:root {
  /* Light page palette (dark hero is overridden locally). */
  --bg: #fafaf7;
  --bg-alt: #ffffff;
  --surface: #f0efe9;
  --ink: #1a1c1b;
  --ink-soft: #4f5552;
  --muted: #8a8e88;
  --hair: #e4e4de;
  --hair-strong: #cbcbc4;
  --green: #4a7a57;
  --blue: #345f7e;
  --accent: #8a6d3f;

  /* Nav colors (vary in dark mode) */
  --nav-bg: rgba(250,250,247,0.92);

  --max: 1440px;
  --gutter: 32px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Dark surface override — used on /personal/* and for any other dark page. */
body.dark {
  --bg: #0c0d0d;
  --bg-alt: #121414;
  --surface: #1a1d1c;
  --ink: #ededea;
  --ink-soft: #b9bbb6;
  --muted: #7d807a;
  --hair: #1f2220;
  --hair-strong: #2b2f2c;
  --green: #8fb59a;
  --blue: #8fb0c4;
  --accent: #c9d3c0;
  --nav-bg: rgba(12,13,13,0.85);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  font-size: 16px;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color .2s, opacity .2s;
}
a:hover { opacity: 0.7; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 780px; }

/* NAV — minimal, fixed, always solid */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 12px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
  transition: background .3s, border-color .3s;
  color: var(--ink);
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
}
body.dark .nav.scrolled { color: var(--ink); }
/* Brand lockup: SVG mark + wordmark, tight, line-art -> color on hover. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
  border: none;
  transition: opacity .2s;
  opacity: 0.85;
}
.brand:hover { opacity: 1; }

.logo-mark {
  width: 38px;
  height: 38px;
  color: inherit;  /* inherits from nav (light over hero, dark when scrolled) */
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  flex-shrink: 0;
}
.logo-mark .lm-ring,
.logo-mark .lm-sun,
.logo-mark .lm-peaks,
.logo-mark .lm-trail {
  transition: stroke .35s ease, fill .35s ease, opacity .35s ease;
}
.logo-mark .lm-ring {
  fill: transparent;
}
.logo-mark .lm-sun {
  fill: transparent;
}
.logo-mark .lm-trail {
  stroke-dasharray: 1 2.6;
  opacity: 0.55;
}

/* Hover: ring fills warm amber, scene inverts to dark strokes, sun goes white. */
.brand:hover .logo-mark { transform: translateY(-1px) rotate(-2deg) scale(1.06); }
.brand:hover .lm-ring   { fill: #e9b96a; stroke: #e9b96a; }
.brand:hover .lm-sun    { fill: #ffffff; stroke: #0c0d0d; }
.brand:hover .lm-peaks  { stroke: #0c0d0d; }
.brand:hover .lm-trail  { stroke: #0c0d0d; opacity: 0.9; }

.brand-word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 25px;
  letter-spacing: 0.005em;
  color: inherit;  /* picks up nav's light/dark color */
  white-space: nowrap;
  transform: translateY(-1px);
}
@media (max-width: 780px) {
  .logo-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 21px; }
  .brand { gap: 10px; }
}

.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); opacity: 1; }
.nav-links .cta {
  padding: 9px 16px;
  font-size: 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  color: var(--ink-soft);
}
.nav-links .cta:hover { border-color: var(--ink-soft); color: var(--ink); opacity: 1; }

/* Scrolled over light body: dark ink using page palette */
.nav.scrolled .nav-links a { color: var(--ink-soft); }
.nav.scrolled .nav-links a:hover { color: var(--ink); }
.nav.scrolled .nav-links .cta { color: var(--ink-soft); border-color: var(--hair-strong); }
.nav.scrolled .nav-links .cta:hover { color: var(--ink); border-color: var(--ink-soft); }

/* Dark surface override for nav-in-scrolled-state */
body.dark .nav.scrolled .nav-links a { color: var(--ink-soft); }
body.dark .nav.scrolled .nav-links a:hover { color: var(--ink); }
body.dark .nav.scrolled .nav-links .cta { color: var(--ink-soft); border-color: var(--hair-strong); }
body.dark .nav.scrolled .nav-links .cta:hover { color: var(--ink); border-color: var(--ink-soft); }

