/* ==========================================================================
   Manu · edition 1 of ∞
   ========================================================================== */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/geist.woff2) format("woff2"); }
/* maths glyphs Instrument Serif doesn't carry: Greek, fractions & superscripts from STIX Two Text, operators from STIX Two Math */
@font-face { font-family: "Math Fallback"; font-style: normal; font-display: swap; src: url(/fonts/stix-math.woff2) format("woff2"); unicode-range: U+00B2, U+00BC-00BD, U+03A3, U+03C0, U+03C3, U+03C6, U+2074, U+211D, U+2026, U+2153; }
@font-face { font-family: "Math Fallback"; font-style: italic; font-display: swap; src: url(/fonts/stix-math-italic.woff2) format("woff2"); unicode-range: U+00B2, U+00BC-00BD, U+03A3, U+03C0, U+03C3, U+03C6, U+2074, U+211D, U+2026, U+2153; }
@font-face { font-family: "Math Fallback"; font-style: normal; font-display: swap; src: url(/fonts/stix-ops.woff2) format("woff2"); unicode-range: U+2032, U+2044, U+2102, U+2192, U+2200-22FF, U+27E8-27E9, U+27F9; }
@font-face { font-family: "Tiro Devanagari Hindi"; font-style: normal; font-display: swap; src: url(/fonts/tiro-deva.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/geist-mono.woff2) format("woff2"); }

:root {
  --paper: #F2ECE3;
  --paper-2: #E9E1D5;
  --ink-day: #1B1714;
  --night-bg: #0D0B10;
  --night-ink: #EFE6DA;
  --rose: #C23B4E;
  --amber: #F0B46C;

  /* live theme: tweened from day to night on scroll */
  --bg: var(--paper);
  --ink: var(--ink-day);
  --muted: rgba(27, 23, 20, .55);
  --line: rgba(27, 23, 20, .16);

  --serif: "Instrument Serif", "Math Fallback", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 3.2vw, 48px);
  --head: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(15px, 1.05vw, 17px)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: italic; }
::selection { background: var(--rose); color: var(--paper); }

.mono { font: 400 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 4px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--rose); outline-offset: 4px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150;
  background: var(--paper); color: var(--ink-day);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--gutter);
}
.no-js .loader { display: none; }
.loader__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.loader__count { font-family: var(--serif); font-style: italic; font-size: clamp(64px, 14vw, 200px); line-height: .8; letter-spacing: -.02em; text-transform: none; }
.loader__bar { height: 1px; background: rgba(27,23,20,.15); margin-top: 1.25rem; }
.loader__bar i { display: block; height: 100%; background: var(--ink-day); transform-origin: left; transform: scaleX(0); }

