/* hitesh goyal, page styles. Layers over brand.css (shared tokens).
   Street level: the daylight surface above the underground lab at
   turqoizelabs.com. Print-editorial — a morning paper with kinetic type.
   One mood only; dark lives downstairs. */

/* Tokens ─────────────────────────────────────────────── */
:root {
  --paper: #FAFAF6;
  --ink:   #0F1414;
  --turq:  #0F8479;
  --stone: #6B6B66;
  --line:  #DDD9D0;
  --soft:  #F1EFE8;
  --wash:  #E6F1EE;
  --deep:  #0A5A52;
  --glow:  none;
}
/* Night edition: the street reads the clock; after dark the paper flips.
   Set pre-paint by an inline script, refreshed by street.js. */
html[data-phase="night"] {
  --paper: #0A0E14;
  --ink:   #E9EEEC;
  --turq:  #2BD9C7;
  --stone: #97A19B;
  --line:  rgba(233, 238, 236, 0.14);
  --soft:  #0E1319;
  --wash:  rgba(43, 217, 199, 0.07);
  --deep:  #8FF7E8;
}
html { background: var(--paper); }
body {
  background-image:
    linear-gradient(to right, rgba(15,132,121,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,132,121,0.025) 1px, transparent 1px);
  transition: background-color .6s ease, color .6s ease;
}
html[data-phase="night"] body {
  background-image:
    linear-gradient(to right, rgba(43,217,199,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43,217,199,0.035) 1px, transparent 1px);
}

/* Faint newsprint grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav ────────────────────────────────────────────────── */
.nav { background: rgba(250, 250, 246, 0.92); backdrop-filter: saturate(160%) blur(10px); }
.nav.scrolled { box-shadow: 0 8px 24px rgba(15, 20, 20, 0.06); }
html[data-phase="night"] .nav { background: rgba(10, 14, 20, 0.78); }
html[data-phase="night"] .nav.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
html[data-phase="night"] body::after { opacity: 0.045; }
.nav-brand .wordmark, .footer .wordmark { color: var(--ink); }
.nav-links a { color: var(--stone); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

main { position: relative; }

/* Newspaper rules ───────────────────────────────────── */
.rule-double { border-top: 2px solid var(--ink); border-bottom: 0.5px solid var(--ink); height: 4px; }
.rule-thick  { border-top: 2px solid var(--ink); }

/* Masthead + hero ────────────────────────────────────── */
.hero {
  min-height: calc(100svh - 56px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 40px; padding-bottom: 130px; /* room for the street below */
  position: relative;
  overflow: hidden; /* dragged letters stay on the page */
}
/* The street itself: sky, skyline, road — painted behind the masthead */
#street {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero .container:not(.hero-foot) { position: relative; z-index: 1; }
.hero-foot { z-index: 1; } /* keeps its absolute anchor from the rule below */
.masthead {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 11px; margin-bottom: 10px;
}
.masthead .ed { color: var(--turq); }

/* Kinetic headline: two lines of draggable metal type */
.kin {
  font-size: clamp(72px, 14.5vw, 200px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-top: 34px;
  max-width: none;
  user-select: none;
  -webkit-user-select: none;
  transform: skewY(calc(var(--vel, 0) * -0.06deg));
}
.kin .kin-line { display: block; }
.kin .kin-line.kin-em { font-style: italic; color: var(--turq); }
.kin .kl {
  display: inline-block;
  will-change: transform;
  cursor: grab;
  touch-action: none;
}
.kin .kl:active { cursor: grabbing; }

.hero-deck {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px; align-items: end;
  margin-top: 44px;
}
.hero .hero-role {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 22px);
  color: var(--ink); line-height: 1.5;
  max-width: 560px;
}
.hero .hero-role b { font-weight: 500; }
.hero .hero-body {
  font-size: 14px; color: var(--stone); line-height: 1.65;
  border-left: 2px solid var(--turq);
  padding-left: 16px;
}
.hero-cta { margin-top: 36px; display: flex; align-items: center; gap: 28px; }
.hero-cta .cv-link { color: var(--ink); border: none; }
.hero-cta .cv-link:hover { color: var(--turq); }

.hero-foot {
  position: absolute; left: 24px; right: 24px; bottom: 82px; /* above the road */
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.hero-foot .mono { font-size: 11.5px; }
/* Street signs: the hints stand on readable plates over the scene */
.hero-foot .plate {
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 0.5px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--ink);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .hero-foot .plate { background: var(--paper); }
}
.phase-flip {
  appearance: none; background: none; border: none; padding: 0;
  font-family: var(--mono); font-size: 11px; color: var(--turq);
  cursor: pointer; border-bottom: 0.5px solid currentColor;
}
.phase-flip:hover { color: var(--deep); }
.scroll-hint { display: inline-flex; align-items: center; gap: 10px; }
.scroll-hint::after {
  content: ''; width: 1px; height: 34px;
  background: linear-gradient(var(--turq), transparent);
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint::after { animation: dripDown 1.8s var(--ease-out-quint) infinite; }
  @keyframes dripDown {
    0%   { clip-path: inset(0 0 100% 0); }
    45%  { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(100% 0 0 0); }
  }
}

/* Section head: column headers with folio numbers ────── */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  transform: skewY(calc(var(--vel, 0) * -0.045deg));
}
.section-head .sec-num {
  color: transparent;
  -webkit-text-stroke: 1px var(--stone);
  font-size: 40px;
  transform: translateY(calc(var(--vel, 0) * 0.6px));
}
.section-head + .rule-thick { margin-bottom: 40px; }
/* Rules print themselves as they arrive */
html.io :is(.rule-thick, .rule-double) {
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.1s var(--ease-out-expo);
}
html.io :is(.rule-thick, .rule-double).in { transform: scaleX(1); }

/* Mood-aware marks and inline SVGs */
.mark-ink { stroke: var(--ink); }
.mark-turq { stroke: var(--turq); }
svg [stroke="#2BD9C7"] { stroke: var(--turq); }

/* Prose ──────────────────────────────────────────────── */
.prose { columns: 1; }
.prose p {
  font-size: 16px; line-height: 1.75;
  color: var(--ink); max-width: 640px; margin-bottom: 18px;
}
.prose p:last-child { margin-bottom: 0; }
.prose .dropcap::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 58px; line-height: 0.8;
  padding: 6px 10px 0 0;
  color: var(--turq);
}

