:root {
  color-scheme: dark;
  --bg: #100f08;
  --panel: rgba(22, 20, 12, 0.82);
  --panel-deep: rgba(7, 8, 5, 0.9);
  --text: #efe9dc;
  --muted: #a8a093;
  --faint: rgba(233, 227, 214, 0.5);
  --line: rgba(233, 227, 214, 0.16);
  --grid: rgba(225, 214, 177, 0.06);
  --grid-strong: rgba(225, 214, 177, 0.1);
  --cyan: #8fc6d7;
  --green: #97c8a3;
  --gold: #c9a45d;
  --pink: #e2a0a5;
  --purple: #b9a5e4;
  --rose: #d7868d;
  --ink: #060704;
  --max: 1320px;
  --radius: 14px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
  --sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(151, 200, 163, 0.08), transparent 30rem),
    radial-gradient(circle at 82% 12%, rgba(226, 160, 165, 0.07), transparent 32rem),
    radial-gradient(circle at 50% 120%, rgba(185, 165, 228, 0.06), transparent 34rem),
    linear-gradient(180deg, #121109, #0a0a06 48%, #110f0a);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* blueprint grid */
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size:
    48px 48px,
    48px 48px,
    240px 240px,
    240px 240px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}

/* cinematic, video-like 3D scene that drifts behind everything */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(0);
  will-change: opacity;
  transition: opacity 1600ms ease;
}

.scene.is-live {
  opacity: 1;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px);
  background-size:
    17px 19px,
    23px 29px;
  mix-blend-mode: overlay;
}

/* soft glow that follows the cursor */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 520px;
  height: 520px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(201, 164, 93, 0.1), transparent 60%);
  transition: opacity 600ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

[id] {
  scroll-margin-top: 108px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.topbar,
.footer,
.hero,
.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 20px 0 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(233, 227, 214, 0.78);
}

.topbar::before {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: -1;
  width: 100vw;
  height: 92px;
  content: "";
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(8, 8, 5, 0.96), rgba(8, 8, 5, 0));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

.brand {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 2.4rem);
}

.nav a {
  position: relative;
  color: rgba(233, 227, 214, 0.6);
  transition: color 180ms ease;
}

.nav a::after {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav a:hover,
.brand:hover,
.footer a:hover,
.enter-link:hover {
  color: var(--gold);
}

.nav a:hover::after {
  transform: scaleX(1);
}

/* ---------- shared text ---------- */
.mono-label,
.node-label,
.node-body,
.diagram-hint,
.chapter-num,
.journal-card span,
.experiment-card span,
.terminal-lines,
.footer,
.enter-link,
.hero-tag {
  font-family: var(--mono);
}

.mono-label,
.node-label {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin-top: 0.5rem;
  color: var(--text);
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-shadow: 0 0 28px rgba(233, 227, 214, 0.16);
}

h2 {
  color: var(--text);
  font-size: clamp(2.3rem, 5.6vw, 5.4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

/* ---------- hero ---------- */
.hero {
  margin-top: 92px;
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
}

.hero-head {
  max-width: 900px;
}

.hero-tag {
  margin-top: 1.1rem;
  color: rgba(233, 227, 214, 0.74);
  font-size: clamp(0.92rem, 1.5vw, 1.2rem);
  letter-spacing: 0.01em;
}

.hero-tag span {
  margin: 0 0.35rem;
  color: var(--gold);
}

/* identity sub-header (click to expand the longer note) */
.identity {
  margin-top: 1.7rem;
  max-width: 660px;
}

.identity-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.identity-line {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.55vw, 1.18rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(233, 227, 214, 0.92);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 2px;
  transition:
    color 200ms ease,
    border-color 200ms ease;
}

.identity-cue {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  transition: color 200ms ease;
}

.identity-toggle:hover .identity-line,
.identity-toggle:focus-visible .identity-line {
  color: var(--gold);
  border-color: var(--gold);
}

.identity-toggle:hover .identity-cue {
  color: var(--gold);
}

.identity-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.identity.is-open .identity-detail {
  grid-template-rows: 1fr;
}

.identity-quote {
  overflow: hidden;
  min-height: 0;
}

.identity-quote blockquote {
  margin: 1.15rem 0 0;
  padding-left: 1.15rem;
  border-left: 2px solid var(--gold);
  color: rgba(233, 227, 214, 0.78);
  font-style: italic;
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.62;
}

/* the diagram canvas */
.panel {
  position: relative;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    var(--panel);
  background-size: 42px 42px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.026),
    0 30px 90px rgba(0, 0, 0, 0.4);
}

.diagram {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: clamp(2.4rem, 4vw, 3.4rem) clamp(1.2rem, 3vw, 2.6rem) clamp(2rem, 4vw, 3rem);
}

.diagram-hint {
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
  color: rgba(233, 227, 214, 0.4);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-align: center;
}

.inputs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
  width: 100%;
}

/* ---------- node cards ---------- */
.node {
  position: relative;
  padding: 1.05rem 1.15rem 1.2rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    rgba(10, 11, 7, 0.82);
  background-size: 24px 24px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  color: var(--cyan);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 24px rgba(0, 0, 0, 0.3);
  transition:
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 260ms ease;
  will-change: transform;
}

.node::before {
  position: absolute;
  inset: 4px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  opacity: 0.55;
}

.node:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px currentColor,
    0 0 28px -2px currentColor,
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.node h2,
.node h3 {
  color: var(--text);
}

.node h3 {
  margin-top: 0.35rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.05;
}

.node-body {
  margin-top: 0.7rem;
  color: rgba(233, 227, 214, 0.66);
  font-size: 0.78rem;
  line-height: 1.55;
}

.node.core {
  width: min(560px, 100%);
  text-align: center;
  padding: 1.6rem 1.8rem 1.8rem;
}

.node.core h2 {
  margin-top: 0.55rem;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.05;
}

.node.core .node-body {
  margin-inline: auto;
  max-width: 440px;
  font-size: 0.86rem;
}

/* ===================== artist story (scroll mind-map) ===================== */
/* dim the living scene a touch so the nodes stay readable over it */
.story-page .scene.is-live {
  opacity: 0.9;
}

.story-page main {
  position: relative;
  z-index: 1;
}

/* intro: "Hi, I am Rajat. / I am a ..." */
.story-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 82vh;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.story-hero-inner {
  max-width: 1000px;
}

.story-hero-inner h1 {
  margin-top: 0.4rem;
}

.story-iam {
  margin-top: 1.2rem;
  font-size: clamp(1.6rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(233, 227, 214, 0.86);
}

/* "thinking" ellipsis — a system that can't quite classify me */
.story-iam .dots {
  display: inline-block;
  color: var(--gold);
}

.story-iam .dots i {
  font-style: normal;
  opacity: 0.2;
  animation: thinkingDot 1.5s ease-in-out infinite;
}
.story-iam .dots i:nth-child(2) {
  animation-delay: 0.22s;
}
.story-iam .dots i:nth-child(3) {
  animation-delay: 0.44s;
}

@keyframes thinkingDot {
  0%,
  65%,
  100% {
    opacity: 0.2;
  }
  32% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-iam .dots i {
    animation: none;
    opacity: 0.7;
  }
}

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: 7vh;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.story-beat {
  display: flex;
  align-items: center;
  min-height: 48vh;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.story-beat-line {
  max-width: 860px;
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
}

/* generic reveal for intro lines */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.95s ease,
    transform 0.95s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
  }
}

.mindmap {
  position: relative;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 6vh 0 16vh;
}

/* central spine + its light fill */
.spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(233, 227, 214, 0.1);
  overflow: hidden;
}