/* HERO — full-bleed cinematic, sits flush below the fixed nav */
:root { --nav-h: 62px; }
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  min-height: 580px;
  margin-top: var(--nav-h);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background: #0c0d0d;
}
.hero-media .hero-slide {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  will-change: opacity;
}
.hero-media .hero-slide.active { opacity: 1; }
/* ──────────────────────────────────────────────────────────────────
   HERO IMAGE + TEXT LEGIBILITY · shared pattern
   Any hero that overlays typography on a photograph uses this treatment:
     ① Left-anchored scrim  — darkens the text column regardless of photo
     ② Bottom-up scrim      — ensures headline area stays readable
     ③ Radial halo behind the headline — a soft grounding wash that
       doesn't read as a hard rectangular box
     ④ Robust text shadows on headline + kicker/eyebrow + lede
   Current hosts: .hero-media (homepage), .detail-hero (trip/project).
   To add a new hero, include its selector in each group below. No new
   values should be needed. ─────────────────────────────────────────── */

/* ① + ② — the two linear scrims. Applied to the image-layer element. */
.hero-media::after,
.detail-hero::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.28) 45%, rgba(0,0,0,0) 75%),
    linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.62) 70%, rgba(0,0,0,0.93) 100%);
}

/* ③ — radial halo behind the headline. Applied to the hero container. */
.hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  left: 0; right: 40%;
  bottom: 0;
  height: 58%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse at 25% 85%,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.38) 40%,
    rgba(0,0,0,0) 75%
  );
}

/* ④ — text shadow recipe for any headline/kicker/lede sitting over a photo. */
.hero-content h1,
.detail-hero-content h1 {
  text-shadow: 0 1px 3px rgba(0,0,0,0.55), 0 2px 28px rgba(0,0,0,0.55);
}
.hero-content p,
.hero-content .eyebrow,
.detail-hero-content p,
.detail-hero-content .kicker {
  text-shadow: 0 1px 3px rgba(0,0,0,0.65), 0 2px 14px rgba(0,0,0,0.45);
}
.hero-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237,237,234,0.7);
  transition: opacity .4s;
}
.hero-credit a { color: rgba(237,237,234,0.85); border-bottom: 1px solid rgba(255,255,255,0.2); }
.hero-credit a:hover { color: #fff; opacity: 1; }
@media (max-width: 780px) {
  .hero-credit { right: 20px; bottom: 16px; font-size: 9px; }
}
.hero-placeholder {
  width: 100%; height: 100%;
  background:
    radial-gradient(1200px 600px at 65% 30%, rgba(143,181,154,0.25), transparent 60%),
    radial-gradient(900px 500px at 20% 80%, rgba(143,176,196,0.2), transparent 55%),
    linear-gradient(160deg, #0e1614 0%, #141a1c 40%, #0b0f10 100%);
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) 48px;
  z-index: 2;
}
.hero-content .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e9b96a;  /* warm amber, readable over any photo */
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 14ch;
  color: #f6f6f2;
}
/* Text shadows come from the shared HERO IMAGE pattern above. */
.hero-content h1 em { font-style: italic; color: #e9b96a; }
.hero-content p {
  max-width: 560px;
  color: rgba(237,237,234,0.82);
  font-size: clamp(15px, 1.2vw, 17px);
  margin: 0;
}
.hero-scroll {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(237,237,234,0.7);
}

/* CAROUSEL of destinations */
.collection {
  padding: 56px 0 40px;
  border-top: 1px solid var(--hair);
}
.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 var(--gutter);
  margin: 0 auto 24px;
  max-width: var(--max);
  gap: 24px;
  flex-wrap: wrap;
}
.collection-head .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.collection-head h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.005em;
  margin: 8px 0 0;
}
.collection-head h2 em { font-style: italic; color: var(--accent); }
.collection-head-right {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.see-all-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
  text-decoration: none;
}
.see-all-link:hover { color: var(--green); border-color: var(--green); opacity: 1; }
body.dark .see-all-link { color: var(--ink); border-color: var(--ink); }

