:root {
  --paper: #ffffff;
  --ink: #1c2a35;
  --muted: #5e6b74;
  --rule: #e2e6e9;
  --green: #1f6b52;
  --mango: #e9a800;
  --mango-soft: #fdf3d6;
  --head: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Literata", Georgia, serif;
  --measure: 38rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a20; --ink: #e4e9ec; --muted: #9aa6ae; --rule: #2a363f;
    --green: #74c9a6; --mango: #f2b705; --mango-soft: #3a3115;
  }
}
:root[data-theme="dark"] {
  --paper: #121a20; --ink: #e4e9ec; --muted: #9aa6ae; --rule: #2a363f;
  --green: #74c9a6; --mango: #f2b705; --mango-soft: #3a3115;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.7 var(--body);
  font-optical-sizing: auto;
}
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; }

/* ---------- home ---------- */
.home-grid {
  max-width: 72rem; margin: 0 auto; padding: 3rem 1rem 2rem;
  display: grid; gap: 2rem 4rem;
  grid-template-columns: 1fr;
  grid-template-areas: "map" "list";
}

/* Photo header: Colombian flag, darkened so white type stays readable. */
.hero {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(12, 20, 27, .35) 0%, rgba(12, 20, 27, .55) 55%, rgba(12, 20, 27, .82) 100%),
    url("/photos/dscn1439-01.jpg") center 30% / cover no-repeat #1c2a35;
}
.intro { max-width: 72rem; margin: 0 auto; padding: 5rem 1rem 3rem; }
.hero .site-title { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero .lede { color: #f1f4f5; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero .lede-links a { color: #fff; text-decoration-color: var(--mango); text-decoration-thickness: 2px; }
.hero .lede-links a:hover { text-decoration-thickness: 3px; }
.site-title {
  font-size: clamp(3.5rem, 13vw, 8.5rem); font-weight: 750; line-height: .88;
  letter-spacing: -.045em; margin: 0 0 1.5rem;
  font-variation-settings: "opsz" 96;
}
.lede { font-size: 1.25rem; line-height: 1.55; max-width: 34rem; margin: 0 0 .75rem; }
.lede-links { margin: 0; font-family: var(--head); font-weight: 550; }

.map { grid-area: map; margin: 0; }
.map figcaption { font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.route { width: 100%; max-width: 22rem; height: auto; display: block; overflow: visible; }
.route .line { fill: none; stroke: var(--mango); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.route .eq { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 4; }
.route .geo { font: italic 400 10px var(--body); fill: var(--muted); }
.route .stop circle { fill: var(--paper); stroke: var(--mango); stroke-width: 2.5; transition: fill .15s; }
.route .stop .num { font: 700 9.5px var(--head); fill: var(--ink); pointer-events: none; }
.route .stop .place { font: 550 11.5px var(--head); fill: var(--ink); }
.route .stop:hover circle, .route .stop.on circle, .route .stop:focus-visible circle { fill: var(--mango); }
.route .stop:focus-visible { outline: none; }
.route .stop:focus-visible .place, .route .stop.on .place { text-decoration: underline; }

.entries { grid-area: list; list-style: none; margin: 0; padding: 0; }
.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry a { display: flex; gap: 1.25rem; padding: 1.4rem 0; color: inherit; text-decoration: none; }
.entry-n {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 2.5px solid var(--mango); display: grid; place-items: center;
  font: 700 .95rem/1 var(--head); margin-top: .2rem; transition: background .15s;
}
.entry a:hover .entry-n, .entry.on .entry-n { background: var(--mango); color: #1c2a35; }
.entry-main { display: flex; flex-direction: column; min-width: 0; }
.entry-place { font: 500 .9rem/1.4 var(--head); color: var(--muted); }
.entry-title { font: 650 1.45rem/1.2 var(--head); letter-spacing: -.01em; margin: .2rem 0 .45rem; }
.entry a:hover .entry-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; text-decoration-color: var(--mango); }
.entry-ex { font-size: 1rem; line-height: 1.6; color: var(--ink); max-width: 36rem; }
.entry-meta { font: 500 .85rem var(--head); color: var(--muted); margin-top: .5rem; }

@media (min-width: 56rem) {
  .home-grid {
    padding-top: 4rem;
    grid-template-columns: 20rem 1fr;
    grid-template-areas: "map list";
  }
  .map { position: sticky; top: 2rem; align-self: start; }
  .intro { display: grid; grid-template-columns: 20rem 1fr; gap: 0 4rem; padding: 8rem 1rem 4rem; }
  .site-title { grid-column: 1 / -1; margin: 0 0 2rem; }
  .lede, .lede-links { grid-column: 2; }
}
@media (max-width: 55.99rem) {
  .route { max-width: 17rem; margin: 0 auto; }
  .map figcaption { text-align: center; }
}

/* ---------- article ---------- */
.mast { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1rem 0; }
.mast-name { font: 750 1.15rem var(--head); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.mast-name:hover { color: var(--green); }
.post main { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }
.post-head { margin: 3.5rem 0 2.5rem; }
.post-where { font: 550 .95rem var(--head); color: var(--muted); margin: 0 0 .75rem; display: flex; align-items: center; gap: .6rem; }
.post-n {
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 2.5px solid var(--mango);
  display: inline-grid; place-items: center; font: 700 .8rem/1 var(--head); color: var(--ink);
}
.post-head h1 { font-size: clamp(2.1rem, 6vw, 3.25rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 700; }
.post-meta { font: 500 .95rem var(--head); color: var(--muted); margin: 0; }

.prose { font-size: 1.1875rem; line-height: 1.75; }
.prose p { margin: 0 0 1.35em; }
.prose h3, .prose h4 { font-size: 1.4rem; margin: 2.2em 0 .6em; }
.prose h4 { font-size: 1.2rem; }
.prose > p:first-child::first-line { font-variant-caps: small-caps; letter-spacing: .02em; }

.video { margin: 2rem 0; }
.yt { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 4px; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 4.25rem; height: 4.25rem; translate: -50% -50%;
  border-radius: 50%; background: var(--mango);
}
.yt-play::after {
  content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%;
  border-style: solid; border-width: .75rem 0 .75rem 1.2rem; border-color: transparent transparent transparent #1c2a35;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.comments { margin: 3.5rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.comments h2 { font-size: 1.3rem; margin: 0 0 1.5rem; }
.comment { margin: 0 0 1.5rem; padding-left: 1rem; border-left: 3px solid var(--mango-soft); font-size: 1rem; line-height: 1.6; }
.comment p { margin: 0 0 .5rem; }
.c-who { font-family: var(--head); font-size: .95rem; }
.c-who time { color: var(--muted); margin-left: .4rem; }
.c-closed { font: 500 .9rem var(--head); color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 3.5rem 0 0; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.pager a { font: 600 1.05rem/1.3 var(--head); text-decoration: none; color: var(--ink); }
.pager a span { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.pager a:hover { color: var(--green); }
.pager .next { text-align: right; }

/* ---------- photos ---------- */
.photos main { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.photos .post-head { max-width: var(--measure); }
.gallery { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.gallery li { flex: calc(var(--ar) * 12) 1 calc(var(--ar) * 11rem); }
.gallery a { display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar); border-radius: 2px; }
.gallery::after { content: ""; flex: 999 1 0; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(10, 16, 20, .92); }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; height: auto; }
.lightbox button {
  position: fixed; top: 50%; translate: 0 -50%; width: 3rem; height: 3rem; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font: 600 1.4rem/1 var(--head); cursor: pointer;
}
.lightbox .lb-prev { left: 1rem; } .lightbox .lb-next { right: 1rem; }
.lightbox .lb-close { top: 1.5rem; translate: none; right: 1rem; }

/* ---------- footer ---------- */
.foot { max-width: 72rem; margin: 4rem auto 0; padding: 2rem 1rem 3rem; border-top: 1px solid var(--rule); font: 500 .9rem var(--head); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.foot p { margin: 0; }
.foot a { margin-left: 1rem; }
.post .foot { max-width: var(--measure); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