/* ---------- Grain ---------- */
.grain {
  pointer-events: none; position: fixed; inset: -100%; z-index: 120;
  opacity: .075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 140; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--paper); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), opacity .3s;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.is-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor__label { font: 400 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .3s; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gutter);
  color: var(--paper); mix-blend-mode: difference;
}
.masthead__logo { font: italic 400 28px/1 var(--serif); display: inline-flex; align-items: flex-start; gap: 6px; }
.masthead__logo sup { font-size: 9px; white-space: nowrap; font-style: normal; margin-top: 2px; }
.masthead__nav { display: flex; gap: clamp(14px, 2.4vw, 36px); font-size: 14px; }
.masthead__nav a { position: relative; display: inline-flex; gap: 6px; align-items: baseline; }
.masthead__nav a .mono { font-size: 9px; opacity: .6; }
.masthead__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.masthead__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.masthead__time { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.masthead__time .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (max-width: 860px) { .masthead__nav { display: none; } }

/* ---------- Shared ---------- */
section { position: relative; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(40px, 7vw, 96px); }
.section-head > .mono { color: var(--muted); }
.section-head__title { margin: 0; font: 400 clamp(36px, 6vw, 92px)/.95 var(--serif); letter-spacing: -.02em; max-width: 14ch; }
.section-head__note { margin: 0; max-width: 42ch; color: var(--muted); }

.math { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.math sup, .math sub { font-size: .62em; line-height: 0; }
.math .bar { position: relative; display: inline-block; }
.math .bar::before { content: ""; position: absolute; left: .14em; right: -.06em; top: .02em; height: .045em; min-height: 1px; background: currentColor; }
.mono .math { font-size: 1.35em; }

.split-char { display: inline-block; will-change: transform; }
.split-mask { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em; margin: 0 -.04em; }

/* ---------- 01 Cover ---------- */
.cover {
  min-height: 100svh;
  padding: calc(var(--head) + 8px) var(--gutter) clamp(20px, 3vw, 36px);
  display: grid;
  grid-template-columns: 1fr minmax(240px, 30vw) 1fr;
  grid-template-rows: auto 1fr;
  column-gap: clamp(20px, 3vw, 48px);
  overflow: hidden;
}
.cover__kicker a { transition: color .3s; }
.cover__kicker a:hover { color: var(--rose); }
.cover__kicker {
  grid-column: 1 / -1; margin: 0 0 clamp(16px, 2.5vw, 28px);
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted);
}
.cover__portrait {
  grid-column: 2; grid-row: 2; align-self: start; justify-self: center; margin: 0; position: relative;
  width: min(100%, calc((100svh - 330px) * .923)); min-width: 220px;
  aspect-ratio: 1205 / 1305; z-index: 1;
}
.cover__portrait img, .cover__portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__portrait canvas { opacity: 0; transition: opacity .6s; }
.cover__portrait.gl-ready canvas { opacity: 1; }
.cover__portrait.gl-ready img { visibility: hidden; }
.cover__portrait figcaption { position: absolute; left: 0; top: calc(100% + 10px); color: var(--muted); white-space: nowrap; }

.cover__title {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0;
  text-align: center; pointer-events: none;
  font: italic 400 clamp(120px, 28vw, 560px)/.78 var(--serif);
  letter-spacing: -.035em;
  color: var(--paper); mix-blend-mode: difference;
  padding-bottom: .1em;
}
.cover__lines {
  grid-column: 1; grid-row: 2; align-self: start; list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0; max-width: 300px; position: relative; z-index: 3;
}
.cover__lines li { border-top: 1px solid var(--line); }
.cover__lines li:last-child { border-bottom: 1px solid var(--line); }
.cover__lines a { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 12px 0; font: 400 19px/1.2 var(--serif); transition: padding .5s var(--ease), color .3s; }
.cover__lines a .mono { color: var(--muted); padding-top: 4px; }
.cover__lines a:hover { padding-left: 8px; color: var(--rose); }
.cover__scroll {
  grid-column: 3; grid-row: 2; align-self: start; justify-self: end; margin: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px; color: var(--muted);
}
.cover__scroll i { width: 48px; height: 1px; background: currentColor; transform-origin: left; animation: line 2.4s var(--ease) infinite; }
@keyframes line { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

@media (max-width: 860px) {
  .cover { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding-bottom: 32px; }
  .cover__kicker span:nth-child(3) { display: none; }
  .cover__portrait { grid-column: 1; grid-row: 2; width: min(100%, 520px); justify-self: center; }
  .cover__portrait figcaption { display: none; }
  .cover__title { position: relative; grid-row: 3; font-size: 38vw; margin-top: -.42em; transform: none; }
  .cover__lines { grid-column: 1; grid-row: 4; max-width: none; margin-top: 28px; }
  .cover__scroll { display: none; }
}

/* ---------- 02 Profile ---------- */
.profile { padding: clamp(120px, 16vw, 220px) var(--gutter) clamp(80px, 10vw, 160px); }
.profile__statement {
  margin: 0 0 clamp(64px, 10vw, 140px);
  font: 400 clamp(34px, 5.4vw, 88px)/1.04 var(--serif); letter-spacing: -.02em;
  max-width: 19ch; text-wrap: balance;
}
.profile__statement em { color: var(--rose); }
.js .profile__statement .word { opacity: .14; }
.profile__body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 8vw, 140px); align-items: start; }
.profile__text { max-width: 52ch; font-size: clamp(16px, 1.2vw, 19px); }
.profile__text p { margin: 0 0 1.1em; }
.dropcap::first-letter { float: left; font: 400 5.1em/.78 var(--serif); margin: .06em .1em 0 0; color: var(--rose); }
.facts { margin: 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: baseline; }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font: 400 clamp(20px, 1.8vw, 26px)/1.2 var(--serif); }
.facts dd a.math { border-bottom: 1px solid var(--line); }
.facts__aside { color: var(--muted); font-size: .72em; }
.profile__text a.math { color: var(--rose); border-bottom: 1px solid currentColor; }
@media (max-width: 860px) { .profile__body { grid-template-columns: 1fr; } .facts > div { grid-template-columns: 96px 1fr; } }