/* Terminal "See all" card inside a carousel. */
.dest.dest--see-all .dest-image {
  background: var(--bg-alt);
  border: 1px solid var(--hair-strong);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  text-align: center;
  transition: border-color .25s, background .25s;
  background-image: none;
}
.dest.dest--see-all:hover .dest-image {
  border-color: var(--green);
  background: #ffffff;
  transform: none;
}
body.dark .dest.dest--see-all:hover .dest-image {
  background: var(--surface);
}
.dest.dest--see-all:hover { transform: none; }
.dest.dest--see-all .sa-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.dest.dest--see-all .sa-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 42px;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.dest.dest--see-all .sa-title em { color: var(--green); font-style: italic; }
.dest.dest--see-all .sa-arrow {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 36px;
  color: var(--ink-soft);
  transition: color .25s, transform .25s;
}
.dest.dest--see-all:hover .sa-arrow { color: var(--green); transform: translateX(4px); }
.dest.dest--see-all .dest-meta .dest-name {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* DETAIL HERO — full-bleed cover image */
.detail-hero {
  position: relative;
  height: 78vh;
  min-height: 560px;
  background-color: #0b0d0f;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 140px var(--gutter) 48px;
}
/* .detail-hero scrim + halo come from the shared HERO IMAGE pattern above. */
.detail-hero-content {
  position: relative;
  width: 100%;
  z-index: 2;
  color: #fff;
}
/* Text shadows come from the shared HERO IMAGE pattern; type sizing only here. */
.detail-hero-content .kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e9b96a;
  margin-bottom: 22px;
}
.detail-hero-content h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 6.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: #f6f6f2;
}
.detail-hero-content h1 em { color: #e9b96a; font-style: italic; }
.detail-hero-content p {
  max-width: 640px;
  color: rgba(255,255,255,0.94);
  font-size: 17px;
  margin: 0;
}

@media (max-width: 780px) {
  .detail-hero { height: 60vh; min-height: 380px; padding: 100px 20px 40px; }
}

/* TRIP CONTENT SECTIONS ─────────────────────────────────────────── */
.trip-section {
  border-top: 1px solid var(--hair);
}
.trip-section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px var(--gutter) 40px;
}
.trip-section-head {
  margin-bottom: 28px;
}
/* Label ("Phase One", "Trip Summary") — readable, 36px, sits above the title */
.trip-section-head .kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: none;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: block;
}
/* Title ("Five Phases. 31 Days.", "Avalanche Course.") — the lead, darker and larger */
.trip-section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 5.5vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
}
.trip-section-head h2 em { font-style: italic; color: var(--blue); }
.trip-body {
  max-width: 700px;
}
.trip-body p {
  font-size: 18px;
  line-height: 1.78;
  color: var(--ink);
  margin: 0 0 20px;
}
.trip-body p:last-child { margin-bottom: 0; }
.trip-body p.placeholder-text {
  color: var(--muted);
  font-style: italic;
}

/* TRIP PHOTO GALLERY ─────────────────────────────────────────────── */
.trip-gallery-section {
  border-top: 1px solid var(--hair);
}
.trip-gallery-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--gutter) 32px;
}
.trip-gallery-head .kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: none;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: block;
}
.trip-gallery-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 5.5vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
}
.trip-gallery-head h2 em { font-style: italic; color: var(--blue); }
.trip-gallery-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 40px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}
.trip-gallery-scroll::-webkit-scrollbar { display: none; }
.trip-gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: transparent;
  display: flex;
  flex-direction: column;
  border: none;
  padding: 0;
  outline: none;
  cursor: zoom-in;
  text-align: left;
}
.trip-gallery-img-wrap {
  height: 280px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.trip-gallery-img-wrap img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.trip-gallery-item:hover .trip-gallery-img-wrap img {
  transform: scale(1.03);
}
.trip-gallery-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  line-height: 1.5;
  padding: 10px 4px 0;
  max-width: 300px;
}
.trip-gallery-item.placeholder {
  width: 320px;
  height: 280px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #eae8df, #d9d6ca);
  cursor: default;
}
.trip-gallery-item.placeholder .ph-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 48px;
  color: rgba(26,28,27,0.22);
}
.trip-gallery-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-align: center;
  padding: 0 var(--gutter) 48px;
  font-style: italic;
}

