/* Mona Sans (SIL OFL), self-hosted: one variable file covers weight 300–900 and width 75–125%. */
@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("../assets/fonts/mona-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ───────────────────────── Tokens: "night trail" ───────────────────────── */
:root {
  --night: #0f0f10;       /* the page: a clear night */
  --dusk: #17171a;        /* raised surfaces */
  --seam: #26262a;        /* hairlines */
  --seam-strong: #3a3a3f;
  --ink: #ebe6dc;         /* warm off-white, the line-art and text */
  --dust: #9d988f;        /* secondary text */
  --stroke: #8e897f;      /* mountain linework */
  --ember: #f2a541;       /* "you are here": active flag, live dot, focus */

  /* aliases used by the case-study styles */
  --slag: var(--night); --iron: var(--dusk); --ash: var(--ink);

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 100%;
  --narrow: 75%;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --col: 46rem;
  --section-gap: clamp(5.5rem, 11vw, 9.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: dark;
}

/* ───────────────────────── Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Film grain: fixed static noise so the flat night doesn't feel sterile. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Comic halftone: a fine dot screen over everything, like cheap newsprint. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 99; opacity: 0.07;
  background-image: radial-gradient(circle at center, #fff 0.55px, transparent 0.95px);
  background-size: 4px 4px;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
strong { font-weight: 600; color: var(--ink); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ember); color: var(--night); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ember); color: var(--night); padding: 0.5rem 0.9rem; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* One quiet column for reading; wider stages only where the picture needs room. */
.col { width: 100%; max-width: calc(var(--col) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ───────────────────────── Controls ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.1rem;
  font-size: 0.9375rem; font-weight: 550; color: var(--ink); background: transparent;
  border: 1px solid var(--seam-strong); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--dust); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--night); }
.btn--primary:hover { background: #fff; border-color: #fff; }
.btn--quiet { border-color: transparent; }
.btn--quiet:hover { border-color: var(--seam-strong); }

.link {
  color: var(--ink); font-weight: 550;
  text-decoration: underline; text-decoration-color: var(--seam-strong);
  text-underline-offset: 0.3em; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s;
}
.link:hover { text-decoration-color: var(--ember); }

.tag {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-stretch: var(--narrow); font-weight: 650; font-size: 0.8125rem; line-height: 1; letter-spacing: 0.01em;
  padding: 0.3em 0.55em 0.32em; border-radius: 3px;
  border: 1px solid var(--seam-strong); color: var(--dust); white-space: nowrap;
}
.tag[data-status="shipped"]  { border-color: var(--ink); color: var(--ink); }
.tag[data-status="built"]    { border-color: var(--dust); color: var(--ink); }
.tag[data-status="adopted"]  { border-color: var(--dust); color: var(--ink); border-style: double; border-width: 3px; padding: 0.2em 0.45em 0.22em; }
.tag[data-status="written"]  { border-style: dashed; }
.tag[data-status="proposed"] { border-style: dotted; }
.tag[data-status="progress"] { border-color: var(--ember); color: var(--ember); }
.tag[data-status="progress"]::before { content: ""; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--ember); }

/* ───────────────────────── Nav ───────────────────────── */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(15, 15, 16, 0.82); border-bottom-color: var(--seam); backdrop-filter: blur(10px); }
.nav__inner {
  display: flex; align-items: center; gap: 1.5rem; height: 4rem;
  max-width: calc(72rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.nav__main { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav__logo { display: block; width: 2.4rem; height: 2.4rem; transition: transform 0.35s var(--ease); }
.nav__logo:hover { transform: rotate(-8deg) scale(1.06); }
.nav__logo svg { width: 100%; height: 100%; overflow: visible; }
.nav__logo path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.logo__ring { stroke: var(--ink); stroke-width: 1.6; }
.logo__ring--2 { stroke-width: 0.9; opacity: 0.45; }
.logo__t { stroke: var(--ink); stroke-width: 3.2; }
.logo__w { stroke: var(--ember); stroke-width: 3.2; }
.nav__music {
  position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-left: -0.5rem;
  background: none; border: 1px solid var(--seam-strong); border-radius: 50%; cursor: pointer; color: var(--dust);
  transition: color 0.2s, border-color 0.2s;
}
.nav__music:hover { color: var(--ink); border-color: var(--dust); }
.nav__music svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.music__bars { position: absolute; inset: 0; display: none; justify-content: center; align-items: center; gap: 2px; }
.music__bars i { width: 2px; height: 0.9rem; background: var(--ember); border-radius: 1px; animation: bars 1.1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-delay: -0.35s; }
.music__bars i:nth-child(3) { animation-delay: -0.7s; }
@keyframes bars { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.nav__music[aria-pressed="true"] { color: var(--ember); border-color: var(--ember); }
.nav__music[aria-pressed="true"] svg { display: none; }
.nav__music[aria-pressed="true"] .music__bars { display: flex; }
.nav__links { display: flex; gap: 1.5rem; }
.nav__links a, .nav__resume { color: var(--dust); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s; }
.nav__links a:hover, .nav__resume:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__resume { color: var(--ink); }
@media (max-width: 640px) { .nav__links { display: none; } .nav__main { margin-left: 0; margin-right: auto; } }

/* ───────────────────────── Hero: a street lamp on a meadow at night ───────────────────────── */
.hero { position: relative; min-height: max(38rem, 100svh); display: flex; flex-direction: column; overflow: hidden; }
.hero__inner {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: end; gap: 2rem;
  width: 100%; max-width: calc(72rem + 2 * var(--gutter)); margin-inline: auto; padding: 7rem var(--gutter) 0;
}
.hero__copy { align-self: center; padding-bottom: 4rem; position: relative; z-index: 2; }
.hero__lede a { color: var(--ink); text-underline-offset: 0.25em; text-decoration-color: var(--seam-strong); }
.hero__title { display: grid; gap: 0.35em; }
.hero__name { font-size: clamp(2.75rem, 1.6rem + 5vw, 4.75rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1; }
.hero__role { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem); font-weight: 350; color: var(--dust); letter-spacing: -0.015em; line-height: 1.25; max-width: 24ch; }
.hero__lede { margin-top: 2rem; color: var(--dust); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.lamp { position: relative; justify-self: center; height: clamp(20rem, 58vh, 30rem); aspect-ratio: 220 / 440; margin-bottom: -3.2rem; z-index: 1; }
.lamp__art { width: 100%; height: 100%; overflow: visible; }
.lamp { --lamp: 1; }
.lamp__halo-wrap, .lamp__cone { opacity: var(--lamp); }
.lamp__glass { fill-opacity: calc(0.25 + 0.75 * var(--lamp)); }
.lamp__flame { opacity: calc(0.15 + 0.85 * var(--lamp)); }
.lamp__halo { animation: halo 6s ease-in-out infinite; transform-origin: 158px 96px; }
@keyframes halo { 50% { opacity: 0.82; transform: scale(0.96); } }
.lamp__rim { fill: none; stroke: #cfc6b6; stroke-width: 10; stroke-linecap: round; }
.lamp__metal { fill: none; stroke: #1b1b1e; stroke-width: 7; stroke-linecap: round; }
.lamp__part { fill: #1b1b1e; stroke: #cfc6b6; stroke-width: 1.6; stroke-linejoin: round; }
.lamp__glass { fill: #ffcf5c; stroke: #cfc6b6; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(255, 194, 74, 0.9)); }
.lamp__flame { fill: #fff4cf; }

/* Bees looping around the lantern: transform-only animation, paused off-screen. */
.bee { position: absolute; left: 71.8%; top: 21.8%; width: 1.25rem; height: 0.9rem; offset-rotate: auto; animation: bee-loop 7s linear infinite; }
.bee svg { width: 100%; height: 100%; overflow: visible; }
.bee--1 { offset-path: path("M0 0C38 -34 86 -6 58 26C34 52 -30 48 -44 18C-58 -12 -30 -26 0 0"); }
.bee--2 { offset-path: path("M0 0C-40 -30 -70 10 -40 34C-12 56 46 40 52 8C58 -22 26 -24 0 0"); animation-duration: 9s; animation-delay: -3s; }
.bee--3 { offset-path: path("M0 0C22 -50 70 -40 64 -6C58 26 10 34 -14 18C-38 2 -20 -18 0 0"); animation-duration: 5.5s; animation-delay: -1.5s; }
@keyframes bee-loop { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.bee .wing { fill: rgba(235, 240, 250, 0.75); stroke: #1b1b1e; stroke-width: 0.6; transform-origin: 10px 7px; animation: flap 0.09s linear infinite alternate; }
.bee .wing--2 { animation-delay: -0.045s; }
.bee__body { fill: #f5c542; stroke: #1b1b1e; stroke-width: 0.8; }
.bee__stripe { fill: none; stroke: #1b1b1e; stroke-width: 1.4; }
.bee__eye { fill: #1b1b1e; }
@keyframes flap { to { transform: scaleY(0.35); } }

/* Meadow: bumpy grass, flowers and two butterflies along the bottom of the hero. */
.meadow { position: relative; height: clamp(7.5rem, 16vh, 10.5rem); margin-top: -1px; z-index: 2; }
.meadow__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.meadow__back { fill: #111b13; }
.meadow__back-edge { fill: none; stroke: #2c4a2b; stroke-width: 1.2; }
.meadow__hill { fill: #16261a; }
.meadow__edge { fill: none; stroke: #6c9a5c; stroke-width: 2; stroke-linejoin: round; }
.meadow__blades { fill: none; stroke-linecap: round; stroke-width: 1.4; }
.meadow__blades--a { stroke: #5d8f50; }
.meadow__blades--b { stroke: #3f6b3a; }
.meadow__flowers .stem { fill: none; stroke: #4e7d45; stroke-width: 1.2; }
.meadow__flowers circle { stroke: #16161a; stroke-width: 0.5; }
.meadow__flowers .eye, .river__flowers .eye { fill: #3a2a12; }
.butterfly { position: absolute; width: 1.3rem; height: 1rem; offset-rotate: 0deg; animation: flutter-path 16s ease-in-out infinite alternate; }
.butterfly--1 { left: 18%; top: 8%; offset-path: path("M0 0C40 -30 90 20 140 -10C190 -40 230 10 280 -20"); }
.butterfly--2 { left: 58%; top: 22%; offset-path: path("M0 0C-30 -40 -90 0 -120 -30C-150 -60 -210 -10 -250 -40"); animation-duration: 21s; }
.butterfly svg { width: 100%; height: 100%; overflow: visible; }
.bf__wings { transform-origin: 10px 8px; animation: wing 0.28s ease-in-out infinite alternate; }
.butterfly--1 .bf__wings path { fill: #f2a541; stroke: #1b1b1e; stroke-width: 0.7; }
.butterfly--2 .bf__wings path { fill: #9fd3e6; stroke: #1b1b1e; stroke-width: 0.7; }
.bf__body { fill: none; stroke: #1b1b1e; stroke-width: 1.6; stroke-linecap: round; }
@keyframes flutter-path { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes wing { to { transform: scaleX(0.25); } }
.hero.is-paused .bee, .hero.is-paused .bee .wing, .hero.is-paused .butterfly, .hero.is-paused .bf__wings, .hero.is-paused .lamp__halo { animation-play-state: paused; }

@media (max-width: 760px) {
  .hero { min-height: 0; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 6rem; gap: 0; }
  .hero__copy { padding-bottom: 0; }
  .lamp { justify-self: end; height: 14rem; margin: -1rem 1rem -2.6rem 0; }
  .meadow { height: 7rem; }
}

/* The one page-load moment: name, then role, then the rest, settle in. */
.js .hero__name, .js .hero__role, .js .hero__lede, .js .hero__actions { opacity: 0; transform: translateY(0.6rem); }
.is-ready .hero__name, .is-ready .hero__role, .is-ready .hero__lede, .is-ready .hero__actions {
  opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
.is-ready .hero__role { transition-delay: 0.12s; }
.is-ready .hero__lede { transition-delay: 0.3s; }
.is-ready .hero__actions { transition-delay: 0.42s; }

/* ───────────────────────── Sections ───────────────────────── */
.section { padding-top: var(--section-gap); }
.section__title { font-size: var(--step-3); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.section__lede { color: var(--dust); margin-top: 0.6rem; max-width: 52ch; }

/* ───────────────────────── Work ───────────────────────── */
.projects { margin-top: 2rem; display: grid; gap: 1rem; }
.project {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--seam); border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 60%);
  transition: border-color 0.3s;
}
.project:hover, .project:focus-within { border-color: var(--seam-strong); }
.project__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.project__title { font-size: var(--step-2); font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.project__summary { margin-top: 0.75rem; color: var(--dust); }
.project--compact { background: none; border-style: dashed; }
.project--compact .project__title { font-size: var(--step-1); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--seam); }
.facts dt { font-stretch: var(--narrow); font-weight: 600; font-size: var(--step--1); color: var(--dust); }
.facts dd { font-size: 0.9375rem; line-height: 1.45; margin-top: 0.2rem; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }
.project__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }

.lab { margin-top: 3.5rem; display: grid; gap: 1rem; }
.lab__title { font-size: var(--step-1); font-weight: 650; }
.lab__frame { position: relative; aspect-ratio: 16 / 11; min-height: 24rem; border: 1px solid var(--seam); border-radius: 14px; overflow: hidden; background: var(--dusk); }
.lab__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0b0f19; }
.lab__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: start; gap: 1.1rem; padding: clamp(1.5rem, 5vw, 3rem); max-width: 34rem; }
.lab__what { font-size: var(--step-1); line-height: 1.45; }
.lab__note { color: var(--dust); font-size: 0.875rem; }
.lab__alt { color: var(--dust); font-size: 0.9375rem; }
@media (max-width: 640px) { .lab__frame { aspect-ratio: auto; min-height: 28rem; } }

/* ───────────────────────── Career: the mountain range ───────────────────────── */
.career__stage {
  position: relative; width: 100%; max-width: 76rem; margin: 2.5rem auto 0; padding-inline: var(--gutter);
}
.range { display: block; width: 100%; height: auto; overflow: hidden; }
.range path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.range__back { stroke: var(--seam-strong); stroke-width: 1; }
.range__occlude { fill: var(--night) !important; stroke: none; }
.range__hatch { stroke: var(--stroke); stroke-width: 0.65; opacity: 0.62; }
.range__hatch-mist { opacity: 0.55; }
.range__spurs { stroke: var(--stroke); stroke-width: 0.8; opacity: 0.7; }
.range__strata { stroke: var(--stroke); stroke-width: 0.6; opacity: 0.4; }
.range__ridge { stroke: var(--ink); stroke-width: 1.3; }
.range__ground { stroke: var(--stroke); stroke-width: 0.8; opacity: 0.7; }
.range__pines path { stroke: var(--stroke); stroke-width: 0.9; }
.range__pines .pine-fill { fill: var(--night); stroke: none; }
.range__drift path { stroke: var(--ink); stroke-width: 1; opacity: 0.18; }
.range__drift { animation: drift 24s ease-in-out infinite alternate; }
.range__drift--slow { animation-duration: 38s; animation-direction: alternate-reverse; }
.range__drift--slow path { opacity: 0.11; }
.career.is-paused .range__drift { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-34px); } }

.range__snow .snow { fill: #ece9e1; stroke: none; opacity: 0.94; }
.range__snow .snow-shade { fill: #9fb4c8; stroke: none; opacity: 0.38; }
.range__snow .snow-streak { stroke: #ece9e1; stroke-width: 1.4; opacity: 0.7; }
.range__climber circle, .range__climber path:not(.beam) { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.range__climber circle:first-child { fill: var(--ink); }
.range__climber .pack { fill: var(--ember); stroke: none; }
.range__climber .headlamp { fill: #fff3c4; stroke: none; }
.range__climber .beam { fill: url(#beam-glow); stroke: none; animation: flicker 5s ease-in-out infinite; }
.range__climber .bob { animation: bob 1.6s ease-in-out infinite; }
.career.is-paused .range__climber * { animation-play-state: paused; }
@keyframes bob { 50% { transform: translateY(-0.6px) rotate(-1.5deg); } }
@keyframes flicker { 0%, 100% { opacity: 0.85; } 45% { opacity: 0.6; } 50% { opacity: 0.9; } }
.pole path { stroke: var(--dust); stroke-width: 1.2; transition: stroke 0.25s; }
.pole .pennant { fill: var(--dust); stroke: none; transition: fill 0.25s; }
.pole.is-hot path { stroke: var(--ember); }
.pole.is-hot .pennant { fill: var(--ember); }

/* Drawn once on first view: ridge traces left to right, then hatch and flags appear. */
.js .career:not(.is-drawn) .range__ridge { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .career .range__ridge { stroke-dasharray: 1; transition: stroke-dashoffset 2.2s var(--ease); }
.js .career.is-drawn .range__ridge { stroke-dashoffset: 0; }
.js .career .range__hatch, .js .career .range__spurs, .js .career .range__strata, .js .career .range__snow, .js .career .range__climber, .js .career .range__pines, .js .career .range__poles, .js .career .flag, .js .career .career__mist { transition: opacity 1s ease 0.9s; }
.js .career:not(.is-drawn) .range__hatch, .js .career:not(.is-drawn) .range__spurs, .js .career:not(.is-drawn) .range__strata, .js .career:not(.is-drawn) .range__snow, .js .career:not(.is-drawn) .range__climber, .js .career:not(.is-drawn) .range__pines,
.js .career:not(.is-drawn) .range__poles, .js .career:not(.is-drawn) .flag, .js .career:not(.is-drawn) .career__mist { opacity: 0; }

.flag {
  position: absolute; left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * var(--xf)); top: var(--y);
  --xf: 0;
  transform: translate(-50%, calc(-100% - 0.5rem));
  display: flex; align-items: center; gap: 0.6rem; text-align: left;
  padding: 0.5rem 0.85rem 0.5rem 0.55rem; max-width: none; white-space: nowrap;
  background: rgba(23, 23, 26, 0.92); border: 1px solid var(--seam-strong); border-radius: 10px; cursor: pointer;
  transition: border-color 0.25s, transform 0.3s var(--ease), background-color 0.25s;
}
.flag[data-career="btech"] { --xf: 0.175; }
.flag[data-career="arvanta"] { --xf: 0.4; }
.flag[data-career="greencashx"] { --xf: 0.6333; }
.flag:hover, .flag:focus-visible, .flag.is-hot { border-color: var(--ember); transform: translate(-50%, calc(-100% - 0.85rem)); }
.flag__n {
  flex: none; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--seam-strong); font-stretch: var(--narrow); font-weight: 700; font-size: 0.75rem; color: var(--dust);
}
.flag:hover .flag__n, .flag.is-hot .flag__n { border-color: var(--ember); color: var(--ember); }
.flag__text { display: grid; line-height: 1.3; }
.flag__text strong { font-size: 0.875rem; font-weight: 650; }
.flag__text span { font-size: 0.78rem; color: var(--dust); }

.career__mist {
  position: absolute; left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * 0.89); top: var(--y);
  transform: translate(-50%, -50%); text-align: center; width: 13rem;
  font-size: 0.9375rem; color: var(--ink); line-height: 1.4;
  text-shadow: 0 0 14px var(--night), 0 0 4px var(--night);
}
.career__mist span { display: block; color: var(--dust); font-size: 0.8125rem; margin-bottom: 0.2rem; }

.career__list { display: none; margin-top: 1.5rem; }
.career__list li { border-top: 1px solid var(--seam); }
.career__list button {
  width: 100%; display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 0; text-align: left;
  background: none; border: 0; cursor: pointer;
}
.career__list button > span:last-child { display: grid; line-height: 1.35; }
.career__list strong { font-weight: 650; }
.career__list button span span { color: var(--dust); font-size: 0.875rem; }
.career__list-more { padding: 0.9rem 0; color: var(--dust); font-size: 0.9375rem; border-bottom: 1px solid var(--seam); }

/* Below ~1060px the peaks sit too close for full labels: numbered pennants on the range, entries listed below. */
@media (max-width: 1060px) {
  .career__stage { padding-inline: 0; margin-top: 1.5rem; }
  .flag { left: calc(100% * var(--xf)); padding: 0; border-radius: 50%; background: var(--night); }
  .flag__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .flag__n { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; color: var(--ink); }
  .career__mist { display: none; }
  .career__list { display: block; }
}

/* The sun: the lamp's light travels here as you scroll, and settles above the hidden summit. */
.sun { position: absolute; width: 8.5rem; height: 8.5rem; pointer-events: none; }
.sun__art { width: 100%; height: 100%; overflow: visible; }
.sun__glow { fill: url(#sun-glow); transform: scale(1.7); }
.sun__rays { fill: #ffcf5c; opacity: 0.9; transform-origin: 0 0; animation: rays 80s linear infinite; }
.sun__disc { fill: url(#sun-disc); stroke: #fff1c4; stroke-width: 1.4; filter: drop-shadow(0 0 10px rgba(255, 206, 102, 0.85)); }
.sun__shine { fill: none; stroke: #fffdf3; stroke-width: 2.2; stroke-linecap: round; opacity: 0.85; }
@keyframes rays { to { transform: rotate(1turn); } }
.career__sun {
  left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * 0.965); top: -9%;
  transform: translate(-50%, -50%); z-index: 1; opacity: var(--sun-static, 1);
}
.sun--travel { position: fixed; left: 0; top: 0; z-index: 30; opacity: 0; will-change: transform, opacity; }
.sun--travel .sun__rays, .sun--travel .sun__shine { opacity: var(--rays, 0); }
.career.is-paused .career__sun .sun__rays { animation-play-state: paused; }
/* Warm light falling across the range from the sun's side. */
.career__stage::after {
  /* A glow centred on the sun that fades to nothing before its own edges, so no seams show. */
  content: ""; position: absolute; pointer-events: none; z-index: 0; opacity: var(--sunlit, 1);
  width: 150%; height: 230%; left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * 0.965); top: -9%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 210, 120, 0.2), rgba(255, 195, 100, 0.08) 45%, rgba(255, 190, 90, 0.025) 75%, transparent);
}
/* Sunlight warms the linework as the sun arrives. */
.career .range__ridge { stroke: color-mix(in srgb, var(--ink), #ffd28a calc(var(--sunlit, 1) * 45%)); }
.career .range__hatch, .career .range__spurs, .career .range__strata { stroke: color-mix(in srgb, var(--stroke), #d9a860 calc(var(--sunlit, 1) * 35%)); }
.career .range__snow .snow { fill: color-mix(in srgb, #ece9e1, #ffd9a0 calc(var(--sunlit, 1) * 40%)); }
.career .range__snow .snow-streak { stroke: color-mix(in srgb, #ece9e1, #ffd9a0 calc(var(--sunlit, 1) * 40%)); }
.career { overflow-x: clip; }
.range { position: relative; z-index: 0; }
.flag, .career__mist { z-index: 2; }
@media (max-width: 1060px) { .career__sun { left: 93%; top: -6%; width: 5.5rem; height: 5.5rem; } }

/* ───────────────────────── Skills: constellations, every name always visible ───────────────────────── */
.sky {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.25rem 3rem;
  max-width: calc(72rem + 2 * var(--gutter)); margin: 2.5rem auto 0; padding: 2rem var(--gutter) 1rem;
}
/* A faint starfield behind the constellations: static CSS dots, no images. */
.sky::before {
  content: ""; position: absolute; inset: -1rem 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12px 18px, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 88px 64px, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 150px 30px, rgba(255, 240, 200, 0.7), transparent 60%),
    radial-gradient(1px 1px at 46px 110px, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 196px 96px, rgba(255, 255, 255, 0.6), transparent 60%);
  background-size: 220px 140px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
}
.constellation { position: relative; min-width: 0; }
.constellation--wide { grid-column: span 2; }
.constellation__name { font-stretch: var(--narrow); font-weight: 650; font-size: 0.95rem; color: var(--ember); margin-bottom: 1.25rem; letter-spacing: 0.02em; }
.constellation__lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.constellation__lines path { fill: none; stroke: rgba(235, 230, 220, 0.3); stroke-width: 1; stroke-dasharray: 2 5; stroke-linecap: round; }
.constellation__stars { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 1.9rem; }
.star { display: flex; align-items: center; gap: 0.65rem; }
.star:nth-child(3n + 2) { margin-top: 1.3rem; }
.star:nth-child(3n) { margin-top: 0.45rem; }
.star__icon {
  position: relative; z-index: 1; flex: none; display: grid; place-items: center;
  width: 2.7rem; height: 2.7rem; border-radius: 50%; color: var(--ink);
  background: radial-gradient(circle, rgba(255, 232, 180, 0.16), rgba(255, 232, 180, 0.03) 62%, transparent 72%), var(--night);
  border: 1px solid rgba(235, 230, 220, 0.38);
  box-shadow: 0 0 14px rgba(255, 214, 120, 0.16);
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.star:hover .star__icon { border-color: var(--ember); box-shadow: 0 0 22px rgba(255, 214, 120, 0.45); transform: scale(1.06); }
.star__icon svg { width: 1.3rem; height: 1.3rem; overflow: visible; }
.star__icon .fill, .star__icon .fill circle { fill: currentColor; }
.star__icon .line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.star__name { position: relative; z-index: 1; font-size: 0.95rem; font-weight: 550; line-height: 1.25; max-width: 12rem; padding: 0.1rem 0.35rem; margin-left: -0.35rem; background: var(--night); border-radius: 4px; }
.skills > .col { max-width: calc(72rem + 2 * var(--gutter)); }
.star:nth-child(4n + 1) .star__icon { animation: twinkle 5s ease-in-out infinite; }
.star:nth-child(4n + 3) .star__icon { animation: twinkle 6.5s ease-in-out -2s infinite; }
@keyframes twinkle { 50% { box-shadow: 0 0 24px rgba(255, 214, 120, 0.42); border-color: rgba(255, 226, 160, 0.7); } }
.skills.is-paused .star__icon { animation-play-state: paused; }
@media (max-width: 900px) {
  .sky { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; }
  .constellation--wide { grid-column: auto; }
}

/* ───────────────────────── Tools ───────────────────────── */
.caps { margin-top: 1.75rem; border-top: 1px solid var(--seam); }
.cap { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0.25rem 2rem; padding: 1.05rem 0; border-bottom: 1px solid var(--seam); }
.cap dt { font-weight: 600; }
.cap dd { color: var(--dust); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li { border: 1px solid var(--seam-strong); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.875rem; color: var(--ink); }
.cap dd { align-self: center; }
.caps__also { margin-top: 1.25rem; color: var(--dust); font-size: 0.9375rem; }
@media (max-width: 640px) { .cap { grid-template-columns: 1fr; } }

/* ───────────────────────── About (layout kept from before) ───────────────────────── */
.about {
  display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: start;
  max-width: calc(66rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.about__side { display: grid; gap: 1.5rem; }
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 75%;
  border-radius: 14px; filter: grayscale(0.3) contrast(1.05); background: var(--dusk);
}
.about__main { display: grid; gap: 2.5rem; padding-top: 3.2rem; }
.about__text { display: grid; gap: 1.2rem; max-width: 60ch; font-size: 1.125rem; line-height: 1.7; }
.about__text p { color: var(--dust); }
.about__text p:first-child { color: var(--ink); }
.about__record { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem; border-top: 1px solid var(--seam); padding-top: 2rem; }
.record h3 { font-stretch: var(--narrow); font-weight: 650; font-size: 0.9375rem; color: var(--dust); margin-bottom: 0.75rem; }
.record ul { display: grid; gap: 0.55rem; }
.record li { color: var(--dust); font-size: 0.9375rem; line-height: 1.5; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .about__side .section__title { grid-column: 1 / -1; }
  .about__main { padding-top: 0; }
}
@media (max-width: 520px) { .about__side { grid-template-columns: 1fr; } }

/* Pune, drawn from OpenStreetMap roads and the Mula-Mutha river. */
.place { border: 1px solid var(--seam); border-radius: 14px; overflow: hidden; background: var(--dusk); }
.place__map { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.place__map img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease); }
.place:hover .place__map img { transform: scale(1.14); }
.place__map::after { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, transparent 55%, rgba(15, 15, 16, 0.7)); pointer-events: none; }
.place__city {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  font-stretch: var(--narrow); font-weight: 850; font-size: 2.6rem; letter-spacing: 0.08em;
  color: rgba(235, 230, 220, 0.82); text-shadow: 0 0 18px rgba(15, 15, 16, 0.9);
}
.place__caption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; font-size: 0.875rem; color: var(--dust); }
.place__time { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ember); font-variant-numeric: tabular-nums; }
.place__icon svg { width: 0.95rem; height: 0.95rem; display: block; }
.place__credit { padding: 0 1rem 0.7rem; font-size: 0.6875rem; color: #8f8a82; }
.place__credit a { color: inherit; }

/* ───────────────────────── River: the last thing before LET'S TALK ───────────────────────── */
.river { position: relative; height: clamp(8rem, 14vw, 11rem); margin-top: var(--section-gap); }
.river__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.river__water { fill: url(#river-water); }
.river__ripples path { fill: none; stroke: #e8f7ff; stroke-width: 1.6; stroke-linecap: round; opacity: 0.8; }
.river__ripples { animation: ripple 28s linear infinite; }
@keyframes ripple { to { transform: translateX(400px); } }
.river__leaf { fill: #7fae5a; stroke: #1b1b1e; stroke-width: 0.8; offset-path: path("M-40 92C300 86 600 100 900 90S1400 96 1660 90"); animation: leaf 46s linear infinite; }
@keyframes leaf { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.river__bank-near { fill: #16261a; }
.river__bank-crest { fill: none; stroke: #6c9a5c; stroke-width: 2; stroke-linejoin: round; }
.river__bank-far { fill: #000; }
.river__edge { fill: none; stroke: #1b1b1e; stroke-width: 2.4; }
.river__stones ellipse { fill: #1c1c1f; stroke: #3a3a3f; stroke-width: 1; }
.river__blades { fill: none; stroke: #4e7d45; stroke-width: 1.3; stroke-linecap: round; }
.river__reeds { fill: none; stroke: #5d8f50; stroke-width: 1.4; stroke-linecap: round; }
.river__heads rect { fill: #6b4a2a; }
.river__flowers circle { stroke: #16161a; stroke-width: 0.5; }
.river.is-paused .river__ripples, .river.is-paused .river__leaf { animation-play-state: paused; }

/* ───────────────────────── Sea lion on the riverbank ───────────────────────── */
.shore { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.shore button { pointer-events: auto; }
.sealion {
  position: absolute; left: 9%; bottom: 69%; width: clamp(7.5rem, 12vw, 10.5rem); aspect-ratio: 1;
}
.sealion__art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sl-rock { fill: #2b2b30; stroke: #4a4a50; stroke-width: 1.6; }
.sl-rock-line { fill: none; stroke: #45454b; stroke-width: 1.2; stroke-linecap: round; }
.sl-body { fill: url(#sl-fur); stroke: #120f0d; stroke-width: 2; stroke-linejoin: round; }
.sl-skull { fill: url(#sl-head-fur); stroke: #120f0d; stroke-width: 2; stroke-linejoin: round; }
.sl-hind, .sl-fore { fill: #4a3322; stroke: #120f0d; stroke-width: 2; stroke-linejoin: round; }
.sl-fore-line { fill: none; stroke: #6b4c34; stroke-width: 1.2; stroke-linecap: round; }
.sl-chest { fill: #c49a6c; opacity: 0.9; }
.sl-sheen { fill: none; stroke: #c9a27a; stroke-width: 2; stroke-linecap: round; opacity: 0.45; }
.sl-pad { fill: #b88e64; }
.sl-dots { fill: none; stroke: #4a3322; stroke-width: 1.3; stroke-linecap: round; }
.sl-nose, .sl-eye { fill: #120f0d; }
.sl-glint { fill: #fff; }
.sl-whisker { fill: none; stroke: #eee6d6; stroke-width: 0.8; stroke-linecap: round; }
.sl-ear { fill: #5a3e29; stroke: #120f0d; stroke-width: 1.4; stroke-linejoin: round; }
.sl-brow { fill: none; stroke: #4a3322; stroke-width: 1.2; stroke-linecap: round; }
.sl-mouth, .sl-eye-happy, .sl-smile { fill: none; stroke: #120f0d; stroke-width: 1.8; stroke-linecap: round; }
.sl-mouth-open { fill: #4a1f1a; stroke: #120f0d; stroke-width: 1.4; }
.sl-blush { fill: #f08a9a; opacity: 0.55; }
.sl-eye-happy, .sl-smile, .sl-blush, .sl-mouth-open { opacity: 0; }

/* Balancing: head and ball sway together around the neck. */
.sl-head { transform-origin: 134px 72px; transition: transform 0.5s var(--ease); animation: sway 2.6s ease-in-out infinite; }
.sealion__balance { position: absolute; inset: 0; transform-origin: 58.26% 44.35%; animation: sway 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
.sl-flipper { transform-origin: 140px 128px; }

.sealion__ball {
  position: absolute; left: 0; top: 0; width: calc(100% * 30 / 230); aspect-ratio: 1; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; pointer-events: auto; will-change: transform;
}
.sealion__ball svg { width: 100%; height: 100%; display: block; overflow: visible; animation: spin 2.4s linear infinite; }
.sealion__ball:hover svg { filter: drop-shadow(0 0 6px rgba(255, 214, 120, 0.6)); }
@keyframes spin { to { transform: rotate(1turn); } }
.vb-base { fill: #f7f3e8; }
.vb-y, .vb-b { fill: none; stroke-width: 3.2; stroke-linecap: round; }
.vb-y { stroke: #f2c14e; }
.vb-b { stroke: #5aa9d6; }
.vb-edge { fill: none; stroke: #120f0d; stroke-width: 1.4; }

/* Free: the ball is off his nose, so the swaying stops. */
.sealion.is-free .sl-head, .sealion.is-free .sealion__balance, .sealion.is-free .sealion__ball svg { animation: none; }
/* Happy: head turns towards you, eyes smile, cheeks blush. */
.sealion.is-happy .sl-head { transform: rotate(32deg); }
.sealion.is-happy .sl-eye-open, .sealion.is-happy .sl-mouth { opacity: 0; }
.sealion.is-happy .sl-eye-happy, .sealion.is-happy .sl-smile, .sealion.is-happy .sl-blush { opacity: 1; }
/* Eating: chomp, and clap the flipper. */
.sealion.is-eating .sl-mouth-open { animation: chomp 0.33s steps(1) 3; }
.sealion.is-eating .sl-flipper { animation: clap 0.28s ease-in-out 4 alternate; }
@keyframes chomp { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes clap { to { transform: rotate(-24deg); } }

.sealion__hearts { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.heart { position: absolute; color: #f07a8e; font-size: 1rem; line-height: 1; animation: float-heart 1.3s ease-out forwards; }
@keyframes float-heart { from { opacity: 0; transform: translate(0, 0) scale(0.6); } 20% { opacity: 1; } to { opacity: 0; transform: translate(0, -46px) scale(1.15); } }
.thrown-fish { position: absolute; left: 0; top: 0; width: 1.5rem; height: 0.75rem; pointer-events: none; z-index: 3; }
.thrown-fish svg { width: 100%; height: 100%; display: block; }
.thrown-fish path { fill: #9fc9e0; stroke: #120f0d; stroke-width: 1; }
.thrown-fish circle { fill: #120f0d; }

.bucket { position: absolute; left: calc(9% - 5.4rem); bottom: 69%; display: grid; justify-items: center; gap: 0.25rem; width: 4.2rem; }
.bucket__btn { width: 3rem; height: 3rem; padding: 0; background: none; border: 0; cursor: pointer; transition: transform 0.25s var(--ease); }
.bucket__btn:hover { transform: rotate(-8deg) translateY(-2px); }
.bucket__btn:active { transform: rotate(-14deg); }
.bucket__btn svg { width: 100%; height: 100%; overflow: visible; }
.bk-body { fill: #5a7fa0; stroke: #120f0d; stroke-width: 1.6; stroke-linejoin: round; }
.bk-band { fill: none; stroke: #3f5f7c; stroke-width: 1.6; }
.bk-handle { fill: none; stroke: #cfc6b6; stroke-width: 1.6; }
.bk-fish { fill: #9fc9e0; stroke: #120f0d; stroke-width: 1; }
.bucket__count {
  margin-top: 0.2rem; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; text-align: center;
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
  background: rgba(15, 15, 16, 0.82); border: 1px solid rgba(159, 201, 224, 0.45);
}
.bucket__count [data-fish-count] { display: inline-block; color: #9fc9e0; font-variant-numeric: tabular-nums; }
.bucket__count.is-bump [data-fish-count] { animation: count-bump 0.45s var(--ease); }
@keyframes count-bump { 40% { transform: scale(1.45); } }
.river.is-paused .sl-head, .river.is-paused .sealion__balance, .river.is-paused .sealion__ball svg { animation-play-state: paused; }
@media (max-width: 640px) {
  .sealion { left: 30%; width: 7rem; }
  .bucket { left: calc(30% - 5rem); }
}

/* ───────────────────────── Let's talk ───────────────────────── */
.talk {
  min-height: 100svh; padding: clamp(5rem, 12vh, 8rem) var(--gutter) 0;
  display: flex; flex-direction: column; background: #000;
}
.talk__title {
  font-stretch: 75%; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.82;
  font-size: 22vw; white-space: nowrap; color: var(--ink);
}
.talk__title span { display: inline-block; }
.talk__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 2.5rem; margin-top: clamp(2.5rem, 6vh, 4rem); }
.talk__pitch { max-width: 26rem; display: grid; gap: 0.9rem; }
.talk__pitch p:first-child { font-size: var(--step-1); line-height: 1.45; }
.talk__email { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.talk__email a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 0.3em; text-decoration-thickness: 1.5px; }
.talk__copy { background: none; border: 0; padding: 0.25rem 0; color: var(--dust); cursor: pointer; font-size: 0.9375rem; text-decoration: underline; text-decoration-color: var(--seam-strong); text-underline-offset: 0.3em; }
.talk__copy:hover { color: var(--ink); }
.talk__links { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; align-self: flex-end; }
.talk__links a { font-stretch: var(--narrow); font-weight: 750; font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem); text-transform: uppercase; letter-spacing: 0.02em; text-decoration: none; color: var(--ink); transition: color 0.2s; }
.talk__links a:hover { color: var(--ember); }
.footer {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding: 1.5rem 0;
  border-top: 1px solid #222; color: var(--dust); font-size: 0.8125rem;
}
.talk .footer { margin-top: auto; }
.talk__foot { margin-bottom: clamp(3rem, 10vh, 6rem); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 120; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--night); font-weight: 600; font-size: 0.9375rem; padding: 0.6rem 1rem; border-radius: 999px;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ───────────────────────── Career detail dialog ───────────────────────── */
.trail {
  width: min(52rem, calc(100% - 2rem)); max-height: min(44rem, calc(100% - 2rem));
  padding: 0; border: 1px solid var(--seam-strong); border-radius: 18px;
  background: var(--dusk); color: var(--ink); overflow: hidden;
}
.trail::backdrop { background: rgba(5, 5, 6, 0.72); backdrop-filter: blur(3px); }
.trail[open] { display: flex; flex-direction: column; animation: trail-in 0.4s var(--ease); }
.trail.is-closing { animation: trail-out 0.2s ease forwards; }
@keyframes trail-in { from { opacity: 0; transform: translateY(1.25rem) scale(0.985); } }
@keyframes trail-out { to { opacity: 0; transform: translateY(0.75rem); } }
.trail__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 1; background: var(--dusk);
  border: 1px solid var(--seam-strong); border-radius: 999px; min-height: 2.4rem; padding: 0.35rem 1rem; cursor: pointer; font-size: 0.875rem;
}
.trail__close:hover { border-color: var(--dust); }
.trail__body { overflow-y: auto; padding: clamp(1.75rem, 4vw, 2.75rem); display: grid; gap: 1rem; }
.trail__kicker { color: var(--ember); font-stretch: var(--narrow); font-weight: 650; font-size: 0.875rem; }
.trail__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; padding-right: 5rem; }
.trail__meta { color: var(--dust); }
.trail__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.1rem 0; border-block: 1px solid var(--seam); margin-top: 0.5rem; }
.trail__facts dt { font-stretch: var(--narrow); font-weight: 600; font-size: var(--step--1); color: var(--dust); }
.trail__facts dd { margin-top: 0.15rem; }
.trail__sub { font-size: 1rem; font-weight: 650; margin-top: 0.75rem; }
.trail__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.trail__chips li { border: 1px solid var(--seam-strong); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.875rem; color: var(--dust); }
.trail__list { display: grid; gap: 0.5rem; }
.trail__list li { position: relative; padding-left: 1.2rem; color: var(--dust); }
.trail__list li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.5rem; height: 1px; background: var(--dust); }
.ledger { margin-top: 0.75rem; border-top: 1px solid var(--seam); }
.ledger > li { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--seam); }
.ledger .tag { justify-self: start; align-self: start; margin-top: 0.2rem; }
.ledger p { color: var(--dust); }
@media (max-width: 560px) {
  .trail__facts { grid-template-columns: 1fr; }
  .ledger > li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ───────────────────────── Case study dialog ───────────────────────── */
.case {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--slag); color: var(--ash);
}
.case::backdrop { background: rgba(8, 7, 6, 0.7); }
.case[open] { display: flex; flex-direction: column; animation: case-in 0.45s var(--ease); }
.case.is-closing { animation: case-out 0.25s ease forwards; }
@keyframes case-in { from { opacity: 0; transform: translateY(2.5rem); } }
@keyframes case-out { to { opacity: 0; transform: translateY(1.5rem); } }
.case__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 4rem; padding-inline: var(--gutter); flex: none;
  border-bottom: 1px solid var(--seam);
}
.case__crumb { color: var(--dust); font-size: 0.9375rem; }
.case__close {
  font: inherit; font-size: 0.9375rem; font-weight: 550; color: var(--ash);
  background: none; border: 1px solid var(--seam-strong); border-radius: 6px;
  min-height: 2.5rem; padding: 0.4rem 1rem; cursor: pointer;
}
.case__close:hover { border-color: var(--dust); }
.case__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.cs { max-width: 1280px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) 6rem; }
.cs__head { display: grid; gap: 1.25rem; justify-items: start; max-width: 56rem; }
.cs__title {
  font-size: clamp(2.2rem, 1rem + 4.2vw, 4.75rem); font-stretch: var(--wide); font-weight: 750;
  letter-spacing: -0.035em; line-height: 1;
}
.cs__lede { color: var(--dust); font-size: var(--step-1); line-height: 1.55; max-width: 60ch; }

.cs__grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 3rem 4rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem); align-items: start;
}
.spec { position: sticky; top: 1.5rem; border-top: 1px solid var(--ember); padding-top: 1.25rem; }
.spec dl { display: grid; gap: 1rem; }
.spec dt { font-stretch: var(--narrow); font-weight: 600; font-size: var(--step--1); color: var(--dust); }
.spec dd { font-size: 0.9375rem; line-height: 1.45; margin-top: 0.15rem; }
.spec__links { display: grid; gap: 0.6rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--seam); }
.spec__links a { font-weight: 550; text-underline-offset: 0.3em; text-decoration-color: var(--seam-strong); }
.spec__links a:hover { text-decoration-color: var(--ember); }
.spec__note { margin-top: 1.5rem; color: var(--dust); font-size: 0.875rem; }
@media (max-width: 900px) {
  .cs__grid { grid-template-columns: 1fr; }
  .spec { position: static; }
}

.cs__body { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); min-width: 0; }
.cs__block { display: grid; gap: 1rem; }
.cs__block > h3 { font-size: var(--step-2); font-weight: 650; letter-spacing: -0.01em; }
.cs__block > p { color: var(--dust); max-width: 66ch; }
.cs__list { display: grid; gap: 0.75rem; max-width: 66ch; }
.cs__list > li { position: relative; padding-left: 1.25rem; color: var(--dust); }
.cs__list > li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.5rem; height: 1px; background: var(--dust); }
.cs__list--num { counter-reset: n; }
.cs__list--num > li { counter-increment: n; padding-left: 2rem; }
.cs__list--num > li::before {
  content: counter(n); width: auto; height: auto; background: none; top: 0;
  font-stretch: var(--narrow); font-weight: 650; color: var(--ember);
}

.feat { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.feat th, .feat td { text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--seam); vertical-align: top; }
.feat thead th { font-stretch: var(--narrow); font-weight: 600; color: var(--dust); font-size: var(--step--1); }
.feat td:nth-child(2) { font-variant-numeric: tabular-nums; }
.feat td:last-child { color: var(--dust); }
.feat tfoot th, .feat tfoot td { border-bottom: 0; font-weight: 650; color: var(--ash); }

/* Pipeline strip: the stages a project really has, drawn once when scrolled into view. */
.pipe__key { display: flex; align-items: center; gap: 0.6rem; color: var(--dust); font-size: 0.875rem; }
.swatch { flex: none; width: 0.9rem; height: 0.9rem; border-radius: 3px; }
.swatch--learned { background: var(--ember); }
.pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 0.5rem; }
.pipe > li {
  position: relative; display: grid; align-content: start; gap: 0.3rem;
  padding: 2.4rem 1rem 1rem 0;
}
/* rail */
.pipe > li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0.72rem; height: 1px;
  background: var(--seam-strong);
  transform: scaleX(var(--draw, 1)); transform-origin: left;
  transition: transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.12s);
}
.pipe > li:nth-child(3n)::before, .pipe > li:last-child::before { right: auto; width: 1.5rem; }
.pipe__n {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 1.45rem; height: 1.45rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--slag); border: 1px solid var(--dust);
  font-stretch: var(--narrow); font-weight: 650; font-size: 0.75rem; color: var(--ash);
  opacity: var(--draw, 1); transition: opacity 0.3s; transition-delay: calc(var(--i, 0) * 0.12s);
}
.pipe > li[data-kind="learned"] .pipe__n { background: var(--ember); border-color: var(--ember); color: var(--slag); }
.pipe > li[data-kind="data"] .pipe__n { border-style: dashed; }
.pipe strong { font-weight: 650; font-size: 0.9375rem; line-height: 1.3; }
.pipe > li[data-kind="learned"] strong { color: var(--ember); }
.pipe span:not(.pipe__n) { color: var(--dust); font-size: 0.875rem; line-height: 1.4; }
.js .pipe:not(.is-drawn) { --draw: 0; }
@media (max-width: 640px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe > li { padding: 0 0 1.25rem 2.4rem; }
  .pipe > li::before { left: 0.72rem; right: auto; top: 0; bottom: 0; width: 1px; height: auto; transform: scaleY(var(--draw, 1)); transform-origin: top; }
  .pipe > li:nth-child(3n)::before { width: 1px; }
  .pipe > li:last-child::before { display: none; }
}

/* Model comparison bars, on an honest 0–100 scale. */
.bars { display: grid; gap: 0.9rem; }
.bars { font-variant-numeric: tabular-nums; }
.bars__row {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 3.5rem 4rem; align-items: center; gap: 1rem;
  font-size: 0.9375rem;
}
.bars__label { color: var(--dust); }
.bars__row.is-best .bars__label { color: var(--ash); font-weight: 600; }
.bars__track { position: relative; height: 0.7rem; background: var(--iron); border-radius: 2px; }
.bars__fill {
  position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%);
  background: var(--seam-strong); border-radius: 2px;
  transform: scaleX(var(--draw, 1)); transform-origin: left; transition: transform 0.9s var(--ease);
}
.bars__row.is-best .bars__fill { background: var(--ember); }
.bars__chance { position: absolute; left: 12.5%; top: -0.3rem; bottom: -0.3rem; width: 1px; background: var(--dust); }
.bars__val { font-weight: 600; text-align: right; }
.bars__ms { color: var(--dust); text-align: right; }
.bars figcaption { color: var(--dust); font-size: 0.8125rem; margin-top: 0.3rem; }
.js .bars:not(.is-drawn) { --draw: 0; }
@media (max-width: 640px) {
  .bars { font-variant-numeric: tabular-nums; }
.bars__row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.4rem 0.75rem; }
  .bars__track { grid-column: 1 / -1; grid-row: 2; }
}

/* Case studies in the night-trail type: normal width, calmer weight. */
.cs__title { font-stretch: 100%; font-weight: 700; }
.case__close { border-radius: 999px; }
.spec { border-top-color: var(--seam-strong); }

/* ───────────────────────── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .hero__name, .js .hero__role, .js .hero__lede, .js .hero__actions { opacity: 1; transform: none; }
  .sun--travel { display: none; }
  .star__icon { animation: none !important; }
  .sl-head, .sealion__balance, .sealion__ball svg, .heart, .sl-flipper, .sl-mouth-open { animation: none !important; }
  .sl-head { transition: none; }
  .range__drift, .sun__rays, .bee, .bee .wing, .butterfly, .bf__wings, .lamp__halo, .river__ripples, .river__leaf, .range__climber *, .music__bars i { animation: none !important; }
}