/* The work: editorial spreads, not cards ─────────────── */
.spread-list { border-top: 2px solid var(--ink); }
.spread {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 60px;
  gap: 28px; align-items: baseline;
  padding: 34px 0;
  border-bottom: 0.5px solid var(--line);
  color: inherit; text-decoration: none;
  position: relative;
}
.spread-num {
  font-size: 12px; color: var(--stone);
  transition: color .25s ease;
}
.spread-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ink);
  transition: transform .45s var(--ease-out-quint), color .25s ease, font-style 0s;
  display: inline-block;
}
.spread:hover .spread-title { transform: translateX(14px); font-style: italic; color: var(--turq); }
.spread:hover .spread-num { color: var(--turq); }
.spread-deck {
  margin-top: 12px;
  font-size: 14px; color: var(--stone); line-height: 1.6;
  max-width: 560px;
}
.spread-meta { display: block; margin-top: 14px; font-size: 11px; color: var(--stone); }
.spread-arrow {
  font-family: var(--serif); font-size: 30px; color: var(--line);
  justify-self: end;
  transition: transform .45s var(--ease-out-quint), color .25s ease;
}
.spread:hover .spread-arrow { transform: translateX(8px); color: var(--turq); }
/* Ink wash swells under the hovered spread */
.spread::before {
  content: ''; position: absolute; inset: 0 -24px;
  background: var(--soft);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .45s var(--ease-out-quint);
  z-index: -1;
}
.spread:hover::before { transform: scaleY(1); }

/* The peek: a sketch card that follows the pointer over a spread */
#peek {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: 150px; height: 150px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 10px;
  display: grid; place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-6deg) scale(0.85);
  transition: opacity .22s ease, transform .35s var(--ease-out-quint);
  box-shadow: 0 18px 44px rgba(15, 20, 20, 0.16);
}
#peek.on { opacity: 1; transform: rotate(-4deg) scale(1); }
#peek svg { width: 96px; height: 96px; color: var(--ink); }
#peek.on svg .d {
  stroke-dasharray: 140; stroke-dashoffset: 140;
  animation: peekDraw .9s var(--ease-out-quint) forwards;
}
@keyframes peekDraw { to { stroke-dashoffset: 0; } }