/* TRIP MAP — animated route section on trip detail pages */
.trip-map-section {
  border-top: 1px solid var(--hair);
  margin-top: 24px;
}
.trip-map-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 28px var(--gutter) 12px;
  max-width: var(--max);
  margin: 0 auto;
}
#trip-map {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--max);
  margin: 0 auto;
  height: 520px;
  display: block;
}
.trip-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}
.trip-stat {
  padding: 24px 28px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.trip-stat + .trip-stat { border-left: 1px solid var(--hair); }
.trip-stat-n {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 56px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.trip-stat-l {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 8px;
}

/* Map pin markers */
.map-pin {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.map-pin-dot {
  width: 10px;
  height: 10px;
  background: #e9b96a;
  border: 2px solid #1a1c1b;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform .2s ease;
}
.map-pin:hover .map-pin-dot { transform: scale(1.5); }
.map-pin--home .map-pin-dot {
  background: #4a7a57;
  width: 12px;
  height: 12px;
  border-color: #fff;
}

/* Mapbox popup overrides */
.mapboxgl-popup.trip-popup .mapboxgl-popup-content {
  background: var(--bg-alt);
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 170px;
}
.mapboxgl-popup.trip-popup .mapboxgl-popup-tip { display: none; }
.trip-popup-content strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.trip-popup-content span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}
.trip-popup-content em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ARCHIVE GRID — used on /trips/ and /projects/ index pages */
.archive-head {
  padding: 96px var(--gutter) 12px;
  max-width: var(--max);
  margin: 0 auto;
}
.archive-head .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.archive-head h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.archive-head h1 em { font-style: italic; color: var(--green); }
.archive-head p {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0;
}
.archive-head .count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 24px;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 72px;
}
.archive-grid .dest {
  width: auto;
  flex: 1 1 auto;
}
.archive-section-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: -8px;
}

.collection-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carousel-wrap {
  position: relative;
}
.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 var(--gutter) 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }

.dest {
  flex: 0 0 auto;
  width: min(50vw, 340px);
  scroll-snap-align: start;
  position: relative;
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.dest:hover { opacity: 1; }
.dest-image {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  transition: transform .4s ease;
}
.dest:hover .dest-image { transform: translateY(-4px); }
.dest-image img { width: 100%; height: 100%; object-fit: cover; }
.dest-image.placeholder {
  background-image:
    radial-gradient(600px 400px at 30% 30%, var(--tint-a, rgba(74,122,87,0.30)), transparent 60%),
    radial-gradient(500px 300px at 80% 80%, var(--tint-b, rgba(52,95,126,0.25)), transparent 55%),
    linear-gradient(160deg, #eae8df 0%, #d9d6ca 100%);
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.dest-image.placeholder .ph-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 72px;
  line-height: 1;
  color: rgba(26,28,27,0.28);
}
/* Dark surfaces (personal pages) get the old darker placeholder treatment. */
body.dark .dest-image.placeholder {
  background-image:
    radial-gradient(600px 400px at 30% 30%, var(--tint-a, rgba(143,181,154,0.35)), transparent 60%),
    radial-gradient(500px 300px at 80% 80%, var(--tint-b, rgba(143,176,196,0.3)), transparent 55%),
    linear-gradient(160deg, #10201b, #14222a);
}
body.dark .dest-image.placeholder .ph-num { color: rgba(255,255,255,0.35); }
.dest-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 14px;
  gap: 5px;
}
#carousel-projects .dest-meta { display: none; }
.dest-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.dest-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
.dest-status.visited { color: var(--green); }
.dest-status.soon { color: var(--blue); }

.carousel-controls {
  display: flex;
  gap: 8px;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 24px auto 0;
  justify-content: flex-end;
}
.carousel-btn {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s, color .2s;
  font-family: var(--font-mono);
}
.carousel-btn:hover { border-color: var(--ink-soft); color: var(--ink); }

/* SIMPLE PAGE SECTIONS (for /about, /writing) */
.page-hero {
  padding: 120px var(--gutter) 52px;
  max-width: 900px;
  margin: 0 auto;
}
.page-hero .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
.page-hero h1 em { font-style: italic; color: var(--accent); }
.page-hero p.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0;
}

.page-body {
  padding: 32px var(--gutter) 72px;
  max-width: 720px;
  margin: 0 auto;
}
.page-body p {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.75;
  margin: 0 0 22px;
}
.page-body p.muted { color: var(--ink-soft); }

/* POSTS (writing page) */
.posts-list { display: grid; gap: 0; max-width: 900px; margin: 0 auto; padding: 0 var(--gutter); }
.post {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--hair);
  align-items: baseline;
}
.posts-list .post:last-child { border-bottom: 1px solid var(--hair); }
.post .date { font-family: var(--font-mono); color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.post h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  margin: 0;
  color: var(--ink);
}
.post .read { font-family: var(--font-mono); color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.post:hover h3 { color: var(--accent); }

/* CONTACT block on home */
.contact-strip {
  padding: 52px var(--gutter);
  border-top: 1px solid var(--hair);
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.contact-strip h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  margin: 0;
  letter-spacing: -0.005em;
}
.contact-strip h3 em { font-style: italic; color: var(--accent); }
.contact-links { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.contact-links a { color: var(--ink-soft); }
.contact-links a:hover { color: var(--ink); opacity: 1; }

/* FOOTER */
.footer {
  padding: 28px var(--gutter) 32px;
  border-top: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); opacity: 1; }

/* LOGIN / PERSONAL (dark) */
.centered-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--bg-alt);
  border: 1px solid var(--hair);
  border-radius: 6px;
}
.login-card h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--ink);
}
.login-card h1 em { font-style: italic; color: var(--accent); }
.login-card p { color: var(--ink-soft); margin: 0 0 28px; font-size: 14px; }
.login-card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--hair-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 14px;
  font-family: var(--font-sans);
}
.login-card input:focus { outline: none; border-color: var(--ink-soft); }
.login-card .error { color: #d48a76; font-size: 13px; min-height: 18px; margin-bottom: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
}
.btn:hover { border-color: var(--ink-soft); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* DASHBOARD (dark) */
.dash-header {
  padding: 140px var(--gutter) 40px;
  max-width: var(--max);
  margin: 0 auto;
  border-bottom: 1px solid var(--hair);
}
.dash-header .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.dash-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.01em;
  margin: 0;
}
.dash-title em { font-style: italic; color: var(--accent); }
.dash-sub { color: var(--ink-soft); margin: 12px 0 0; font-size: 16px; max-width: 560px; }
.dash-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pill.live { color: var(--green); border-color: var(--green); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: var(--max);
  margin: 48px auto 72px;
  padding: 0 var(--gutter);
  gap: 0;
}
.stat {
  padding: 28px 24px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.stat + .stat { border-left: 1px solid var(--hair); }
.stat .n {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 36px;
  color: var(--ink);
}
.stat .l {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 4px;
}

.feed-list { display: grid; gap: 0; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 80px; }
.feed-item {
  padding: 28px 0;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: baseline;
}
.feed-list .feed-item:last-child { border-bottom: 1px solid var(--hair); }
.feed-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  line-height: 1.8;
}
.feed-meta .agent { color: var(--blue); display: block; text-transform: uppercase; }
.feed-meta .date { display: block; }
.feed-body h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--ink);
}
.feed-body p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 640px; }

