/* ============================================================
   Yashasvi Yadav · "The Launch" · Dune-inspired restraint
   Polished with unslop (Damir Sokolovsky, @heydamir, CC BY 4.0)

   Direction
   Product    A portfolio for an engineer turned MBA and co-founder, read by founders
              and hiring managers for Founder's Office, Product and Marketing roles
   Character  exact, warm, quietly confident
   World      a workshop at dusk: sand, brushed metal, one work lamp
   Moments    the portrait under the lamp (and its exploded view); the result
              number on each project
   Signature  release-note version tags (v1.0 to v4.2), on the timeline only
   ============================================================ */
:root {
  /* warm neutral ramp, tinted toward sand */
  --bg-deep: #0B0A08;
  --bg: #0F0E0B;
  --raised: #1C1A16;
  --text: #EDE6DA;        /* primary */
  --text-2: #B3A994;      /* secondary */
  --text-3: #8A8272;      /* muted: meta only */
  --hair: rgba(237, 230, 218, .09);

  /* light (sand) sections */
  --sand: #D8C3A0;
  --s-text: #1F1B16;
  --s-text-2: #4A4033;
  --s-text-3: #6B5E4B;
  --s-hair: rgba(31, 27, 22, .14);

  /* one accent, from the world: lamp amber */
  --accent: #C8893A;

  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: "Syncopate", "Arial Black", sans-serif;
  --sans: "General Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-deep); }
body {
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg-deep); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 24px var(--gutter);
  font-size: 14px; color: var(--sand); mix-blend-mode: difference;
}
.nav a { text-decoration: none; }
.mark { font-family: var(--display); font-weight: 700; letter-spacing: .24em; font-size: 16px; }
.links { display: flex; gap: 32px; align-items: center; }
.links a { opacity: .72; transition: opacity .16s var(--ease); }
.links a:hover, .links a:focus-visible { opacity: 1; }
.mark { justify-self: start; }
.nav .cta { grid-column: 3; justify-self: end; border: 1px solid currentColor; padding: 8px 16px; border-radius: 6px; }

.corner {
  position: fixed; bottom: 24px; right: var(--gutter); z-index: 80;
  font-family: var(--mono); font-size: 12px; color: var(--text-3);
  text-decoration: none; transition: color .16s var(--ease), opacity .4s var(--ease);
}
.corner:hover { color: var(--text); }
.corner.hide { opacity: 0 !important; pointer-events: none; }

.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 85; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: var(--text-3); transform-origin: left; transform: scaleX(0); }

/* ---------- shared type ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-bottom: 24px; }
.eyebrow.dark { color: var(--s-text-3); }
.display {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(32px, 5.2vw, 80px); line-height: 1.04; letter-spacing: 0;
}
.mega {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(56px, 15vw, 256px); line-height: .9; text-align: center;
}
.lede { margin-top: 24px; max-width: 36rem; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--text-2); }
.lede.center { margin-left: auto; margin-right: auto; text-align: center; }
.split .w { display: inline-block; }

/* ---------- 1. HERO: bold poster (after MotionSites "Bold Portfolio Hero") ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; color: #fff;
  /* spice orange: deeper at the top left, warmer and lighter toward the bottom */
  background:
    radial-gradient(ellipse 80% 60% at 50% 105%, rgba(255, 196, 120, .55), transparent 70%),
    linear-gradient(165deg, #C9401A 0%, #DE5A22 38%, #EC7A32 72%, #F29647 100%);
}


/* headline: the name, huge and condensed, the head overlapping its lower edge */
.name {
  position: absolute; left: 0; right: 0; top: 15vh; z-index: 2; margin: 0; text-align: center; white-space: nowrap;
  font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(64px, 14.4vw, 270px); line-height: .86; letter-spacing: .005em; color: #fff;
}
.n1, .n2 { display: inline-block; will-change: transform, opacity; }
.n2 { margin-left: .18em; }

/* head-and-shoulders crop of the portrait, fading out at the bottom */
.subject {
  position: absolute; left: 50%; bottom: 9vh; z-index: 3; translate: -50% 0;
  height: min(76vh, 118vw); aspect-ratio: 733 / 760; overflow: hidden; will-change: transform;
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 26%);
          mask-image: linear-gradient(to top, transparent 0, #000 26%);
}
.subject img {
  position: absolute; left: 0; top: 0; width: 100%; height: auto;
}

/* small "//" notes either side */
.meta { position: absolute; z-index: 5; max-width: 320px; font-family: "Anton", Impact, sans-serif; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; color: rgba(255, 255, 255, .95); }
.meta.l { left: var(--gutter); bottom: 22vh; }
.meta.r { right: var(--gutter); top: 50vh; text-align: right; }

/* logo-style strip of places and ventures */
.marquee {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9vh; min-height: 56px; z-index: 5; overflow: hidden;
  display: flex; align-items: center;
  background: linear-gradient(to top, rgba(200, 70, 20, .25), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mq-track { display: flex; align-items: center; gap: clamp(40px, 6vw, 96px); width: max-content; padding-left: 48px; white-space: nowrap; }
.mq { color: #fff; opacity: .92; font-family: "Anton", Impact, sans-serif; font-size: clamp(18px, 2vw, 30px); line-height: 1; letter-spacing: .04em; text-transform: uppercase; }

/* annotations: thin lines from the portrait to each label (white on orange) */
.annot { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; overflow: visible; opacity: 0; }
.annot .ln { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 1; }
.annot .dot { fill: #D9531F; stroke: #fff; stroke-width: 1.5; }
@media (max-width: 760px) { .annot { display: none; } } /* labels sit over the photo on phones, so no lines */

.callout { position: absolute; z-index: 7; width: min(300px, 30vw); opacity: 0; }
.callout .tag { font-family: "Anton", Impact, sans-serif; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); margin-bottom: 8px; }
.callout h2 { font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: clamp(20px, 2vw, 30px); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 8px; color: #fff; }
.callout p { font-family: "Anton", Impact, sans-serif; font-size: 15px; line-height: 1.4; letter-spacing: .03em; color: rgba(255, 255, 255, .9); }
.callout b { font-weight: 400; color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.callout.left { text-align: right; }
#c1 { top: 30vh; left: calc(50% + 28vh); }
#c2 { top: 50vh; right: calc(50% + 28vh); }
#c3 { top: 66vh; left: calc(50% + 28vh); }

/* role line tucked under "YADAV", right-aligned to it */
.n2 { position: relative; }
.role-line {
  position: absolute; right: .04em; top: calc(100% + 10px); z-index: 2; white-space: nowrap;
  font-family: "Anton", Impact, sans-serif; font-size: clamp(14px, 1.25vw, 19px); line-height: 1; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255, 255, 255, .92);
}
.role-line span { padding: 0 .35em; opacity: .7; }
.meta-roles { margin-top: 10px; }

/* hero actions under the left note */
.hero-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.hbtn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px;
  font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: #fff; border: 1px solid rgba(255, 255, 255, .7);
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .12s var(--ease);
}
.hbtn:hover { background: rgba(255, 255, 255, .14); }
.hbtn:active { transform: scale(.98); }
.hbtn.primary { background: #fff; color: #C9401A; border-color: #fff; }
.hbtn.primary:hover { background: #1F1B16; color: #fff; border-color: #1F1B16; }


/* soft handover from the orange hero into the dark work section */
.work::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: clamp(120px, 22vh, 220px); pointer-events: none;
  background: linear-gradient(to bottom, #F29647 0%, #B8582A 22%, #5A2B16 52%, #1E1410 78%, var(--bg) 100%);
}
.work > * { position: relative; }

/* nav sits plain white over the orange hero */
.nav.on-hero { mix-blend-mode: normal; color: #fff; font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.nav.on-hero .mark { font-family: "Anton", Impact, sans-serif; letter-spacing: .08em; font-weight: 400; font-size: 20px; }

/* ---------- 3. WORK (moment: the result numbers) ---------- */
.work { position: relative; z-index: 6; background: var(--bg); padding: clamp(96px, 16vh, 192px) 0 64px; }
.work-head { margin-bottom: clamp(64px, 10vh, 128px); }

.bucket { padding: 0 var(--gutter); max-width: 1360px; margin: 0 auto; }
.bucket-title {
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 8px 32px;
  padding: clamp(64px, 10vh, 112px) 0 32px; border-bottom: 1px solid var(--hair);
}
.bt-num { font-family: var(--mono); font-size: 12px; color: var(--text-3); grid-row: span 2; align-self: start; padding-top: 16px; }
.bt {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(56px, 12vw, 192px); line-height: .9; color: var(--text);
}
.bt em { font-style: normal; color: var(--text-3); }
.bucket-title p { font-size: 15px; color: var(--text-2); }

.project {
  max-width: 1360px; margin: 0 auto; padding: clamp(64px, 10vh, 112px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px);
  border-bottom: 1px solid var(--hair);
}
.p-num { position: sticky; top: 24vh; align-self: start; }

/* RoverX background scene: Mars-tinted dunes with a rover driving across */
.project.has-scene { position: relative; padding-top: calc(clamp(360px, 74vh, 720px) + 32px); }
.project.has-scene > .p-num { z-index: 1; }
.project.has-scene > .p-body { position: relative; z-index: 1; }
.scene {
  position: absolute; left: 50%; top: 0; width: 100vw; translate: -50% 0; height: clamp(360px, 74vh, 720px);
  overflow: hidden; background: #0B0908;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
}
.scene .topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-title {
  position: absolute; left: 0; right: 0; top: 16%; text-align: center; z-index: 1; pointer-events: none;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 9vw, 150px); line-height: 1; color: rgba(237, 230, 218, .9);
}
.scene-title em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: #E8945A; }
.rover-track { position: absolute; left: 0; bottom: 24%; width: clamp(150px, 19vw, 280px); z-index: 2; pointer-events: none; will-change: transform; }
.rover { width: 100%; height: auto; display: block; overflow: visible; }
.rv-body  { fill: #1C1714; stroke: #E8CDA8; stroke-width: 1.4; }
.rv-deck  { fill: #3A2A1E; stroke: #E8945A; stroke-width: 1.2; }
.rv-line  { fill: none; stroke: #E8CDA8; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rv-line.soft { stroke: rgba(232, 205, 168, .35); stroke-width: 1; }
.rv-joint { fill: #1C1714; stroke: #E8945A; stroke-width: 1.4; }
.rv-lens  { fill: #E8945A; }
.rv-wheel circle { fill: #15110F; stroke: #E8CDA8; stroke-width: 1.6; }
.rv-wheel path { fill: none; stroke: rgba(232, 205, 168, .55); stroke-width: 1.2; }
.rv-shadow { fill: rgba(0, 0, 0, .45); }
.rover-scene .forge-credit { color: rgba(232, 205, 168, .45); }

/* bionic arm background scene (after MotionSites "SynapticForge"): a light studio,
   a human hand and a bionic hand reaching toward a soft halo between the fingertips */
.project.has-forge { position: relative; padding-top: calc(clamp(360px, 78vh, 760px) + 32px); }
.project.has-forge > .p-num { z-index: 1; }
.project.has-forge > .p-body { position: relative; z-index: 1; }
.forge {
  position: absolute; left: 50%; top: 0; width: 100vw; translate: -50% 0; height: clamp(360px, 78vh, 760px);
  overflow: hidden; color: var(--s-text);
  background: radial-gradient(ellipse 70% 80% at 50% 48%, #F6F2EA 0%, #ECE4D6 45%, #D9CDB8 75%, var(--bg) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
}
.forge-title {
  position: absolute; left: 0; right: 0; top: 24%; text-align: center; z-index: 1; white-space: nowrap;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 5.2vw, 92px); line-height: 1.05; color: rgba(31, 27, 22, .9); padding: 0 16px;
}
.forge-title em {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; text-transform: none;
  color: var(--accent); padding: 0 .12em;
}
.forge-stage {
  position: absolute; left: 50%; top: 52%; width: min(1240px, 112vw); aspect-ratio: 2 / 1; translate: -50% -50%; z-index: 2;
}
.halo { /* centred on the gap between the fingertips: 47% across, 44% down the photo */
  position: absolute; left: 47%; top: 44%; width: 34%; aspect-ratio: 1; translate: -50% -50%;
}
.halo i {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(200,137,58,.0), rgba(200,137,58,.65), rgba(232,190,140,.8), rgba(255,255,255,.7), rgba(200,137,58,0) 62%, rgba(214,170,120,.55), rgba(200,137,58,0));
  -webkit-mask: radial-gradient(circle, transparent 50%, #000 58%, #000 66%, transparent 74%);
          mask: radial-gradient(circle, transparent 50%, #000 58%, #000 66%, transparent 74%);
  filter: blur(16px);
}
.halo::after { /* soft light between the fingertips */
  content: ""; position: absolute; inset: 28%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,240,220,.35) 45%, transparent 72%);
}
.hand { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(31,27,22,.14)); }
.hand-l { clip-path: inset(0 53% 0 0); }   /* human hand: left part of the photo */
.hand-r { clip-path: inset(0 0 0 47%); }   /* bionic hand: right part */
.forge-credit {
  position: absolute; right: var(--gutter); bottom: 14%; z-index: 3;
  font-family: var(--mono); font-size: 11px; color: rgba(31,27,22,.45);
}
@media (max-width: 760px) {
  .forge-title { top: 14%; white-space: normal; font-size: 9vw; }
  .forge-stage { top: 56%; width: 150vw; }
}
.p-num .big {
  display: block; font-family: var(--display); font-weight: 700; color: var(--accent);
  font-size: clamp(44px, 7.2vw, 120px); line-height: .95; letter-spacing: -.02em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.p-num .big small { font-size: .42em; color: var(--text-3); letter-spacing: 0; vertical-align: .55em; }
.p-num .cap { display: block; margin-top: 16px; max-width: 28ch; font-size: 15px; line-height: 1.5; color: var(--text-2); }

.p-index { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.project h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.08; letter-spacing: .02em; }
.p-sub { margin-top: 8px; font-size: 18px; color: var(--text-2); }
.project dl { margin-top: 32px; }
.project dt { font-size: 13px; font-weight: 500; color: var(--text-3); margin-bottom: 4px; }
.project dd { margin-bottom: 20px; color: var(--text-2); max-width: 54ch; }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--mono); font-size: 12px; color: var(--text-2); border: 1px solid var(--hair); padding: 4px 8px; border-radius: 4px; }

/* ---------- sand sections ---------- */
.sand { background: var(--sand); color: var(--s-text); position: relative; z-index: 6; padding: clamp(96px, 16vh, 176px) 0; }
.sand .lede { color: var(--s-text-2); }

.role-grid { margin-top: clamp(48px, 8vh, 96px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--s-hair); }
.role { padding: 32px 32px 40px 0; border-right: 1px solid var(--s-hair); }
.role + .role { padding-left: 32px; }
.role:last-child { border-right: 0; }
.r-n { font-family: var(--mono); font-size: 12px; color: var(--s-text-3); }
.role h3 { margin-top: 16px; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(18px, 1.8vw, 24px); letter-spacing: .04em; }
.role ul { margin-top: 24px; display: grid; gap: 12px; }
.role li { padding-left: 20px; position: relative; color: var(--s-text-2); line-height: 1.5; }
.role li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--s-text-3); }
.see { margin-top: 24px; font-size: 14px; color: var(--s-text-3); }
.see a { color: var(--s-text); text-underline-offset: 4px; }

/* ---------- 5. TIMELINE (signature: version tags) ---------- */
.timeline { position: relative; z-index: 6; background: var(--bg); overflow: hidden; }
.tl-pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: clamp(96px, 14vh, 144px) 0 80px; }
.tl-track { margin-top: clamp(48px, 8vh, 96px); }
.tl-list { display: flex; padding: 0 var(--gutter); width: max-content; position: relative; }
.tl-list::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 4px; height: 1px; background: var(--hair); }
.tl-item { width: clamp(256px, 26vw, 360px); padding: 32px 40px 0 0; position: relative; }
.tl-item::before { content: ""; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--text-3); background: var(--bg); }
.tl-item.now::before { background: var(--accent); border-color: var(--accent); }
.tl-item .v { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.tl-item.now .v { color: var(--accent); }
.tl-item h3 { margin-top: 12px; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 16px; letter-spacing: .04em; line-height: 1.35; }
.tl-item p:last-child { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* ---------- 6. WINS ---------- */
.win-grid { margin-top: clamp(48px, 8vh, 96px); display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 1px; background: var(--s-hair); border: 1px solid var(--s-hair); }
.win { background: var(--sand); padding: 32px 24px 40px; }
.w-big { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2vw, 30px); line-height: 1.15; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.win p:last-child { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--s-text-2); }

/* ---------- 7. LIFE ---------- */
.life { position: relative; z-index: 6; background: var(--bg); padding: clamp(96px, 16vh, 192px) 0; }
.life-list { margin-top: clamp(48px, 8vh, 96px); border-top: 1px solid var(--hair); }
.life-list li {
  display: grid; grid-template-columns: minmax(160px, 1fr) 2.4fr; gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--hair);
}
.l-k { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(14px, 1.4vw, 18px); letter-spacing: .04em; transition: color .16s var(--ease); }
.life-list li:hover .l-k { color: var(--accent); }
.l-v { color: var(--text-2); }

/* ---------- 8. CONTACT ---------- */
.contact { position: relative; z-index: 6; background: var(--bg-deep); padding: clamp(112px, 20vh, 224px) 0 0; overflow: hidden; text-align: center; }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.topo-hero { z-index: 0; }
.lamp { z-index: 1; mix-blend-mode: screen; }
.contact .wrap, .contact .foot { position: relative; z-index: 2; }
/* a neutral pool of shadow behind the text so the contour lines never fight the words */
.contact .wrap::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(1100px, 120%); height: 130%; translate: -50% -50%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(11,10,8,.88) 0%, rgba(11,10,8,.6) 45%, transparent 72%);
  pointer-events: none;
}
.contact .foot { background: linear-gradient(to top, var(--bg-deep) 40%, rgba(11,10,8,.6)); }
.c-actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 6px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--hair); color: var(--text); background: var(--raised);
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: #26231E; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--bg-deep); border-color: transparent; }
.btn.primary:hover { background: #FFFFFF; }
.c-mail { margin-top: 20px; font-family: var(--mono); font-size: 13px; color: var(--text-3); word-break: break-all; }
.foot {
  margin-top: clamp(96px, 16vh, 176px);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter); border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--text-3);
}
.foot a { text-decoration: none; transition: color .16s var(--ease); }
.foot a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; gap: 24px; }
  .p-num { position: static; }
  .role-grid { grid-template-columns: 1fr; }
  .role, .role + .role { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--s-hair); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .links { display: none; }
  .meta.r { display: none; }
  .meta.l { left: var(--gutter); right: var(--gutter); bottom: calc(max(9vh, 56px) + 40px); max-width: none; text-align: center; }
  .meta.l p { display: none; }
  .hero-actions { justify-content: center; margin-top: 0; }
  .role-line { right: auto; left: 50%; translate: -50% 0; font-size: 12px; }
  .name { top: 14vh; font-size: 17vw; white-space: normal; line-height: .9; }
  .n2 { margin-left: 0; display: block; }
  .subject { height: min(58vh, 120vw); }
  .callout { width: 46vw; }
  .callout p { font-size: 12px; }
  .callout h2 { font-size: 12px; }
  #c1, #c3 { left: auto; right: 12px; }
  #c2 { right: auto; left: 12px; }
  .corner { display: none; }
  .contact .wrap::before { opacity: .55; }
  .tl-list { flex-direction: column; width: auto; gap: 32px; padding-left: calc(var(--gutter) + 28px); }
  .tl-list::before { left: calc(var(--gutter) + 4px); right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .tl-item { width: auto; padding: 0; }
  .tl-item::before { left: -28px; top: 6px; }
  .life-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .callout { display: none; } /* same facts appear in work, timeline and wins */
}

