/* ==========================================================================
   Abhishek Pahari — "The Ascent", minimal.
   Kathmandu (1,400 m) → Summit (8,849 m). Scroll is the climb.
   ========================================================================== */

:root {
  --bg: #0b0b0a;
  --surface: #151513;
  --ink: #f2ede4;
  --ink-2: rgba(242, 237, 228, 0.62);
  --ink-3: rgba(242, 237, 228, 0.38);
  --line: rgba(242, 237, 228, 0.1);
  --accent: #ff7a1a; /* sayapatri — the marigold strung for Tihar */
  --accent-ink: #120a03;
  --contour: #f2ede4; /* the map's lines */
  --edge: rgba(242, 237, 228, 0.42); /* hairline boxes: the radio, keys, buttons */
  --snow: #f2ede4;

  /* prayer flags: sky, air, fire, water, earth */
  --flag-blue: #2f6fe0;
  --flag-white: #efe9df;
  --flag-red: #e0412e;
  --flag-green: #1f9a57;
  --flag-yellow: #f1b51c;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-deva: "Tiro Devanagari Hindi", "Kohinoor Devanagari", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.35, 0.64, 1);
  --morph: cubic-bezier(0.32, 1.28, 0.5, 1);
  --morph: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067, 1.093 24%, 1.098 25.6%, 1.091 27.8%, 1.063 31.2%, 1.006 39.2%, 0.989 43.3%, 0.983 47%, 0.987 52.9%, 0.999 63.3%, 1.002 71.4%, 1);
  --gutter: clamp(20px, 5vw, 72px);
}
/* Light is the default: a paper trail map, brown contours, cold grey snow. */
[data-theme="light"] {
  --bg: #f2ede3;
  --surface: #e7e0d3;
  --ink: #161412;
  --ink-2: rgba(22, 20, 18, 0.66);
  --ink-3: rgba(22, 20, 18, 0.42);
  --line: rgba(22, 20, 18, 0.12);
  --accent: #e45d0a;
  --accent-ink: #fff8f1;
  --contour: #7b4a22;
  --edge: #161412;
  --snow: #8fa3b8;
  --flag-white: #fffdf8;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--f-display); font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  transition: background 0.5s, color 0.5s;
}
[data-theme="light"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ol, figure, blockquote { margin: 0; }
ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 400; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.skip:focus { top: 12px; }

.mono { font-family: var(--f-mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.02em; text-transform: uppercase; }
.eyebrow { display: flex; gap: 10px; align-items: center; color: var(--ink-2); margin-bottom: 28px; }
.eyebrow b { color: var(--accent); font-weight: 500; }
.eyebrow i { font-style: normal; color: var(--ink-3); }
.h2 { font-size: clamp(40px, 5.6vw, 88px); line-height: 0.95; font-weight: 500; letter-spacing: -0.045em; font-variation-settings: "wdth" 112; }
.h2 em, .hero__line em, .contact__title em, .statement .em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--accent); font-variation-settings: normal; }
/* Keys: hairline boxes with mono labels. Hover paints them orange, left to right. */
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 3px;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 0% 100% no-repeat var(--ink); color: var(--bg);
  font: 500 12px/1 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  transition: background-size 0.45s var(--ease), color 0.2s, border-color 0.2s;
}
.btn::after { content: "→"; transition: translate 0.35s var(--spring); }
.btn[target="_blank"]::after { content: "↗"; }
.btn:hover { background-size: 100% 100%; border-color: var(--accent); color: var(--accent-ink); }
.btn:hover::after { translate: 3px 0; }
.btn--ghost { background-color: transparent; color: var(--ink); border-color: var(--edge); }

/* reveals */
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }

