/* ============================================================
   BUTOWSKY · A CONSTELLATION
   Restrained, atmospheric. Less terminal, more nebula.
   ============================================================ */

:root {
  /* ---------------- palette ---------------- */
  --c-deep:       #020414;
  --c-navy:       #050b27;
  --c-navy-soft:  #0a1444;
  --c-bloom-v:    rgba(58, 32, 110, 0.55);   /* violet nebula bloom */
  --c-bloom-b:    rgba(28, 60, 130, 0.40);   /* blue nebula bloom */
  --c-ivory:      #f4f1e6;
  --c-ivory-dim:  rgba(244, 241, 230, 0.55);
  --c-ivory-soft: rgba(244, 241, 230, 0.28);
  --c-ivory-faint:rgba(244, 241, 230, 0.10);
  --c-glow:       rgba(244, 241, 230, 0.85); /* white star halo */
  --c-line:       rgba(244, 241, 230, 0.18);
  --c-amber:      #e9c389;                   /* one warm accent, used sparingly */

  /* ---------------- type ------------------- */
  --f-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-body:    "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono:    "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-italic:  "Fraunces", "Iowan Old Style", Georgia, serif;

  --t-eyebrow:  clamp(0.62rem, 0.58rem + 0.16vw, 0.72rem);
  --t-mono:     clamp(0.65rem, 0.60rem + 0.18vw, 0.78rem);
  --t-body:     clamp(0.95rem, 0.90rem + 0.25vw, 1.10rem);
  --t-lede:     clamp(1.10rem, 0.95rem + 0.65vw, 1.45rem);
  --t-h2:       clamp(1.50rem, 1.10rem + 1.80vw, 2.40rem);
  --t-display:  clamp(2.40rem, 1.40rem + 5.00vw, 6.50rem);
  --t-name:     clamp(2.20rem, 1.60rem + 3.20vw, 4.80rem);

  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-5: 3rem; --s-6: 5rem;

  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast:  220ms;
  --d-med:   480ms;
  --d-slow:  900ms;
  --d-cinema: 1500ms;

  --hero-fade: 1; /* JS sets this 1 -> 0 as user scrolls past hero */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--c-ivory); color: var(--c-navy); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

html, body {
  background: var(--c-deep);
  color: var(--c-ivory);
  font-family: var(--f-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--f-mono); font-feature-settings: "tnum"; }

/* ============================================================
   THE SKY — atmospheric, with nebula blooms
   ============================================================ */

.sky {
  position: fixed; inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, var(--c-bloom-v) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 75% 75%, var(--c-bloom-b) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 50%, var(--c-navy-soft) 0%, var(--c-navy) 30%, var(--c-deep) 75%);
  pointer-events: none;
}
/* (vignette dropped — was muddying midtones) */

.starfield {
  position: absolute;
  inset: -10%;
  background-repeat: repeat;
  transition: transform 80ms linear;
  will-change: transform;
}
.starfield.layer-1 {
  /* Densest layer — small distant stars */
  background-size: 500px 500px;
  background-image:
    radial-gradient(0.8px 0.8px at 7% 12%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 13% 19%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 23% 47%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 28% 8%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 31% 73%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.7px 0.7px at 39% 35%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 41% 83%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 47% 96%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 52% 58%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.7px 0.7px at 58% 26%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 64% 67%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 67% 12%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 71% 88%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 76% 33%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 81% 54%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1px 1px at 89% 71%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 93% 38%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 9% 64%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 96% 9%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 18% 91%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 84% 84%, var(--c-ivory-soft) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 3% 41%, var(--c-ivory-dim) 50%, transparent 50%);
  opacity: 0.65;
}
.starfield.layer-2 {
  /* Mid layer — slightly larger, brighter stars */
  background-size: 800px 800px;
  background-image:
    radial-gradient(1px 1px at 6% 38%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 11% 88%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1.2px 1.2px at 19% 14%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.9px 0.9px at 26% 62%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.2px 1.2px at 31% 22%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 38% 79%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1.1px 1.1px at 44% 45%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.7px 0.7px at 49% 91%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1px 1px at 55% 7%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 56% 14%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1px 1px at 63% 36%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.9px 0.9px at 71% 73%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.4px 1.4px at 78% 51%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.7px 0.7px at 82% 23%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.7px 0.7px at 92% 19%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(1.1px 1.1px at 88% 81%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 96% 64%, var(--c-ivory-dim) 50%, transparent 50%),
    radial-gradient(0.8px 0.8px at 2% 71%, var(--c-ivory-dim) 50%, transparent 50%);
  opacity: 0.55;
}
.starfield.layer-3 {
  /* Foreground — sparser bright stars */
  background-size: 1200px 1200px;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 27%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.4px 1.4px at 20% 60%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(2px 2px at 29% 9%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.6px 1.6px at 47% 38%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.8px 1.8px at 64% 84%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 73% 16%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.8px 1.8px at 82% 76%, var(--c-ivory) 50%, transparent 50%),
    radial-gradient(1.4px 1.4px at 91% 42%, var(--c-ivory) 50%, transparent 50%);
  opacity: 0.5;
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.35; }
  to   { opacity: 0.55; }
}