/* Writing: the reading list ──────────────────────────── */
.note-intro {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--stone);
  margin-bottom: 28px; max-width: 520px;
}
.note-list { border-top: 2px solid var(--ink); counter-reset: note; }
.note-row {
  display: flex; align-items: baseline; gap: 24px;
  padding: 20px 0;
  border-bottom: 0.5px solid var(--line);
  color: inherit;
}
.note-row::before {
  counter-increment: note;
  content: counter(note, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--stone);
  transition: color .2s ease;
}
.note-row:hover::before { color: var(--turq); }
.note-row .note-title { flex: 1; }
.note-row .note-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--ink);
  transition: color .2s ease, transform .35s var(--ease-out-quint);
  display: inline-block;
}
.note-row:hover .note-title { color: var(--turq); transform: translateX(10px); font-style: italic; }
.note-row .note-meta { font-family: var(--mono); font-size: 11px; color: var(--stone); white-space: nowrap; }

/* Experience: a timeline that draws itself ───────────── */
.xp-list {
  list-style: none; margin: 0; padding: 0 0 0 30px;
  border-top: 2px solid var(--ink);
  position: relative;
  --xp: 0;
}
.xp-list::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.xp-list::after {
  content: ''; position: absolute; left: 7px; top: 0;
  width: 1px; height: calc(var(--xp) * 100%);
  background: var(--turq);
  box-shadow: 0 0 8px rgba(15, 132, 121, 0.35);
}
.xp-item {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px 24px; padding: 28px 0;
  border-bottom: 0.5px solid var(--line);
  transition: padding-left .35s var(--ease-out-quint);
  position: relative;
}
.xp-item::before {
  content: ''; position: absolute; left: -27px; top: 33px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--stone);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.xp-item.lit::before {
  background: var(--turq); border-color: var(--turq);
  box-shadow: 0 0 10px rgba(15, 132, 121, 0.45);
}
/* Ghost year rises behind the hovered role */
.xp-item::after {
  content: attr(data-year);
  position: absolute; right: 0; top: -6px;
  font-family: var(--serif); font-size: 76px; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .45s var(--ease-out-quint);
  pointer-events: none;
}
.xp-item:hover::after { opacity: 1; transform: none; }
.xp-item:hover { padding-left: 10px; }
.xp-role { font: 500 15px var(--sans); color: var(--ink); }
.xp-role .at { color: var(--stone); font-weight: 400; }
.xp-dates { font-family: var(--mono); font-size: 12px; color: var(--stone); white-space: nowrap; }
.xp-sub { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--stone); }
.xp-item p { grid-column: 1 / -1; font-size: 13.5px; color: var(--stone); line-height: 1.6; max-width: 640px; }

/* Stack ──────────────────────────────────────────────── */
.stack-block { display: flex; flex-direction: column; }
.stack-block .chip-ticker + .chip-ticker { border-top: none; }
.chip { background: transparent; }
.chip:hover { border-color: var(--turq); color: var(--turq); }

/* Quote band: a pull quote off the presses ───────────── */
.quote-band { background: transparent; position: relative; }
.quote-band .quote { font-size: clamp(20px, 2.8vw, 28px); max-width: 640px; }
.quote-band::before {
  content: '\201C';
  position: absolute; top: 34px; left: 50%;
  transform: translateX(-320px);
  font-family: var(--serif); font-size: 130px; line-height: 1;
  color: var(--wash);
  pointer-events: none;
}