/* -------------------------------------------------------------------------- */
/* Nav                                                                        */
/* -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -0.01em; }
.nav__brand svg { width: 26px; height: 26px; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav__links a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav__links a:hover, .nav__links a.is-on { color: var(--ink); }
.nav__theme { height: 30px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 3px; color: var(--ink-2); transition: color 0.2s, border-color 0.2s; }
.nav__theme:hover { color: var(--accent); border-color: var(--accent); }

/* altimeter: a thin rail on the right, and where you are */
.alt { position: fixed; right: 22px; top: 50%; z-index: 40; translate: 0 -50%; height: 46vh; display: flex; align-items: center; pointer-events: none; }
.alt__rail { position: relative; width: 1px; height: 100%; background: var(--line); }
.alt__rail i { position: absolute; left: 0; bottom: 0; width: 1px; height: var(--p, 0%); background: var(--accent); }
.alt__rail i::after { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.alt__label { position: absolute; right: 14px; bottom: var(--p, 0%); translate: 0 50%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; color: var(--ink-3); }
.alt__label b { color: var(--ink); font-weight: 500; }
.alt { transition: opacity 0.4s var(--ease); }
.alt.is-away { opacity: 0; }

/* -------------------------------------------------------------------------- */
/* 01 Kathmandu                                                               */
/* -------------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; padding: 112px var(--gutter) 0; display: flex; flex-direction: column; overflow: hidden; touch-action: pan-y; }
.terrain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero > :not(.terrain):not(.hero__readout) { position: relative; z-index: 1; }
.hero__readout { position: absolute; left: 0; top: 0; z-index: 2; padding: 6px 9px; border-radius: 6px; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; pointer-events: none; transform: translate(var(--x, 0), var(--y, 0)); transition: opacity 0.3s; white-space: nowrap; }
.hero__readout.show { opacity: 1; }
/* the words stay small and up top; the name below is the hero */
.hero__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: end; }
.hero__top .eyebrow { grid-column: 1 / -1; }
.hero__line { font-size: clamp(28px, 3vw, 46px); line-height: 1; letter-spacing: -0.035em; font-weight: 400; font-variation-settings: "wdth" 106; max-width: 15ch; }
.hero__sub { max-width: 32ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.hero__go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.hero__go span.mono { color: var(--ink-3); white-space: nowrap; }
.hero__go { flex-wrap: nowrap; gap: 12px; }
.hero__or { color: var(--ink-3); font-size: 13px; }
.ptt--solo[hidden] + .hero__or { display: none; }
.hero__name {
  margin-top: auto; padding: 0.1em 0 0.02em; display: flex; flex-direction: column; width: 100%;
  line-height: 0.84; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; user-select: none;
}
.hero__name .row { display: flex; width: max-content; }
.hero__name .l { display: inline-block; font-variation-settings: "wdth" var(--w, 100), "wght" 700; }
.js .hero__name .l { opacity: 0; transform: translateY(40%); }
.hero__name.in .l { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i) * 40ms); }

/* -------------------------------------------------------------------------- */
/* Sections                                                                   */
/* -------------------------------------------------------------------------- */
.sec { position: relative; max-width: 1440px; margin: 0 auto; padding: clamp(110px, 16vh, 190px) var(--gutter) 0; }