/* The constellation container */
.chart {
  position: absolute;
  inset: 0;
  will-change: transform;
}


/* ============================================================
   STARS — pure dot + soft halo, no reticle
   ============================================================ */

.star {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--d-slow) var(--ease);
}
.star.active { opacity: 1; }

.star-marker {
  width: 18px;
  height: 18px;
  position: relative;
  margin: 0 auto;
  display: block;
  border-radius: 50%;
  background: var(--c-ivory);
  box-shadow:
    0 0 6px #fff,
    0 0 18px var(--c-glow),
    0 0 36px rgba(244, 241, 230, 0.45),
    0 0 80px rgba(244, 241, 230, 0.18);
  transition: transform var(--d-fast) var(--ease), box-shadow var(--d-fast) ease;
  animation: starPulse 4.2s ease-in-out infinite alternate;
}

@keyframes starPulse {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}

.star.surveyed .star-marker {
  width: 20px;
  height: 20px;
  background: var(--c-amber);
  box-shadow:
    0 0 8px #fbe5bf,
    0 0 22px rgba(233, 195, 137, 0.85),
    0 0 44px rgba(233, 195, 137, 0.4),
    0 0 96px rgba(233, 195, 137, 0.18);
}

.star:hover .star-marker {
  transform: scale(1.4);
  box-shadow:
    0 0 12px #fff,
    0 0 28px var(--c-ivory),
    0 0 56px rgba(244, 241, 230, 0.5),
    0 0 112px rgba(244, 241, 230, 0.25);
}

/* Star label — name only, restrained */
.star-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 22px);
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--c-ivory);
  pointer-events: none;
  line-height: 1.15;
}
.star-label .name {
  display: block;
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
  letter-spacing: -0.015em;
}
.star-label .meta {
  display: block;
  font-family: var(--f-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ivory-dim);
  margin-top: 4px;
  font-weight: 500;
  font-feature-settings: "tnum";
}

/* ============================================================
   CONNECTOR LINES (SVG) — barely-there hairlines
   ============================================================ */

.chart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.line {
  fill: none;
  stroke: var(--c-line);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  transition: stroke-dashoffset 1600ms var(--ease-io), opacity 600ms ease, stroke var(--d-fast);
  opacity: 0;
}
.line.active { stroke-dashoffset: 0; opacity: 1; }
.line.binary { stroke: var(--c-ivory-soft); }

/* Marriage year labels — bold sans, tabular figures, no decoration */
.line-label {
  position: absolute;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--c-ivory);
  background: var(--c-deep);
  padding: 3px 10px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity var(--d-med) ease;
  pointer-events: none;
  font-feature-settings: "tnum";
}
.line-label.active { opacity: 1; }

/* (binary orbits dropped — pure tree lines now) */

/* ============================================================
   SHOOTING STAR — soft white trail
   ============================================================ */

.shooting-star {
  position: absolute;
  width: 90px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--c-ivory) 80%, #fff 100%);
  transform: translate(-100%, -50%) rotate(0deg);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(244, 241, 230, 0.6));
}

/* ============================================================
   HUD — minimal, just identity + survey count
   ============================================================ */

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ivory-dim);
  font-weight: 350;
}