/* Threshold / contact ────────────────────────────────── */
.threshold { background: var(--soft); padding: 120px 0; position: relative; overflow: hidden; }
/* The shout: a giant outline headline rolling behind the band */
.shout {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}
.shout-track { display: inline-flex; }
.shout span {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(90px, 12vw, 170px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 14%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .shout span { -webkit-text-stroke: 1px rgba(127, 127, 127, 0.2); }
}
@media (prefers-reduced-motion: no-preference) {
  .shout-track { animation: shoutRoll 38s linear infinite; }
  @keyframes shoutRoll { to { transform: translateX(-50%); } }
}
.threshold-inner { position: relative; z-index: 1; }
.threshold h2 { margin-top: 16px; font-size: clamp(28px, 4vw, 40px); }
.threshold-body {
  margin-top: 16px; max-width: 460px;
  font-size: 15px; color: var(--ink); line-height: 1.6;
}
.threshold-cta { margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.threshold-cta .mail-link { color: var(--ink); border: none; font-size: 15px; }
.threshold-cta .mail-link:hover { color: var(--turq); }
.wash-band::before {
  background:
    radial-gradient(38% 42% at 30% 40%, rgba(15,132,121,0.16), transparent 70%),
    radial-gradient(30% 36% at 72% 62%, rgba(10,90,82,0.10), transparent 70%);
}

/* The service elevator: the way down to the lab ──────── */
.elevator-band {
  background: #050B0C;
  color: #E6F2EF;
  padding: 72px 0;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(18,230,200,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18,230,200,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.elevator-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
}
.elevator-band .mono { color: #7E9B96; }
.elevator-line {
  margin-top: 10px;
  font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px);
  color: #E6F2EF; max-width: 560px; line-height: 1.4;
}
.elevator-line .nn {
  color: #C9FFF6;
  text-shadow:
    0 0 6px rgba(18,230,200,0.55),
    0 0 18px rgba(18,230,200,0.30);
  font-style: italic;
}
@media (prefers-reduced-motion: no-preference) {
  .elevator-line .nn { animation: nnTired 7s 3s infinite; }
  @keyframes nnTired {
    0%, 88%, 92%, 100% { opacity: 1; }
    89%, 91% { opacity: 0.25; text-shadow: none; }
  }
}
.btn-down {
  border-color: #12E6C8; color: #12E6C8;
  background-image: linear-gradient(#12E6C8, #12E6C8);
  white-space: nowrap;
}
.btn-down:hover { color: #050B0C; }
@media (prefers-reduced-motion: no-preference) {
  .btn-down { animation: downPulse 3.4s ease-in-out infinite; }
  @keyframes downPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(18,230,200,0.10); }
    50%      { box-shadow: 0 0 0 1px rgba(18,230,200,0.28), 0 0 26px rgba(18,230,200,0.32); }
  }
}

/* Descent overlay: doors close, the level counter falls */
#descent { position: fixed; inset: 0; z-index: 600; pointer-events: none; visibility: hidden; }
#descent.going { visibility: visible; pointer-events: auto; }
#descent::before, #descent::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: #030808;
  transition: transform .7s var(--ease-out-expo);
}
#descent::before { left: 0; transform: translateX(-101%); border-right: 1px solid rgba(18,230,200,0.35); }
#descent::after  { right: 0; transform: translateX(101%); border-left: 1px solid rgba(18,230,200,0.35); }
#descent.going::before { transform: translateX(0); }
#descent.going::after  { transform: translateX(0); }
#descent .descent-level {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; transition: opacity .3s ease .5s;
  font-family: var(--mono);
}
#descent.going .descent-level { opacity: 1; }
#descent .descent-label { font-size: 11px; letter-spacing: 0.3em; color: #7E9B96; text-transform: lowercase; }
#descent .descent-num {
  font-size: 44px; color: #C9FFF6;
  text-shadow: 0 0 6px rgba(18,230,200,0.55), 0 0 18px rgba(18,230,200,0.30);
  font-variant-numeric: tabular-nums;
}

/* Essays: the reading page ───────────────────────────── */
.essay { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.essay-head { padding: 72px 0 20px; }
.essay-head .essay-crumb { font-size: 11px; margin-bottom: 28px; }
.essay-head .essay-crumb a { color: var(--stone); border: none; }
.essay-head .essay-crumb a:hover { color: var(--turq); }
.essay-head .essay-meta { font-size: 11px; margin-bottom: 14px; color: var(--turq); }
.essay-head h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1; max-width: 640px; margin: 0 0 22px;
}
.essay-head .essay-lede {
  font-family: var(--serif); font-style: italic;
  font-size: 18px; line-height: 1.55;
  color: var(--stone); max-width: 580px;
}
.essay .rule-thick { margin-bottom: 8px; }
.essay-body { padding: 32px 0 56px; }
.essay-body p { font-size: 16.5px; line-height: 1.75; margin: 0 0 20px; }
.essay-body > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left; font-size: 56px; line-height: 0.8;
  padding: 6px 10px 0 0; color: var(--turq);
}
.essay-body h2 { font-size: 24px; margin: 46px 0 18px; }
.essay-body h3 { font-size: 17px; margin: 34px 0 14px; }
.essay-body ul, .essay-body ol { padding-left: 22px; margin: 0 0 20px; }
.essay-body li { font-size: 16px; line-height: 1.65; margin-bottom: 10px; }
.essay-body blockquote { margin: 30px 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--turq); }
.essay-body blockquote p { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0; }
.essay-body code { font-family: var(--mono); font-size: 13.5px; background: var(--soft); padding: 2px 6px; border-radius: 4px; }
.essay-body .code {
  background: var(--soft); border: 0.5px solid var(--line); border-radius: 8px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 20px;
}
.essay-body .code code { background: none; padding: 0; font-size: 13px; line-height: 1.55; }
.essay-body .fig-img, .essay-body .fig-d2 { margin: 28px 0; }
.essay-body .fig-img img { max-width: 100%; border-radius: 10px; border: 0.5px solid var(--line); display: block; }
.essay-body .fig-d2 {
  background: #FAFAF6; border: 0.5px solid var(--line); border-radius: 10px;
  padding: 20px; overflow-x: auto;
}
.essay-body .fig-d2 svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.essay-foot { border-top: 0.5px solid var(--line); padding: 28px 0 72px; }
.essay-next { margin-top: 18px; }
.essay-back { margin-top: 28px; font-family: var(--mono); font-size: 12px; }
.essay-back a { color: var(--stone); border: none; }
.essay-back a:hover { color: var(--turq); }