/* RESPONSIVE */
@media (max-width: 780px) {
  .nav { padding: 18px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.cta) { display: none; }
  .nav-links .cta { display: inline-flex; }
  .hero-content { padding-bottom: 56px; padding-left: 20px; padding-right: 20px; }
  .collection-head { padding: 0 20px; }
  .carousel { padding-left: 20px; padding-right: 20px; }
  .carousel-controls { padding: 0 20px; }
  .dest { width: 72vw; }
  .post { grid-template-columns: 100px 1fr; }
  .post .read { display: none; }
  .feed-item { grid-template-columns: 1fr; gap: 6px; }
  .contact-strip { grid-template-columns: 1fr; }
  .page-hero { padding-top: 130px; padding-left: 20px; padding-right: 20px; }
  .page-body { padding-left: 20px; padding-right: 20px; }
}

/* ── LIGHTBOX ─────────────────────────────────────────────────────────── */
.lb-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(12,13,13,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: auto;
}
body.lb-active { overflow: hidden; }

.lb-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 80px);
}
.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 3px;
  opacity: 0;
  transition: opacity .2s ease;
}
.lb-img.lb-img-visible { opacity: 1; }

.lb-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  min-height: 36px;
}
.lb-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(237,237,234,0.75);
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}
.lb-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(237,237,234,0.35);
}
.lb-prev, .lb-next {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(237,237,234,0.2);
  background: transparent;
  color: rgba(237,237,234,0.7);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s, color .2s;
}
.lb-prev:hover, .lb-next:hover {
  border-color: rgba(237,237,234,0.7);
  color: #ededea;
}
.lb-close {
  position: fixed;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(237,237,234,0.2);
  background: transparent;
  color: rgba(237,237,234,0.6);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s, color .2s;
  line-height: 1;
}
.lb-close:hover { border-color: rgba(237,237,234,0.6); color: #ededea; }

@media (max-width: 600px) {
  .lb-frame { max-width: 100vw; max-height: calc(100vh - 100px); }
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 16px; }
  .lb-prev { position: fixed; left: 8px; }
  .lb-next { position: fixed; right: 8px; }
}