.waves { margin: clamp(80px, 10vw, 140px) 0 0; border-block: 1px solid var(--line); position: relative; }
.waves canvas { width: 100%; height: clamp(260px, 44vh, 440px); touch-action: pan-y; cursor: ew-resize; }
.waves__readout { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); text-transform: none; letter-spacing: .02em; min-height: 2.6em; }
.waves__readout b { font-weight: 400; color: var(--ink); }
.waves__readout b.r { color: var(--rose); }
.waves figcaption { display: grid; grid-template-columns: 260px minmax(0, 62ch); gap: 16px; padding: 14px 0 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.waves figcaption .math { font-size: 20px; color: var(--ink); display: inline-block; margin-top: 8px; }
@media (max-width: 860px) { .waves figcaption { grid-template-columns: 1fr; } }

/* ---------- 03 Frames ---------- */
.frames { padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(100px, 12vw, 180px); }
.sheet {
  position: relative; background: #15110F; color: var(--amber);
  padding: 44px clamp(14px, 2vw, 28px);
  border-radius: 2px;
  box-shadow: 0 40px 80px -40px rgba(27,23,20,.45);
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(242,236,227,.85) 10px 22px, transparent 22px 34px);
  border-radius: 2px; opacity: .9;
}
.sheet::before { top: 14px; } .sheet::after { bottom: 14px; }
.sheet__edge { position: absolute; left: 0; right: 0; top: 28px; margin: 0; overflow: hidden; white-space: nowrap; font-size: 8px; opacity: .6; text-align: center; }
.sheet__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1vw, 14px); }
.sheet__grid li { position: relative; }
.frame { display: block; position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #000; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.92); }
.frame:hover img { transform: scale(1.06); filter: saturate(1.05); }
.frame .mono { position: absolute; left: 6px; bottom: 5px; font-size: 9px; color: var(--amber); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.pencil { position: absolute; left: -16%; top: -12%; width: 132%; height: 124%; overflow: visible; pointer-events: none; z-index: 2; }
.pencil path { fill: none; stroke: var(--rose); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 760; stroke-dashoffset: 760; filter: drop-shadow(0 0 1px rgba(194,59,78,.5)); }
.no-js .pencil path { stroke-dashoffset: 0; }
.pencil__note {
  position: absolute; right: -6px; bottom: -40px; z-index: 3;
  font: italic 400 26px/1 var(--serif); color: var(--rose); transform: rotate(-6deg);
}
.js .pencil__note { opacity: 0; }
@media (max-width: 1100px) { .sheet__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .sheet__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .sheet__grid li.is-chosen { margin-bottom: 36px; } }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; }
.lightbox[open] { display: grid; place-items: center; align-content: center; gap: 14px; }
.lightbox::backdrop { background: rgba(13, 11, 16, .92); backdrop-filter: blur(6px); }
.lightbox img { max-height: 82dvh; width: auto; max-width: 92vw; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox p { margin: 0; color: var(--night-ink); text-align: center; }
.lightbox button { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 04 Notes ---------- */
.notes { padding: 0 var(--gutter) clamp(120px, 14vw, 200px); }
.marquee { margin: 0 calc(var(--gutter) * -1) clamp(80px, 10vw, 140px); overflow: hidden; border-block: 1px solid var(--line); padding: 1.2vw 0; }
.marquee__track { display: flex; width: max-content; gap: .4em; font: italic 400 clamp(56px, 11vw, 180px)/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; will-change: transform; }
.marquee__track span:nth-child(even) { color: var(--rose); font-style: normal; font-size: .45em; align-self: center; }
.marquee__track span:nth-child(4n+3) { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.theorems { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); }
.theorems li { padding: clamp(24px, 3vw, 40px) 0; border-top: 1px solid var(--line); }
.theorem__label { margin: 0 0 18px; color: var(--muted); }
.theorem__math { margin: 0 0 22px; font-size: clamp(30px, 3.4vw, 54px); line-height: 1.15; color: var(--ink); white-space: normal; text-wrap: balance; }
.theorem__math sup { font-size: .5em; vertical-align: .9em; line-height: 0; }
.theorem__math sub { font-size: .5em; vertical-align: -.2em; line-height: 0; }
.theorem__meaning, .theorem__romance { display: grid; gap: 6px; }
.theorem__meaning { margin-bottom: 18px; }
.theorem__meaning .mono, .theorem__romance .mono { color: var(--muted); font-size: 10px; }
.theorem__meaning p { margin: 0; font-size: 15px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 78%, transparent); max-width: 52ch; }
.theorem__romance { padding-left: 16px; border-left: 2px solid var(--rose); }
.theorem__romance .mono { color: var(--rose); }
.theorem__romance p { margin: 0; font: 400 clamp(19px, 1.55vw, 23px)/1.38 var(--serif); max-width: 40ch; }
.theorems li:nth-child(odd) .theorem__math { color: var(--rose); }
@media (max-width: 860px) { .theorems { grid-template-columns: 1fr; } }

/* ---------- 05 After dark ---------- */
.us { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); align-items: center; padding: clamp(80px, 10vw, 160px) 0 clamp(40px, 6vw, 80px); position: relative; z-index: 3; }
.us__photo { margin: 0; overflow: hidden; aspect-ratio: 3 / 4; max-height: 88svh; }
.us__photo img { width: 100%; height: 115%; object-fit: cover; object-position: 50% 40%; will-change: transform; }
.us__copy > .mono { color: var(--muted); }
.us__copy .mono .math { font-size: 1.5em; color: var(--amber); }
.us__title { margin: 14px 0 24px; font: italic 400 clamp(64px, 9vw, 150px)/.88 var(--serif); letter-spacing: -.03em; }
.us__title em { color: var(--amber); font-style: normal; }
.us__copy p { margin: 0 0 1em; font: 400 clamp(20px, 1.7vw, 26px)/1.4 var(--serif); max-width: 32ch; }
.us__copy .us__meaning { font: 400 15px/1.6 var(--sans); color: var(--muted); max-width: 46ch; }
.us__meaning a { color: var(--amber); border-bottom: 1px solid currentColor; }
@media (max-width: 760px) { .us { grid-template-columns: 1fr; } }

.night { padding: 0 var(--gutter); overflow: hidden; }
.night__stage { position: relative; min-height: 135svh; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); display: grid; align-content: end; }
.no-js .night, .no-js .colophon { background: var(--night-bg); color: var(--night-ink); --ink: var(--night-ink); --muted: rgba(239,230,218,.5); --line: rgba(239,230,218,.14); }
.night__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.night__stars { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.star-btn {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  pointer-events: auto; cursor: pointer;
}
.star-btn:focus-visible { outline: 1px dashed rgba(240,180,108,.6); outline-offset: -8px; }
.night__copy { position: relative; z-index: 3; align-self: end; padding-bottom: clamp(40px, 6vw, 80px); max-width: 640px; pointer-events: none; }
.night__copy > .mono { color: var(--muted); }
.night__title { margin: 12px 0 18px; font: italic 400 clamp(64px, 11vw, 180px)/.85 var(--serif); letter-spacing: -.03em; }
.night__lede { margin: 0; font: 400 clamp(18px, 1.6vw, 24px)/1.4 var(--serif); max-width: 34ch; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.night__lede em { color: var(--amber); }
.night__whisper {
  position: absolute; z-index: 4; left: 50%; top: 6%; transform: translateX(-50%); margin: 0;
  color: var(--amber); text-align: center; opacity: 0; transition: opacity 1s; white-space: nowrap;
}
.night__whisper.is-on { opacity: .9; }
.night__whisper.is-math { font: italic 400 clamp(17px, 1.6vw, 22px)/1.3 var(--serif); text-transform: none; letter-spacing: 0; white-space: normal; width: min(90vw, 760px); }
.night__whisper sup { font-size: .65em; line-height: 0; }
.night__since {
  position: absolute; z-index: 4; left: 50%; top: 55%; transform: translate(-50%, 12px); margin: 0;
  display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 1.2s, transform 1.2s var(--ease);
}
.night__since.is-on { opacity: 1; transform: translate(-50%, 0); }
.night__since .math { font-size: clamp(24px, 2.6vw, 38px); color: var(--night-ink); }
.night__since .mono { color: var(--amber); }
.night__since b { font-weight: 400; }

.night__note {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 46ch); gap: clamp(28px, 5vw, 80px);
  align-items: center; justify-content: center;
  padding: 20px 0 clamp(100px, 12vw, 160px);
}
.night__note[hidden] { display: none; }
.polaroid { margin: 0; background: #F4EEE4; padding: 12px 12px 54px; transform: rotate(-3deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); position: relative; }
.polaroid img { height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 42%; width: 100%; filter: brightness(2.2) saturate(0) contrast(.6); transition: filter 4.5s cubic-bezier(.3,.1,.2,1); }
.polaroid.is-developed img { filter: none; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font: italic 400 22px/1 var(--serif); color: #2A2420; }
.note-letter { font: 400 clamp(19px, 1.6vw, 23px)/1.5 var(--serif); }
.note-letter p { margin: 0 0 1em; }
.note-letter .sig { font-style: italic; color: var(--amber); font-size: 1.4em; }
.note-letter .proof { margin: 1.2em 0 .3em; font: italic 400 clamp(28px, 3vw, 42px)/1.1 var(--serif); color: var(--night-ink); white-space: nowrap; }
.note-letter .proof-meaning { font-size: .82em; color: color-mix(in srgb, var(--ink) 75%, transparent); }
.note-letter .proof-note { font-style: italic; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.note-letter .again { margin-top: 1.4em; color: var(--muted); }
.note-letter .again button { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .night__note { grid-template-columns: 1fr; justify-items: center; } .polaroid { width: min(78%, 280px); } }

/* ---------- Colophon ---------- */
.colophon { position: relative; padding: clamp(40px, 6vw, 80px) var(--gutter) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.colophon__big { margin: 0 0 clamp(32px, 4vw, 60px); font: italic 400 clamp(110px, 30vw, 520px)/.78 var(--serif); letter-spacing: -.04em; text-align: center; }
.colophon__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.colophon__grid > div > .mono { display: block; color: var(--muted); margin-bottom: 10px; }
.colophon__grid p { margin: 0; font: 400 19px/1.35 var(--serif); max-width: 26ch; }
.links { list-style: none; margin: 0; padding: 0; font: 400 19px/1.6 var(--serif); }
.links a:hover, .colophon__grid p a:hover { color: var(--amber); }
.colophon__grid p a { border-bottom: 1px solid var(--line); }
.colophon__base { display: flex; justify-content: space-between; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.colophon__base a:hover { color: var(--ink); }
@media (max-width: 860px) { .colophon__grid { grid-template-columns: 1fr 1fr; } }
/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .cover__scroll i, .masthead__time .dot { animation: none; }
  .js .profile__statement .word { opacity: 1; }
  .js .pencil__note { opacity: 1; }
  .pencil path { stroke-dashoffset: 0; }
}

/* ---------- The 1% problem ---------- */
.percent {
  margin-top: clamp(80px, 10vw, 140px); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start;
}
.percent__story > .mono { color: var(--muted); }
.percent__quote { margin: 18px 0 22px; font: italic 400 clamp(38px, 4.6vw, 72px)/1.02 var(--serif); letter-spacing: -.02em; color: var(--rose); }
.percent__quote cite { display: block; margin-top: 14px; font-style: normal; color: var(--muted); }
.percent__story > p:not(.theorem__math) { margin: 0 0 22px; font: 400 clamp(19px, 1.5vw, 22px)/1.4 var(--serif); max-width: 40ch; }
.percent__story .theorem__math { margin-top: 8px; }
.percent__toy {
  position: sticky; top: calc(var(--head) + 24px);
  padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: 4px;
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}
.percent__label { display: flex; justify-content: space-between; margin: 0 0 10px; color: var(--muted); }
.percent__label [data-pct-scale] { color: var(--rose); }
.percent__bar { position: relative; height: 54px; border-radius: 3px; overflow: hidden; background: rgba(27,23,20,.06); display: flex; }
.percent__seen { display: block; height: 100%; width: 100%; background: var(--rose); flex: none; }
.percent__rest { display: block; height: 100%; flex: 1; background: linear-gradient(90deg, #F0B46C, #E9876F 45%, #C23B4E 70%, #7E3A8C); opacity: 0; }
.percent__total { margin: 22px 0 6px; font-size: clamp(34px, 3.6vw, 56px); line-height: 1.05; color: var(--ink); white-space: normal; overflow-wrap: anywhere; }
.percent__total sup { font-size: .5em; vertical-align: .9em; line-height: 0; }
.percent__note { margin: 0 0 22px; min-height: 2.8em; color: var(--muted); font-size: 15px; max-width: 44ch; }
.percent__ask {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font: italic 400 21px/1 var(--serif); transition: transform .5s var(--ease), background .3s;
}
.percent__ask::after { content: "♡"; font-style: normal; font-size: 16px; color: var(--rose); }
.percent__ask:hover { transform: translateY(-2px) scale(1.02); }
.percent__ask:active { transform: scale(.97); }
.percent__reply { margin: 18px 0 0; min-height: 1.4em; font: italic 400 clamp(22px, 2vw, 28px)/1.25 var(--serif); color: var(--rose); }
.percent__reply .ch { display: inline-block; opacity: 0; transform: translateY(.3em); animation: ch .5s var(--ease) forwards; }
@keyframes ch { to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .percent { grid-template-columns: 1fr; } .percent__toy { position: relative; top: 0; } }

/* ---------- Her names ---------- */
.names { position: relative; z-index: 3; padding: clamp(60px, 8vw, 120px) 0 clamp(40px, 6vw, 80px); }
.names .section-head__title em { color: var(--amber); }
.names__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.names__card {
  position: relative; padding: 0 0 26px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, rgba(240,180,108,.07), transparent 60%), rgba(255,255,255,.015);
  transition: border-color .5s, transform .8s var(--ease);
}
.names__card:hover { border-color: rgba(240,180,108,.35); transform: translateY(-4px); }
.names__card canvas { width: 100%; height: clamp(220px, 22vw, 300px); cursor: crosshair; }
.names__card > *:not(canvas) { margin-left: clamp(18px, 2vw, 26px); margin-right: clamp(18px, 2vw, 26px); }
.names__name { margin-top: 6px; margin-bottom: 2px; font: italic 400 clamp(38px, 3.4vw, 54px)/1 var(--serif); letter-spacing: -.02em; transform-origin: center 120%; transition: letter-spacing .2s; }
.names__fact { margin-top: 6px; margin-bottom: 20px; color: var(--amber); font-size: 18px; white-space: normal; }
.names__fact sup, .names__fact sub { font-size: .62em; }
.names__card .theorem__meaning p { font-size: 14px; }
.names__card .theorem__romance { border-left-color: var(--amber); }
.names__card .theorem__romance .mono { color: var(--amber); }
.names__card .theorem__romance p { font-size: clamp(18px, 1.35vw, 21px); }
.names__card a { color: var(--amber); border-bottom: 1px solid currentColor; }
.names__live { display: block; margin-top: 8px; color: var(--rose); text-transform: none; letter-spacing: .02em; }
@media (max-width: 980px) { .names__list { grid-template-columns: 1fr; } }

/* ---------- The dream ---------- */
.dream { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(60px, 8vw, 120px) 0; }
.dream__copy > .mono { color: var(--muted); }
.dream__title { margin: 14px 0 24px; font: italic 400 clamp(52px, 7vw, 116px)/.9 var(--serif); letter-spacing: -.03em; }
.dream__title em { font-style: italic; background: linear-gradient(100deg, #7CF5C0, #5ED9A8 35%, #A98BEA 70%, #E37BA2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dream__copy p { margin: 0 0 1em; font: 400 clamp(18px, 1.45vw, 22px)/1.45 var(--serif); max-width: 42ch; color: color-mix(in srgb, var(--ink) 85%, transparent); }

.ticket {
  --t-bg: #F4EEE4; --t-ink: #1B1714;
  position: relative; display: grid; grid-template-columns: 1fr 150px; color: var(--t-ink);
  transform: rotate(-2deg); transition: transform .9s var(--ease), box-shadow .9s var(--ease);
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); outline: none;
}
.ticket:hover, .ticket:focus-visible { transform: rotate(0) translateY(-6px) scale(1.02); }
.ticket__main, .ticket__stub { background: var(--t-bg); padding: 22px 24px; }
.ticket__main { border-radius: 10px 0 0 10px; -webkit-mask: radial-gradient(circle 10px at 100% 0, #0000 98%, #000) top right / 100% 51% no-repeat, radial-gradient(circle 10px at 100% 100%, #0000 98%, #000) bottom right / 100% 51% no-repeat; mask: radial-gradient(circle 10px at 100% 0, #0000 98%, #000) top right / 100% 51% no-repeat, radial-gradient(circle 10px at 100% 100%, #0000 98%, #000) bottom right / 100% 51% no-repeat; }
.ticket__stub { position: relative; border-radius: 0 10px 10px 0; border-left: 2px dashed rgba(27,23,20,.25); display: grid; align-content: start; gap: 4px; overflow: hidden;
  -webkit-mask: radial-gradient(circle 10px at 0 0, #0000 98%, #000) top left / 100% 51% no-repeat, radial-gradient(circle 10px at 0 100%, #0000 98%, #000) bottom left / 100% 51% no-repeat;
  mask: radial-gradient(circle 10px at 0 0, #0000 98%, #000) top left / 100% 51% no-repeat, radial-gradient(circle 10px at 0 100%, #0000 98%, #000) bottom left / 100% 51% no-repeat; }
.ticket .mono { color: rgba(27,23,20,.5); font-size: 9.5px; }
.ticket b { display: block; font: 400 22px/1.15 var(--serif); margin-bottom: 10px; }
.ticket b.math { font-size: 26px; }
.ticket small { display: block; margin: -8px 0 8px; font: italic 400 14px var(--serif); color: var(--rose); }
.ticket__head { display: flex; justify-content: space-between; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid rgba(27,23,20,.15); }
.ticket__head span:first-child { color: var(--t-ink); }
.ticket__route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.ticket__route b { font: italic 400 clamp(24px, 2.2vw, 32px)/1.05 var(--serif); }
.ticket__arrow { color: var(--rose); font-size: 18px; }
.ticket__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.ticket__lights { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(180deg, transparent, rgba(94,217,168,.35) 55%, rgba(169,139,234,.45)); filter: blur(10px); opacity: .5; transition: opacity .9s; animation: lights 6s ease-in-out infinite alternate; }
.ticket:hover .ticket__lights, .ticket:focus-visible .ticket__lights { opacity: 1; }
@keyframes lights { to { transform: translateY(-14%) skewY(-6deg); } }
@media (max-width: 860px) { .dream { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ticket { grid-template-columns: 1fr; } .ticket__main { border-radius: 10px 10px 0 0; -webkit-mask: none; mask: none; } .ticket__stub { border-radius: 0 0 10px 10px; border-left: 0; border-top: 2px dashed rgba(27,23,20,.25); -webkit-mask: none; mask: none; grid-template-columns: auto 1fr; column-gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .ticket__lights { animation: none; } }

/* ---------- Interlude · t = 33 ---------- */
.meet { position: relative; }
.meet__pin { min-height: 100svh; padding: calc(var(--head) + 4px) var(--gutter) 28px; display: grid; align-content: center; justify-items: center; text-align: center; gap: clamp(10px, 1.6vh, 22px); }
.meet__kicker { margin: 0; color: var(--muted); }
.meet__line { position: relative; width: min(100%, 900px); height: 64px; }
.meet__axis { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.meet__gap { position: absolute; top: 50%; height: 2px; margin-top: -.5px; left: 50%; width: 0; background: repeating-linear-gradient(90deg, var(--rose) 0 6px, transparent 6px 11px); opacity: .7; }
.meet__dot { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; }
.meet__dot b { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font: italic 400 20px/1 var(--serif); white-space: nowrap; }
.meet__dot--m { background: var(--rose); box-shadow: 0 0 0 6px rgba(194,59,78,.12); }
.meet__dot--m b { color: var(--rose); }
.meet__dot--j { background: var(--ink); box-shadow: 0 0 0 6px rgba(27,23,20,.08); }
.meet__dot--j b { top: auto; bottom: -30px; }
.meet__flash { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: radial-gradient(circle, rgba(240,180,108,.55), rgba(194,59,78,.18) 40%, transparent 70%); opacity: 0; transform: scale(.2); pointer-events: none; }
.meet__read { margin: 0; font-size: clamp(24px, 2.6vw, 36px); color: var(--ink); min-height: 1.3em; }
.meet__words { display: grid; justify-items: center; gap: clamp(8px, 1.6vh, 18px); max-width: 900px; }
.meet__title { margin: 0; font: 400 clamp(40px, min(5.4vw, 9vh), 88px)/.95 var(--serif); letter-spacing: -.02em; }
.meet__title em { color: var(--rose); }
.meet__shayari { margin: 8px 0 0; display: grid; gap: 12px; }
.meet__deva { margin: 0; font: 400 clamp(24px, min(3vw, 5.2vh), 46px)/1.4 "Tiro Devanagari Hindi", var(--serif); color: var(--ink); }
.meet__roman { margin: 0; font: italic 400 clamp(18px, 1.6vw, 23px)/1.4 var(--serif); color: var(--rose); }
.meet__trans { margin: 0; font-size: 15px; color: var(--muted); }
.meet__body { margin: 4px 0 0; font: 400 clamp(16px, min(1.35vw, 2.5vh), 21px)/1.42 var(--serif); max-width: 52ch; color: color-mix(in srgb, var(--ink) 80%, transparent); }