.spine-fill {
  position: absolute;
  inset: 0;
  transform-origin: top;
  transform: scaleY(0);
  background: linear-gradient(180deg, var(--gold), var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(201, 164, 93, 0.5);
}

/* nodes */
.mnode {
  position: relative;
  display: flex;
  margin: 7vh 0;
}
.mnode.side-left {
  justify-content: flex-start;
}
.mnode.side-right {
  justify-content: flex-end;
}
.mnode.center {
  justify-content: center;
  text-align: center;
}

.mnode-card {
  position: relative;
  width: calc(50% - 54px);
  padding: 1.15rem 1.35rem 1.4rem;
  background: rgba(10, 11, 7, 0.9);
  border: 1.5px solid currentColor;
  border-radius: 12px;
  color: var(--cyan);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.mnode.center .mnode-card {
  width: min(620px, 100%);
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* junction dot sits on the spine */
.mnode-dot {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
  color: var(--gold);
}
.mnode.center .mnode-dot {
  display: none;
}

/* connector from spine to card */
.mnode.side-left .mnode-card::after,
.mnode.side-right .mnode-card::after {
  content: "";
  position: absolute;
  top: 34px;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, currentColor, transparent);
}
.mnode.side-left .mnode-card::after {
  right: -54px;
  transform: scaleX(-1);
}
.mnode.side-right .mnode-card::after {
  left: -54px;
}

/* card text */
.mnode-card h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text);
}
.mnode-card h3 {
  margin-top: 0.45rem;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.1;
  color: var(--text);
}
.mnode-sub {
  margin-top: 1rem;
  font-family: var(--mono);
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}
.mnode-body {
  margin-top: 0.7rem;
  color: rgba(233, 227, 214, 0.74);
  font-size: 0.92rem;
  line-height: 1.55;
}
.mnode-hint {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.7;
}
.mnode-media {
  margin-top: 0.95rem;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  overflow: hidden;
}

.mnode-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mnode-links {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.mnode-links a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: rgba(233, 227, 214, 0.82);
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}
.mnode-links a:hover {
  color: var(--gold);
  transform: translateX(3px);
}
.mnode.center .enter-link {
  margin-top: 1.6rem;
}