.hud-mark {
  position: absolute;
  top: 1.5rem;
  left: clamp(1rem, 3vw, 2rem);
  letter-spacing: 0.16em;
  color: var(--c-ivory);
  font-weight: 700;
  font-size: 0.82rem;
}
.hud-counter {
  position: absolute;
  top: 1.5rem;
  right: clamp(1rem, 3vw, 2rem);
  letter-spacing: 0.16em;
  color: var(--c-ivory-dim);
  font-feature-settings: "tnum";
  font-weight: 600;
  font-size: 0.82rem;
  transition: color var(--d-med) ease, letter-spacing var(--d-med) ease;
}
.hud-counter b {
  color: var(--c-ivory);
  font-weight: 700;
}
.chart-complete-settled .hud-counter { color: var(--c-amber); }
.chart-complete-settled .hud-counter b { color: var(--c-amber); }

/* ============================================================
   HERO SCENE — wordmark + Look up.
   The wordmark is FIXED and fades via --hero-fade as you scroll past hero.
   ============================================================ */

.hero-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  pointer-events: none;
  opacity: var(--hero-fade);
  transition: opacity 80ms linear;
}

.lookup {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-italic);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.6rem);
  color: var(--c-ivory);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  opacity: 0;
  animation: lookupBeat 4.4s ease forwards;
  letter-spacing: -0.01em;
}
@keyframes lookupBeat {
  0%   { opacity: 0; transform: translate(-50%, -50%) translateY(8px); }
  18%  { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  60%  { opacity: 1; }
  78%  { opacity: 0; transform: translate(-50%, -50%) translateY(-8px); }
  100% { opacity: 0; }
}

.wordmark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 2.2rem + 7vw, 9.5rem);
  letter-spacing: -0.04em;
  color: var(--c-ivory);
  text-align: center;
  line-height: 0.92;
  opacity: 0;
  animation: wordmarkIn 1.4s var(--ease) 3.4s forwards;
}
@keyframes wordmarkIn {
  from { opacity: 0; transform: translateY(20px); letter-spacing: 0.02em; }
  to   { opacity: 1; transform: translateY(0); letter-spacing: -0.04em; }
}

.scroll-cue {
  position: absolute;
  bottom: 8%;
  left: 50%; transform: translateX(-50%);
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--c-ivory-dim), transparent);
  opacity: 0;
  animation: fadeIn 1s ease 5s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Scroll spacers (no visible content) */
.scenes { position: relative; z-index: 1; }
.scene  { height: 100vh; height: 100svh; }

/* ============================================================
   BIO PANEL
   ============================================================ */

.bio {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--c-navy);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms var(--ease);
}
.bio.open { opacity: 1; pointer-events: auto; }

.bio-main {
  padding: clamp(4rem, 10vh, 7rem) clamp(2rem, 6vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  position: relative;
}

.bio-eyebrow {
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-ivory-dim);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.bio-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.8rem + 3.6vw, 5.4rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin-bottom: 1.5rem;
  color: var(--c-ivory);
}

.bio-tagline {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  color: var(--c-amber);
  margin-bottom: 2.5rem;
  line-height: 1.35;
  max-width: 32ch;
  letter-spacing: -0.01em;
}

.bio-body p {
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--c-ivory);
  max-width: 58ch;
  font-weight: 380;
}
.bio-body p:last-child { margin-bottom: 0; }

.bio-links {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.bio-links a {
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ivory);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 4px;
  transition: color 240ms ease, border-color 240ms ease, transform 240ms var(--ease);
  pointer-events: auto;
  font-weight: 400;
}
.bio-links a:hover {
  color: var(--c-amber);
  border-color: var(--c-amber);
  transform: translateY(-2px);
}

.bio-meta {
  border-left: 1px solid var(--c-line);
  padding: clamp(4rem, 10vh, 7rem) clamp(2rem, 4vw, 4rem);
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--c-ivory-dim);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-weight: 400;
}
.bio-meta-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  line-height: 1.6;
}
.bio-meta-row b {
  color: var(--c-ivory-dim);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.66rem;
}
.bio-meta-row .val { color: var(--c-ivory); }