/* 02 Lukla */
.statement { font-size: clamp(30px, 4.4vw, 72px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; font-variation-settings: "wdth" 104; max-width: 26ch; }
.statement .w { opacity: 0.14; transition: opacity 0.45s var(--ease); }
.statement .w.on { opacity: 1; }
.path { margin-top: clamp(60px, 9vw, 120px); border-top: 1px solid var(--line); }
.path li { display: grid; grid-template-columns: 160px 1fr auto; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.path .mono { color: var(--ink-3); }
.path b { font-size: clamp(20px, 2vw, 26px); font-weight: 500; letter-spacing: -0.02em; }
.path span:last-child { color: var(--ink-2); font-size: 15px; }
.path li.is-now .mono { color: var(--accent); }

/* 03 Namche — routes I've climbed: big names, each with its own ridge */
.routes { margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.route {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(150px, 280px) 110px 20px; gap: 32px; align-items: center;
  width: 100%; padding: 30px 0; border-bottom: 1px solid var(--line); text-align: left;
}
.route__n { align-self: start; padding-top: 0.6em; color: var(--ink-3); }
.route__name strong { display: block; font-size: clamp(36px, 4.6vw, 72px); font-weight: 500; line-height: 0.95; letter-spacing: -0.045em; font-variation-settings: "wdth" 112; transition: translate 0.5s var(--ease); }
.route__name span { display: block; margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.route:hover .route__name strong, .route:focus-visible .route__name strong { translate: 10px 0; }
.route__ridge { position: relative; height: 52px; }
.route__ridge svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route__ridge path { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route__ridge svg.hi path { stroke: var(--accent); stroke-width: 1.75; }
/* drawn left to right: in grey as the route arrives, in orange on hover */
.route__ridge svg { clip-path: inset(-20% -2% -20% 0); }
.js .route:not(.in) .route__ridge svg, .route__ridge svg.hi { clip-path: inset(-20% 102% -20% 0); }
.route.in .route__ridge svg { transition: clip-path 1.4s var(--ease); }
.route.in .route__ridge svg.hi { transition: clip-path 0.8s var(--ease); }
.route:hover .route__ridge svg.hi, .route:focus-visible .route__ridge svg.hi { clip-path: inset(-20% -2% -20% 0); }
.route__ridge i { position: absolute; font-style: normal; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1.5px var(--ink-3); transition: background 0.25s, box-shadow 0.25s; }
.route:hover .route__ridge i, .route:focus-visible .route__ridge i { background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); transition-delay: calc(var(--x) * 0.55s); }
.route__ridge b { position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; font-weight: 400; font-size: 11px; text-transform: uppercase; white-space: nowrap; color: var(--ink-2); transition: color 0.25s; }
.route:hover .route__ridge b { color: var(--ink); }
/* lit by the voice mode while the twin talks about it */
.route.is-lit .route__name strong { translate: 10px 0; }
.route.is-lit .route__ridge svg.hi { clip-path: inset(-20% -2% -20% 0); }
.route.is-lit .route__ridge i { background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); transition-delay: calc(var(--x) * 0.55s); }
.route.is-lit .route__ridge b { color: var(--ink); }
.route.is-lit .route__go { color: var(--accent); translate: 4px 0; }
.route__meta { display: flex; flex-direction: column; gap: 4px; font-size: 11px; text-transform: uppercase; color: var(--ink-3); }
.route__go { color: var(--ink-3); transition: color 0.2s, translate 0.35s var(--spring); }
.route:hover .route__go, .route:focus-visible .route__go { color: var(--accent); translate: 4px 0; }

/* 04 Tengboche — five camps on one rising line */
.climb { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: clamp(60px, 9vw, 110px); min-height: 380px; align-items: end; }
.climb__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.climb__line path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.camp { position: relative; display: flex; flex-direction: column; gap: 10px; }
.camp:nth-child(2) { margin-bottom: 0; }
.camp:nth-child(3) { margin-bottom: 60px; }
.camp:nth-child(4) { margin-bottom: 120px; }
.camp:nth-child(5) { margin-bottom: 180px; }
.camp:nth-child(6) { margin-bottom: 240px; }
.camp__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px var(--accent); transition: background 0.3s; }
.camp__flag { width: 18px; height: 12px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); margin-top: 6px; transform-origin: 0 100%; }
.camp .mono { color: var(--ink-3); }
.camp b { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -0.03em; font-variation-settings: "wdth" 110; }
.camp p { color: var(--ink-2); font-size: 15px; line-height: 1.45; max-width: 24ch; }
.camp > :not(.camp__dot) { transition: opacity 0.6s var(--ease), scale 0.55s var(--spring); }
.js .camp:not(.on) > :not(.camp__dot) { opacity: 0.18; }
.js .camp:not(.on) .camp__flag { scale: 1 0; }
.camp.on .camp__dot { background: var(--accent); }

/* 05 Dingboche — kind words */
.quote { max-width: 30ch; min-height: 5.4em; font-size: clamp(28px, 3.6vw, 52px); }
.quote blockquote { margin: 0; font-family: var(--f-serif); font-style: italic; font-weight: 400; line-height: 1.12; letter-spacing: -0.02em; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.quote figcaption { margin-top: 26px; color: var(--ink-2); transition: opacity 0.5s; }
.quote figcaption b { color: var(--ink); font-weight: 500; }
.quote.is-swap blockquote { opacity: 0; transform: translateY(10px); }
.quote.is-swap figcaption { opacity: 0; }
.quote__nav { display: flex; gap: 20px; margin-top: 36px; }
.quote__nav button { padding: 8px 0 6px; border-bottom: 2px solid transparent; color: var(--ink-3); transition: color 0.2s, border-color 0.2s; }
.quote__nav button:hover { color: var(--ink); }
.quote__nav button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* 06 Summit */
.contact { padding-bottom: 40px; overflow: hidden; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contact > :not(.snow) { position: relative; }
/* A string of prayer flags across the summit. Say namaste and they snap in the wind. */
.flags { position: absolute !important; left: 0; right: 0; top: 18px; height: 120px; pointer-events: none; }
.flags svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flags path { fill: none; stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.flag { position: absolute; width: 20px; height: 26px; margin-left: -10px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line); transform-origin: 50% 0; animation: flutter 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes flutter { 0%, 100% { rotate: -5deg; skew: 0 2deg; } 50% { rotate: 6deg; skew: 0 -3deg; } }
.flags.is-cheer .flag { animation-duration: 0.45s; }
.namaste { display: flex; align-items: baseline; gap: 16px; margin-bottom: 6px; font-family: var(--f-deva); font-size: clamp(28px, 3vw, 44px); color: var(--ink-2); text-align: left; }
.namaste span { transition: color 0.25s; }
.namaste i { font-style: normal; color: var(--ink-3); transition: color 0.25s; }
.namaste:hover span, .namaste:focus-visible span { color: var(--accent); }
.namaste:hover i { color: var(--ink); }
.contact__title { font-size: clamp(56px, 10.5vw, 190px); line-height: 0.9; font-weight: 500; letter-spacing: -0.055em; font-variation-settings: "wdth" 110; max-width: 9ch; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 48px; }
.email { display: inline-flex; align-items: stretch; min-height: 48px; border: 1px solid var(--edge); border-radius: 3px; font-size: 17px; }
.email span { display: flex; align-items: center; padding: 0 18px; }
.email i { display: flex; align-items: center; padding: 0 14px; border-left: 1px solid var(--edge); font-style: normal; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 0% 100% no-repeat; transition: background-size 0.45s var(--ease), color 0.2s; }
.email:hover i { background-size: 100% 100%; color: var(--accent-ink); }
.contact__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; }
.contact__links a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.contact__links a:hover { color: var(--accent); }
.foot { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(100px, 16vh, 180px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); }

/* -------------------------------------------------------------------------- */
/* Case-study sheet                                                           */
/* -------------------------------------------------------------------------- */
.sheet { padding: 0; margin: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; color: var(--ink); overflow: hidden; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet__in { position: absolute; right: 0; top: 0; bottom: 0; width: min(720px, 100%); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); box-shadow: -1px 0 0 var(--line), -30px 0 80px rgba(0, 0, 0, 0.4); }
.sheet[open] .sheet__in { animation: sheet-in 0.6s var(--ease) both; }
.sheet.is-closing .sheet__in { animation: sheet-out 0.3s ease-in forwards; }
@keyframes sheet-in { from { transform: translateX(100%); } }
@keyframes sheet-out { to { transform: translateX(100%); } }
.sheet__x { position: sticky; top: 16px; float: right; margin: 16px 16px 0 0; z-index: 2; width: 40px; height: 40px; border: 1px solid var(--edge); border-radius: 3px; display: grid; place-items: center; background: var(--bg); transition: color 0.2s, border-color 0.2s; }
.sheet__x:hover { color: var(--accent); border-color: var(--accent); }
.sheet__x svg { width: 18px; height: 18px; }
.sheet__body { padding: 28px clamp(22px, 5vw, 56px) 64px; }
.cs-eyebrow { color: var(--ink-2); }
.cs-eyebrow b { color: var(--accent); font-weight: 500; }
.cs-title { margin-top: 18px; font-size: clamp(52px, 8vw, 96px); line-height: 0.9; font-weight: 500; letter-spacing: -0.05em; font-variation-settings: "wdth" 112; }
.cs-line { margin-top: 14px; font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.4vw, 30px); color: var(--ink-2); }
.cs-img { margin: 30px 0 0; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.cs-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.cs-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 30px 0 0; padding: 18px 0; border-block: 1px solid var(--line); }
.cs-facts dt { color: var(--ink-3); }
.cs-facts dd { margin: 6px 0 0; font-size: 16px; }
.cs-sum { margin-top: 28px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.cs-did { margin-top: 22px; padding: 0; list-style: none; display: grid; gap: 10px; }
.cs-did li { display: flex; gap: 12px; font-size: 17px; }
.cs-did li::before { content: "—"; color: var(--accent); }
.cs-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cs-next { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); text-align: left; }
.cs-next b { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; transition: color 0.2s; }
.cs-next:hover b { color: var(--accent); }
.cs-next .mono { color: var(--ink-3); }

.toast { position: fixed; top: 18px; left: 50%; z-index: 160; translate: -50% -12px; padding: 10px 14px; border-radius: 3px; background: var(--ink); color: var(--bg); font: 500 12px/1 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity 0.25s, translate 0.45s var(--spring); }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* -------------------------------------------------------------------------- */
/* The radio — ask the twin, typed or out loud                               */
/* -------------------------------------------------------------------------- */
.radio { --rw: min(440px, calc(100vw - 24px)); position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; translate: -50% 0; transition: translate 0.5s var(--ease), opacity 0.3s; }
.radio.is-away { translate: -50% 150%; opacity: 0; pointer-events: none; }
.radio__dock, .radio__log, .radio__caption { background: var(--bg); color: var(--ink); border: 1px solid var(--edge); border-radius: 4px; box-shadow: 0 22px 40px -22px rgba(40, 24, 8, 0.45); }
[data-theme="light"] .radio__dock, [data-theme="light"] .radio__log, [data-theme="light"] .radio__caption { background-color: #f6f2ea; }

/* the dock: what it'll answer here, and the key you hold to talk */
.radio__dock { display: flex; align-items: stretch; height: 44px; overflow: hidden; }
.radio[data-state="open"] .radio__dock, .radio.has-caption .radio__dock { width: var(--rw); }
.radio__toggle { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 14px; font-size: 14px; font-weight: 500; white-space: nowrap; text-align: left; transition: background 0.2s; }
.radio__toggle:hover { background: var(--surface); }
.ptt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-left: 1px solid var(--edge); white-space: nowrap;
  background: linear-gradient(var(--accent), var(--accent)) 0 0 / 0% 100% no-repeat; color: var(--ink);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  transition: background-size 0.45s var(--ease), color 0.2s;
}
.ptt:hover, .ptt[data-led="listening"] { background-size: 100% 100%; color: var(--accent-ink); }
.ptt--solo { height: 34px; border: 1px solid var(--edge); border-radius: 3px; padding: 0 12px; }
.led { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); transition: background 0.2s; }
.radio[data-led] .radio__toggle .led, [data-led="speaking"] .led { background: var(--accent); }
[data-led="thinking"] .led { animation: pulse 0.9s ease-in-out infinite; }
[data-led="listening"] .led { animation: blink 0.9s steps(1) infinite; }
.ptt:hover .led, .ptt[data-led="listening"] .led { background: var(--accent-ink); }
@keyframes pulse { 50% { opacity: 0.25; } }
@keyframes blink { 50% { opacity: 0; } }

/* captions: the last exchange, above the dock */
.radio__caption { position: relative; display: none; width: var(--rw); padding: 12px 40px 14px 14px; }
.radio.has-caption:not([data-state="open"]) .radio__caption { display: block; animation: rise 0.45s var(--ease) both; }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }
.cap, .entry { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cap + .cap { margin-top: 8px; }
.cap > b, .entry > b { font-weight: 500; color: var(--ink-3); }
.cap--twin > b, .entry--twin > b { color: var(--accent); }
.cap--you span { font-size: 14px; color: var(--ink-2); }
.cap--you span:empty::before { content: attr(data-hint); color: var(--ink-3); }
.cap--twin span { font-size: 18px; line-height: 1.32; letter-spacing: -0.01em; }
.cap__x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; color: var(--ink-3); font-size: 18px; line-height: 1; transition: color 0.2s; }
.cap__x:hover { color: var(--ink); }
.w { opacity: 0.18; transition: opacity 0.2s; }
.w.on { opacity: 1; }