/* Reading progress: a turquoise rule under the nav, scrubbed by scroll */
.essay-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .essay-progress {
    display: block;
    position: fixed; top: 55px; left: 0; z-index: 60;
    width: 100%; height: 2px;
    background: var(--turq);
    transform: scaleX(0); transform-origin: 0 50%;
    animation: readProgress linear both;
    animation-timeline: scroll(root);
    pointer-events: none;
  }
  @keyframes readProgress { to { transform: scaleX(1); } }
}

/* Footer ─────────────────────────────────────────────── */
.footer { background: var(--soft); position: relative; z-index: 1; margin-top: 0; }

/* Preloader: ascending to street level ───────────────── */
#loader {
  position: fixed; inset: 0; z-index: 500;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: transform .7s var(--ease-out-expo), opacity .5s ease;
}
#loader.done { transform: translateY(-100%); opacity: 0.6; pointer-events: none; }
#loader svg rect { stroke-dasharray: 60; stroke-dashoffset: 60; }
@media (prefers-reduced-motion: no-preference) {
  #loader svg rect { animation: draw .8s cubic-bezier(.7,0,.3,1) forwards; }
  #loader svg rect:nth-of-type(1) { animation-delay: .05s; }
  #loader svg rect:nth-of-type(2) { animation-delay: .2s; }
  #loader svg rect:nth-of-type(3) { animation-delay: .35s; }
  #loader svg rect:nth-of-type(4) { animation-delay: .5s; }
}
@media (prefers-reduced-motion: reduce) { #loader { display: none; } }
.loader-meta {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--stone);
}
.loader-meta #loader-count { color: var(--turq); font-variant-numeric: tabular-nums; }

/* Custom cursor ──────────────────────────────────────── */
.cur-dot, .cur-ring, .cur-label { display: none; }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.cur-on, html.cur-on a, html.cur-on button, html.cur-on .card { cursor: none; }
  html.cur-on .cur-dot, html.cur-on .cur-ring, html.cur-on .cur-label { display: block; }
  .cur-dot {
    position: fixed; top: 0; left: 0; z-index: 300;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--turq);
    pointer-events: none;
    transform: translate(-50%, -50%);
  }
  .cur-ring {
    position: fixed; top: 0; left: 0; z-index: 299;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--turq);
    opacity: 0.5;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease-out-quint), height .25s var(--ease-out-quint), opacity .2s ease;
  }
  html.cur-hover .cur-ring { width: 56px; height: 56px; opacity: 0.9; }
  .cur-label {
    position: fixed; top: 0; left: 0; z-index: 301;
    font-family: var(--mono); font-size: 10px; color: var(--paper);
    background: var(--turq);
    padding: 2px 7px; border-radius: 999px;
    pointer-events: none;
    transform: translate(14px, 14px);
    opacity: 0;
    transition: opacity .2s ease;
  }
  html.cur-hover .cur-label.on { opacity: 1; }
}

/* Hero load choreography (only with anims-on) ────────── */
html.anims-on .kin .kl {
  opacity: 0; transform: translateY(70px) rotate(4deg);
  animation: typeDrop .9s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--d, 0) * 45ms + 0.15s);
}
@keyframes typeDrop {
  to { opacity: 1; transform: none; }
}
html.anims-on .hero-body.reveal, html.anims-on .hero-role.reveal {
  animation-name: riseBlur; animation-duration: .9s;
}
@keyframes riseBlur {
  from { opacity: 0; transform: translateY(12px); filter: blur(10px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}

/* Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .spread { grid-template-columns: 48px minmax(0, 1fr); }
  .spread-arrow { display: none; }
}
@media (max-width: 720px) {
  .hero { min-height: calc(96svh - 56px); }
  .hero-deck { grid-template-columns: 1fr; gap: 20px; }
  .hero-cta { flex-wrap: wrap; }
  .hero-foot { position: static; margin-top: 48px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .masthead { flex-direction: column; gap: 2px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head .sec-num { font-size: 28px; }
  .xp-item { grid-template-columns: 1fr; }
  .elevator-inner { flex-direction: column; align-items: flex-start; }
}