.bio-related {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-line);
}
.bio-related-title {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ivory-dim);
  margin-bottom: 0.75rem;
}
.bio-related-list {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.bio-related-list a {
  color: var(--c-ivory);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 200ms ease;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
}
.bio-related-list a:hover { color: var(--c-amber); }
.bio-related-list a::after {
  content: "→";
  color: var(--c-ivory-dim);
  transition: transform 200ms ease, color 200ms ease;
  font-style: normal;
}
.bio-related-list a:hover::after {
  color: var(--c-amber);
  transform: translate(4px, 0);
}

.bio-close {
  position: fixed;
  top: 1.25rem;
  right: clamp(1rem, 3vw, 2rem);
  width: 40px; height: 40px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--c-ivory);
  background: transparent;
  z-index: 210;
  transition: transform 280ms var(--ease), border-color 220ms ease;
  pointer-events: auto;
  font-size: 1.2rem;
}
.bio-close:hover { transform: rotate(90deg); border-color: var(--c-ivory); }

/* ============================================================
   TIME-SCRUB BAR — quieter, fewer labels
   ============================================================ */

.timescrub {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.5rem 0.7rem;
  background: rgba(5, 11, 39, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--c-ivory-faint);
  border-radius: 999px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--d-med) var(--ease);
}
.timescrub.visible { opacity: 1; }
.timescrub-row {
  display: flex; align-items: center; gap: 0.65rem;
}
.timescrub-label {
  font-family: var(--f-display);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ivory-dim);
  font-weight: 600;
}
.timescrub-year {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ivory);
  min-width: 2.6rem;
  text-align: center;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  transition: color var(--d-fast) ease;
}
.timescrub.manual .timescrub-year { color: var(--c-amber); }
.timescrub-track {
  position: relative;
  width: clamp(200px, 36vw, 320px);
  height: 14px;
  display: flex; align-items: center;
  cursor: pointer;
  touch-action: none;
}
.timescrub-rail {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--c-ivory-faint);
}
.timescrub-fill {
  position: absolute;
  left: 0;
  height: 1px;
  background: var(--c-ivory-soft);
  width: 0%;
}
.timescrub-tick {
  position: absolute;
  width: 1px; height: 4px;
  background: var(--c-ivory-soft);
  top: 5px;
  pointer-events: none;
}
.timescrub-tick-label {
  position: absolute;
  top: 12px;
  font-family: var(--f-body);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--c-ivory-dim);
  transform: translateX(-50%);
  pointer-events: none;
  font-feature-settings: "tnum";
}
.timescrub-handle {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-ivory);
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--c-glow), 0 0 22px rgba(244, 241, 230, 0.45);
  cursor: grab;
  transition: transform 120ms ease, background var(--d-fast) ease;
}
.timescrub.manual .timescrub-handle { background: var(--c-amber); box-shadow: 0 0 10px var(--c-amber), 0 0 22px rgba(233, 195, 137, 0.5); }
.timescrub-handle:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.2); }

/* ============================================================
   CHART COMPLETE
   ============================================================ */

.chart-complete-flash {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(244, 241, 230, 0.35) 0%, transparent 60%);
  opacity: 0;
}
.chart-complete .chart-complete-flash {
  animation: completeFlash 2.4s ease forwards;
}
@keyframes completeFlash {
  0%   { opacity: 0; }
  20%  { opacity: 0.7; }
  100% { opacity: 0; }
}
.chart-complete .star-marker {
  background: var(--c-amber);
  box-shadow: 0 0 12px var(--c-amber), 0 0 24px rgba(233, 195, 137, 0.5);
}
.chart-complete .line { stroke: var(--c-ivory); opacity: 1 !important; filter: drop-shadow(0 0 3px var(--c-glow)); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .hud { font-size: 0.6rem; }
  .hud-mark { letter-spacing: 0.28em; }

  .bio { grid-template-columns: 1fr; }
  .bio-meta { border-left: 0; border-top: 1px solid var(--c-line); padding: 2rem clamp(1.25rem, 5vw, 2rem); }
  .bio-main { padding: 4rem 1.5rem 2rem; }

  .timescrub { bottom: 0.85rem; padding: 0.4rem 1rem 0.55rem; }
  .timescrub-track { width: clamp(160px, 60vw, 240px); }

  .star-label { font-size: 0.85rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .star { opacity: 1 !important; }
  .star-marker { animation: none !important; }
  .line { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .starfield { animation: none !important; }
  .lookup, .wordmark, .scroll-cue { opacity: 1 !important; animation: none !important; }
}