/* reveal-on-scroll for nodes */
.mnode-card,
.mnode-dot {
  opacity: 0;
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.mnode.side-left .mnode-card {
  transform: translateX(-38px);
}
.mnode.side-right .mnode-card {
  transform: translateX(38px);
}
.mnode.center .mnode-card {
  transform: translateY(34px);
}
.mnode.in-view .mnode-card {
  opacity: 1;
  transform: none;
}
.mnode.in-view .mnode-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 720px) {
  .spine {
    left: 22px;
  }
  .mnode,
  .mnode.side-left,
  .mnode.side-right,
  .mnode.center {
    justify-content: flex-start;
    text-align: left;
  }
  .mnode-card,
  .mnode.center .mnode-card {
    width: calc(100% - 54px);
    margin-left: 54px;
  }
  .mnode-dot,
  .mnode.center .mnode-dot {
    left: 22px;
    display: block;
  }
  .mnode.side-left .mnode-card::after,
  .mnode.side-right .mnode-card::after {
    left: -54px;
    right: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mnode-card,
  .mnode-dot {
    transition: none;
  }
}

/* ---------- story v2: cinematic acts ---------- */
.acts {
  position: fixed;
  right: 20px;
  top: 50%;
  z-index: 25;
  transform: translateY(-50%);
  display: grid;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-align: right;
  pointer-events: none;
}

.acts span {
  opacity: 0.5;
  transition:
    color 300ms ease,
    opacity 300ms ease;
}

.acts span.is-current {
  color: var(--gold);
  opacity: 1;
}

@media (max-width: 900px) {
  .acts {
    display: none;
  }
}

.act {
  display: flex;
  align-items: center;
  min-height: 96vh;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.act-inner {
  max-width: 880px;
}

.act h2 {
  font-size: clamp(2.2rem, 6.2vw, 5rem);
  line-height: 1;
  letter-spacing: -0.038em;
}

.act-lead {
  margin-top: 1.25rem;
  max-width: 640px;
  font-size: clamp(1.02rem, 1.9vw, 1.32rem);
  line-height: 1.62;
  color: rgba(233, 227, 214, 0.82);
}

.act-lead strong {
  color: var(--gold);
  font-weight: 600;
}

.act-big {
  margin-top: 1.6rem;
  font-size: clamp(1.8rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.act-sub {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.act-meta {
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--gold);
  opacity: 0.8;
}

.act .enter-link {
  margin-top: 1.8rem;
  display: inline-block;
}

.act .enter-link + .enter-link {
  margin-left: 1.6rem;
}

/* work showcase: video slots */
.video-row {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 940px;
}

@media (max-width: 760px) {
  .video-row {
    grid-template-columns: 1fr;
  }
}

.video-slot {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(8, 8, 5, 0.5);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  overflow: hidden;
  transition:
    color 200ms ease,
    border-color 200ms ease;
}

.video-slot:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.5);
}

.video-slot iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-row.four {
  grid-template-columns: repeat(2, 1fr);
}

.video-slot.has-video {
  border: 1px solid var(--line);
  background: #000;
}

.video-fig {
  margin: 0;
}

.video-fig figcaption {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* the quick timeline */
.timeline {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.timeline li {
  display: flex;
  gap: 1.4rem;
  align-items: baseline;
}

.tl-year {
  min-width: 132px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.tl-what {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: rgba(233, 227, 214, 0.86);
}

.tl-crash .tl-what {
  color: var(--rose);
}

.tl-quiet .tl-year,
.tl-quiet .tl-what {
  color: rgba(233, 227, 214, 0.34);
}

.tl-back .tl-what {
  color: var(--green);
}

@media (max-width: 560px) {
  .timeline li {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* HUD scene controls (merodev-style game overlay) */
.hud {
  position: fixed;
  left: 22px;
  bottom: 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
}

.hud-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  background: rgba(8, 8, 5, 0.55);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: rgba(233, 227, 214, 0.78);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    color 200ms ease,
    border-color 200ms ease;
}

.hud-toggle:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.5);
}

.hud-box {
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  transition: background 200ms ease;
}

.hud-toggle.is-on {
  color: var(--gold);
  border-color: var(--gold);
}

.hud-toggle.is-on .hud-box {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.hud-hint {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.hud-toggle.is-on ~ .hud-hint {
  opacity: 0;
}

@media (max-width: 640px) {
  .hud-hint {
    display: none;
  }
}

/* "fill me in" placeholder hints */
.chapter-card em {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--gold);
  opacity: 0.7;
}

/* clickable section nodes + link cards */
a.node,
a.experiment-card,
a.chapter-card,
a.journal-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* node boxes as buttons (open in place) */
button.node {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.node.is-active {
  box-shadow:
    0 0 0 1px currentColor,
    0 0 28px -2px currentColor,
    0 18px 40px rgba(0, 0, 0, 0.45);
}

/* in-place expanding panels under the diagram nodes */
.node-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 460ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.node-panel.is-open {
  grid-template-rows: 1fr;
}

.node-panel-in {
  overflow: hidden;
  min-height: 0;
  padding: 0 0.2rem;
  transition: padding 460ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.node-panel.is-open .node-panel-in {
  padding: 3rem 0.2rem 2.2rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.panel-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 0.85;
}

.panel-meta + .video-row {
  margin-top: 1rem;
}

.video-row + .panel-meta {
  margin-top: 1.3rem;
}

.panel-hint {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* second-level nodes inside a panel */
.sub-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.sub-node {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 0.55rem;
  width: 100%;
  padding: 1.15rem 1.25rem 1.3rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: rgba(10, 11, 7, 0.85);
  border: 1.5px solid currentColor;
  border-radius: 10px;
  transition:
    transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 240ms ease;
}

.sub-node:hover {
  transform: translateY(-3px);
}

.sub-node.is-active {
  box-shadow:
    0 0 0 1px currentColor,
    0 0 22px -4px currentColor;
}

.sub-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  opacity: 0.8;
}

.sub-node strong {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

.sub-go {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

.sub-node:hover .sub-go {
  opacity: 1;
}

.sub-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sub-panel.is-open {
  grid-template-rows: 1fr;
}

.sub-panel-in {
  overflow: hidden;
  min-height: 0;
  transition: padding 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sub-panel.is-open .sub-panel-in {
  padding-top: 2.6rem;
}

/* everything cascades in, layer by layer */
.node-panel-in > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.node-panel.is-open .node-panel-in > * {
  opacity: 1;
  transform: none;
}

.node-panel.is-open .node-panel-in > *:nth-child(2) {
  transition-delay: 0.08s;
}

.node-panel.is-open .node-panel-in > *:nth-child(3) {
  transition-delay: 0.16s;
}

.node-panel.is-open .node-panel-in > *:nth-child(4) {
  transition-delay: 0.24s;
}

.node-panel-in > .panel-grid > *,
.node-panel-in > .sub-nodes > * {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.node-panel.is-open .node-panel-in > .panel-grid > *,
.node-panel.is-open .node-panel-in > .sub-nodes > * {
  opacity: 1;
  transform: none;
}

.node-panel.is-open .node-panel-in > .panel-grid > *:nth-child(2),
.node-panel.is-open .node-panel-in > .sub-nodes > *:nth-child(2) {
  transition-delay: 0.1s;
}

.node-panel.is-open .node-panel-in > .panel-grid > *:nth-child(3),
.node-panel.is-open .node-panel-in > .sub-nodes > *:nth-child(3) {
  transition-delay: 0.2s;
}

.node-panel.is-open .node-panel-in > .panel-grid > *:nth-child(4) {
  transition-delay: 0.3s;
}

.sub-panel-in > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sub-panel.is-open .sub-panel-in > * {
  opacity: 1;
  transform: none;
}

.sub-panel.is-open .sub-panel-in > *:nth-child(2) {
  transition-delay: 0.09s;
}

.sub-panel.is-open .sub-panel-in > *:nth-child(3) {
  transition-delay: 0.18s;
}

.sub-panel.is-open .sub-panel-in > *:nth-child(4) {
  transition-delay: 0.27s;
}

.sub-panel.is-open .sub-panel-in > *:nth-child(5) {
  transition-delay: 0.36s;
}

/* editorial video rows: the work + the story behind it, side by side */
.sub-intro {
  max-width: 680px;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  line-height: 1.7;
  color: rgba(233, 227, 214, 0.85);
  margin: 0 0 3rem;
}

.video-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 1fr);
  gap: clamp(1.6rem, 3.5vw, 3.2rem);
  align-items: center;
  margin: 0 0 4.5rem;
}

.video-feature:last-child {
  margin-bottom: 0.6rem;
}

.video-feature:nth-of-type(even) > .video-fig {
  order: 2;
}

.video-feature .video-fig {
  margin: 0;
}

.video-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.video-desc {
  margin-top: 0.85rem;
  max-width: 460px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(233, 227, 214, 0.78);
}

.video-desc em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--gold);
  opacity: 0.7;
}

@media (max-width: 860px) {
  .video-feature {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.6rem;
  }

  .video-feature:nth-of-type(even) > .video-fig {
    order: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .node-panel,
  .sub-panel,
  .sub-panel-in,
  .node-panel-in > *,
  .node-panel-in > .panel-grid > *,
  .node-panel-in > .sub-nodes > *,
  .sub-panel-in > *,
  .sub-panel .video-fig {
    transition: none;
  }
}

/* writing/research feed tags */
.chapter-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.85;
}

.node-go {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.55;
  transform: translateX(0);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

a.node:hover .node-go,
a.node:focus-visible .node-go {
  opacity: 1;
  transform: translateX(4px);
}

/* ---------- connector trunk (always aligns to the 5 columns) ---------- */
.trunk {
  position: relative;
  width: 100%;
  height: 72px;
}

.trunk .stubs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 36px;
}

.trunk .stubs i {
  width: 2px;
  height: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--line), rgba(233, 227, 214, 0.32));
}

.trunk .hline {
  position: absolute;
  top: 36px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--cyan),
    var(--pink),
    var(--gold),
    var(--green),
    var(--purple)
  );
  opacity: 0.55;
}

.drop {
  position: absolute;
  top: 36px;
  left: 50%;
  width: 2px;
  height: 36px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(233, 227, 214, 0.32), var(--cyan));
}

.drop-out {
  position: relative;
  top: 0;
  left: 0;
  height: 44px;
  transform: none;
  margin: 4px 0;
  background: linear-gradient(180deg, var(--cyan), var(--rose));
}

/* ---------- output bar ---------- */
.output {
  display: grid;
  gap: 0.4rem;
  width: min(680px, 100%);
  padding: 1rem 1.4rem;
  text-align: center;
  background: rgba(85, 44, 47, 0.32);
  border: 1.5px solid currentColor;
  border-radius: 10px;
  box-shadow: 0 0 26px rgba(215, 134, 141, 0.16);
  font-family: var(--mono);
  color: var(--rose);
}

.output span {
  color: rgba(233, 227, 214, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.output strong {
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 700;
}

.enter-link {
  justify-self: center;
  color: rgba(233, 227, 214, 0.56);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- generic sections ---------- */
.section {
  padding: clamp(6rem, 11vw, 11rem) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: clamp(1.6rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(2.6rem, 7vw, 6rem);
}

.section-head.compact {
  grid-template-columns: 1fr;
  max-width: 930px;
}

.section-head .mono-label {
  grid-column: 1 / -1;
}

.section-head > p:not(.mono-label),
.signal-copy > p:not(.mono-label) {
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

/* ---------- story ---------- */
.chapter-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 1rem;
  padding: 2.2rem;
  border: 1.5px solid rgba(226, 160, 165, 0.5);
  border-radius: 16px;
  background: rgba(18, 16, 9, 0.55);
  overflow-x: auto;
}

.chapter-board::before {
  position: absolute;
  left: 2.2rem;
  right: 2.2rem;
  top: 50%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--rose), var(--green), var(--gold));
  opacity: 0.32;
}

.chapter-card {
  position: relative;
  min-height: 280px;
  padding: 1.3rem;
  background: rgba(10, 11, 7, 0.86);
  border: 1.5px solid currentColor;
  border-radius: 10px;
  color: var(--cyan);
  transition:
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 260ms ease;
}

.chapter-card:nth-child(even) {
  margin-top: 5rem;
}

.chapter-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 26px -4px currentColor;
}

.chapter-num {
  color: currentColor;
  font-size: 2.4rem;
  font-weight: 700;
}

.chapter-card h3 {
  margin-top: 1.3rem;
  color: var(--text);
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  line-height: 1.1;
}

.chapter-card p {
  margin-top: 0.9rem;
  color: rgba(233, 227, 214, 0.66);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- writings ---------- */
.query-map {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) 120px minmax(320px, 1.2fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}

.query-box {
  padding: clamp(1.4rem, 4vw, 2.2rem);
  min-height: 250px;
  background: rgba(10, 11, 7, 0.82);
  border: 1.5px solid currentColor;
  border-radius: 12px;
  color: var(--cyan);
}

.query-box span {
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 700;
}

.query-box p {
  margin-top: 1.2rem;
  color: rgba(233, 227, 214, 0.7);
  font-family: var(--mono);
  font-size: clamp(0.88rem, 1.4vw, 1.05rem);
  line-height: 1.8;
}

.query-pipe {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
}

.query-pipe span {
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.query-pipe span:nth-child(2) {
  background: linear-gradient(90deg, transparent, var(--green), transparent);
}

.query-pipe span:nth-child(3) {
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

.journal-stack {
  display: grid;
  gap: 0.9rem;
}

.journal-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  min-height: 88px;
  padding: 1rem 1.2rem;
  background: rgba(10, 11, 7, 0.82);
  border: 1.5px solid currentColor;
  border-radius: 10px;
  color: var(--cyan);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.journal-card:hover {
  transform: translateX(6px);
  box-shadow: 0 0 22px -4px currentColor;
}

.journal-card span {
  color: currentColor;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.journal-card p {
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  line-height: 1.35;
}

/* ---------- experiments ---------- */
.experiment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.experiment-card {
  display: grid;
  align-content: space-between;
  gap: 1.5rem;
  min-height: 360px;
  padding: 1.4rem;
  background: rgba(10, 11, 7, 0.82);
  border: 1.5px solid currentColor;
  border-radius: 12px;
  color: var(--cyan);
  transition:
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 260ms ease;
}

.experiment-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px -4px currentColor;
}

.experiment-card span {
  color: currentColor;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.experiment-card h3 {
  margin-top: 0.85rem;
  color: var(--text);
  font-size: clamp(1.7rem, 3.2vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.experiment-card p {
  color: rgba(233, 227, 214, 0.7);
  font-family: var(--mono);
  font-size: clamp(0.86rem, 1.3vw, 1.02rem);
  line-height: 1.7;
}

/* ---------- signal ---------- */
.signal-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(400px, 1.22fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  min-height: 600px;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: 20px;
  background:
    radial-gradient(circle at 63% 47%, rgba(255, 255, 255, 0.1), transparent 22rem),
    #060605;
  border: 1px solid var(--line);
  overflow: hidden;
}

.signal-copy h2 {
  margin-top: 1rem;
}

.signal-copy > p:not(.mono-label) {
  margin-top: 1.4rem;
}

.wire-wave {
  width: min(100%, 760px);
  justify-self: center;
  overflow: visible;
  filter:
    drop-shadow(0 0 9px rgba(255, 255, 255, 0.45))
    drop-shadow(0 0 24px rgba(255, 255, 255, 0.18));
}

.wave-rings ellipse,
.wave-lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.35;
}

.wave-rings ellipse {
  opacity: 0.7;
}

.wave-lines path {
  opacity: 0.8;
}

/* ---------- contact ---------- */
.contact-section {
  padding-top: clamp(3rem, 8vw, 8rem);
}

.terminal-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background: rgba(10, 11, 7, 0.82);
  border: 1.5px solid currentColor;
  border-radius: 14px;
  color: var(--cyan);
}

.terminal-card h2 {
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 4.6rem);
}

.terminal-lines {
  display: grid;
  gap: 0.7rem;
  margin-top: 2rem;
  color: rgba(233, 227, 214, 0.78);
}

.terminal-lines span {
  display: inline-block;
  min-width: 94px;
  color: currentColor;
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 4rem;
  color: rgba(233, 227, 214, 0.48);
  font-size: 0.74rem;
}

.footer a {
  color: rgba(233, 227, 214, 0.62);
}

/* ---------- color helpers ---------- */
.color-cyan,
.color-blue {
  color: var(--cyan);
}
.color-green {
  color: var(--green);
}
.color-gold {
  color: var(--gold);
}
.color-pink {
  color: var(--pink);
}
.color-purple {
  color: var(--purple);
}
.color-rose {
  color: var(--rose);
}

/* ---------- reveal on scroll ---------- */
.section {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .section {
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  /* connector trunk only maps to 5 columns; hide it on the wrapped layout */
  .trunk {
    height: 40px;
  }

  .trunk .stubs,
  .trunk .hline {
    display: none;
  }

  .drop {
    top: 0;
    height: 40px;
  }

  .section-head,
  .query-map,
  .signal-panel {
    grid-template-columns: 1fr;
  }

  .query-pipe {
    display: none;
  }

  .experiment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .nav {
    width: 100%;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .hero {
    margin-top: 110px;
  }

  .inputs {
    grid-template-columns: 1fr;
  }

  .chapter-board {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .chapter-board::before {
    display: none;
  }

  .chapter-card,
  .chapter-card:nth-child(even) {
    min-height: 0;
    margin-top: 0;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .topbar,
  .footer,
  .hero,
  .section {
    width: min(var(--max), calc(100% - 28px));
  }

  .journal-card {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .signal-panel {
    min-height: 0;
    padding: 1.1rem;
  }
}

/* ===== intro gate (boot sequence + ENTER) ===== */
body.has-gate {
  overflow: hidden;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  /* FINAL-18(F) · the boot is no longer a black wall — the code streams
     and the field breathe faintly behind it (his ask), held back by a
     center vignette so the text stays clean */
  /* FINAL-19(C) · a small dark POOL just behind the boot text; the rest
     of the screen stays clear so the particle field + streams read on
     desktop too (his ask — he couldn't see the bubbles) */
  background:
    radial-gradient(32rem 24rem at 50% 46%, rgba(4, 4, 3, 0.86), rgba(6, 6, 4, 0.5) 52%, rgba(6, 6, 4, 0.18) 100%);
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}

.gate.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  width: min(560px, calc(100% - 48px));
  display: grid;
  gap: 0.95rem;
  font-family: var(--mono);
}

.gate-line,
.gate-bar,
.gate-name,
.gate-actions {
  opacity: 0;
  transform: translateY(10px);
  animation: gateIn 0.6s ease forwards;
  animation-delay: calc(var(--i) * 0.45s + 0.15s);
}

.gate-line {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.gate-bar {
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(233, 227, 214, 0.1);
}

.gate-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  animation: gateLoad 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 0.45s + 0.3s);
}

.gate-name {
  margin-top: 0.4rem;
  font-family: var(--sans);
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.gate-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.2rem;
}

.gate-enter {
  padding: 0.85rem 2.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  color: var(--gold);
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.gate-enter:hover {
  transform: translateY(-2px);
  background: rgba(201, 164, 93, 0.08);
  box-shadow: 0 0 24px -4px var(--gold);
}

.gate-quiet {
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  cursor: pointer;
  text-decoration: underline dotted;
}

.gate-quiet:hover {
  color: var(--gold);
}

@keyframes gateIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes gateLoad {
  to {
    transform: scaleX(1);
  }
}

/* ===== homepage: room to breathe ===== */
.home .hero {
  margin-top: 0;
}

.home .hero-head {
  position: relative;
  max-width: 900px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
}

.home .hero-head .scroll-cue {
  position: absolute;
  left: 0;
  bottom: 6vh;
}

.home .diagram {
  margin-top: 8vh;
  margin-bottom: 24vh;
}

/* hero cascades in after ENTER */
.home .hero-head > * {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.is-entered .hero-head > * {
  opacity: 1;
  transform: none;
}

body.is-entered .hero-head > *:nth-child(2) {
  transition-delay: 0.12s;
}

body.is-entered .hero-head > *:nth-child(3) {
  transition-delay: 0.24s;
}

body.is-entered .hero-head > *:nth-child(4) {
  transition-delay: 0.36s;
}

body.is-entered .hero-head > *:nth-child(5) {
  transition-delay: 0.5s;
}

/* diagram reveals on scroll */
.home .diagram-hint {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home .diagram-hint.in-view {
  opacity: 1;
  transform: none;
}

.home .diagram .inputs .node {
  opacity: 0;
  transition:
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 260ms ease,
    opacity 0.8s ease;
}

.home .diagram .inputs .node.in-view {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .gate-line,
  .gate-bar,
  .gate-name,
  .gate-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .gate-bar span {
    animation: none;
    transform: none;
  }

  .home .hero-head > *,
  .home .diagram-hint,
  .home .diagram .inputs .node {
    transition: none;
  }
}

/* ===== let the field shine through the diagram card ===== */
.home .diagram.panel {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    rgba(14, 13, 8, 0.38);
  background-size: 42px 42px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ===== typewriter caret ===== */
.is-typing::after {
  content: "▌";
  margin-left: 2px;
  color: var(--gold);
  animation: caretBlink 0.9s steps(2) infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

/* ===== view more ===== */
.view-more-wrap {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0.6rem;
}

.view-more {
  padding: 0.75rem 2.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.view-more:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.55);
  box-shadow: 0 0 18px -6px var(--gold);
}

.more-videos {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.more-videos.is-shown {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .is-typing::after {
    animation: none;
  }

  .more-videos {
    transition: none;
  }
}

/* ===== hero v2: typed intro ===== */
.home #hero-title {
  min-height: 1.1em;
  font-size: clamp(2.7rem, 7.6vw, 6.2rem);
}

.home .story-iam {
  margin-top: 1.4rem;
}

.hero-quip {
  margin-top: 1.1rem;
  min-height: 1.4em;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  letter-spacing: 0.03em;
  color: var(--muted);
}

body.is-entered .hero-head > *:nth-child(6) {
  transition-delay: 0.62s;
}

/* ===== rajat.mind — the terminal that answers ===== */
.mind-chip {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  background: rgba(8, 8, 5, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(233, 227, 214, 0.78);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

body.is-entered .mind-chip {
  opacity: 1;
  pointer-events: auto;
}

.mind-chip:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.55);
  box-shadow: 0 0 18px -6px var(--gold);
}

.mind-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: mindPulse 2s ease-in-out infinite;
}

@keyframes mindPulse {
  50% {
    opacity: 0.35;
  }
}

.mind-term {
  position: fixed;
  right: 22px;
  bottom: 74px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-height: min(560px, 72vh);
  background: rgba(8, 8, 5, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mind-term.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.mind-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.mind-close {
  padding: 0 0.3rem;
  background: none;
  border: 0;
  color: var(--faint);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mind-close:hover {
  color: var(--gold);
}

.mind-out {
  flex: 1;
  min-height: 200px;
  padding: 1rem 1.1rem;
  overflow-y: auto;
  display: grid;
  gap: 0.85rem;
  align-content: start;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.mind-you {
  color: var(--faint);
}

.mind-ans {
  color: rgba(233, 227, 214, 0.9);
  white-space: pre-wrap;
}

.mind-ans a {
  color: var(--gold);
  text-decoration: underline dotted;
}

.mind-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--line);
}

.mind-form .prompt {
  font-family: var(--mono);
  color: var(--gold);
}

.mind-form input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  caret-color: var(--gold);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.mind-form input::placeholder {
  color: var(--faint);
}

@media (max-width: 640px) {
  .mind-term {
    right: 16px;
    bottom: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mind-dot {
    animation: none;
  }

  .mind-term,
  .mind-chip {
    transition: none;
  }
}

/* ===== the veil: He is behind everything, barely visible ===== */
.veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("assets/rajat-hoodie.jpg") 72% 30% / cover no-repeat;
  opacity: 0.08;
  filter: saturate(0.9) brightness(1.35) contrast(1.05);
  -webkit-mask-image: radial-gradient(
    75% 85% at 62% 42%,
    #000 30%,
    transparent 76%
  );
  mask-image: radial-gradient(75% 85% at 62% 42%, #000 30%, transparent 76%);
  animation: veilBreathe 26s ease-in-out infinite;
}

@keyframes veilBreathe {
  0%,
  100% {
    opacity: 0.05;
  }
  50% {
    opacity: 0.1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .veil {
    animation: none;
    opacity: 0.06;
  }
}

/* ===== scroll-choreographed intro (same design, new timing) ===== */
.intro-track {
  height: 270vh;
}

.home .intro-track .hero-head {
  position: sticky;
  top: 0;
}

.home .hero-head > .step {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home .hero-head > .step.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .home .hero-head > .step {
    transition: none;
  }
}

/* ===== node panels as mind-maps: description → stem → branches ===== */
.panel-desc {
  max-width: 660px;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.65;
  color: rgba(233, 227, 214, 0.85);
  min-height: 1.65em;
}

.node-panel-in > .sub-nodes,
.node-panel-in > .panel-grid {
  position: relative;
  margin-top: 3.4rem;
}

/* stem dropping from the description */
.node-panel-in > .sub-nodes::before,
.node-panel-in > .panel-grid::before {
  content: "";
  position: absolute;
  top: -2.9rem;
  left: 50%;
  width: 1px;
  height: 1.7rem;
  background: linear-gradient(180deg, transparent, rgba(201, 164, 93, 0.55));
}

/* rail across the branches */
.node-panel-in > .sub-nodes::after,
.node-panel-in > .panel-grid::after {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 164, 93, 0.35) 18%,
    rgba(201, 164, 93, 0.35) 82%,
    transparent
  );
}

/* each branch hangs from the rail on its own thread… */
.node-panel-in > .sub-nodes > *,
.node-panel-in > .panel-grid > * {
  position: relative;
}

.node-panel-in > .sub-nodes > *::before,
.node-panel-in > .panel-grid > *::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 50%;
  width: 1px;
  height: 1.2rem;
  background: rgba(201, 164, 93, 0.35);
}

/* …with a glowing joint where it meets the card */
.node-panel-in > .sub-nodes > *::after,
.node-panel-in > .panel-grid > *::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

/* roomier branch cards */
.sub-nodes {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.sub-node {
  padding: 1.5rem 1.6rem 1.7rem;
  gap: 0.7rem;
  border-radius: 14px;
}

.sub-node strong {
  font-size: 1.12rem;
}

.node-panel-in > .panel-grid {
  gap: 24px;
}

.node-panel-in .journal-card {
  padding: 1.35rem 1.45rem 1.5rem;
  border-radius: 14px;
}

.node-panel.is-open .node-panel-in {
  padding-bottom: 2.6rem;
}

@media (max-width: 760px) {
  .node-panel-in > .sub-nodes,
  .node-panel-in > .panel-grid {
    margin-top: 2rem;
  }

  .node-panel-in > .sub-nodes::before,
  .node-panel-in > .sub-nodes::after,
  .node-panel-in > .panel-grid::before,
  .node-panel-in > .panel-grid::after,
  .node-panel-in > .sub-nodes > *::before,
  .node-panel-in > .sub-nodes > *::after,
  .node-panel-in > .panel-grid > *::before,
  .node-panel-in > .panel-grid > *::after {
    display: none;
  }
}

/* "I am a" types on scroll; the thinking dots arrive a beat later */
.story-iam .dots {
  opacity: 0;
  transition: opacity 0.6s ease 0.8s;
}

.story-iam.is-in .dots {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .story-iam .dots {
    transition: none;
  }
}

/* ===== "classification failed" — the system gives up labelling him ===== */
.hero-fail {
  margin-top: 1.7rem;
  display: grid;
  gap: 0.5rem;
  font-family: var(--mono);
}

.fail-line {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  min-height: 1.5em;
}

.fail-line.fail-dim {
  color: var(--faint);
}

/* the closing line, after everything has been seen */
.closer {
  display: flex;
  justify-content: center;
  padding: 4vh 0 16vh;
}

.closer .identity {
  margin-top: 0;
  max-width: 720px;
  text-align: center;
}

.closer .identity-toggle {
  justify-content: center;
}

/* his credits, as plain lines */
.video-roles {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.video-roles li {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: rgba(233, 227, 214, 0.78);
}

.video-roles li::before {
  content: "— ";
  color: var(--gold);
}

/* ===== side dock: compact section jumper that follows you down ===== */
.dock {
  position: fixed;
  left: 16px;
  top: 50%;
  z-index: 26;
  display: grid;
  gap: 10px;
  transform: translateY(-50%) translateX(-18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.dock-on .dock {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(8, 8, 5, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease;
}

.dock-item:hover,
.dock-item.is-active {
  border-color: currentColor;
}

.dock-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.dock-item.is-active .dock-dot {
  box-shadow:
    0 0 8px currentColor,
    0 0 20px currentColor;
}

.dock-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(233, 227, 214, 0.85);
  opacity: 0;
  transition:
    max-width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.3s ease;
}

.dock-item:hover .dock-label,
.dock-item.is-active .dock-label {
  max-width: 160px;
  opacity: 1;
}

@media (max-width: 900px) {
  .dock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock,
  .dock-label {
    transition: none;
  }
}

/* placeholder role lines */
.video-roles em {
  font-style: normal;
  color: var(--gold);
  opacity: 0.75;
}

/* roles under grid cards sit tighter */
.video-row .video-fig .video-roles {
  margin-top: 0.55rem;
}

/* ===== click-to-play posters (filmography) ===== */
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition:
    opacity 0.3s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.video-thumb:hover img {
  opacity: 0.95;
  transform: scale(1.04);
}

.thumb-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: var(--gold);
  border: 1px solid rgba(201, 164, 93, 0.7);
  border-radius: 50%;
  background: rgba(8, 8, 5, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: box-shadow 0.3s ease;
}

.video-thumb:hover .thumb-play {
  box-shadow: 0 0 24px -4px var(--gold);
}

/* ===== the work wall: flythrough + focus (homepage) ===== */
.fly {
  position: relative;
  height: 420vh;
}

.fly-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.fly-hint {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.bg-rows {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.bg-row {
  white-space: nowrap;
  font-weight: 900;
  font-size: 30vh;
  line-height: 0.82;
  letter-spacing: 0.02em;
  will-change: transform;
}

.bg-row.solid {
  color: rgba(201, 164, 93, 0.09);
}

.bg-row.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(201, 164, 93, 0.15);
}

.fly-stage.is-focused .bg-rows {
  opacity: 0.35;
}

.fly-card {
  position: absolute;
  top: 50%;
  left: var(--x);
  z-index: 2;
  width: clamp(240px, 29vw, 440px);
  cursor: pointer;
  will-change: transform;
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
}

.fly-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transition: border-color 0.25s ease;
}

.fly-card:hover img {
  border-color: rgba(201, 164, 93, 0.6);
}

.fly-card figcaption {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.fly-card .tag {
  color: var(--gold);
}

.fly-stage.is-focused .fly-card {
  opacity: 0.06;
  filter: blur(3px);
  pointer-events: none;
}

/* the focused work: media left, his roles right */
.fly-focus {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-content: center;
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform: translateY(20px);
}

.fly-focus.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.focus-title {
  margin-top: 0.5rem;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.focus-roles {
  margin-top: 1.1rem;
}

.focus-note .enter-link {
  display: inline-block;
  margin-top: 1.4rem;
}

.focus-back {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}

.focus-back:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.55);
}

@media (max-width: 820px) {
  .fly {
    height: auto;
  }
  .fly-stage {
    position: static;
    height: auto;
    overflow: visible;
    display: grid;
    gap: 2rem;
    padding: 4rem 24px;
  }
  .bg-rows,
  .fly-hint {
    display: none;
  }
  .fly-card {
    position: static;
    width: min(560px, 100%);
    margin: 0 auto;
    transform: none !important;
  }
  .fly-focus {
    position: fixed;
    inset: 0;
    z-index: 60;
    grid-template-columns: 1fr;
    align-content: center;
    background: rgba(9, 9, 6, 0.96);
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fly {
    height: auto;
  }
  .fly-stage {
    position: static;
    height: auto;
    overflow: visible;
    display: grid;
    gap: 2rem;
    padding: 4rem 24px;
  }
  .bg-rows {
    display: none;
  }
  .fly-card {
    position: static;
    width: min(560px, 100%);
    margin: 0 auto;
    transform: none !important;
  }
}

/* ===== toolkit / skills ===== */
.skill-groups {
  display: grid;
  gap: 2.6rem;
}

.skill-tag {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}

.skills-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.skills-list li {
  padding: 0.72rem 1.35rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: rgba(233, 227, 214, 0.85);
  background: rgba(8, 8, 5, 0.5);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.skills-list li:hover {
  color: var(--gold);
  border-color: rgba(201, 164, 93, 0.55);
  box-shadow: 0 0 18px -6px var(--gold);
  transform: translateY(-2px);
}

/* the classification beat, framed as a tiny terminal window */
.hero-fail {
  max-width: 480px;
  background: rgba(8, 8, 5, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.fail-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.fail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(233, 227, 214, 0.18);
}

.fail-bar .fail-dot:first-child {
  background: rgba(215, 134, 141, 0.55);
}

.fail-name {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.fail-body {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem 1rem;
}


/* binary code projected onto the silhouette */
.veil-code {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.15;
  -webkit-mask-image: radial-gradient(34% 52% at 66% 40%, #000 26%, transparent 72%);
  mask-image: radial-gradient(34% 52% at 66% 40%, #000 26%, transparent 72%);
  animation: veilFlicker 7s steps(14) infinite;
}

.veil-code-in {
  white-space: pre;
  text-align: center;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.45em;
  color: rgba(151, 200, 163, 0.9);
  text-shadow: 0 0 9px rgba(151, 200, 163, 0.55);
  animation: codeScroll 110s linear infinite;
}

@keyframes codeScroll {
  to {
    transform: translateY(-50%);
  }
}

@keyframes veilFlicker {
  0%, 100% { opacity: 0.15; }
  43% { opacity: 0.1; }
  49% { opacity: 0.19; }
  71% { opacity: 0.12; }
}

@media (prefers-reduced-motion: reduce) {
  .veil-code,
  .veil-code-in {
    animation: none;
  }
}