/* follow-ups: plain links, not pills */
.nexts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.radio__caption > .nexts { padding-left: 52px; }
.next { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 4px; transition: color 0.2s, text-decoration-color 0.2s; }
.next::before { content: "→ "; color: var(--accent); }
a.next::after { content: " ↗"; }
.next:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* the log: a transcript, not chat bubbles */
.radio__log { position: absolute; left: 50%; bottom: calc(100% + 8px); display: flex; flex-direction: column; width: var(--rw); height: min(540px, calc(100svh - 140px)); translate: -50% 10px; opacity: 0; visibility: hidden; transition: opacity 0.25s, translate 0.45s var(--ease), visibility 0s 0.45s; }
.radio[data-state="open"] .radio__log { translate: -50% 0; opacity: 1; visibility: visible; transition: opacity 0.3s, translate 0.5s var(--ease), visibility 0s; }
.radio__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.radio__entries { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0 14px; list-style: none; scrollbar-width: thin; }
.entry { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.entry > b { padding-top: 2px; }
.entry--you p { color: var(--ink-2); font-size: 15px; }
.entry--twin p { font-size: 16px; line-height: 1.45; }
.entry__body p + p { margin-top: 6px; }
.entry__body .big { font-size: 34px; line-height: 1.1; }
.entry__body a:not(.next) { color: inherit; text-underline-offset: 3px; }
.entry.is-wait .entry__body::after { content: ""; display: inline-block; width: 8px; height: 16px; background: var(--accent); vertical-align: -2px; animation: blink 0.9s steps(1) infinite; }
/* a project, drawn as its route */
.ref { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 4px 14px; align-items: end; width: 100%; margin-top: 10px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 3px; text-align: left; transition: border-color 0.2s; }
.ref > .mono:first-child { grid-area: 1 / 1; min-width: 0; overflow: hidden; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
.ref__go { grid-area: 1 / 2; justify-self: end; color: var(--ink-3); transition: color 0.2s; }
.ref strong { grid-area: 2 / 1; font-size: 24px; font-weight: 500; line-height: 1; letter-spacing: -0.035em; font-variation-settings: "wdth" 112; }
.ref__ridge { grid-area: 2 / 2; height: 26px; }
.ref__ridge svg { width: 100%; height: 100%; overflow: visible; }
.ref__ridge path { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke 0.2s; }
.ref:hover { border-color: var(--accent); }
.ref:hover .ref__go { color: var(--accent); }
.ref:hover .ref__ridge path { stroke: var(--accent); }
.lnk { color: inherit; font-weight: 500; text-underline-offset: 4px; }
.radio__form { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-top: 1px solid var(--line); }
.radio__form input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; border-bottom: 1px solid var(--edge); border-radius: 0; background: none; color: var(--ink); font: 400 16px var(--f-display); outline: none; }
.radio__form input:focus { border-bottom-color: var(--accent); }
.radio__form input::placeholder { color: var(--ink-3); }
.radio__send { height: 36px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 3px; background: linear-gradient(var(--accent), var(--accent)) 0 0 / 0% 100% no-repeat; transition: background-size 0.45s var(--ease), color 0.2s, border-color 0.2s; }
.radio__send:hover { background-size: 100% 100%; border-color: var(--accent); color: var(--accent-ink); }

/* -------------------------------------------------------------------------- */
/* Small screens                                                              */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .route { grid-template-columns: 32px minmax(0, 1fr) minmax(120px, 200px) 20px; gap: 20px; }
  .route__meta { display: none; }
  .climb { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 26px; padding-left: 26px; }
  .climb__line { display: none; }
  .climb::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--accent); transform-origin: 50% 0; scale: 1 var(--p, 0); }
  .camp, .camp:nth-child(n) { margin-bottom: 0; }
  .camp__dot { position: absolute; left: -26px; top: 4px; }
  .path li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .path .mono { grid-column: 1 / -1; }
  .path span:last-child { text-align: right; }
  .alt { display: none; }
}
@media (max-width: 640px) {
  .nav__links a { display: none; }
  .hero { padding-top: 104px; }
  .hero__top { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .route { grid-template-columns: minmax(0, 1fr) 20px; gap: 0 12px; padding: 24px 0 26px; }
  .route__n { display: none; }
  .route__go { grid-column: 2; grid-row: 1; align-self: start; padding-top: 0.5em; }
  .route__ridge { grid-column: 1 / -1; height: 40px; margin-top: 40px; }
  .cs-facts { gap: 12px; }
  .cs-facts dd { font-size: 15px; }
  .foot { flex-direction: column; }
  .flag:nth-of-type(2n) { display: none; }
  .ref { grid-template-columns: minmax(0, 1fr) 76px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}