/* ============================================================
   2. CHAPTERS OF MY LIFE (after the Arnav Kumar reference)
   A light, calm section: cards slide sideways as you scroll; each opens a page.
   ============================================================ */
.chapters { position: relative; z-index: 6; background: #F4EFE7; color: #1F1B16; overflow: hidden; }
.chapters::before { /* soft handover from the orange hero */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: clamp(90px, 16vh, 160px); pointer-events: none;
  background: linear-gradient(to bottom, #F29647, rgba(244, 239, 231, 0));
}
.ch-pin { min-height: 100vh; display: flex; align-items: center; gap: clamp(32px, 5vw, 80px); padding: 96px 0 64px var(--gutter); position: relative; }
.ch-head { flex: none; width: clamp(220px, 24vw, 360px); }
.ch-eyebrow { font-family: "Anton", Impact, sans-serif; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #C9401A; }
.ch-title { margin-top: 12px; font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 7vw, 120px); line-height: .9; }
.ch-hint { margin-top: 20px; font-size: 14px; color: #6B5E4B; max-width: 22ch; }

.ch-track { display: flex; gap: 24px; width: max-content; padding-right: var(--gutter); will-change: transform; }
.ch-card {
  width: clamp(280px, 26vw, 380px); flex: none; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(31, 27, 22, .06), 0 12px 32px rgba(31, 27, 22, .08);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ch-card:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(31, 27, 22, .06), 0 20px 44px rgba(31, 27, 22, .14); }
.ch-cover {
  position: relative; aspect-ratio: 16 / 11; color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 20px 22px;
}
.ch-cover.t1 { background: linear-gradient(150deg, #0E0A07, #2E2016 70%, #4A321C); color: #FFF3E2; }   /* Behind the camera: screening-room black and projector gold */
.ch-cover.t1 .bk-top, .ch-cover.t1 .bk-line { color: #F2B66D; }
/* Behind the camera: the cover is a camera viewfinder (Google Flow image), with a live REC label and timecode drawn on top */
.bk-plate-wrap { position: relative; z-index: 1; display: block; margin-top: 16px; }
.bk-plate-wrap .bk-plate { margin-top: 0; }
.bk-rec, .bk-tc { position: absolute; z-index: 2; font-family: var(--mono); font-weight: 600; letter-spacing: .08em; line-height: 1; color: #FFF3E2; text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
  font-size: clamp(7px, calc(var(--bw, 300px) * .03), 11px); pointer-events: none; }
.bk-rec { left: 30.5%; top: 17.2%; animation: bk-rec 1.4s steps(1) infinite; }
.bk-tc { right: 13.5%; bottom: 14.5%; color: rgba(255, 243, 226, .85); }
@keyframes bk-rec { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bk-rec { animation: none; } }
.ch-cover.t2 { background: linear-gradient(150deg, #3A1A10, #A3401C); }
.ch-cover.t3 { background: linear-gradient(150deg, #E9E1D3, #CDB58F); color: #1F1B16; }
.ch-cover.t4 { background: linear-gradient(150deg, #0F2A2A, #2E6B5E); }
.ch-cover.t5 { background: linear-gradient(150deg, #1B1B1F, #4A4458); }
.ch-cover.t6 { background: radial-gradient(ellipse 90% 60% at 50% 100%, rgba(200, 16, 46, .55), transparent 70%), linear-gradient(150deg, #0E0E12, #2A0B12); }
.ch-cover.t-am { background: linear-gradient(150deg, #0F2A18, #2F7A3E); }
.ch-cover.t7 { background: radial-gradient(ellipse 90% 45% at 50% 28%, rgba(255, 168, 110, .2), transparent 70%), linear-gradient(160deg, #3B2A44, #1F1626); }   /* dusk-coloured cloth */
.bk-spine.ch-cover.t7 { background: linear-gradient(180deg, #4A3550, #2A1E30); }
/* a picture from each chapter, set into its cover like a framed plate (assets/covers/<chapter>.webp) */
.bk-plate { position: relative; z-index: 1; display: block; width: 100%;   /* above the cover's paper grain, so the picture stays clean */
   aspect-ratio: 600 / 325; object-fit: cover; margin-top: 16px; border-radius: 3px;
  border: 2px solid rgba(255, 244, 225, .85); box-shadow: 0 0 0 5px rgba(255, 244, 225, .1), 0 12px 26px rgba(0, 0, 0, .4); }
.ch-cover.t3 .bk-plate { border-color: rgba(31, 27, 22, .75); box-shadow: 0 0 0 5px rgba(31, 27, 22, .08), 0 12px 26px rgba(31, 27, 22, .25); }   /* the light Symbionic cover */
/* the original covers, kept: add class "classic" to a book's two .ch-cover spans to switch that book back */
.ch-cover.classic .bk-plate { display: none; }
.ch-cover.t7.classic { background: linear-gradient(150deg, #22301E, #6E7F45); }
.ch-num { font-family: "Anton", Impact, sans-serif; font-size: clamp(64px, 6vw, 96px); line-height: .85; opacity: .9; }
.ch-stat { font-family: "Anton", Impact, sans-serif; font-size: clamp(26px, 2.4vw, 36px); line-height: 1; text-transform: uppercase; }
.ch-stat small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 12px; text-transform: none; opacity: .8; }
.ch-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.ch-when { font-size: 12px; color: #7B7266; }
.ch-body h3 { margin-top: 8px; font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: 28px; text-transform: uppercase; letter-spacing: .01em; }
.ch-line { margin-top: 8px; font-size: 15px; line-height: 1.5; color: #4A4033; flex: 1; }
.ch-card .ch-open {   /* old card button; scoped so it never styles body.ch-open */
  align-self: flex-start; margin-top: 18px; padding: 8px 14px; border-radius: 999px; background: #1F1B16; color: #fff;
  font-size: 13px; font-weight: 500; transition: background-color .16s var(--ease);
}
.ch-card:hover .ch-open { background: #C9401A; }

/* ---------- chapter pages ---------- */
.chapter-layer {
  position: fixed; inset: 0; z-index: 120; overflow-y: auto; overscroll-behavior: contain;
  background: #F4EFE7; color: #1F1B16; -webkit-overflow-scrolling: touch;
}
.chapter-layer[hidden] { display: none; }
body.ch-open { overflow: hidden; }
.chapter-page { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) 96px; }
.cp-top {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; background: linear-gradient(#F4EFE7 70%, rgba(244, 239, 231, 0));
}
.cp-back { font-size: 14px; font-weight: 500; color: #1F1B16; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(31, 27, 22, .2); transition: background-color .16s var(--ease); }
.cp-back:hover { background: #1F1B16; color: #fff; }
.cp-count { font-family: "Anton", Impact, sans-serif; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: #7B7266; }

.cp-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); }
.cp-toc { position: sticky; top: 88px; align-self: start; padding-top: 48px; }
.cp-toc p { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7B7266; margin-bottom: 12px; }
.cp-toc ol { list-style: none; display: grid; gap: 8px; }
.cp-toc a { font-size: 14px; color: #6B5E4B; text-decoration: none; border-left: 1px solid rgba(31, 27, 22, .15); padding-left: 12px; display: block; transition: color .16s, border-color .16s; }
.cp-toc a:hover, .cp-toc a.on { color: #1F1B16; border-color: #C9401A; }

.cp-main { padding-top: 48px; }
.cp-where { font-size: 14px; color: #7B7266; }
.cp-title { margin-top: 10px; font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 8vw, 128px); line-height: .9; }
.cp-meta { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 20px; border-top: 1px solid rgba(31, 27, 22, .14); }
.cp-meta dt { font-size: 12px; color: #7B7266; }
.cp-meta dd { margin-top: 6px; font-size: 15px; line-height: 1.45; }
.cp-meta dd span { display: block; font-size: 13px; color: #7B7266; }

.cp-scene, .cp-cover { margin: 40px 0 8px; border-radius: 20px; overflow: hidden; }
.cp-cover { aspect-ratio: 21 / 9; padding: clamp(24px, 4vw, 48px); }
.cp-cover .ch-num { font-size: clamp(96px, 14vw, 220px); }
.cp-cover .ch-stat { font-size: clamp(32px, 4vw, 64px); }
/* scenes that used to sit full-bleed in the old project list now sit inside the page */
.cp-scene .scene, .cp-scene .forge {
  position: relative; left: auto; top: auto; translate: none; width: 100%; height: clamp(340px, 62vh, 640px);
  -webkit-mask-image: none; mask-image: none;
}

.cp-text { padding-top: 24px; }
.cp-sec { padding: 40px 0; border-bottom: 1px solid rgba(31, 27, 22, .1); scroll-margin-top: 80px; }
.cp-kicker { font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: #C9401A; margin-bottom: 14px; }
.cp-sec p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: #2E271E; max-width: 62ch; }
.cp-sec ul { margin-top: 14px; display: grid; gap: 10px; }
.cp-sec p + p, .cp-sec ul + p, .cp-sec .sc-head + p { margin-top: 14px; }
.cp-sec li { position: relative; padding-left: 22px; font-size: 17px; line-height: 1.5; color: #2E271E; }
.cp-sec li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: #C9401A; }
.cp-sec b { font-weight: 600; color: #1F1B16; }

.cp-pager { margin-top: 56px; display: flex; justify-content: space-between; gap: 16px; }
.cp-pager a {
  flex: 1; max-width: 48%; padding: 20px 24px; border-radius: 16px; background: #fff; text-decoration: none; color: #1F1B16;
  font-family: "Anton", Impact, sans-serif; font-size: clamp(22px, 2.4vw, 32px); text-transform: uppercase; line-height: 1.1;
  box-shadow: 0 1px 2px rgba(31, 27, 22, .06), 0 10px 26px rgba(31, 27, 22, .07); transition: transform .2s var(--ease);
}
.cp-pager a:hover { transform: translateY(-3px); }
.cp-pager small { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 13px; text-transform: none; color: #7B7266; }
.cp-pager .cp-next { text-align: right; margin-left: auto; }

@media (max-width: 860px) {
  .ch-pin { flex-direction: column; align-items: stretch; padding: 80px var(--gutter) 64px; }
  .ch-head { width: auto; }
  .ch-track { flex-direction: column; width: auto; padding-right: 0; }
  .ch-card { width: 100%; }
  .cp-grid { grid-template-columns: 1fr; gap: 0; }
  .cp-toc, .cp-gap { display: none; }
  .cp-meta { grid-template-columns: 1fr; gap: 14px; }
  .cp-cover { aspect-ratio: 4 / 3; }
  .cp-pager { flex-direction: column; }
  .cp-pager a { max-width: none; }
}
/* the hands scene sized to its frame inside the chapter page */
.cp-scene .forge-stage { width: 92%; top: 58%; }
.cp-scene .forge-title { top: 14%; font-size: clamp(26px, 4.6vw, 72px); }

/* ============================================================
   CONNECT: the last page. Dark dusk over the interactive dunes,
   a velocity marquee, a giant copyable email, big rolling link rows.
   ============================================================ */
.contact.connect {
  position: relative; z-index: 6; overflow: hidden; text-align: left; padding: 0; color: #EFE9DE;
  background: #0E0C0B; min-height: 100vh; display: flex; flex-direction: column;
}
.connect::before { /* handover from the cream chapters */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: clamp(80px, 14vh, 140px); z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, #F4EFE7, rgba(14, 12, 11, 0));
}
.connect .topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.connect > *:not(.topo):not(.cn-toast) { position: relative; z-index: 2; }

.cx-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: clamp(120px, 18vh, 180px) var(--gutter) 0;
}
.cx-eyebrow, .cx-clock { font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: rgba(239, 233, 222, .75); }
.cx-clock { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.cx-dot { width: 8px; height: 8px; border-radius: 50%; background: #E8945A; }

.cx-title {
  padding: 8px var(--gutter) 0; margin: 0; font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(84px, 15vw, 280px); line-height: .84; color: #EFE9DE; display: flex; flex-wrap: wrap; column-gap: .22em;
}
.cx-title span:last-child { color: #E8945A; }

/* velocity marquee */
.cx-velo { margin-top: clamp(28px, 5vh, 56px); border-top: 1px solid rgba(239, 233, 222, .14); border-bottom: 1px solid rgba(239, 233, 222, .14); overflow: hidden; background: rgba(14, 12, 11, .55); }
.cx-velo-track { display: flex; align-items: center; gap: 28px; width: max-content; padding: 16px 0; white-space: nowrap; will-change: transform; }
.cx-velo-track span { font-family: "Anton", Impact, sans-serif; font-size: clamp(22px, 2.6vw, 40px); text-transform: uppercase; letter-spacing: .02em; }
.cx-velo-track i { font-style: normal; color: #E8945A; font-size: .9em; }

/* the email, huge and copyable */
.cx-mail-wrap { padding: clamp(48px, 8vh, 96px) var(--gutter) 0; }
.cx-k { font-size: 13px; color: rgba(239, 233, 222, .6); margin-bottom: 10px; }
.cx-mail {
  all: unset; cursor: none; display: inline-block; max-width: 100%; overflow-wrap: anywhere;
  font-family: "Anton", Impact, sans-serif; font-size: clamp(30px, 5.4vw, 96px); line-height: 1; letter-spacing: .005em; color: #EFE9DE;
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 2px no-repeat; padding-bottom: 6px;
  transition: background-size .45s var(--ease), color .2s var(--ease);
}
.cx-mail span { color: rgba(239, 233, 222, .45); transition: color .2s var(--ease); }
.cx-mail:hover { color: #fff; background-size: 100% 2px; }
.cx-mail:hover span { color: #E8945A; }
.cx-mail:focus-visible { outline: 1px solid #E8945A; outline-offset: 8px; }
.cx-bubble {
  position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none; padding: 8px 14px; border-radius: 999px;
  background: #E8945A; color: #1A120D; font: 600 13px var(--sans); white-space: nowrap;
  opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.cx-bubble.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* link rows: the label rolls up, a fill sweeps in, the arrow turns */
.cx-rows { list-style: none; margin: clamp(48px, 8vh, 96px) 0 0; border-top: 1px solid rgba(239, 233, 222, .14); }
.cx-row {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 56px; align-items: center; gap: 16px;
  padding: clamp(14px, 2.4vh, 26px) var(--gutter); text-decoration: none; color: #EFE9DE; overflow: hidden;
  border-bottom: 1px solid rgba(239, 233, 222, .14);
}
.cx-row::before {
  content: ""; position: absolute; inset: 0; background: #E8945A; transform: scaleY(0); transform-origin: bottom; z-index: -1;
  transition: transform .45s var(--ease);
}
.cx-row:hover::before, .cx-row:focus-visible::before { transform: scaleY(1); }
.cx-row:hover, .cx-row:focus-visible { color: #1A120D; }
.cx-n { font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .08em; opacity: .6; }
.cx-name { display: block; overflow: hidden; height: 1em; font-family: "Anton", Impact, sans-serif; text-transform: uppercase; font-size: clamp(44px, 7vw, 120px); line-height: 1; }
.cx-name span { display: block; position: relative; transition: transform .5s var(--ease); }
.cx-name span::after { content: attr(data-t); position: absolute; left: 0; top: 100%; }
.cx-row:hover .cx-name span, .cx-row:focus-visible .cx-name span { transform: translateY(-100%); }
.cx-sub { font-size: 14px; opacity: .7; text-align: right; }
.cx-arrow { justify-self: end; font-size: clamp(24px, 2.4vw, 36px); transition: transform .45s var(--ease); }
.cx-row:hover .cx-arrow { transform: rotate(45deg); }

/* footer with a giant name bleeding off the bottom */
.cx-foot { margin-top: auto; padding-top: clamp(64px, 10vh, 120px); overflow: hidden; }
.cx-foot-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 0 var(--gutter) 18px;
  font-family: "Anton", Impact, sans-serif; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: rgba(239, 233, 222, .7);
}
.cx-magnet { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(239, 233, 222, .35); color: #EFE9DE; text-decoration: none; transition: background-color .16s var(--ease), color .16s var(--ease); }
.cx-magnet:hover { background: #EFE9DE; color: #1A120D; }
.cx-giant {
  margin: 0; text-align: center; white-space: nowrap; line-height: .78; margin-bottom: -.14em;
  font-family: "Anton", Impact, sans-serif; text-transform: uppercase; font-size: clamp(120px, 27vw, 520px);
  color: transparent; -webkit-text-stroke: 1px rgba(239, 233, 222, .28);
}

.cn-toast {
  position: fixed; left: 50%; bottom: 28px; translate: -50% 20px; z-index: 130; opacity: 0; pointer-events: none;
  background: #EFE9DE; color: #1A120D; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: opacity .2s var(--ease), translate .2s var(--ease);
}
.cn-toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 760px) {
  .cx-top { flex-direction: column; align-items: flex-start; }
  .cx-row { grid-template-columns: minmax(0, 1fr) 32px; }
  .cx-sub { display: none; }
  .cx-mail { cursor: pointer; }
}
@media (hover: none) { .cx-mail { cursor: pointer; } }

/* resume viewer (opens from the "Resume" tab) */
.resume-page { max-width: 1000px; }
.rs-download {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; text-decoration: none;
  background: #C9401A; color: #fff; font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .05em; text-transform: uppercase;
  transition: background-color .16s var(--ease);
}
.rs-download:hover { background: #1F1B16; }
.rs-head { padding-top: 24px; }
.rs-frame {
  margin-top: 28px; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 4px rgba(31, 27, 22, .06), 0 18px 48px rgba(31, 27, 22, .12);
  height: min(130vh, 1300px);
}
.rs-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.rs-fallback { margin-top: 16px; font-size: 14px; color: #6B5E4B; }
.rs-fallback a { color: #C9401A; }
@media (max-width: 760px) { .rs-frame { height: 80vh; } }

/* ---------- Connect: matched to the hero (orange, white condensed type) ---------- */
.contact.connect {
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 50% 105%, rgba(255, 196, 120, .55), transparent 70%),
    linear-gradient(165deg, #C9401A 0%, #DE5A22 38%, #EC7A32 72%, #F29647 100%);
}
.connect::before { background: linear-gradient(to bottom, #F4EFE7, rgba(244, 239, 231, 0)); }
.cx-eyebrow, .cx-clock { color: rgba(255, 255, 255, .9); }
.cx-dot { background: #fff; }
.cx-title { color: #fff; }
.cx-title span:last-child { color: #fff; }

.cx-velo { background: transparent; border-color: rgba(255, 255, 255, .45); }
.cx-velo-track span { color: #fff; }
.cx-velo-track i { color: rgba(255, 255, 255, .7); }

.cx-k { color: rgba(255, 255, 255, .8); }
.cx-mail { color: #fff; }
.cx-mail span { color: rgba(255, 255, 255, .6); }
.cx-mail:hover { color: #fff; }
.cx-mail:hover span { color: #fff; }
.cx-mail:focus-visible { outline-color: #fff; }
.cx-bubble { background: #fff; color: #C9401A; }

.cx-rows { border-top-color: rgba(255, 255, 255, .45); }
.cx-row { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }
.cx-row::before { background: #fff; }
.cx-row:hover, .cx-row:focus-visible { color: #C9401A; }
.cx-n { opacity: .8; }
.cx-sub { opacity: .85; }

.cx-foot-row { color: rgba(255, 255, 255, .9); }
.cx-magnet { color: #fff; border-color: rgba(255, 255, 255, .75); }
.cx-magnet:hover { background: #fff; color: #C9401A; }
.cx-giant { -webkit-text-stroke: 1px rgba(255, 255, 255, .55); }

.cn-toast { background: #1F1B16; color: #fff; }

/* ============================================================
   CHAPTERS AS BOOKS (after Sudarvel's portfolio)
   A shelf of 3D books on a curve; scroll turns the shelf; click opens a flip-book.
   ============================================================ */
.chapters.books { background: #F4EFE7; }
.bk-pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 96px 0 40px; position: relative; }
.bk-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; padding: 0 var(--gutter); }
.bk-center { text-align: center; }
.bk-h { margin-top: 8px; font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(64px, 9vw, 150px); line-height: .88; color: #1F1B16; }
.bk-side { font-size: 15px; line-height: 1.5; color: #4A4033; max-width: 30ch; }
.bk-side.r { justify-self: end; text-align: right; }

.bk-stage { --bw: clamp(190px, 17vw, 280px); --bh: calc(var(--bw) * 1.45); --bt: 30px;
  position: relative; height: calc(var(--bh) * 1.22); margin-top: clamp(16px, 4vh, 48px); perspective: 1500px; perspective-origin: 50% 40%; }
.bk-ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.bk {
  all: unset; position: absolute; left: 50%; top: 50%; width: var(--bw); height: var(--bh);
  margin-left: calc(var(--bw) / -2); margin-top: calc(var(--bh) / -2);
  transform-style: preserve-3d; cursor: pointer; will-change: transform;
}
.bk:focus-visible .bk-front { outline: 2px solid #C9401A; outline-offset: 4px; }
.bk-face { position: absolute; top: 0; height: 100%; backface-visibility: hidden; }
.bk-front {
  left: 0; width: 100%; transform: translateZ(calc(var(--bt) / 2)); border-radius: 3px 8px 8px 3px; overflow: hidden;
  display: flex; flex-direction: column; padding: 18px 18px 16px; box-shadow: inset 6px 0 10px rgba(0, 0, 0, .18);
}
.bk-front::after { /* paper grain and a light sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,.18), transparent 35%, transparent 70%, rgba(0,0,0,.12)),
              repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px);
}
.bk-spine {
  left: calc(50% - var(--bt) / 2); width: var(--bt); transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2));
  display: flex; align-items: center; justify-content: center; filter: brightness(.78);
}
.bk-spine span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: "Anton", Impact, sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.bk-edge {
  left: calc(50% - var(--bt) / 2); width: var(--bt); transform: rotateY(90deg) translateZ(calc(var(--bw) / 2 - 2px));
  background: repeating-linear-gradient(90deg, #F6F1E8 0 2px, #E3DBCC 2px 3px); height: calc(100% - 6px); top: 3px;
}
.bk-top { display: flex; justify-content: space-between; font-family: "Anton", Impact, sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.bk-title { margin-top: auto; font-family: "Anton", Impact, sans-serif; font-size: clamp(30px, 2.8vw, 46px); line-height: .92; text-transform: uppercase; }
.bk-line { margin-top: 10px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.45; opacity: .85; }

.bk-tag { display: flex; align-items: center; gap: 18px; padding: 8px var(--gutter) 0; font-family: "Anton", Impact, sans-serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #6B5E4B; }
.bk-barcode { width: 84px; height: 26px; background: repeating-linear-gradient(90deg, #1F1B16 0 2px, transparent 2px 4px, #1F1B16 4px 5px, transparent 5px 8px, #1F1B16 8px 11px, transparent 11px 12px); }
.bk-count b { font-weight: 400; color: #C9401A; }

@media (max-width: 760px) {
  .bk-head { grid-template-columns: 1fr; text-align: center; }
  .bk-side { display: none; }
  .bk-stage { --bw: 46vw; }
}
/* the shelf stays pinned, so drop the orange hand-over fade at its top */
.chapters.books::before { display: none; }

/* ---------- shelf v2: wider, bigger front book, obvious click ---------- */
.bk-stage { --bw: clamp(200px, 16.5vw, 290px); height: calc(var(--bh) * 1.45); }
.bk-front { box-shadow: inset 6px 0 10px rgba(0, 0, 0, .18), 0 30px 40px -22px rgba(31, 27, 22, .55); transition: box-shadow .3s var(--ease); }
.bk.is-front .bk-front { box-shadow: inset 6px 0 10px rgba(0, 0, 0, .18), 0 46px 60px -26px rgba(31, 27, 22, .65); }
.bk.is-front:hover .bk-front { box-shadow: inset 6px 0 10px rgba(0, 0, 0, .18), 0 56px 70px -24px rgba(31, 27, 22, .7), 0 0 0 2px #C9401A; }

/* the "Open chapter" pill under the front book */
.bk-cta {
  position: absolute; left: 50%; top: calc(100% + 22px); translate: -50% 0; transform: translateZ(calc(var(--bt) / 2));
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px; background: #1F1B16; color: #fff;
  font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), background-color .2s var(--ease);
}
.bk-cta i { width: 8px; height: 8px; border-radius: 50%; background: #F29647; box-shadow: 0 0 0 0 rgba(242, 150, 71, .7); animation: bkPing 1.8s ease-out infinite; }
@keyframes bkPing { 0% { box-shadow: 0 0 0 0 rgba(242, 150, 71, .7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(242, 150, 71, 0); } }
.bk.is-front .bk-cta { opacity: 1; }
.bk.is-front:hover .bk-cta { background: #C9401A; }
.bk:not(.is-front) { cursor: pointer; }
.bk.is-front { cursor: pointer; }
.bk-hint { color: #C9401A; }
@media (prefers-reduced-motion: reduce) { .bk-cta i { animation: none; } }

/* ---------- Connect fits one screen ---------- */
.contact.connect { height: 100vh; height: 100svh; min-height: 620px; }
.cx-top { padding-top: max(84px, 11vh); }
.cx-title { padding-top: 0; font-size: clamp(56px, min(11vw, 17vh), 210px); }
.cx-velo { margin-top: 2.6vh; }
.cx-velo-track { padding: 1.1vh 0; }
.cx-velo-track span { font-size: clamp(18px, min(2.2vw, 3.6vh), 34px); }
.cx-mail-wrap { padding-top: 3.6vh; }
.cx-k { margin-bottom: .8vh; }
.cx-mail { font-size: clamp(24px, min(4.6vw, 7.4vh), 84px); }
.cx-rows { margin-top: 3.4vh; }
.cx-row { padding-top: 1.1vh; padding-bottom: 1.1vh; }
.cx-name { font-size: clamp(30px, min(5vw, 7.6vh), 92px); }
.cx-arrow { font-size: clamp(20px, min(2vw, 3.4vh), 32px); }
.cx-foot { margin-top: auto; padding-top: 1.6vh; }
.cx-foot-row { padding-bottom: 2.2vh; }

/* one-screen Connect: no cream fade band at the top */
.connect::before { display: none; }

/* ---------- shelf v3: no slicing, no jitter ----------
   The ring is flat (each book is its own 3D object, stacked by z-index, front on top),
   and the perspective lives on the ring so every book is still seen in depth. */
.bk-stage { perspective: none; }
.bk-ring { transform-style: flat; perspective: 1500px; perspective-origin: 50% 42%; }
.bk { backface-visibility: hidden; }
.bk-dim { position: absolute; inset: 0; transform: translateZ(calc(var(--bt) / 2 + 1px)); background: #1F1B16; opacity: 0; pointer-events: none; border-radius: 3px 8px 8px 3px; }

/* hero note: two short personality lines */
.meta.l { max-width: 360px; }
.meta-who { font-size: clamp(18px, 1.55vw, 24px); line-height: 1.15; letter-spacing: .02em; }
.meta-me {
  margin-top: 10px; font-family: var(--sans); text-transform: none; letter-spacing: 0;
  font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; color: rgba(255, 255, 255, .88);
}

/* ---------- Connect v2: calmer type, two-column body, still back-to-top ---------- */
.cx-top { padding-top: max(96px, 13vh); }
.cx-eyebrow, .cx-clock { font-size: 13px; }
.cx-title { font-size: clamp(44px, min(6.6vw, 11vh), 120px); line-height: .9; margin-top: 1.2vh; }

.cx-velo { margin-top: 3.6vh; }
.cx-velo-track { gap: 22px; padding: 1.3vh 0; }
.cx-velo-track span { font-size: clamp(14px, min(1.4vw, 2.4vh), 20px); letter-spacing: .08em; }
.cx-velo-track i { font-size: .8em; }

.cx-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 120px);
  align-items: center; align-content: center; flex: 1; padding: 4vh var(--gutter);
}
.cx-mail-wrap { padding: 0; position: relative; }
.cx-k { font-size: 13px; letter-spacing: .04em; margin-bottom: 1.2vh; }
.cx-mail { font-size: clamp(26px, min(3.1vw, 5.4vh), 52px); line-height: 1.05; }
.cx-mail span { display: block; }
.cx-note { margin-top: 2.2vh; max-width: 38ch; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }

.cx-rows { margin: 0; }
.cx-row { grid-template-columns: minmax(0, 1fr) auto 28px; gap: 14px; padding: 1.9vh 14px; }
.cx-n { font-size: 13px; }
.cx-name { font-size: clamp(22px, min(2.4vw, 4.2vh), 38px); }
.cx-sub { font-size: 14px; }
.cx-arrow { font-size: 20px; }

.cx-foot-row { font-size: 12px; padding-bottom: 2.6vh; }
.cx-top-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .75); color: #fff; text-decoration: none;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.cx-top-btn:hover, .cx-top-btn:focus-visible { background: #fff; color: #C9401A; }

@media (max-width: 900px) {
  .contact.connect { height: auto; min-height: 100svh; }
  .cx-body { grid-template-columns: 1fr; gap: 40px; flex: none; padding: 40px var(--gutter) 0; }
  .cx-row { grid-template-columns: minmax(0, 1fr) 24px; }
  .cx-foot { padding-top: 48px; }
}

/* nav button morphs into the page it points at (main.js: growTo) */
.cx-morph { position: fixed; inset: 0; z-index: 79; pointer-events: none; overflow: hidden; will-change: clip-path; }
.cx-morph .cx-copy { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
.cx-morph-ring {
  position: fixed; z-index: 79; pointer-events: none; box-sizing: border-box;
  border: 1px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; white-space: nowrap; overflow: hidden;
}
.cx-morph-ring span { display: inline-block; }

/* email on one line: sized to its column (the address is ~16.4em wide) */
.cx-mail-wrap { container-type: inline-size; }
.cx-mail { white-space: nowrap; overflow-wrap: normal; font-size: min(44px, 6cqi); }
.cx-mail span { display: inline; }

/* Connect v3: no eyebrow/clock row, no row captions, centred arrows */
.cx-title { padding-top: max(104px, 14vh); }
.cx-row { grid-template-columns: minmax(0, 1fr) 28px; }
.cx-path { display: inline-flex; align-items: center; gap: .6em; }
.cx-arw { width: 1.15em; height: .75em; flex: none; display: block; }
@media (max-width: 900px) { .cx-row { grid-template-columns: minmax(0, 1fr) 24px; } }
.cx-morph-dim { position: fixed; inset: 0; z-index: 79; pointer-events: none; background: #1A0B05; opacity: 0; }

/* ---------- motion pass: one nav, sections hand over like cards ---------- */
/* the nav keeps one typeface everywhere; only its colour changes, and it fades */
.nav {
  mix-blend-mode: normal; color: #1F1B16; transition: color .4s var(--ease);
  font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
}
.nav .mark { font-family: "Anton", Impact, sans-serif; letter-spacing: .08em; font-weight: 400; font-size: 20px; }
.nav.on-hero { color: #fff; }

/* each section slides over the one before; its top corners are rounded by main.js (handover) */
#contact, .hero-pinned #chapters { margin-top: -28px; }
.sec-dim { position: absolute; inset: 0; z-index: 20; background: #1A0B05; opacity: 0; pointer-events: none; }

/* a page growing out of the thing you clicked (chapters.js) dims the page behind it */
.page-dim { position: fixed; inset: 0; z-index: 119; background: #1A0B05; opacity: 0; pointer-events: none; }
.cx-morph-ring { border-color: currentColor; }

/* Connect link rows, calmer hover: one gesture, one timing.
   A white panel rises from the bottom and leaves through the top; the label slides right,
   the arrow nudges the way it points. No rolling label, no spinning arrow. */
.cx-row { transition: color .35s var(--ease); }
.cx-row::before { transform-origin: top; transition: transform .45s var(--ease); }
.cx-row:hover::before, .cx-row:focus-visible::before { transform-origin: bottom; }
.cx-name { height: auto; overflow: visible; }
.cx-name span { transition: transform .45s var(--ease); }
.cx-name span::after { content: none; }
.cx-row:hover .cx-name span, .cx-row:focus-visible .cx-name span { transform: translateX(12px); }
.cx-arrow { transition: transform .45s var(--ease); }
.cx-row:hover .cx-arrow, .cx-row:focus-visible .cx-arrow { transform: translate(3px, -3px); }
.cx-n { transition: opacity .35s var(--ease); }
.cx-row:hover .cx-n, .cx-row:focus-visible .cx-n { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .cx-row::before, .cx-name span, .cx-arrow { transition: none; }
}

/* Connect rows: the white panel follows the mouse. It grows from the edge the pointer came in
   through and leaves through the edge it went out of (chapters.js sets --from on each row). */
.cx-row::before, .cx-row:hover::before, .cx-row:focus-visible::before { transform-origin: 50% var(--from, 100%); }

/* the menu bar text is black everywhere */
.nav, .nav.on-hero { color: #000; }

/* nav Connect / Back to top button: hover like the Connect rows. A black panel fills it from the
   edge the pointer came in through (chapters.js sets --from), the text turns white, the arrow
   nudges the way it points, and the button presses in slightly on click. */
.nav .cta {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .35em;
  transition: color .35s var(--ease), transform .2s var(--ease);
}
.nav .cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #000;
  transform: scaleY(0); transform-origin: 50% var(--from, 100%); transition: transform .45s var(--ease);
}
.nav .cta:hover, .nav .cta:focus-visible { color: #fff; }
.nav .cta:hover::before, .nav .cta:focus-visible::before { transform: scaleY(1); }
.nav .cta span { display: inline-block; transition: transform .45s var(--ease); }
.nav .cta:hover span, .nav .cta:focus-visible span { transform: translate(2px, -2px); }
.nav .cta[href="#top"]:hover span, .nav .cta[href="#top"]:focus-visible span { transform: translateY(-3px); }
.nav .cta:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .nav .cta::before, .nav .cta span { transition: none; } }

/* nav text links: a line draws under the link from the side the pointer came in from and
   leaves through the side it went out (chapters.js sets --fromx); the other links step back */
.links a { position: relative; padding: 4px 0; transition: opacity .35s var(--ease); }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: var(--fromx, 0%) 50%; transition: transform .45s var(--ease);
}
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }
.links:hover a { opacity: .4; }
.links a:hover, .links a:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .links a::after { transition: none; } }

/* hero name: 25% smaller, sitting a little lower so the head still overlaps its lower edge */
.name { font-size: clamp(48px, 10.8vw, 202px); top: 20vh; }

/* YY logo: the two letters step apart and lift one after the other, and a line draws under
   them from the side the pointer came in (like the other nav links) */
.nav .mark { position: relative; display: inline-flex; padding: 4px 0; }
.nav .mark span { display: inline-block; transition: transform .45s var(--ease); }
.nav .mark:hover span:first-child, .nav .mark:focus-visible span:first-child { transform: translate(-3px, -3px); }
.nav .mark:hover span:last-child, .nav .mark:focus-visible span:last-child { transform: translate(3px, -3px) rotate(8deg); transition-delay: .05s; }
.nav .mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: var(--fromx, 0%) 50%; transition: transform .45s var(--ease);
}
.nav .mark:hover::after, .nav .mark:focus-visible::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .nav .mark span, .nav .mark::after { transition: none; } }

/* name a little higher, portrait a little lower, so the head only overlaps the name's lower part */
.name { top: 15vh; }
.subject { bottom: 4vh; }

/* ---------- loader: "hello" in a few languages, then the sheet lifts (main.js) ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: #1A0B05; color: #fff;
  display: flex; align-items: center; justify-content: center;
  /* failsafe: if the script never runs, get out of the way */
  animation: loaderFailsafe 0s linear 10s forwards;
}
@keyframes loaderFailsafe { to { visibility: hidden; } }
.loader-word {
  display: flex; align-items: center; gap: 16px; margin: 0;
  font-family: var(--sans), "Noto Sans Devanagari", sans-serif; font-weight: 500;
  font-size: clamp(34px, 4.4vw, 64px); line-height: 1.2; letter-spacing: -.01em;
}
.loader-word span { display: inline-block; }
.loader-word i { width: 12px; height: 12px; border-radius: 50%; background: #F29647; flex: none; }
/* the trailing curved edge of the sheet as it lifts */
.loader-curve {
  position: absolute; left: -10%; right: -10%; top: 100%; height: 18vh; background: #1A0B05;
  border-radius: 0 0 50% 50%; transform-origin: 50% 0; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .loader { display: none; } }
.loader { flex-direction: column; gap: 14px; }
.loader-src { margin: 0; min-height: 1.4em; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: rgba(255, 255, 255, .55); opacity: 0; }
/* loader: bigger greeting, no dot, no credit line */
.loader-word { font-size: clamp(42px, 5.6vw, 84px); }
.loader-src { display: none; }

/* loader lines roll through one clipped band (main.js); padding keeps Hindi matras and descenders inside it */
.loader-word { display: grid; place-items: center; overflow: hidden; padding: .22em .3em; }
.loader-word span { grid-area: 1 / 1; white-space: nowrap; will-change: transform; }
/* loader in the site's cream, dark type; it lifts away to reveal the orange hero */
.loader, .loader-curve { background: #F4EFE7; }
.loader { color: #1F1B16; }

/* ============================================================
   CHAPTER PAGES v2: a full-width interactive scene with the title over it,
   then role and dates, a band of key numbers, the story, and the skills used.
   ============================================================ */
.chapter-page:not(.resume-page) { max-width: none; padding: 0 0 96px; }
.chapter-page:not(.resume-page) > .cp-top { padding-left: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); }
.chapter-page:not(.resume-page) > .cp-intro,
.chapter-page:not(.resume-page) > .cp-stats,
.chapter-page:not(.resume-page) > .cp-grid,
.chapter-page:not(.resume-page) > .cp-pager { max-width: 1240px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.cp-hero {
  position: relative; margin: 0 12px; height: clamp(460px, 76vh, 820px); border-radius: 24px; overflow: hidden; isolation: isolate;
  background: #120D0A; color: #F4EFE7;
}
.cp-hero[data-tone="light"] { background: #ECE4D6; color: #1F1B16; }
.cp-hero-bg { position: absolute; inset: 0; z-index: 0; }
.cp-hero-bg > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.cp-hero .scene, .cp-hero .forge { left: 0; top: 0; translate: none; -webkit-mask-image: none; mask-image: none; }
.cp-hero-text { position: absolute; z-index: 3; left: clamp(20px, 4vw, 56px); top: clamp(24px, 6vh, 64px); max-width: min(760px, 80%); pointer-events: none; }
.cp-hero .cp-where { color: inherit; opacity: .72; }
.cp-hero .cp-title { margin-top: 10px; font-size: clamp(56px, 9vw, 150px); }
.cp-hint {
  position: absolute; z-index: 3; right: clamp(16px, 3vw, 40px); bottom: clamp(14px, 2.4vh, 24px); left: clamp(16px, 3vw, 40px); text-align: right;
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em; opacity: .6; pointer-events: none;
}
.cp-intro .cp-meta { margin-top: 36px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* the numbers band */
.cp-stats { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px 32px; margin-top: 44px; }
.cp-stats li { border-top: 2px solid #1F1B16; padding-top: 16px; }
.cp-n { display: block; font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: clamp(34px, 4vw, 60px); line-height: 1; color: #1F1B16; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-stats span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: #6B5E4B; max-width: 28ch; }

/* skills used */
.cp-skills { border-bottom: 0; }
.cp-tags, .cp-sec .cp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cp-sec .cp-tags li { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(31, 27, 22, .2); font-size: 14px; line-height: 1.2; }
.cp-sec .cp-tags li::before { content: none; }

@media (max-width: 860px) {
  .cp-hero { margin: 0 8px; height: clamp(440px, 72svh, 640px); border-radius: 18px; }
  .cp-hero-text { max-width: calc(100% - 40px); }
  .cp-hero .cp-title { font-size: clamp(48px, 15vw, 96px); }
  .cp-hint { text-align: left; }
  .cp-intro .cp-meta { grid-template-columns: 1fr; }
  .cp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
}

/* ---------- scene: school, a film strip under a projector beam ---------- */
.scene-film { overflow: hidden; background: #070504; }
/* the films' own colours, blurred into a soft glow (drawn by scenes.js: film) */
.scene-film .sc-ambient { position: absolute; left: -15%; top: -15%; width: 130%; height: 130%; filter: blur(64px) saturate(1.6) brightness(.95); opacity: 1; transform: translateZ(0); }
.scene-film .sc-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 60%, rgba(7, 5, 4, .15) 0%, rgba(7, 5, 4, .45) 65%, rgba(7, 5, 4, .92) 100%),
              linear-gradient(180deg, rgba(7, 5, 4, .55) 0%, transparent 35%, transparent 75%, rgba(7, 5, 4, .7) 100%); }
.film-beam {
  position: absolute; right: -6%; top: -8%; width: 70%; height: 125%; transform-origin: 92% 0;
  background: linear-gradient(200deg, rgba(255, 220, 170, .26), rgba(255, 210, 160, .06) 55%, transparent 80%);
  clip-path: polygon(92% 0, 100% 0, 46% 100%, 0 100%);
  animation: beamFlicker 4s steps(1) infinite;
}
@keyframes beamFlicker { 0%, 100% { opacity: 1; } 12% { opacity: .86; } 14% { opacity: 1; } 58% { opacity: .92; } 60% { opacity: 1; } }
.film-strip { position: absolute; left: -8%; right: -8%; bottom: 14%; height: clamp(120px, 19vh, 180px); transform: rotate(-4deg); box-shadow: 0 30px 60px rgba(0, 0, 0, .55); overflow: hidden; background: #0A0706; }
.film-track { display: flex; height: 100%; width: max-content; will-change: transform; }
.film-frame { position: relative; flex: none; width: clamp(170px, 17vw, 250px); height: 100%; padding: 26px 4px; background: #0A0706; }
.film-frame::before, .film-frame::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(244, 229, 205, .8) 7px 17px, transparent 17px 25px);
}
.film-frame::before { top: 8px; } .film-frame::after { bottom: 8px; }
.film-frame i {
  display: grid; place-items: center; height: 100%; border-radius: 3px; padding: 0 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #6B4426, #3A2416 70%, #24160E);
  font-style: normal; font-family: "Anton", Impact, sans-serif; text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(16px, 1.5vw, 22px); line-height: 1.1; color: #F5DDBA;
}
.film-frame:nth-child(even) i { background: radial-gradient(ellipse at 50% 40%, #5A3A2A, #2E1D15 70%, #1C120C); }
.film-grain {
  position: absolute; inset: -50%; opacity: .09; pointer-events: none; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(3) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-4%, 3%); } 66% { transform: translate(3%, -5%); } 100% { transform: translate(0, 0); } }

/* ---------- scene: engineering, Mars dunes (dunes and rover styles above) ---------- */
.cp-hero .rover-track { bottom: 14%; }

/* ---------- scene: symbionic, the hands ---------- */
.cp-hero .forge { background: radial-gradient(ellipse 70% 80% at 50% 58%, #FBF8F2 0%, #EFE7DA 45%, #DCCFBA 80%, #CFC0A7 100%); }
.cp-hero .forge-stage { top: 60%; width: min(1180px, 104%); }

/* ---------- scene: thinkerbell, the Braille field ---------- */
.scene-braille { background: radial-gradient(ellipse 80% 80% at 60% 55%, #1F4E46 0%, #11302B 55%, #0A1F1C 100%); }
.scene-braille canvas { display: block; width: 100%; height: 100%; }

/* ---------- scene: masters' union, the case chart ---------- */
.scene-case { background: radial-gradient(ellipse 80% 90% at 70% 60%, #3B3546 0%, #24212C 55%, #17151C 100%); }
.case-svg { display: block; width: 100%; height: 100%; }
.cs-grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.cs-bar { fill: rgba(255, 255, 255, .1); transition: fill .25s var(--ease); }
.cs-bar.on { fill: rgba(242, 150, 71, .45); }
.cs-line { fill: none; stroke: #F29647; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cs-dot { fill: #24212C; stroke: #F29647; stroke-width: 2.5; transition: r .2s var(--ease); }
.cs-dot.on { r: 7; fill: #F29647; }
.cs-cross { stroke: rgba(255, 255, 255, .35); stroke-width: 1; stroke-dasharray: 4 5; opacity: 0; transition: opacity .2s var(--ease); }
.scene-case.cross .cs-cross { opacity: 1; }
.case-badge {
  position: absolute; z-index: 2; margin: -18px 0 0 -6px; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; background: #F29647; color: #1A120D;
  font-family: "Anton", Impact, sans-serif; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- scene: SaberCharge, made only from SaberCharge's own assets ----------
   a dark backdrop with the app's real menu bar and blade sprite (28 frames, empty to full):
   the cursor charges it, a click changes its colour. The site's demo video plays in a
   player on the right of the hero (.sc-side), not as the background. */
.scene-saber { overflow: hidden; background: #0C0C0F; }
.sc-layer { position: absolute; inset: 0; }
.sc-mb {
  position: absolute; left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 24px;
  background: rgba(20, 20, 24, .55); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; font: 500 16px var(--sans);
}
.sc-pct { font-style: normal; min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
.sc-sprite { aspect-ratio: 229 / 66; background: url(../assets/projects/sabercharge/bg/saber-crimson.webp) 0 0 / 100% auto no-repeat; }
.sc-sprite-sm { height: 28px; }
#page-sabercharge > .cp-top { translate: 0 32px; }   /* drop the nav pills below the bigger menu bar, without moving the hero */
@media (max-width: 860px) { #page-sabercharge > .cp-top { translate: none; padding-top: 52px; } }   /* phones: the hero flows, so plain padding */
/* the big blade sits centred under the title's tagline (.sc-intro) */
.sc-sprite-lg { width: clamp(150px, 14vw, 210px); margin: 14px auto 0; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .45)); }
@media (min-width: 861px) and (max-height: 780px) {   /* short screens: drop the content a little so it clears the blade */
  #page-sabercharge .cp-hero-text { top: 60% !important; }
  #page-sabercharge .sc-side { top: 57% !important; }
}
/* the cursor embers, ported from sabercharge.tech (CursorEmbers.tsx): see scenes.js */
.sc-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sc-embers canvas { position: absolute; inset: 0; display: block; }
.sc-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .5) 100%); }

/* ---------- scene: Adult Money: see "ADULT MONEY: the shop" at the end of this file ---------- */

/* ---------- scene: off the clock, the hidden blade ---------- */
@media (prefers-reduced-motion: reduce) { .film-beam, .film-grain { animation: none; } }

/* ============================================================
   CHAPTER PAGES v3: the scene is the whole page's background.
   It stays fixed behind everything and reacts to the cursor anywhere on the page;
   the story sits on a tinted sheet over it, in each chapter's own colours.
   ============================================================ */
.chapter-page[data-tone] {
  --ink: #EDE6DA; --ink-2: rgba(237, 230, 218, .64); --line: rgba(237, 230, 218, .16); --sheet: rgba(16, 12, 10, .8); --acc: #E8945A; --card: rgba(255, 255, 255, .06);
  position: relative; min-height: 100%; color: var(--ink);
}
.chapter-page[data-tone="light"] { --ink: #1F1B16; --ink-2: #6B5E4B; --line: rgba(31, 27, 22, .14); --sheet: rgba(251, 248, 242, .86); --acc: #C9401A; --card: #fff; }
#page-school       { --acc: #F2B66D; --sheet: rgba(22, 14, 10, .84); }
#page-engineering  { --acc: #E8945A; --sheet: rgba(14, 10, 9, .82); }
#page-thinkerbell  { --acc: #8FD3C0; --sheet: rgba(7, 26, 23, .84); }
#page-mastersunion { --acc: #F29647; --sheet: rgba(20, 18, 25, .86); }
#page-sabercharge  { --acc: #FF5468; --sheet: rgb(12, 12, 15); }   /* solid: the video's captions showed through the story text */
#page-offclock     { --acc: #CFE08F; --sheet: rgba(21, 29, 16, .84); }

.cp-bg { position: fixed; inset: 0; z-index: 0; }
.cp-bg > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.cp-bg .scene, .cp-bg .forge { left: 0; top: 0; translate: none; -webkit-mask-image: none; mask-image: none; }
.chapter-page[data-tone] > :not(.cp-bg) { position: relative; z-index: 1; }

/* the sticky bar floats over the scene: just the two pills */
.chapter-page[data-tone] > .cp-top { position: sticky; z-index: 3; background: none; pointer-events: none; }
.chapter-page[data-tone] .cp-top > * { pointer-events: auto; }
.chapter-page[data-tone] .cp-back { background: var(--sheet); color: var(--ink); border-color: var(--line); }
.chapter-page[data-tone] .cp-back:hover { background: var(--ink); color: var(--sheet); }
.chapter-page[data-tone] .cp-count { padding: 8px 14px; border-radius: 999px; background: var(--sheet); color: var(--ink-2); }

/* the first screen is all scene, with the title over it */
.chapter-page[data-tone] .cp-hero {
  margin: 0; height: clamp(440px, calc(100svh - 76px), 960px); border-radius: 0; background: none; overflow: visible; isolation: auto;
  color: var(--ink); pointer-events: none;
}
.chapter-page[data-tone] .cp-hero-text { left: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); top: clamp(8px, 3vh, 32px); }
.chapter-page[data-tone="dark"] .cp-hero-text { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.chapter-page[data-tone] .cp-hint { right: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); left: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); bottom: 28px; }

/* the story sheet */
.cp-sheet {
  max-width: 1240px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) clamp(32px, 5vw, 64px);
  background: var(--sheet); border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
.cp-sheet > .cp-intro, .cp-sheet > .cp-stats, .cp-sheet > .cp-grid, .cp-sheet > .cp-pager { max-width: none; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.cp-sheet .cp-intro .cp-meta { margin-top: 0; border-top-color: var(--line); }
.cp-sheet .cp-meta dt, .cp-sheet .cp-meta dd span { color: var(--ink-2); }
.cp-sheet .cp-meta dd { color: var(--ink); }
.cp-sheet .cp-stats li { border-top-color: var(--acc); }
.cp-sheet .cp-n { color: var(--ink); }
.cp-sheet .cp-stats span { color: var(--ink-2); }
.cp-sheet .cp-toc p { color: var(--ink-2); }
.cp-sheet .cp-toc a { color: var(--ink-2); border-left-color: var(--line); }
.cp-sheet .cp-toc a:hover, .cp-sheet .cp-toc a.on { color: var(--ink); border-left-color: var(--acc); }
.cp-sheet .cp-sec { border-bottom-color: var(--line); }
.cp-sheet .cp-kicker { color: var(--acc); }
.cp-sheet .cp-sec p, .cp-sheet .cp-sec li { color: var(--ink); opacity: .92; }
.cp-sheet .cp-sec b { color: var(--ink); }
.cp-sheet .cp-sec li::before { background: var(--acc); }
.cp-sheet .cp-tags li { border-color: var(--line); opacity: 1; }
.cp-sheet .cp-pager a { background: var(--card); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.cp-sheet .cp-pager small { color: var(--ink-2); }
.cp-sheet .cp-pager a:hover { border-color: var(--acc); }

@media (max-width: 860px) {
  .cp-sheet { margin: 0 8px; border-radius: 20px; }
  .chapter-page[data-tone] .cp-hero { height: clamp(420px, calc(100svh - 70px), 760px); }
}

/* scene tweaks: hands sit below the title; GPU hints for the moving glow layers */
.cp-bg .forge-stage { top: 64%; width: min(1100px, 96%); }
.halo i, .saber-blade, .mb-batt b, .film-beam { will-change: transform; }

/* the "Open chapter" dot pulses with a ring that scales and fades (compositor only),
   instead of animating box-shadow, which repainted every frame */
.bk-cta i { position: relative; animation: none; box-shadow: none; }
.bk-cta i::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(242, 150, 71, .7);
  animation: bkRing 1.8s ease-out infinite; will-change: transform, opacity;
}
@keyframes bkRing { 0% { transform: scale(1); opacity: 1; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bk-cta i::after { animation: none; opacity: 0; } }

/* Engineering: the rover film, inside the page (the dunes background is untouched) */
.cp-film { margin: 40px 0 0; }
.cp-film video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; background: #1A110C; }
.cp-film figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-2, #6B5E4B); }

/* Symbionic: the new hands image (fingertip gap at 50.4% across, 61% down) on a matching cream */
.cp-bg .forge { background: radial-gradient(ellipse 75% 85% at 50% 52%, #F8E8CE 0%, #F2E0C3 45%, #E3CCA9 80%, #D3BA95 100%); }
.cp-bg .forge-stage { aspect-ratio: 2200 / 959; width: min(1240px, 104%); top: 62%;
  -webkit-mask-image: radial-gradient(ellipse 72% 80% at 50% 55%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 80% at 50% 55%, #000 62%, transparent 100%); }
.cp-bg .halo { left: 50.4%; top: 61%; width: 26%; }
.cp-bg .hand { filter: none; }
.cp-bg .hand-l { clip-path: inset(0 49.6% 0 0); }
.cp-bg .hand-r { clip-path: inset(0 0 0 50.4%); }

/* chapter pages: each piece of the story rises in as it scrolls into view (chapters.js revealOnScroll) */
.rv { opacity: 0; transform: translateY(12px); transition: opacity .5s cubic-bezier(.22, 1, .36, 1) var(--rv-d, 0s), transform .5s cubic-bezier(.22, 1, .36, 1) var(--rv-d, 0s); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* chapter figures: generated illustrations, captioned as such */
.cp-figure { margin: 40px 0 0; }
.cp-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; background: rgba(0, 0, 0, .2); }
.cp-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-2, #6B5E4B); }

/* SaberCharge: the real icon, gallery, icon exploration and link */
.sc-figure img { aspect-ratio: auto; object-fit: contain; background: #1C1D20; }
.sc-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: start; }
.sc-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.sc-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.sc-gallery img { display: block; width: 100%; height: auto; border-radius: 10px; }
.sc-link { display: inline-block; margin-top: 18px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.sc-link:hover { border-color: var(--acc); background: rgba(255, 84, 104, .12); }
.cp-sec .cp-figure { margin-top: 22px; }
@media (max-width: 860px) { .sc-gallery { grid-template-columns: 1fr; } }

/* hero strip: official logos (white) alongside the names that have none */
.mq-logo { display: inline-flex; align-items: center; opacity: 1; }   /* logos in their original colours */
.mq-logo img { display: block; height: clamp(20px, 2.1vw, 30px); width: auto; max-width: none; }


/* chapter pages: the organisation's logo above the title */
.cp-logo { display: block; height: clamp(24px, 2.8vw, 38px); width: auto; max-width: min(70vw, 420px); margin-bottom: 18px; }
.chapter-page[data-tone="dark"] .cp-logo { filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .35)); }

/* a product photo on a plain card, shown whole */
.cp-figure-product img { aspect-ratio: 4 / 3; object-fit: contain; background: #F4F1EC; padding: clamp(16px, 3vw, 40px); }
.cp-figure-product { max-width: 720px; }
/* balance the logos' visual weight against the bold names */
.mq-logo img { height: clamp(24px, 2.4vw, 36px); }
.mq-logo img[src*="vit"] { height: clamp(32px, 3.3vw, 50px); }
.mq-logo img[src*="masters-union"] { height: clamp(26px, 2.7vw, 40px); }
.mq-logo img[src*="sabercharge"] { height: clamp(16px, 1.6vw, 24px); }
.mq-logo img[src*="thinkerbell"] { height: clamp(28px, 2.9vw, 44px); }

/* menu bar button: the label swap animates transform from JavaScript, so CSS must not also ease
   transform (the two fought and made the swap stutter). The press effect uses the separate `scale`. */
.nav .cta { transition: color .35s var(--ease), scale .2s var(--ease); }
.nav .cta:active { transform: none; scale: .96; }

.sc-launch { margin-top: 18px; }

/* Chapters heading: the side notes are gone, so the heading is the only item and sits centred */
.bk-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }

/* ---------- shelf extras: colour glow, arrows, cover logos, teaser, year timeline ---------- */
@property --glow { syntax: '<color>'; inherits: true; initial-value: #6B3A5A; }
.chapters { transition: --glow .9s var(--ease); }
.bk-glow {
  position: absolute; left: 50%; top: 52%; width: min(1100px, 90vw); height: 130%; translate: -50% -50%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, color-mix(in srgb, var(--glow) 42%, transparent) 0%, transparent 70%);
}
.bk-ring { z-index: 1; }
.bk-arrow {
  all: unset; position: absolute; top: 50%; translate: 0 -50%; z-index: 120; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 20px; color: #1F1B16;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(31, 27, 22, .15);
  transition: background-color .2s var(--ease), color .2s var(--ease), scale .2s var(--ease);
}
.bk-arrow.prev { left: var(--gutter); } .bk-arrow.next { right: var(--gutter); }
.bk-arrow:hover, .bk-arrow:focus-visible { background: #1F1B16; color: #fff; }
.bk-arrow:active { scale: .94; }
.bk-logo { display: block; height: 18px; width: auto; max-width: 70%; margin-top: 12px; object-fit: contain; object-position: left; opacity: .9; }

.bk-under { display: grid; justify-items: center; gap: 14px; padding: 6px var(--gutter) 0; }
.bk-teaser { margin: 0; min-height: 1.5em; font-size: 15px; color: #4A4033; text-align: center; transition: opacity .25s var(--ease), translate .25s var(--ease); }
.bk-teaser.out { opacity: 0; translate: 0 6px; }
.bk-time { position: relative; width: min(720px, 86vw); padding-top: 8px; }
.bk-time-line { position: relative; height: 2px; background: rgba(31, 27, 22, .15); border-radius: 2px; }
.bk-time-range { position: absolute; top: -1px; height: 4px; border-radius: 4px; background: #C9401A; left: 0; width: 10%;
  transition: left .6s var(--ease), width .6s var(--ease); }
.bk-time-dots { position: absolute; left: 0; right: 0; top: 9px; height: 0; }
.bk-dot { all: unset; position: absolute; top: 0; width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; cursor: pointer;
  background: #F4EFE7; border: 2px solid rgba(31, 27, 22, .45); transition: background-color .25s var(--ease), border-color .25s var(--ease), scale .25s var(--ease); }
.bk-dot:hover, .bk-dot:focus-visible { border-color: #C9401A; scale: 1.2; }
.bk-dot.on { background: #C9401A; border-color: #C9401A; scale: 1.25; }
.bk-time-years { display: flex; justify-content: space-between; margin-top: 12px; font-family: "Anton", Impact, sans-serif; font-size: 12px; letter-spacing: .1em; color: #7B7266; }
.bk-count { font-family: "Anton", Impact, sans-serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #6B5E4B; }
.bk-count b { font-weight: 400; color: #C9401A; }
@media (max-width: 760px) {
  .bk-arrow { width: 40px; height: 40px; font-size: 16px; top: auto; bottom: -8px; translate: none; }
  .bk-teaser { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .chapters, .bk-time-range, .bk-teaser { transition: none; } }
/* spacing: clear the "Open chapter" pill; the counter sits beside the timeline to save height */
.bk-under { margin-top: 44px; gap: 10px; }
.bk-time { margin-top: 2px; }
.bk-under .bk-count { position: absolute; left: calc(100% + 28px); top: -2px; white-space: nowrap; }
.bk-under { position: relative; }
.bk-time { position: relative; }
.bk-glow { background: radial-gradient(ellipse 50% 50% at 50% 50%, color-mix(in srgb, var(--glow) 60%, transparent) 0%, transparent 72%); }
@media (max-width: 960px) { .bk-under .bk-count { position: static; } }
/* fit heading, shelf, teaser and timeline on shorter laptop screens */
.bk-stage { height: calc(var(--bh) * 1.3); }
.bk-h { font-size: clamp(56px, min(9vw, 14vh), 150px); }
.bk-under { margin-top: 38px; }
/* books scale with the screen's height too, so the shelf, teaser and timeline fit on short laptops */
.bk-stage { --bw: clamp(170px, min(16.5vw, 25vh), 290px); }
.bk-pin { padding-top: 84px; padding-bottom: 24px; }
.bk-under { margin-top: 46px; }
@media (max-width: 760px) { .bk-stage { --bw: min(46vw, 30vh); } }
.bk-under { margin-top: 58px; }
/* the cover's top line (chapter + dates) scales with the book and stays on one line */
.bk-top { gap: 8px; white-space: nowrap; font-size: clamp(9px, calc(var(--bw) * .046), 12px); }

/* no "Open chapter" pill: the books get the room back (the front book still opens on click,
   and shows an orange ring on hover) */
.bk-stage { --bw: clamp(180px, min(18vw, 30vh), 310px); }
.bk-under { margin-top: 34px; }
@media (max-width: 760px) { .bk-stage { --bw: min(52vw, 34vh); } }
.bk-stage { height: calc(var(--bh) * 1.2); }
.bk-under { margin-top: 20px; }

/* ongoing chapters: a diamond with a slow pulse, and a range bar that runs on past "Now" */
.bk-dot.ongoing { border-radius: 2px; rotate: 45deg; width: 10px; height: 10px; border-color: #C9401A; background: #F4EFE7; }
.bk-dot.ongoing::after { content: ""; position: absolute; inset: -5px; border-radius: 3px; border: 1.5px solid rgba(201, 64, 26, .55);
  animation: bkOngoing 2s ease-out infinite; }
@keyframes bkOngoing { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.bk-dot.ongoing.on { background: #C9401A; }
.bk-time-range.ongoing { background: linear-gradient(90deg, #C9401A 70%, rgba(201, 64, 26, 0)); }
@media (prefers-reduced-motion: reduce) { .bk-dot.ongoing::after { animation: none; opacity: 0; } }

/* heading 15% smaller; the books take the room */
.bk-h { font-size: clamp(48px, min(7.65vw, 11.9vh), 128px); }
.bk-stage { --bw: clamp(190px, min(19.5vw, 33vh), 330px); }
@media (max-width: 760px) { .bk-stage { --bw: min(56vw, 36vh); } }

/* Connect: the email address on its row, a direct resume download */
.cx-row { grid-template-columns: minmax(0, 1fr) 28px; }
.cx-row .cx-arrow { grid-column: -2; }
.cx-addr { font-size: 14px; opacity: .85; white-space: nowrap; }
.cx-dl {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 2.4vh; padding: 11px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .8); color: #fff; text-decoration: none;
  font-family: "Anton", Impact, sans-serif; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .2s var(--ease), color .2s var(--ease), scale .2s var(--ease);
}
.cx-dl small { font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; opacity: .75; margin-left: 4px; }
.cx-dl:hover, .cx-dl:focus-visible { background: #fff; color: #C9401A; }
.cx-dl:active { scale: .97; }
@media (max-width: 900px) {
  .cx-row { grid-template-columns: minmax(0, 1fr) 24px; }
  .cx-addr { grid-column: 2; grid-row: 2; font-size: 13px; margin-top: 4px; white-space: normal; overflow-wrap: anywhere; }
  .cx-row .cx-arrow { grid-column: 2; grid-row: 1; }
}
@media (max-width: 900px) { .cx-addr { grid-column: 2 / 4; white-space: nowrap; overflow-wrap: normal; font-size: 12.5px; } }

/* Connect: a copy button beside the address */
.cx-mail-row { display: flex; align-items: center; gap: 14px; }
.cx-mail-row .cx-mail { font-size: min(40px, 5.3cqi); }
.cx-copybtn {
  all: unset; flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .7); color: #fff; transition: background-color .2s var(--ease), color .2s var(--ease), scale .2s var(--ease);
}
.cx-copybtn:hover, .cx-copybtn:focus-visible { background: #fff; color: #C9401A; }
.cx-copybtn:active { scale: .92; }
.cx-copybtn svg { position: absolute; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s var(--ease), scale .25s var(--ease); }
.cx-copybtn .ic-done { opacity: 0; scale: .6; }
.cx-copybtn.done .ic-copy { opacity: 0; scale: .6; }
.cx-copybtn.done .ic-done { opacity: 1; scale: 1; }
@media (max-width: 760px) { .cx-copybtn { width: 38px; height: 38px; } }

/* Resume page: the page as an image (no PDF viewer), at its natural height */
.rs-frame { height: auto; background: #fff; }
.rs-frame img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .cx-mail-row { gap: 10px; } .cx-mail-row .cx-mail { font-size: min(40px, 4.9cqi); } }

/* RoverX logo: in the hero strip, and paired with VIT on the Engineering cover and page */
.mq-logo img[src*="roverx"] { height: clamp(20px, 2vw, 30px); }
.bk-logos { display: flex; align-items: center; gap: 12px; margin-top: 12px; max-width: 80%; }
.bk-logos .bk-logo { margin-top: 0; min-width: 0; }
.bk-logos .bk-logo[src*="roverx"] { height: 14px; }
.cp-logos { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin-bottom: 18px; }
.cp-logos .cp-logo { margin-bottom: 0; }
.cp-logo-rx { height: clamp(18px, 2.1vw, 28px); }

/* Adult Money logo */
.mq-logo img[src*="adult-money"] { height: clamp(30px, 3vw, 44px); }
.bk-logos .bk-logo[src*="adult-money"] { height: 26px; }
.cp-logo-am { height: clamp(34px, 3.8vw, 52px); }
.am-logo { display: block; height: 64px; width: auto; margin: 4px 0 18px; }

/* loader: a chunky, rounded, friendly face (Baloo 2 covers Devanagari and Latin), bouncing letters */
.loader-word { font-family: "Baloo 2", var(--sans), sans-serif; font-weight: 800; font-size: clamp(50px, 6.8vw, 104px); letter-spacing: -.02em; line-height: 1.15; }
.loader-word .lc { display: inline-block; font-weight: inherit; will-change: transform; }
.loader-word .lc-hi { color: #C9401A; }

.sc-hero-link { pointer-events: auto; margin-top: 22px; border-color: var(--acc); background: rgba(0, 0, 0, .35); text-shadow: none; }

/* ============ SaberCharge: everything that matters fits the first screen ============
   left: title, the numbers, four Result → Action → Context points and the website link;
   right: the demo video. Below, the rest as short RAC bullets on cards. */
#page-sabercharge .cp-hero-text { max-width: min(620px, 52%); }
#page-sabercharge .cp-hero .cp-title { font-size: clamp(48px, 6vw, 96px); }
#page-sabercharge .cp-logo { margin-bottom: 12px; }
.sc-nums { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 28px; margin-top: 18px; }
.sc-nums li { display: grid; gap: 4px; }
.sc-nums b { font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: clamp(26px, 2.4vw, 38px); line-height: 1; color: var(--ink); }
.sc-nums span { font-size: 12px; color: var(--ink-2); }
.rac { display: grid; gap: 12px; }
.rac li { padding-left: 14px; border-left: 2px solid var(--acc); font-size: 15px; line-height: 1.45; color: var(--ink); }
.rac li::before { content: none; }
.rac b { font-weight: 700; }
.rac span { color: var(--ink); opacity: .82; }
.rac em { display: block; margin-top: 2px; font-style: normal; font-family: var(--mono); font-size: 11.5px; letter-spacing: .01em; color: var(--ink-2); }
.sc-key { margin-top: 22px; text-shadow: none; }
.sc-hero-link { margin-top: 20px; }
.sc-side { position: absolute; z-index: 3; margin: 0; top: 48%; translate: 0 -50%; right: max(var(--gutter, 20px), calc((100% - 1240px) / 2 + var(--gutter, 20px))); width: min(38vw, 540px); }
.sc-side video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: #000; border: 1px solid rgba(237, 237, 240, .08); box-shadow: 0 24px 64px rgba(0, 0, 0, .55); }
.sc-side figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.sc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sc-card { padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.sc-card .cp-kicker { margin-bottom: 14px; }
.sc-card-wide { grid-column: 1 / -1; }
.rac-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
#page-sabercharge .sc-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
#page-sabercharge .cp-skills { margin-top: 28px; }
@media (max-width: 860px) {
  #page-sabercharge .cp-hero { height: auto; padding: 8px 0 72px; }
  #page-sabercharge .cp-hero-text { position: relative; left: auto; top: auto; max-width: none; padding: 0 var(--gutter, 20px); }
  .sc-nums { grid-template-columns: repeat(2, auto); }
  .sc-side { position: relative; top: auto; right: auto; translate: none; width: auto; margin: 24px var(--gutter, 20px) 0; }
  .sc-cards, .rac-2, #page-sabercharge .sc-gallery { grid-template-columns: 1fr 1fr; }
  .sc-cards, .rac-2 { grid-template-columns: 1fr; }
}

/* ============ All chapters: everything that matters on the first screen ============
   The scene keeps a shorter hero; the story panel opens with an at-a-glance block (role and dates,
   the numbers, 3–4 Result → Action → Context points), then short bullet cards. */
#page-school .cp-hero, #page-engineering .cp-hero, #page-symbionic .cp-hero, #page-thinkerbell .cp-hero,
#page-mastersunion .cp-hero, #page-adultmoney .cp-hero, #page-offclock .cp-hero { height: clamp(260px, 40svh, 440px); }
.glance { display: grid; gap: 22px; }
.glance-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; color: var(--ink-2); }
.glance-meta b { margin-right: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--acc); }
.glance .cp-stats { margin: 0; }
.glance-key { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 28px; }
.glance + .sc-cards { margin-top: 28px; }
.sc-card-img { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.sc-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.sc-card-img figcaption { padding: 10px 16px 14px; font-size: 12px; color: var(--ink-2); }
.sc-card-product img { object-fit: contain; background: #F4F1EC; padding: 16px; }
.sc-cards > :only-child, .sc-cards > .sc-card-img:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sc-cards > .sc-card-img:last-child:nth-child(odd) img { aspect-ratio: 21 / 9; }
@media (max-width: 860px) {
  #page-school .cp-hero, #page-engineering .cp-hero, #page-symbionic .cp-hero, #page-thinkerbell .cp-hero,
  #page-mastersunion .cp-hero, #page-adultmoney .cp-hero, #page-offclock .cp-hero { height: auto; padding: 4px 0 28px; }
  #page-school .cp-hero-text, #page-engineering .cp-hero-text, #page-symbionic .cp-hero-text, #page-thinkerbell .cp-hero-text,
  #page-mastersunion .cp-hero-text, #page-adultmoney .cp-hero-text, #page-offclock .cp-hero-text { position: relative; left: auto; top: auto; max-width: none; padding: 0 var(--gutter, 20px); }
  .chapter-page[data-tone] .cp-hint { display: none; }   /* the hints are about the cursor; phones have none */
  .glance { gap: 16px; }
  .glance .cp-stats { gap: 14px 18px; }
  .glance-key { gap: 10px; }
  .sc-cards > .sc-card-img:last-child:nth-child(odd) img { aspect-ratio: 16 / 9; }
}
.glance .cp-stats { gap: 18px 28px; }
.glance .cp-stats li { padding-top: 12px; }
.glance .cp-n { font-size: clamp(28px, 3vw, 44px); }
.glance .cp-stats span { margin-top: 6px; font-size: 13px; }
/* the scene no longer shows through behind the at-a-glance text */
#page-school       { --sheet: rgba(22, 14, 10, .95); }
#page-engineering  { --sheet: rgba(14, 10, 9, .95); }
#page-symbionic    { --sheet: rgba(251, 248, 242, .95); }
#page-thinkerbell  { --sheet: rgba(7, 26, 23, .95); }
#page-mastersunion { --sheet: rgba(20, 18, 25, .95); }
#page-offclock     { --sheet: rgba(21, 29, 16, .95); }

/* ============ SaberCharge: unslop pass ============
   Direction. Product: a paid Mac app, built solo, that turns the battery icon into a blade.
   Character: exact, nocturnal, a little playful. World: a Mac menu bar at night, lit only by the blade.
   Moments: the demo video, and the live blade with its embers. Signature: the blade's crimson as the
   marker on every point, and on the one figure that matters (revenue).
   Type: Plus Jakarta Sans (SaberCharge's own interface face) with JetBrains Mono for meta.
   One graphite-ink ramp, hairlines at 8%, radius 10 / 16, one easing curve. */
#page-sabercharge {
  --ink: #EEEEF0; --ink-2: #A3A3AB; --ink-3: #85858D; --line: rgba(238, 238, 240, .08); --card: #141417;
  --acc: #FF2A54; --sheet: #0E0E11;
  font-family: "IBM Plex Sans", var(--sans);
}
#page-sabercharge .cp-top a, #page-sabercharge .cp-top span { font-family: "IBM Plex Sans", var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; }
#page-sabercharge .cp-hero .cp-where { font-size: 14px; color: var(--ink-2); opacity: 1; }
#page-sabercharge .cp-hero .cp-title {
  margin-top: 8px; font-family: "IBM Plex Sans", var(--sans); font-weight: 600; text-transform: none;
  font-size: clamp(44px, 5.4vw, 76px); line-height: 1.04; letter-spacing: -.03em; text-shadow: none;
}
#page-sabercharge .cp-hero-text { text-shadow: none; }
#page-sabercharge .sc-nums { gap: 8px 32px; margin-top: 24px; }
#page-sabercharge .sc-nums b { font-family: "IBM Plex Sans", var(--sans); font-weight: 600; font-size: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#page-sabercharge .sc-nums li:first-child b { color: var(--acc); }
#page-sabercharge .sc-nums span { font-size: 12px; color: var(--ink-3); }
#page-sabercharge .rac { gap: 12px; }
#page-sabercharge .rac li { padding-left: 16px; border-left: 2px solid var(--acc); font-size: 15px; line-height: 1.5; }
#page-sabercharge .rac b { font-weight: 600; color: var(--ink); }
#page-sabercharge .rac span { color: var(--ink-2); opacity: 1; }
#page-sabercharge .rac em { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
#page-sabercharge .sc-key { margin-top: 24px; }
#page-sabercharge .sc-link {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 10px; border: 0;
  background: #EEEEF0; color: #0E0E11; font: 500 15px "IBM Plex Sans", var(--sans);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); transition: background-color .15s cubic-bezier(.22, 1, .36, 1), transform .15s cubic-bezier(.22, 1, .36, 1);
}
#page-sabercharge .sc-link:hover { background: #FFFFFF; }
#page-sabercharge .sc-link:active { transform: scale(.98); }
#page-sabercharge .sc-link:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
#page-sabercharge .sc-hero-link { margin-top: 24px; }
#page-sabercharge .sc-side figcaption { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
#page-sabercharge .cp-hint { font-size: 12px; color: var(--ink-3); opacity: 1; }
#page-sabercharge .cp-sheet .cp-kicker { font-family: "IBM Plex Sans", var(--sans); font-weight: 500; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-bottom: 16px; }
#page-sabercharge .sc-cards { gap: 16px; }
#page-sabercharge .sc-card { padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
#page-sabercharge .sc-gallery { gap: 12px; margin-top: 16px; }
#page-sabercharge .sc-gallery img { border-radius: 12px; border: 1px solid var(--line); }
#page-sabercharge .cp-skills { margin-top: 0; padding: 32px 0 8px; }
#page-sabercharge .cp-sheet .cp-tags li { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--ink-2); }
#page-sabercharge .cp-pager a { font-family: "IBM Plex Sans", var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -.01em; text-transform: none; border-radius: 16px; }
#page-sabercharge .cp-pager small { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
/* split hero: the text block and the video share one vertical centre, the live blade sits under the video */
@media (min-width: 861px) {
  #page-sabercharge .cp-hero-text { top: 50%; translate: 0 -50%; }
  #page-sabercharge .sc-side { top: 46%; }
}

/* ============ SaberCharge: title in the website's own face, body in IBM Plex Sans ============
   StarJedi is the face sabercharge.tech uses for its name; the $ glyph is left out (it draws an
   insignia there), exactly as the site does. Every line of text below the title is Plex Sans:
   a bold result, then one plain sentence in the secondary colour. No mono fragments. */
@font-face {
  font-family: "StarJedi"; src: url(../assets/fonts/StarJedi.ttf) format("truetype"); font-display: swap;
  unicode-range: U+0020-0023, U+0025-007E, U+00A0-00FF;
}
#page-sabercharge .sc-intro { position: absolute; z-index: 3; left: 50%; top: clamp(16px, 4vh, 40px); translate: -50% 0; text-align: center; }
#page-sabercharge .sc-tagline { margin: 6px 0 0; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.4; color: var(--ink-2); white-space: nowrap; }
#page-sabercharge .cp-hero .sc-title {
  margin: 0; white-space: nowrap;
  font-family: "StarJedi", "IBM Plex Sans", sans-serif; font-weight: 400; text-transform: none;
  font-size: clamp(40px, 5.2vw, 80px); line-height: 1.1; letter-spacing: .04em; text-align: center; color: var(--ink);
}
#page-sabercharge .cp-hero .cp-where { margin-bottom: 4px; }
#page-sabercharge .sc-nums { margin-top: 16px; }
#page-sabercharge .sc-nums b { font-weight: 600; font-size: 34px; letter-spacing: -.01em; }
#page-sabercharge .sc-nums span { font-size: 13px; }
#page-sabercharge .rac { gap: 16px; }
#page-sabercharge .rac li { display: grid; gap: 2px; padding-left: 16px; font-size: 15px; line-height: 1.45; }
#page-sabercharge .rac b { font-weight: 600; font-size: 16px; }
#page-sabercharge .rac span { font-size: 14px; color: var(--ink-2); }
#page-sabercharge .rac-2 { gap: 16px 32px; }
#page-sabercharge .sc-side figcaption,
#page-sabercharge .cp-hint,
#page-sabercharge .cp-pager small { font-family: "IBM Plex Sans", var(--sans); font-size: 13px; letter-spacing: 0; }
@media (min-width: 861px) {
  #page-sabercharge .cp-hero-text { top: 56%; }
  #page-sabercharge .sc-side { top: 52%; }
}
@media (max-width: 860px) {
  #page-sabercharge .sc-intro { position: relative; left: auto; top: auto; translate: none; padding: 8px var(--gutter, 20px) 16px; }
  #page-sabercharge .cp-hero .sc-title { display: block; font-size: clamp(30px, 9vw, 44px); white-space: normal; }
  #page-sabercharge .sc-tagline { white-space: normal; }
}

/* ============ All chapters: IBM Plex Sans for every line of text ============
   Same treatment as SaberCharge. Each chapter keeps its big title face; everything else is Plex Sans,
   headings in sentence case, and each point is a bold result with one plain sentence under it. */
.chapter-page[data-tone] { font-family: "IBM Plex Sans", var(--sans); }
.chapter-page[data-tone] .cp-top a, .chapter-page[data-tone] .cp-top span { font-family: "IBM Plex Sans", var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; }
.chapter-page[data-tone] .cp-where { font-size: 14px; }
.chapter-page[data-tone] .cp-hint, .chapter-page[data-tone] figcaption { font-family: "IBM Plex Sans", var(--sans); font-size: 13px; letter-spacing: 0; }
.chapter-page[data-tone] .cp-sheet .cp-kicker { font-family: "IBM Plex Sans", var(--sans); font-weight: 500; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-bottom: 16px; }
.glance-meta b { font-family: "IBM Plex Sans", var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.glance .cp-n { font-family: "IBM Plex Sans", var(--sans); font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.01em; }
.glance .cp-stats span { font-size: 13px; }
.chapter-page[data-tone] .rac { gap: 16px; }
.chapter-page[data-tone] .rac li { display: grid; gap: 2px; padding-left: 16px; line-height: 1.45; }
.chapter-page[data-tone] .rac b { font-weight: 600; font-size: 16px; color: var(--ink); }
.chapter-page[data-tone] .rac span { font-size: 14px; color: var(--ink-2); opacity: 1; }
.chapter-page[data-tone] .sc-card { padding: 24px; border-radius: 16px; }
.chapter-page[data-tone] .sc-card-img { padding: 0; }
.chapter-page[data-tone] .cp-sheet .cp-tags li { padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.chapter-page[data-tone] .cp-pager a { font-family: "IBM Plex Sans", var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -.01em; text-transform: none; }
.chapter-page[data-tone] .cp-pager small { font-family: "IBM Plex Sans", var(--sans); font-weight: 400; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }

/* ============ SaberCharge: the story reads like a charge ============
   Five sections in order. A crimson rail down the left fills as you read (scroll), and each
   section's battery level (20% … 100%) lights up when you reach it: SaberCharge's own idea,
   used once. Bigger, higher-contrast text, one column of points per section. */
#page-sabercharge { --ink-2: #B9B9C1; }
.sc-story { position: relative; --p: 0; }
.sc-rail { position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: rgba(238, 238, 240, .08); }
.sc-rail-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--acc); transform-origin: top; transform: scaleY(var(--p)); }
.sc-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; padding: 48px 0 48px 28px; border-top: 1px solid var(--line); }
.sc-row:first-of-type { border-top: 0; padding-top: 8px; }
.sc-row-head { position: sticky; top: 120px; align-self: start; display: grid; gap: 6px; }
.sc-row-head h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); }
.sc-points { display: grid; gap: 24px; max-width: 64ch; }
.sc-points li { display: grid; gap: 4px; }
.sc-points b, .sc-lessons b { font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sc-points span, .sc-lessons span { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.sc-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.sc-shots img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.sc-lede { margin: 0 0 20px; max-width: 56ch; font-size: 18px; line-height: 1.55; color: var(--ink); }
.sc-channels { margin: 0; display: grid; }
.sc-channels div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.sc-channels dt { font-size: 16px; font-weight: 600; color: var(--ink); }
.sc-channels dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.sc-lessons { list-style: none; margin: 0; padding: 0; counter-reset: lesson; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.sc-lessons li { counter-increment: lesson; display: grid; gap: 4px; }
.sc-lessons li::before { content: counter(lesson, decimal-leading-zero); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--acc); }
#page-sabercharge .cp-skills { padding-top: 40px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .sc-rail { display: none; }
  .sc-row { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .sc-row-head { position: static; }
  .sc-lessons, .sc-shots { grid-template-columns: 1fr; }
  .sc-channels div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .sc-rail-fill { transform: none; } }

/* ============ SaberCharge story, organised: same content, laid out across the width ============
   Each section's label sits above its content (battery level, then name), so the content gets the
   full width: points and screenshots side by side, build points in three columns, business points
   in a 2 × 2, launch channels as five tiles, lessons in three columns. The rail still charges. */
.sc-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 40px 0 40px 28px; }
.sc-row:first-of-type { padding-top: 4px; }
.sc-row-head { position: static; display: flex; align-items: baseline; gap: 12px; }
.sc-row-head h3 { font-size: 24px; }
.sc-points { max-width: none; gap: 20px 32px; }
.sc-points li { padding-left: 16px; border-left: 2px solid var(--line); transition: border-color .3s cubic-bezier(.22, 1, .36, 1); }
.sc-row.on .sc-points li { border-left-color: var(--acc); }
.sc-points b, .sc-lessons b { font-size: 17px; }
.sc-points span, .sc-lessons span { font-size: 15px; }
#sabercharge-product .sc-row-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
#sabercharge-product .sc-shots { margin-top: 0; }
#sabercharge-build .sc-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#sabercharge-business .sc-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-lede { margin: 0 0 16px; max-width: 64ch; font-size: 17px; }
.sc-channels { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sc-channels div { grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #141417; }
.sc-channels dd { font-size: 14px; }
.sc-lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
@media (max-width: 1100px) {
  #sabercharge-build .sc-points, .sc-lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-channels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sc-row { padding: 28px 0; }
  #sabercharge-product .sc-row-body, #sabercharge-build .sc-points, #sabercharge-business .sc-points, .sc-lessons { grid-template-columns: minmax(0, 1fr); }
  .sc-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sabercharge-product .sc-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sc-points li, .sc-lessons li, .sc-channels div { align-content: start; }

/* chapter number: quiet text beside the back button, not a pill in the corner */
.chapter-page:not(.resume-page) > .cp-top { justify-content: flex-start; gap: 14px; }
.chapter-page .cp-top .cp-count { padding: 0; border-radius: 0; background: none; font-size: 12px; font-weight: 400; color: var(--ink-3, #7B7266); }


/* ============ Off the clock: my room, live ============
   The whole page is one illustrated room (Google Flow) with its window sky cut out. Behind the
   window a sky drawn in code follows the visitor's time of day, with clouds drifting behind the
   buildings. On top: a live monitor, a printer that prints, a clock that ticks, dust in the sun,
   steam, cards on the poker mat. Every position is a % of the picture. scenes.js runs it. */
#page-offclock { max-width: none; padding: 0; }
#page-offclock > .cp-top { position: absolute; left: 0; right: 0; top: 0; z-index: 20; translate: none; padding-left: 20px; padding-right: 20px; }
.room { position: relative; height: 100svh; overflow: hidden; background: #1C2430; color: #fff; }
.room-view { position: absolute; inset: 0; overflow: clip; }
.wind-defs { position: absolute; width: 0; height: 0; }
.room-stage {
  position: absolute; left: 50%; top: 50%; width: max(100vw, 100svh * 2752 / 1536); aspect-ratio: 2752 / 1536; translate: -50% -50%;
  container-type: inline-size; transform-origin: 0 0; transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
/* the camera: a 2D move and zoom (the browser re-draws it sharp at the end), with the view outside
   zooming less than the room around the same point, so it reads as further away */
.room.flying :is(.room-stage, .deep) { transition: transform 1.15s cubic-bezier(.65, 0, .2, 1); }
/* the view outside sits deeper in space, so it drifts slower than the room when the camera moves */
.deep { position: absolute; inset: 0; z-index: 0; pointer-events: none; transition: transform .7s cubic-bezier(.22, 1, .36, 1); }
.room-plane { position: absolute; inset: 0; z-index: 3; transition: opacity .5s ease; }   /* always above the view outside, even mid fade */
/* until the room picture has loaded, its moving pieces stay hidden (no props floating in the dark) */
.room:not(.loaded) :is(.room-plane, .deep) { opacity: 0; }
.city { position: absolute; z-index: 2; left: 31.5%; top: 5.2%; width: 54%; aspect-ratio: 2752 / 1536; filter: saturate(.95); transition: filter .8s; }
.city > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* a quiet DLF mark on the round tower: thin letters in the building's own tone, easy to miss */
.dlf { position: absolute; left: var(--dl, 52.5%); top: var(--dt, 29.6%); translate: -50% 0; pointer-events: none;
  font: 600 .55cqw/1 "IBM Plex Sans", sans-serif; letter-spacing: .22em; color: rgba(236, 242, 244, .55); }
.room[data-time="night"] .dlf { color: rgba(255, 236, 200, .6); }
/* the Rapid Metro: the real train from the skyline art, moved along the real track by scenes.js */
.metro-run { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
/* night: the skyline, train and tower go dark through one shared filter; the lit windows stay bright on top */
.room[data-time="night"] .city > img.night-dim { filter: brightness(.45) saturate(.7) hue-rotate(195deg); }
.room[data-time="night"] image.night-dim { filter: url(#cityNight); }
.night-lights, .metro-glow { opacity: 0; transition: opacity 1.2s ease; }
.room[data-time="dusk"] .night-lights { opacity: .35; }
.room[data-time="dusk"] .metro-glow { opacity: .5; }
.room[data-time="night"] :is(.night-lights, .metro-glow) { opacity: 1; }
.mg-win { fill: #FFE9B8; }
.rp-video { display: block; width: 100%; max-height: 34vh; object-fit: cover; border-radius: 10px; margin: 0 0 10px; background: #000; }
.mg-door { fill: #FFE2A6; opacity: .75; }
.room[data-time="dusk"] .city { filter: saturate(1.1) sepia(.25) brightness(.92); }
.room[data-time="dawn"] .city { filter: sepia(.15) brightness(1.02); }
.room-img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.room-plane > :is(.hs, .spr, .hblade, .tripod, .trek, .travel, .clock, .print, .steam, .mat, .screen, .poster, .edit-box) { position: absolute; left: calc(var(--l) * 1%); top: calc(var(--t) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); }

/* the sky behind the window: colours by time of day, clouds drift behind the city */
.sky { position: absolute; z-index: 1; left: 25%; top: 0; width: 68%; height: 60%; overflow: hidden;
  background: linear-gradient(180deg, var(--s1), var(--s2) 70%, var(--s3)); transition: background .8s; }
.room[data-time="day"]   { --s1: #3E8EE0; --s2: #8CC6F2; --s3: #CFE9F7; --cloud: #FFFFFF; --cloud2: #D7E6F2; --tint: transparent; }
.room[data-time="dusk"]  { --s1: #3B3F8F; --s2: #E07A6B; --s3: #F7C68A; --cloud: #FFD9C2; --cloud2: #C98B9A; --tint: rgba(255, 120, 60, .12); }
.room[data-time="night"] { --s1: #070B22; --s2: #18204A; --s3: #2C3368; --cloud: #4A5590; --cloud2: #2E3670; --tint: rgba(20, 30, 90, .42); }
.room[data-time="dawn"]  { --s1: #5C7EC9; --s2: #F2B7A6; --s3: #FBE3C2; --cloud: #FFF1E6; --cloud2: #E3BFC2; --tint: rgba(255, 180, 140, .08); }
.cloud { position: absolute; display: block; width: 18%; aspect-ratio: 3 / 1; opacity: .95; animation: drift var(--d, 70s) linear infinite; animation-delay: var(--dl, 0s);
  background:
    radial-gradient(circle at 30% 60%, var(--cloud) 0 26%, transparent 27%),
    radial-gradient(circle at 52% 40%, var(--cloud) 0 32%, transparent 33%),
    radial-gradient(circle at 72% 62%, var(--cloud) 0 24%, transparent 25%),
    radial-gradient(ellipse 48% 22% at 50% 80%, var(--cloud2) 0 98%, transparent 100%);
  filter: drop-shadow(0 2px 0 rgba(40, 60, 90, .12)); }
.cloud.c1 { top: 6%;  --d: 80s;  --dl: -10s; }
.cloud.c2 { top: 20%; --d: 110s; --dl: -60s; width: 26%; }
.cloud.c3 { top: 34%; --d: 95s;  --dl: -35s; width: 14%; }
.cloud.c4 { top: 12%; --d: 140s; --dl: -100s; width: 22%; opacity: .8; }
.cloud.c5 { top: 44%; --d: 120s; --dl: -20s; width: 30%; opacity: .7; }
@keyframes drift { from { left: -32%; } to { left: 104%; } }
.sky-sun { position: absolute; right: 16%; top: 18%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #FFF8DC 0 45%, rgba(255, 240, 190, .5) 55%, transparent 70%); transition: all .8s; }
.room[data-time="dusk"] .sky-sun { top: 58%; background: radial-gradient(circle, #FFE1A8 0 45%, rgba(255, 170, 110, .55) 55%, transparent 72%); }
.room[data-time="night"] .sky-sun { top: 14%; width: 6%; background: radial-gradient(circle at 40% 40%, #F4F1E4 0 46%, transparent 48%); box-shadow: 0 0 30px 6px rgba(220, 225, 255, .18); }
.room[data-time="dawn"] .sky-sun { right: 70%; top: 62%; }
.sky-stars { position: absolute; inset: 0; opacity: 0; transition: opacity .8s;
  background-image: radial-gradient(1.5px 1.5px at 12% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 48% 26%, #fff, transparent), radial-gradient(1px 1px at 66% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 82% 30%, #fff, transparent), radial-gradient(1px 1px at 92% 6%, #fff, transparent), radial-gradient(1px 1px at 22% 36%, #fff, transparent), radial-gradient(1px 1px at 58% 40%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate; }
.room[data-time="night"] .sky-stars { opacity: 1; }
@keyframes twinkle { to { filter: brightness(.6); } }
.bird { position: absolute; top: 24%; left: -10%; width: 2.4%; aspect-ratio: 2 / 1; border-top: 2px solid #2B3550; border-radius: 50% 50% 0 0; animation: bird 26s linear infinite 6s; }
.bird::after { content: ""; position: absolute; left: 50%; top: -2px; width: 100%; height: 100%; border-top: 2px solid #2B3550; border-radius: 50% 50% 0 0; }
.room[data-time="night"] .bird { display: none; }
@keyframes bird { 0% { left: -10%; top: 30%; } 50% { top: 18%; } 100% { left: 110%; top: 26%; } }

/* posters: minimalist tributes drawn in code (not the studios' artwork) */
.poster { z-index: 3; pointer-events: none; display: block; }
.poster-im { --l: 14.35; --t: 8.6; --w: 6.45; --h: 28.8; clip-path: polygon(0 0, 100% 9.6%, 100% 97.2%, 0 100%); }
.poster-dune { --l: 2.7; --t: 26.5; --w: 7.1; --h: 19.1; clip-path: polygon(0 0, 100% 4%, 100% 93.7%, 0 100%); }
.pt { font-family: "Anton", Impact, sans-serif; }
.pt-im { font-size: 30px; fill: #F2D27A; letter-spacing: 2px; }
.pt-sm { font-family: "IBM Plex Sans", sans-serif; font-size: 11px; fill: #E9C77A; letter-spacing: 3px; }
.pt-dune { font-size: 19px; fill: #4A2410; letter-spacing: 7px; }
.im-glow { animation: arc 3.2s ease-in-out infinite; transform-origin: 50px 96px; }
@keyframes arc { 50% { opacity: .65; transform: scale(.92); } }
/* plants: cut-out layers that sway from their pot (or hook) in a slow, gusty wind */
.plant { position: absolute; z-index: 5; left: calc(var(--l) * 1%); top: calc(var(--t) * 1%); width: calc(var(--w) * 1%); height: calc(var(--h) * 1%); pointer-events: none;
  transform-origin: var(--pivot, 50% 100%); animation: sway var(--dur, 6s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); will-change: transform; }
@keyframes sway {
  0%   { transform: rotate(calc(var(--amp, 1deg) * -1)) skewX(calc(var(--amp, 1deg) * .4)); }
  35%  { transform: rotate(calc(var(--amp, 1deg) * .5)) skewX(calc(var(--amp, 1deg) * -.3)); }
  60%  { transform: rotate(calc(var(--amp, 1deg) * -.2)) skewX(0deg); }
  100% { transform: rotate(var(--amp, 1deg)) skewX(calc(var(--amp, 1deg) * -.5)); }
}

.plant-front { animation: none; will-change: auto; }

/* a tripod with a camera, in the corner by the desk; click it and the camera pans and the light blinks */
.tripod { --l: 75.6; --t: 73.57; --w: 9.08; --h: 25.72; z-index: 4; pointer-events: none; overflow: visible; }
.tripod :is(path, rect, circle, ellipse) { stroke: #1E1A17; stroke-linejoin: round; stroke-linecap: round; }
.tp-leg { fill: none; stroke: #1E1A17 !important; stroke-width: 11; }
.tp-back { stroke: #2C2A29 !important; stroke-width: 8 !important; }
.tp-leg-in { fill: none; stroke: #5D6168 !important; stroke-width: 4; }
.tp-clamp { fill: none; stroke: #8C9096 !important; stroke-width: 4; }
.tp-foot { fill: none; stroke: #111 !important; stroke-width: 7; }
.tp-col { fill: #4A4E55; stroke-width: 3; }
.tp-plate { fill: #3A3D42; stroke-width: 3; }
.tp-arm { fill: none; stroke: #2B2D31 !important; stroke-width: 7; }
.tp-body { fill: #34373D; stroke-width: 3.5; }
.tp-top { fill: #2A2C31; stroke-width: 3; }
.tp-lens { fill: #23252A; stroke-width: 3.5; }
.tp-glass { fill: #3E5A78; stroke-width: 3; }
.tp-screen { fill: #6F8FA8; stroke-width: 2; }
.tp-rec { fill: #E0412F; stroke-width: 1.5; animation: rec-blink 2.4s steps(1) infinite; }
@keyframes rec-blink { 50% { fill: #5A2018; } }
.tp-head { transform-box: fill-box; transform-origin: 51% 70%; }   /* pans about the head plate */
.tripod.go-rec .tp-head { animation: tp-pan 1.6s cubic-bezier(.45, 0, .2, 1); }
.tripod.go-rec .tp-rec { animation: rec-blink .3s steps(1) 5; }
@keyframes tp-pan { 30% { transform: rotate(-7deg); } 65% { transform: rotate(4deg); } }

/* trekking: a pole leaning on the desk and a pair of boots on the floor; click and the pole knocks, the boots hop */
.trek { --l: 53.05; --t: 68.36; --w: 10.9; --h: 24.09; z-index: 4; pointer-events: none; overflow: visible; }
.trek :is(path, rect, ellipse) { stroke: #2B1A12; stroke-linejoin: round; stroke-linecap: round; }
.tk-shaft-o { fill: none; stroke-width: 12; }
.tk-shaft { fill: none; stroke: #A9B2BC !important; stroke-width: 7; }
.tk-lower { fill: none; stroke: #7E8893 !important; stroke-width: 5.5; }
.tk-basket { fill: #2E2F33; stroke-width: 2; }
.tk-tip { fill: none; stroke-width: 4; }
.tk-lock { fill: none; stroke: #E0712F !important; stroke-width: 4; }
.tk-grip { fill: #2E2F33; stroke-width: 2.5; }
.tk-strap { fill: none; stroke: #C9472F !important; stroke-width: 3.5; }
.tk-upper { fill: #8A5A36; stroke-width: 3; }
.tk-back .tk-upper { fill: #6E4629; }
.tk-toe { fill: #5E3C24; stroke-width: 2; }
.tk-collar { fill: none; stroke: #C9A36E !important; stroke-width: 3; }
.tk-lace { fill: none; stroke: #E58A3A !important; stroke-width: 2.6; }
.tk-sole { fill: #3A2A20; stroke-width: 3; }
.tk-lug { fill: none; stroke: #1E1510 !important; stroke-width: 2.5; }
.tk-pole { transform-box: fill-box; transform-origin: 85% 98%; }
.trek.go-trek .tk-pole { animation: tk-knock .7s cubic-bezier(.3, 0, .2, 1); }
.trek.go-trek .tk-boots { animation: hop .45s cubic-bezier(.22, 1, .36, 1) .15s; }
@keyframes tk-knock { 30% { transform: rotate(-4deg); } 60% { transform: rotate(1.5deg); } }

/* travel: two polaroids on a string between the clock and the blade; click and they swing */
.travel { --l: 23.26; --t: 22.46; --w: 13.44; --h: 6.18; z-index: 4; pointer-events: none; overflow: visible; }
.tv-nail { fill: #6B5A48; stroke: #2B1A12; stroke-width: 1.2; }
.tv-string { fill: none; stroke: #7A5E44; stroke-width: 1.4; }
.tv-frame { fill: #FBF8F1; stroke: #2B1A12; stroke-width: 1.6; }
.tv-photo-line { fill: none; stroke: #2B1A12; stroke-width: 1; }
.tv-cap { font: italic 600 7.5px "IBM Plex Sans", sans-serif; fill: #3A2E24; }
.tv-peg { fill: #C9A36E; stroke: #2B1A12; stroke-width: 1.1; }
.tv-card { transform-box: fill-box; transform-origin: 50% 0; }
.travel.go-sway .tv-china { animation: tv-sway 1.4s ease-out; }
.travel.go-sway .tv-nepal { animation: tv-sway 1.4s ease-out .12s; }
@keyframes tv-sway { 15% { transform: rotate(9deg); } 40% { transform: rotate(-6deg); } 65% { transform: rotate(3deg); } 85% { transform: rotate(-1deg); } }

/* a quiet list of treks in the panel */
.rp-treks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rp-treks li { display: flex; justify-content: space-between; gap: 12px; font: 400 15px/1.4 "IBM Plex Sans", var(--sans); color: var(--cream-2); border-bottom: 1px solid rgba(255, 244, 220, .12); padding-bottom: 5px; }
.rp-treks b { font-weight: 600; color: var(--butter); }
.rp-treks span { opacity: .75; }

/* the hidden blade, redrawn over the one in the picture: a leather bracer on its strap, hanging on two pegs;
   click it and the blade snaps out of the wrist end, holds, and slides back */
.hblade { --l: 23.98; --t: 28.39; --w: 12.36; --h: 6.77; z-index: 4; pointer-events: none; overflow: visible; }
.hblade :is(path, rect, circle) { stroke: #2B1A12; stroke-linejoin: round; stroke-linecap: round; }
.hblade .hb-wall { fill: #CBB09C; stroke: none; }
.hb-strap { fill: #6A3E26; stroke-width: 3.5; }
.hb-hi { fill: none; stroke: #94603D !important; stroke-width: 3; }
.hb-holes circle { fill: #2B1A12; stroke: none; }
.hb-buckle { fill: none; stroke: #4A4540 !important; stroke-width: 6; }
.hb-prong { stroke: #B9B4AC !important; stroke-width: 3; }
.hb-blade path:first-child { fill: url(#hbSteel); stroke-width: 2.5; }
.hb-fuller { fill: none; stroke: #7D8892 !important; stroke-width: 1.5; }
.hb-bracer { fill: #7A4A2E; stroke-width: 3.5; }
.hb-plate { fill: #8F5C39; stroke-width: 1.6; }
.hb-stitch { fill: none; stroke: #D9B07A !important; stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .8; }
.hb-rivets circle { fill: #D4A94E; stroke-width: 1.5; }
.hb-ring { fill: #C9A24A; stroke-width: 2; }
.hb-blade { transform: translateX(0); }
.hblade.go-stab .hb-blade { animation: hb-stab 1.3s cubic-bezier(.2, .9, .3, 1); }
@keyframes hb-stab {
  0% { transform: translateX(0); }
  12% { transform: translateX(72px); }
  18%, 70% { transform: translateX(66px); }
  100% { transform: translateX(0); }
}

/* the room's light follows the sky: a tint for dusk and night, sunbeams by day */
.room-tint { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: var(--tint); mix-blend-mode: multiply; transition: background .8s; }
.beams { position: absolute; z-index: 6; left: 8%; top: 0; width: 60%; height: 100%; pointer-events: none; mix-blend-mode: soft-light;
  background: repeating-linear-gradient(115deg, rgba(255, 236, 190, 0) 0 7%, rgba(255, 236, 190, .5) 9% 13%, rgba(255, 236, 190, 0) 16% 22%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  animation: beams 9s ease-in-out infinite alternate; transition: opacity .8s; }
@keyframes beams { from { opacity: .5; } to { opacity: .95; } }
.room:not([data-time="day"]) .beams { opacity: 0; animation: none; }
.dust { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; }
.room[data-time="night"] .dust { opacity: .3; }

/* the monitor: a live desktop with SaberCharge's blade charging in the menu bar and a terminal */
.screen { --l: 50.2; --t: 42.9; --w: 13.7; --h: 15.1; z-index: 4; overflow: hidden; border-radius: .25cqw; pointer-events: none;
  background: radial-gradient(ellipse at 70% 120%, #3B2B6E, #12152B 70%); box-shadow: 0 0 1.4cqw rgba(120, 150, 255, .25); }
.scr-bar { display: flex; align-items: center; gap: .3cqw; height: 9%; padding: 0 .4cqw; background: rgba(255, 255, 255, .12); font: 600 .55cqw/1 "IBM Plex Sans", sans-serif; color: #fff; }
.scr-bar i { flex: 1; }
.scr-np { opacity: .85; }
.scr-time { font-style: normal; }
.scr-term { position: absolute; left: 8%; right: 8%; top: 20%; bottom: 10%; padding: .4cqw .5cqw; border-radius: .3cqw; background: rgba(8, 10, 20, .85); box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .4); }
.scr-lines { margin: 0; font: 400 .62cqw/1.5 "JetBrains Mono", monospace; color: #9EF0B5; white-space: pre-wrap; }
.scr-lines b { color: #FFB86B; font-weight: 400; }
.scr-lines i { display: inline-block; width: .4cqw; height: .7cqw; background: #9EF0B5; vertical-align: -.1cqw; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* hotspots: invisible until hovered */
.hs { all: unset; position: absolute; z-index: 9; cursor: pointer; }
.hs[data-k="chair"] { z-index: 8; }
/* hover: the room dims around the object like a spotlight, and its name floats above it */
/* hover: a soft warm glow on the object (nothing else changes), and its name above it */
.spot { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: screen;
  background: radial-gradient(ellipse var(--sw, 10%) var(--sh, 10%) at var(--sx, 50%) var(--sy, 50%), rgba(255, 226, 160, .32) 0, rgba(255, 226, 160, .12) 45%, rgba(255, 226, 160, 0) 75%); }
.spot.on { opacity: 1; }
.tag { position: absolute; z-index: 10; left: var(--tx, 50%); top: var(--ty, 50%); translate: -50% calc(-100% - 8px); padding: 5px 10px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  font: 600 max(11px, .8cqw) "IBM Plex Sans", sans-serif; color: #2B2414; background: #FFF4C9; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); opacity: 0; scale: .9; transition: opacity .25s, scale .25s; }
.tag.on { opacity: 1; scale: 1; }
.tag::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; translate: -50% 0; rotate: 45deg; background: inherit; }
.room.zoomed .tag { opacity: 0; }

/* pieces cut from the picture so they can move in place */
.spr { z-index: 4; pointer-events: none; background: center / 100% 100% no-repeat; }
.spr-racket { transform-origin: 50% 100%; filter: drop-shadow(-.35cqw .25cqw .25cqw rgba(90, 60, 40, .2)); }
.spr.go-wiggle { animation: wiggle .5s cubic-bezier(.36, .07, .19, .97); }
.spr-racket.go-swing { animation: swing .7s cubic-bezier(.22, 1, .36, 1); }
.spr-car.go-rev { animation: rev .7s linear; }
.spr-dumbbell.go-lift { animation: lift .55s cubic-bezier(.22, 1, .36, 1); }
.spr-hourglass { transition: rotate .8s cubic-bezier(.65, 0, .35, 1);
}
.spr-hourglass.flipped { rotate: 180deg; }
.spr-takeaway.go-wiggle { animation: hop .45s cubic-bezier(.22, 1, .36, 1); }
@keyframes wiggle { 20% { rotate: -5deg; } 45% { rotate: 4deg; } 70% { rotate: -2deg; } }
@keyframes swing { 30% { rotate: -10deg; } 60% { rotate: 5deg; } 85% { rotate: -2deg; } }
@keyframes rev { 0%, 100% { translate: 0 0; } 10%, 30%, 50% { translate: -1.5% -2%; } 20%, 40%, 60% { translate: 1.5% 1%; } 80% { translate: 0 -4%; } }
@keyframes lift { 45% { translate: 0 -14%; rotate: -3deg; } }
@keyframes hop { 40% { translate: 0 -10%; } }

/* hourglass: the sand runs live; it rides on the hourglass piece so it flips with it */
.glass { position: absolute; left: 21.7%; top: 17%; width: 63.3%; height: 67%; pointer-events: none; }
.glass svg { display: block; width: 100%; height: 100%; }
.glass svg.inv { transform: rotate(180deg); }
.g-pane { fill: #F4EEE4; }
.g-top, .g-pile, .g-stream { fill: #D9A55B; }
.g-top { transform-box: view-box; transform-origin: 27px 48px; animation: g-top var(--sand-t, 9s) linear infinite; }
.g-pile { transform-box: view-box; transform-origin: 27px 100px; animation: g-pile var(--sand-t, 9s) linear infinite; }
.g-stream { animation: g-stream var(--sand-t, 9s) linear infinite; }
@keyframes g-top { 0% { transform: scaleY(1); } 92%, 100% { transform: scaleY(0); } }
@keyframes g-pile { 0% { transform: scaleY(0); } 92%, 100% { transform: scaleY(1); } }
@keyframes g-stream { 0%, 91% { opacity: 1; } 93%, 100% { opacity: 0; } }

/* ?roomedit: outlines every box so new objects are easy to place */
.room.editing .hs { outline: 1.5px dashed rgba(255, 80, 80, .9); outline-offset: -1px; }
.room.editing .hs::after { content: attr(data-k); position: absolute; left: 2px; top: 2px; padding: 1px 4px; font: 600 10px/1.2 "IBM Plex Sans", sans-serif; color: #fff; background: rgba(200, 30, 30, .85); }
.edit-box { position: absolute; z-index: 9; outline: 2px solid #2BD9FF; background: rgba(43, 217, 255, .12); pointer-events: none; }
.edit-out { position: absolute; z-index: 30; left: 12px; top: 60px; padding: 6px 10px; border-radius: 8px; font: 600 13px "JetBrains Mono", monospace; color: #fff; background: rgba(0, 0, 0, .8); pointer-events: none; }

/* clock, printer, steam, cards on the mat */
.clock { --l: 26.6; --t: 9.2; --w: 6.9; --h: 12.3; z-index: 4; overflow: visible; pointer-events: none; }
.clock line { stroke: #2A2A2E; stroke-linecap: round; }
.clock .ch-h { stroke-width: 3.6; } .clock .ch-m { stroke-width: 2.4; } .clock .ch-s { stroke: #C2412D; stroke-width: 1.2; }
.clock circle { fill: #2A2A2E; }
.clock text { font: 600 9px "IBM Plex Sans", sans-serif; letter-spacing: .12em; fill: #C2412D; text-transform: uppercase; }
.clock :is(.ch-h, .ch-m, .ch-s) { transform-origin: 50px 50px; transform-box: view-box; }
.clock.spin :is(.ch-h, .ch-m) { transition: transform 1.2s cubic-bezier(.65, 0, .35, 1); }
.print { --l: 12.6; --t: 62.6; --w: 4; --h: 7.9; z-index: 4; pointer-events: none; }
.print-obj { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(calc(100% - var(--p, 0) * 100%) 0 0 0); filter: drop-shadow(0 0 4px rgba(255, 150, 70, .45)); }
.print-obj :is(path, rect, circle) { fill: #F08A3E; stroke: #7A3410; stroke-width: 1.4; }
.nozzle { position: absolute; left: 0; width: 18%; height: 3px; border-radius: 2px; bottom: calc(var(--p, 0) * 100%); background: #FFB25C; box-shadow: 0 0 8px 2px rgba(255, 160, 70, .8); translate: 0 50%; animation: noz 1.1s ease-in-out infinite alternate; }
@keyframes noz { to { left: 82%; } }
.print.done .nozzle { display: none; }
.steam { --l: 47.7; --t: 53.2; --w: 2.4; --h: 6; z-index: 4; pointer-events: none; }
.steam i { position: absolute; bottom: 0; width: 26%; height: 100%; border-radius: 50%; background: radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, .6), transparent 65%); filter: blur(1.5px); opacity: 0; animation: steam 3.2s ease-out infinite; }
.steam i:nth-child(1) { left: 6%; } .steam i:nth-child(2) { left: 38%; animation-delay: 1s; } .steam i:nth-child(3) { left: 66%; animation-delay: 2s; }
@keyframes steam { 0% { opacity: 0; translate: 0 30%; scale: .6; } 30% { opacity: .9; } 100% { opacity: 0; translate: 8% -60%; scale: 1.3; } }
.mat { --l: 71.6; --t: 65.9; --w: 13.6; --h: 3.7; z-index: 5; perspective: 40cqw; display: grid; place-items: center; pointer-events: none; }
.board { display: flex; gap: .35cqw; transform: rotateX(52deg); transform-origin: 50% 60%; }
.mat .pc[hidden] { display: none; }
.mat .pc { width: 1.75cqw; aspect-ratio: 5 / 7; border-radius: .2cqw; display: grid; place-items: center; font: 700 .62cqw/1.05 "IBM Plex Sans", sans-serif; font-style: normal; text-align: center; background: #F6F1E6; color: #1E1B17; box-shadow: 0 .15cqw .3cqw rgba(0, 0, 0, .4); }

/* the panel that tells the story of each object */
.room-head { position: absolute; z-index: 12; left: 50%; bottom: 22px; translate: -50% 0; display: flex; align-items: baseline; gap: 14px; white-space: nowrap; pointer-events: none; transition: opacity .4s;
  padding: 10px 18px; border-radius: 16px; background: rgba(14, 18, 28, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .1); }
.room-head .cp-where { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .7); }
.room-head .cp-title { margin: 0; font-size: 18px; letter-spacing: .02em; color: #fff; }
.room-hint { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .85); }
.room-count { margin: 0; font-size: 13px; color: #FFE3A3; }
.room.zoomed :is(.room-head, .room-pager, .room-credit) { opacity: 0; pointer-events: none; }
.room-pager, .room-credit { transition: opacity .4s; }
/* the dialogue box: like a visual-novel text box at the foot of the screen. The object's name sits on a
   plate over its top edge, the lines type themselves out, a ▼ blinks when they're done. */
.room-panel {
  --ink: #221A12; --cream: #FFF4DC; --cream-2: rgba(255, 244, 220, .78); --butter: #F6D77E; --navy: rgba(18, 22, 38, .9);
  position: absolute; z-index: 14; left: 50%; bottom: 22px; translate: -50% 0; width: min(780px, calc(100% - 32px));
  padding: 30px 28px 14px; color: var(--cream); background: var(--navy);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 244, 220, .9); border-radius: 18px; outline: 1px solid rgba(255, 244, 220, .25); outline-offset: -8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); animation: rp-in .45s cubic-bezier(.2, 1.2, .4, 1); }
.room-panel[hidden] { display: none; }
/* for things near the floor the card sits at the top, under the back link */
.room.panel-top .room-panel { bottom: auto; top: 84px; }
@keyframes rp-in { from { opacity: 0; translate: -50% 24px; } }
.rp-plate { position: absolute; left: 22px; top: 0; translate: 0 -55%; display: flex; align-items: baseline; gap: 10px; padding: 8px 16px 7px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--butter); box-shadow: 3px 3px 0 var(--ink); }
.rp-title { margin: 0; font: 400 22px/1 "Anton", Impact, sans-serif; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.rp-kicker { margin: 0; font: 600 11px/1 "IBM Plex Sans", var(--sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(34, 26, 18, .7); }
.rp-close { all: unset; position: absolute; right: 12px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--cream-2); transition: background-color .2s, color .2s; }
.rp-close:hover { background: rgba(255, 244, 220, .12); color: var(--cream); }
.rp-close:focus-visible, .rp-nav button:focus-visible, .rp-btns button:focus-visible { outline: 2px solid var(--butter); outline-offset: 2px; }
.rp-text { display: grid; gap: 6px; min-height: 52px; }
.rp-text p { margin: 0; font: 400 18px/1.5 "IBM Plex Sans", var(--sans); color: var(--cream); }
.rp-text .caret { display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--butter); animation: blink .8s steps(1) infinite; }
/* the plate and the rest come in with the box; the choices wait for the text to finish */
.room-panel > :is(.rp-plate, .rp-foot) { animation: rp-up .4s cubic-bezier(.22, 1, .36, 1) both; }
.rp-plate { animation-delay: .08s; } .rp-foot { animation-delay: .2s; }
@keyframes rp-up { from { opacity: 0; translate: 0 6px; } }
.rp-plate { animation-name: plate-in; }
@keyframes plate-in { from { opacity: 0; translate: -8px -55%; } }
.rp-extra:empty { display: none; }
.rp-extra { margin-top: 14px; transition: opacity .3s, translate .3s; }
.room-panel:not(.typed) .rp-extra { opacity: 0; translate: 0 6px; pointer-events: none; }
.rp-live { margin: 0; font: 400 16px/1.45 "IBM Plex Sans", var(--sans); color: var(--cream-2); }
.rp-live b { font-weight: 700; color: var(--butter); }
.rp-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.rp-cards span { width: 44px; font: 600 11px/1 "IBM Plex Sans", var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--cream-2); }
.rp-cards .card { width: 36px; aspect-ratio: 5 / 7; border: 2px solid var(--ink); border-radius: 6px; display: grid; place-items: center; font: 700 14px/1.05 "IBM Plex Sans", sans-serif; font-style: normal; text-align: center; background: #FFFDF8; color: var(--ink); animation: deal-in .35s cubic-bezier(.22, 1, .36, 1) both; }
.rp-cards .card:nth-of-type(2) { animation-delay: .05s; } .rp-cards .card:nth-of-type(3) { animation-delay: .1s; } .rp-cards .card:nth-of-type(4) { animation-delay: .15s; } .rp-cards .card:nth-of-type(5) { animation-delay: .2s; }
@keyframes deal-in { from { opacity: 0; translate: -10px -6px; rotate: -8deg; } }
.rp-cards .card.red { color: #B8321F; }
.rp-cards .card.down { background: repeating-linear-gradient(45deg, #A12A2A 0 4px, #8A2121 4px 8px); border-color: #FFFDF8; }
.rp-cards .card.empty { border: 1.5px dashed rgba(255, 244, 220, .35); background: transparent; animation: none; }
/* choices, like dialogue options */
.rp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rp-btns button { all: unset; cursor: pointer; padding: 7px 14px; border: 1.5px solid rgba(255, 244, 220, .7); border-radius: 999px; font: 600 13px "IBM Plex Sans", var(--sans); color: var(--cream); transition: background-color .15s, color .15s, transform .12s; }
.rp-btns button::before { content: "▸ "; color: var(--butter); }
.rp-btns button:hover { background: var(--cream); color: var(--ink); }
.rp-btns button:active { transform: scale(.97); }
.rp-btns button[hidden] { display: none; }
.rp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.rp-nav { display: flex; align-items: center; gap: 10px; }
.rp-nav button { all: unset; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; line-height: 1; cursor: pointer; color: var(--cream-2); transition: background-color .2s, color .2s; }
.rp-nav button:hover { background: rgba(255, 244, 220, .12); color: var(--cream); }
.rp-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 244, 220, .22); transition: background-color .3s, scale .3s; }
.rp-dots i.seen { background: rgba(246, 215, 126, .55); }
.rp-dots i.now { background: var(--butter); scale: 1.4; }
.rp-more { font-size: 12px; color: var(--butter); opacity: 0; }
.room-panel.typed .rp-more { opacity: 1; animation: more 1.1s ease-in-out infinite; }
@keyframes more { 50% { translate: 0 3px; opacity: .5; } }
/* the LEGO car and the Diet Coke: cut-out pictures, not pieces of the room */
.spr.prop { background: none; object-fit: contain; filter: drop-shadow(0 .25cqw .25cqw rgba(40, 25, 10, .25)); }
/* the line from the object to its card, drawn once the camera has arrived */
.rp-link { position: absolute; inset: 0; z-index: 13; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rp-link path { fill: none; stroke: #FFF7E6; stroke-width: 2.5; stroke-dasharray: 7 6; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.rp-link circle { fill: #F6D77E; stroke: #241C14; stroke-width: 2.5; opacity: 0; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.rp-link.on path { opacity: 1; animation: link-draw .6s cubic-bezier(.22, 1, .36, 1) both; }
.rp-link.on circle { opacity: 1; animation: pin 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes link-draw { from { stroke-dashoffset: 300; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes pin { 50% { transform: scale(1.35); } }
.room-pager { position: absolute; z-index: 12; left: max(var(--gutter, 20px), calc((100% - 1240px) / 2 + var(--gutter, 20px))); right: max(var(--gutter, 20px), calc((100% - 1240px) / 2 + var(--gutter, 20px))); bottom: 22px; display: flex; justify-content: space-between; pointer-events: none; }
.room-pager a { pointer-events: auto; padding: 10px 16px; border-radius: 999px; font: 500 14px "IBM Plex Sans", var(--sans); color: #fff; text-decoration: none; background: rgba(14, 18, 28, .62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .14); }
.room-pager a:hover { background: rgba(14, 18, 28, .85); }
.room-credit { position: absolute; z-index: 12; left: 50%; bottom: 6px; translate: -50% 0; margin: 0; font-size: 10px; color: rgba(255, 255, 255, .75); text-shadow: 0 1px 4px rgba(0, 0, 0, .6); white-space: nowrap; pointer-events: none; }
@media (max-width: 860px) {
  .room-view { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
  .room-view::-webkit-scrollbar { display: none; }
  .room-stage { left: 0; top: 0; translate: none; width: calc(100svh * 2752 / 1536); height: 100svh; }
  .room-head { bottom: auto; top: 64px; left: 12px; right: 12px; translate: none; flex-wrap: wrap; gap: 2px 10px; white-space: normal; padding: 8px 12px; border-radius: 12px; }
  .room-head .cp-title { font-size: 16px; }
  .room-hint { font-size: 12px; }
  .room-hint::after { content: " Swipe to look around."; }
  .room-count { font-size: 12px; }
  .room-panel { left: 10px; right: 10px; bottom: 12px; translate: none; width: auto; padding: 28px 18px 12px; animation-name: rp-sheet; }
  .room.panel-top .room-panel { top: 100px; bottom: auto; }
  @keyframes rp-sheet { from { opacity: 0; translate: 0 24px; } }
  .rp-title { font-size: 19px; }
  .rp-text p { font-size: 16px; }
  .room-pager { bottom: 12px; left: 12px; right: 12px; }
  .room-credit { display: none; }
}
@media (prefers-reduced-motion: reduce) { .room-stage *, .room-stage *::after { animation: none !important; transition: none !important; } }



/* ============ ADULT MONEY: the shop ============
   Borrowed from the Adult Money store (cool-stuff-spot): cream / ink / lime, 1px ink borders, hard offset
   shadows, a lime marquee bar, mono pill badges and the pixel logo. Text stays IBM Plex Sans like every
   chapter; Space Grotesk (the store's own face) for numbers and headings, Space Mono for small labels.
   Toned down for a business read (1 Dec): thinner shadows, lime only as an accent, an ink marquee.
   The scene is a tidy 4x2 grid of store product photos, top right: they hold still, scroll away with
   the hero, and a click ticks one off with a coin burst (scenes.js, amShop). */
#page-adultmoney {
  --ink: #16170F; --ink-2: #5E624B; --line: #16170F; --acc: #6FC22E; --lime: #86E23C; --tile: #DEEFC2;
  --cream: #F5F0E1; --sheet: #F5F0E1; --card: #FFFDF6; --hard: 2px 2px 0 0 #16170F; --hard-lg: 3px 3px 0 0 #16170F;
  font-family: "IBM Plex Sans", var(--sans);
}
#page-adultmoney .cp-top a, #page-adultmoney .cp-top span { font-family: "Space Mono", var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
#page-adultmoney .cp-top { padding-top: 46px; }
#page-adultmoney .cp-back, #page-adultmoney .cp-count { background: var(--cream); color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
#page-adultmoney .cp-back:hover { background: var(--lime); color: var(--ink); }

/* scene: a lime-tinted shop floor with an ink dot grid */
.scene-am {
  overflow: hidden; background-color: var(--tile);
  background-image: radial-gradient(rgba(22, 23, 15, .08) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}
#page-adultmoney > .am-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 6; height: auto; overflow: hidden; background: var(--ink); border-bottom: 1px solid var(--ink); }
.am-track { display: flex; width: max-content; will-change: transform; }
.am-run { display: flex; flex: none; padding: 8px 0; font: 700 12px/1 "Space Mono", var(--mono); letter-spacing: .06em; color: var(--cream); white-space: nowrap; }
.am-run span { display: inline-flex; align-items: center; gap: 12px; padding: 0 22px 0 0; }
.am-run span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--lime); rotate: 45deg; }

.am-shelf {
  position: absolute; top: clamp(70px, 10vh, 104px); right: clamp(24px, 4vw, 64px); width: min(44%, 560px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 14px;
}
.am-p {
  position: relative; display: block; width: 100%; padding: 6px; margin: 0;
  background: var(--card); border: 1px solid var(--ink); border-radius: 12px; box-shadow: var(--hard);
  cursor: pointer; transition: box-shadow .16s ease, scale .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.am-p img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 7px; pointer-events: none; }
.am-p i { position: absolute; left: 8px; top: -11px; padding: 3px 7px; border: 1px solid var(--ink); border-radius: 6px; background: var(--cream); font: 700 10px/1 "Space Mono", var(--mono); font-style: normal; color: var(--ink); text-transform: uppercase; }
.am-p:hover { box-shadow: var(--hard-lg); scale: 1.04; z-index: 2; }
.am-p:active { box-shadow: 1px 1px 0 0 var(--ink); }
.am-p:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.am-p.in-cart::after { content: "✓"; position: absolute; right: -9px; top: -9px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--lime); font: 700 12px/1 "Space Mono", var(--mono); color: var(--ink); }

.am-coins { position: absolute; inset: 0; pointer-events: none; }
.am-coin { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFE08A, #F2B53A 55%, #C98A12); border: 2px solid #7A4E05;
  font: 700 10px/1 "Space Grotesk", var(--sans); color: #7A4E05; }

/* hero: pill, pixel logo and the store's line */
#page-adultmoney .cp-hero-text { color: var(--ink); top: clamp(16px, 4vh, 40px); max-width: min(560px, 48%); }
.am-pill { display: inline-block; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 999px; background: var(--lime); font: 700 11px/1 "Space Mono", var(--mono); letter-spacing: .08em; color: var(--ink); }
#page-adultmoney .am-title { margin: 14px 0 0; font-size: 0; line-height: 0; }
.am-title img { display: block; width: clamp(240px, 30vw, 420px); height: auto; filter: drop-shadow(2px 2px 0 rgba(22, 23, 15, .55)); }
.am-line { margin-top: 14px; font-weight: 700; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); }
.am-line span { color: #3E8A1E; }

/* the story sheet: a cream card with an ink border and a hard shadow */
#page-adultmoney .cp-sheet { background: var(--cream); border: 1px solid rgba(22, 23, 15, .9); border-radius: 22px; box-shadow: 0 24px 60px rgba(22, 23, 15, .14); }
#page-adultmoney .glance-meta b { font-family: "Space Mono", var(--mono); font-weight: 700; color: #3E8A1E; }
#page-adultmoney .glance .cp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#page-adultmoney .cp-stats li { padding: 14px 16px; border: 1px solid var(--ink); border-top: 4px solid var(--lime); border-radius: 12px; background: var(--card); box-shadow: var(--hard); }
#page-adultmoney .cp-n { font-family: "Space Grotesk", var(--sans); font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
#page-adultmoney .cp-stats span { color: var(--ink); opacity: .78; }
#page-adultmoney .rac li { border-left: 3px solid var(--lime); }
#page-adultmoney .rac b { color: var(--ink); }

.am-gallery { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.am-shot-lead { grid-column: 1 / -1; }
.am-shot-lead img { aspect-ratio: 2 / 1; object-position: 50% 45%; }
.am-shot { position: relative; margin: 0; border: 1px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--hard-lg); }
.am-shot img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.am-shot:nth-child(4) img { object-position: 50% 62%; }
.am-shot figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--ink); }
.am-shot figcaption { padding: 8px 12px; border: 1px solid var(--ink); border-radius: 10px; background: rgba(245, 240, 225, .95); width: fit-content; max-width: calc(100% - 24px); }
.am-shot figcaption span { font: 700 11px/1 "Space Mono", var(--mono); padding: 4px 7px; border: 1px solid var(--ink); border-radius: 6px; background: var(--tile); }

/* sections: a mono kicker, a bold heading, then the content */
.am-sec { margin-top: clamp(40px, 5vw, 64px); }
.am-head { display: grid; gap: 6px; margin-bottom: 20px; }
.am-head h3 { font-family: "Space Grotesk", var(--sans); font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.am-head p:not(.am-k) { font-size: 15px; color: var(--ink); opacity: .75; max-width: 60ch; }
.am-k { font: 700 11px/1 "Space Mono", var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #3E8A1E; }

/* the shelf: product cards like the store's own */
.am-cat { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.am-item { display: flex; flex-direction: column; border: 1px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: var(--hard); overflow: hidden; transition: translate .16s ease, box-shadow .16s ease; }
.am-item:hover { translate: -2px -2px; box-shadow: var(--hard-lg); }
.am-item-img { position: relative; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--ink); overflow: hidden; }
.am-item-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.am-item-img i { position: absolute; left: 8px; top: 8px; padding: 3px 7px; border: 1px solid var(--ink); border-radius: 6px; background: var(--cream); font: 700 10px/1 "Space Mono", var(--mono); font-style: normal; text-transform: uppercase; color: var(--ink); }
.am-item b { padding: 12px 12px 0; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.am-item span { padding: 4px 12px 14px; font-size: 13px; line-height: 1.4; color: var(--ink); opacity: .75; }

/* the playbook: four numbered moves */
.am-plays { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.am-plays li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 18px 20px; border: 1px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard); }
.am-plays em { grid-row: span 3; font: 700 26px/1 "Space Grotesk", var(--sans); font-style: normal; color: #3E8A1E; }
.am-plays b { font-size: 17px; font-weight: 700; color: var(--ink); }
.am-plays span { font-size: 14.5px; line-height: 1.45; color: var(--ink); opacity: .82; }
.am-plays small { margin-top: 6px; justify-self: start; padding: 3px 7px; border: 1px solid var(--ink); border-radius: 6px; background: var(--cream); font: 700 10px/1.2 "Space Mono", var(--mono); text-transform: uppercase; color: var(--ink); }
#page-adultmoney .am-sec .am-gallery { margin-top: 0; }

/* what I learned: sales leads, four more skills beside it */
.am-learn { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.am-learn-lead { display: grid; gap: 8px; align-content: start; padding: clamp(20px, 2.6vw, 28px); border: 1px solid var(--ink); border-radius: 14px; background: var(--ink); color: var(--cream); }
.am-learn-lead .am-k { color: var(--lime); }
.am-learn-lead b { font: 700 clamp(28px, 3vw, 40px)/1 "Space Grotesk", var(--sans); letter-spacing: -.02em; color: var(--cream); }
.am-learn-lead span { font-size: 16px; line-height: 1.55; color: var(--cream); opacity: .88; max-width: 52ch; }
.am-learn-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.am-learn-list li { display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: var(--hard); }
.am-learn-list b { font-size: 15px; font-weight: 700; color: var(--ink); }
.am-learn-list span { font-size: 13.5px; line-height: 1.4; color: var(--ink); opacity: .78; }

#page-adultmoney .cp-skills { margin-top: 12px; border-bottom: 0; }
#page-adultmoney .cp-kicker { font-family: "Space Mono", var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .08em; color: #3E8A1E; }
#page-adultmoney .cp-tags li { background: var(--card); border: 1px solid rgba(22, 23, 15, .5); }
#page-adultmoney .cp-pager a { background: var(--card); border: 1px solid var(--ink); box-shadow: var(--hard); }
#page-adultmoney .cp-pager a:hover { background: var(--lime); }

@media (max-width: 860px) {
  #page-adultmoney .cp-top { padding-top: 40px; }
  #page-adultmoney .cp-hero { padding-bottom: 240px; }
  #page-adultmoney .cp-hero-text { max-width: none; }
  .am-shelf { left: 16px; right: 16px; width: auto; gap: 18px 10px; }
  .am-p { padding: 4px; border-radius: 10px; }
  .am-p i { font-size: 9px; top: -9px; left: 5px; padding: 2px 5px; }
  #page-adultmoney .glance .cp-stats { grid-template-columns: 1fr 1fr; }
  .am-gallery { grid-template-columns: 1fr; }
  .am-shot-lead img { aspect-ratio: 16 / 9; }
  .am-cat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .am-plays { grid-template-columns: 1fr; }
  .am-learn, .am-learn-list { grid-template-columns: 1fr; }
  .am-shot figcaption { position: static; max-width: none; width: auto; border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
}
@media (min-width: 861px) and (max-width: 1180px) { .am-cat { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .am-p, .am-item { transition: none; } }

/* ============ BEHIND THE CAMERA (chapter 01): a screening room ============
   Warm projector amber on near-black. The films autoplay muted while on screen; tap a film for its sound
   (scenes.js, scFilms). Film-strip sprocket holes run along the top and bottom of each screen. */
#page-school { --gold: #F2B66D; --gold-2: #FFD9A0; }
/* the hero flows (no fixed height) so the award line can never run into the films */
#page-school .cp-hero { height: auto; padding: clamp(8px, 3vh, 32px) 0 clamp(28px, 4vh, 48px); }
#page-school .cp-hero-text { position: relative; top: auto; }
.sc-award { margin-top: 16px; font: 600 13px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

#page-school .sc-room { background: none; border: 0; box-shadow: none; padding-top: 8px; }
#page-school > .cp-top { background: linear-gradient(180deg, rgba(7, 5, 4, .9) 0%, rgba(7, 5, 4, .6) 60%, transparent 100%); }
.sc-now { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 600 12px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.sc-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FF5A4E; box-shadow: 0 0 0 4px rgba(255, 90, 78, .18); animation: sc-rec 1.6s ease-in-out infinite; }
.sc-now::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(242, 182, 109, .35), transparent); }
@keyframes sc-rec { 50% { opacity: .35; } }

/* a plain video page: big clean screens, nothing on the picture; name, details and sound sit underneath */
.sc-film-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) clamp(20px, 2.4vw, 32px); }
.sc-film { margin: 0; }
.sc-screen { position: relative; border-radius: 12px; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 236, 205, .06); transition: box-shadow .3s ease; }
.sc-film.is-loud .sc-screen { box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(242, 182, 109, .55); }
.sc-screen video { display: block; width: 100%; height: auto; aspect-ratio: 2.2 / 1; object-fit: cover;   /* wide frame trims the black bars baked into both films */
  background: #000; cursor: pointer; }

.sc-film:first-child .sc-screen video { object-position: 50% 80%; }   /* Lost & found: keep its subtitles in frame */
.sc-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 2px 0; }
.sc-meta { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.sc-meta b { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2vw, 28px); line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; color: #FFF3E2; }
.sc-meta span { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 236, 205, .6); }
.sc-meta .sc-win { color: var(--gold); }

.sc-snd { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(255, 236, 205, .22); border-radius: 999px;
  background: transparent; color: #FFF3E2; cursor: pointer; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s ease, color .2s ease, border-color .2s ease; }
.sc-snd:hover { border-color: var(--gold); }
.sc-snd:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sc-snd .on { display: none; } .sc-snd[aria-pressed="true"] .on { display: inline; } .sc-snd[aria-pressed="true"] .off { display: none; }
.sc-snd[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1A110C; }
.sc-snd-ico { display: inline-flex; }

.sc-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(28px, 3.4vw, 44px) 0 0; padding: 0; list-style: none; }
.sc-tags li { padding: 8px 14px; border: 1px solid rgba(242, 182, 109, .35); border-radius: 999px; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
#page-school .sc-room .cp-pager { margin-top: clamp(28px, 3.4vw, 44px); }

@media (max-width: 860px) {
  .sc-film-grid { grid-template-columns: 1fr; }
  .sc-award { font-size: 11px; }
  .sc-snd { padding: 10px; }   /* phones: icon-only sound button, so the title gets the room */
  .sc-snd-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #page-school .cp-hero { padding-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { .sc-now::before { animation: none; } .sc-screen { transition: none; } }
