/* ============================================================
   SAI KIRAN MEDA — "THE RECORD"
   Night for the infrastructure. Paper for the published work.
   One gold accent. Everything indexed, because it really is.
   ============================================================ */

:root {
  --night: #06070d;
  --night-2: #0b0e17;
  --ink: #eaedf6;
  --dim: #9099ae;
  --dim-2: rgba(144, 153, 174, 0.55);
  --gold: #c9a24b;
  --gold-bright: #e6c684;
  --gold-soft: rgba(201, 162, 75, 0.14);
  --paper: #efe9dc;
  --paper-2: #e7dfcd;
  --ink-paper: #1b1712;
  --dim-paper: #70654f;
  --line: rgba(160, 172, 205, 0.13);
  --line-strong: rgba(160, 172, 205, 0.24);
  --line-paper: rgba(27, 23, 18, 0.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 5.5vw, 84px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #120d04; }

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: #050609;
  display: grid; place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.monogram { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.monogram-text {
  font-family: var(--font-display); font-weight: 600; font-size: 30px;
  letter-spacing: 0.4em; text-indent: 0.4em; color: var(--ink);
  animation: monogram-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.monogram-line {
  width: 110px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  transform: scaleX(0);
  animation: line-draw 1.1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes monogram-in { from { opacity: 0; letter-spacing: 0.7em; } to { opacity: 1; letter-spacing: 0.4em; } }
@keyframes line-draw { to { transform: scaleX(1); } }

/* ============ FIXED LAYERS ============ */
#sky { position: fixed; inset: 0; z-index: -3; width: 100vw; height: 100vh; }
.grain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none; opacity: 0.4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(6, 7, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: clamp(12px, 2.2vw, 30px); align-items: center; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--dim); text-transform: uppercase;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-cta {
  padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink) !important;
  transition: border-color 0.25s, background 0.25s;
}
.nav-cta:hover { border-color: var(--gold); background: var(--gold-soft); }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ============ SHARED ============ */
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold);
}
.sec-head { padding: 0 var(--pad); margin-bottom: clamp(40px, 7vh, 80px); }
.sec-head .eyebrow { display: block; margin-bottom: 20px; }
.sec-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 5.4vw, 74px);
  line-height: 1.04; letter-spacing: -0.01em;
}
.sec-title em { font-style: italic; color: var(--gold-bright); }
.wrap { padding-left: var(--pad); padding-right: var(--pad); }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14vh var(--pad) 0;
  position: relative;
}
.hero-eyebrow {
  font-size: clamp(10px, 1.1vw, 12px); color: var(--dim);
  letter-spacing: 0.2em; margin-bottom: 3.5vh;
  font-family: var(--font-mono); text-transform: uppercase;
}
.hero-eyebrow .sep { color: var(--gold); }
.hero-title {
  font-family: var(--font-display); font-weight: 550;
  font-size: clamp(46px, 10vw, 158px);
  line-height: 0.98; letter-spacing: -0.015em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; transform: translateY(112%); }
.hero-title .accent { font-style: italic; color: var(--gold-bright); }
.hero-sub {
  margin-top: 5vh;
  display: flex; flex-wrap: wrap; gap: 28px 70px;
  align-items: flex-end; justify-content: space-between;
  max-width: 1280px;
}
.hero-statement {
  font-size: clamp(18px, 2.2vw, 27px); line-height: 1.45; font-weight: 300;
  max-width: 24em;
}
.hero-statement strong { font-weight: 500; color: var(--gold-bright); }
.hero-meta {
  font-size: 11px; letter-spacing: 0.16em; line-height: 2.1;
  color: var(--dim); text-align: right; text-transform: uppercase;
}

/* the record strip — live index of proof */
.record-strip {
  margin-top: 9vh;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.record-cell {
  padding: 22px 26px 26px 0;
  border-right: 1px solid var(--line);
  transition: background 0.3s;
  display: block;
}
.record-cell:last-child { border-right: none; }
.record-cell:hover { background: rgba(201, 162, 75, 0.05); }
.record-num {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1;
  color: var(--ink);
}
.record-label {
  display: block; margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
}
.record-cell:hover .record-label { color: var(--gold-bright); }
@media (max-width: 700px) {
  .record-strip { grid-template-columns: repeat(2, 1fr); }
  .record-cell { padding: 18px 14px 20px 0; }
  .record-cell:nth-child(even) { border-right: none; }
}

.scroll-hint {
  position: absolute; bottom: 30px; right: var(--pad);
  display: flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
  font-family: var(--font-mono);
}
.scroll-arrow { animation: bob 1.7s ease-in-out infinite; color: var(--gold); }
@media (max-width: 900px) { .scroll-hint { display: none; } }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============ PROLOGUE ============ */
.prologue {
  padding: 22vh var(--pad);
  max-width: 1250px;
}
.prologue-text {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 54px);
  line-height: 1.32; letter-spacing: -0.005em;
}
.prologue-text .sl-line { opacity: 0.12; transition: opacity 0.6s ease; }
.prologue-text .sl-line.lit { opacity: 1; }
.prologue-kicker { margin-top: 6vh; }

/* lessons — the compressed decade */
.lessons { padding: 4vh 0 14vh; }
.lesson-row {
  display: grid; grid-template-columns: 110px 1fr;
  gap: clamp(16px, 3vw, 44px); align-items: baseline;
  padding: clamp(26px, 3.6vh, 40px) var(--pad);
  border-top: 1px solid var(--line);
  max-width: 1250px;
}
.lesson-row:last-child { border-bottom: 1px solid var(--line); }
.lesson-when {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--dim-2); text-transform: uppercase;
}
.lesson-what {
  font-family: var(--font-display); font-weight: 450;
  font-size: clamp(19px, 2.3vw, 30px); line-height: 1.25;
}
.lesson-what span { color: var(--dim); font-family: var(--font-body); font-weight: 300; font-size: 0.62em; display: block; margin-top: 6px; }
@media (max-width: 620px) { .lesson-row { grid-template-columns: 1fr; gap: 8px; } }

/* ============ THE PAPER SPREAD (book + research) ============ */
.paper-spread {
  background: var(--paper);
  color: var(--ink-paper);
  position: relative;
}
.paper-spread::before {
  /* deckle edge into the night above */
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
}
.paper-spread .eyebrow { color: #8a6a1f; }
.paper-spread .sec-title { color: var(--ink-paper); }
.paper-spread .sec-title em { color: #8a6a1f; }
/* subtle paper fibre */
.paper-spread::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: multiply;
}
.paper-spread > * { position: relative; z-index: 1; }

/* ---- BOOK ---- */
.book-sec { padding: clamp(70px, 14vh, 140px) 0 clamp(60px, 10vh, 110px); }
.book-grid {
  display: grid; grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(36px, 6vw, 100px);
  padding: 0 var(--pad);
  align-items: center;
  max-width: 1350px;
}
@media (max-width: 860px) { .book-grid { grid-template-columns: 1fr; } }

/* CSS-built book object */
.book-object { perspective: 1400px; justify-self: center; width: min(320px, 72vw); }
.book-3d {
  position: relative; width: 100%; aspect-ratio: 0.66;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(2deg);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.book-object:hover .book-3d { transform: rotateY(-10deg) rotateX(1deg); }
.book-cover {
  position: absolute; inset: 0;
  background: #0a0e18;
  border-radius: 3px 10px 10px 3px;
  box-shadow: 0 30px 60px rgba(20, 16, 8, 0.35), 0 10px 24px rgba(20, 16, 8, 0.25);
  overflow: hidden;
  backface-visibility: hidden;
}
.book-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.book-cover::after {
  /* spine crease + subtle sheen over the real cover */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.32) 0, rgba(0, 0, 0, 0.08) 4.5%, transparent 9%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.09) 0%, transparent 28%);
  pointer-events: none;
}
.book-spine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 34px;
  transform-origin: left center;
  transform: rotateY(90deg) translateX(-17px);
  background: linear-gradient(180deg, #0d1220, #080b14);
  border-radius: 3px 0 0 3px;
}
.book-pages {
  position: absolute; top: 1.2%; bottom: 1.2%; right: -12px; width: 12px;
  background: repeating-linear-gradient(to bottom, #f2ecdf 0 2px, #ddd5c2 2px 3px);
  transform: rotateY(60deg);
  transform-origin: left center;
  border-radius: 0 2px 2px 0;
}

.book-info .eyebrow { display: block; margin-bottom: 18px; }
.book-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -0.01em;
}
.book-title em { font-style: italic; color: #8a6a1f; }
.book-desc {
  margin-top: 3.5vh; max-width: 56ch;
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.75; color: #453d2e;
}
.book-meta {
  margin-top: 4vh;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  border-top: 1px solid var(--line-paper);
  max-width: 620px;
}
.book-meta div {
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--line-paper);
}
.book-meta dt { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim-paper); }
.book-meta dd { margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--ink-paper); }
.book-ctas { margin-top: 4.5vh; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--ink-paper); color: var(--paper); }
.btn-solid:hover { background: #000; }
.btn-ghost { border: 1px solid var(--line-paper); color: var(--ink-paper); }
.btn-ghost:hover { border-color: var(--ink-paper); }
/* night variants */
.btn-solid-night { background: var(--ink); color: var(--night); }
.btn-solid-night:hover { background: #fff; }
.btn-ghost-night { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost-night:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---- RESEARCH ---- */
.research-sec { padding: clamp(50px, 9vh, 100px) 0 clamp(80px, 14vh, 150px); }
.research-list {
  border-top: 1px solid var(--line-paper);
  margin: 0 var(--pad);
  max-width: 1350px;
}
.pub {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: clamp(14px, 3vw, 40px);
  padding: clamp(24px, 3.4vh, 38px) 0;
  border-bottom: 1px solid var(--line-paper);
  align-items: baseline;
  transition: background 0.3s, padding-left 0.3s;
}
.pub:hover { background: rgba(27, 23, 18, 0.03); padding-left: 12px; }
.pub-index { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--dim-paper); }
.pub-title {
  display: block;
  font-family: var(--font-display); font-weight: 480;
  font-size: clamp(17px, 1.9vw, 25px); line-height: 1.3;
  color: var(--ink-paper);
}
.pub-venue {
  display: block;
  margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.1em; color: var(--dim-paper); text-transform: uppercase;
}
.pub-venue .doi { color: #8a6a1f; }
.pub-link {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--ink-paper); text-transform: uppercase; white-space: nowrap;
  border-bottom: 1px solid transparent; transition: border-color 0.25s, color 0.25s;
}
.pub:hover .pub-link { border-color: var(--ink-paper); }
@media (max-width: 680px) {
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-link { justify-self: start; margin-top: 6px; }
}
.research-foot {
  margin: 5vh var(--pad) 0; max-width: 1350px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.research-stats { display: flex; gap: clamp(20px, 4vw, 56px); }
.rstat-num { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.8vw, 38px); color: var(--ink-paper); }
.rstat-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim-paper); margin-top: 4px; }
.research-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ PRESS (back to night) ============ */
.press-sec { padding: clamp(90px, 16vh, 170px) 0 clamp(60px, 10vh, 110px); }
.press-quote {
  padding: 0 var(--pad); margin-bottom: clamp(50px, 9vh, 100px);
  max-width: 1250px;
}
.press-quote blockquote {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: clamp(24px, 3.4vw, 50px); line-height: 1.3; letter-spacing: -0.005em;
}
.press-quote blockquote .sl-line { opacity: 0.12; transition: opacity 0.6s ease; }
.press-quote blockquote .sl-line.lit { opacity: 1; }
.press-quote cite {
  display: block; margin-top: 3.5vh; font-style: normal;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}
.press-list { border-top: 1px solid var(--line); margin: 0 var(--pad); max-width: 1350px; }
.press-row {
  display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto;
  gap: clamp(14px, 3vw, 44px); align-items: baseline;
  padding: clamp(22px, 3vh, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding-left 0.3s;
}
.press-row:hover { background: rgba(201, 162, 75, 0.045); padding-left: 12px; }
.press-outlet {
  font-family: var(--font-display); font-weight: 550;
  font-size: clamp(15px, 1.6vw, 20px); color: var(--ink);
}
.press-head { font-size: clamp(14px, 1.5vw, 17px); font-weight: 300; color: var(--dim); line-height: 1.5; }
.press-head strong { color: var(--ink); font-weight: 400; }
.press-date { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--dim-2); white-space: nowrap; }
.press-row:hover .press-date { color: var(--gold-bright); }
@media (max-width: 680px) { .press-row { grid-template-columns: 1fr; gap: 6px; } }

/* ============ HONORS ============ */
.honors-sec { padding: clamp(60px, 10vh, 120px) 0; }
.honors-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; padding: 0 var(--pad); max-width: 1350px;
}
.honor-card {
  border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(24px, 2.6vw, 36px);
  background: linear-gradient(170deg, rgba(16, 20, 32, 0.65), rgba(8, 10, 18, 0.35));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s;
  display: flex; flex-direction: column; gap: 12px;
}
.honor-card:hover { transform: translateY(-6px); border-color: rgba(201, 162, 75, 0.45); }
.honor-kind { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.28em; color: var(--gold); text-transform: uppercase; }
.honor-card h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(19px, 2vw, 25px); line-height: 1.2; }
.honor-card p { font-size: 14px; color: var(--dim); flex: 1; }
.honor-link { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink); text-transform: uppercase; }

/* cert ticker */
.cert-ticker {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; margin-top: clamp(40px, 7vh, 70px);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.cert-track {
  display: inline-flex; gap: 38px; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; color: var(--dim);
  animation: ticker 44s linear infinite;
  padding-right: 38px;
}
.cert-track .star { color: var(--gold); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============ OPEN SOURCE ============ */
.oss-sec { padding: clamp(70px, 12vh, 140px) 0; }
.oss-flag {
  margin: 0 var(--pad); max-width: 1350px;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(170deg, rgba(16, 20, 32, 0.7), rgba(8, 10, 18, 0.4));
  padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 64px);
  transition: border-color 0.4s;
}
.oss-flag:hover { border-color: rgba(201, 162, 75, 0.4); }
@media (max-width: 820px) { .oss-flag { grid-template-columns: 1fr; } }
.oss-name { font-family: var(--font-display); font-weight: 550; font-size: clamp(28px, 3.6vw, 48px); line-height: 1; }
.oss-name em { font-style: italic; color: var(--gold-bright); }
.oss-tag { margin-top: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.oss-desc { margin-top: 3vh; font-size: clamp(14px, 1.5vw, 17px); color: var(--dim); line-height: 1.75; max-width: 52ch; }
.oss-desc strong { color: var(--ink); font-weight: 400; }
.oss-ctas { margin-top: 3.5vh; display: flex; gap: 12px; flex-wrap: wrap; }
.oss-points { display: flex; flex-direction: column; justify-content: center; gap: 0; border-left: 1px solid var(--line); padding-left: clamp(18px, 2.5vw, 40px); }
@media (max-width: 820px) { .oss-points { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } }
.oss-point { padding: 14px 0; border-bottom: 1px solid var(--line); }
.oss-point:last-child { border-bottom: none; }
.oss-point b { display: block; font-weight: 400; font-size: 14px; color: var(--ink); }
.oss-point span { font-size: 12.5px; color: var(--dim-2); }
.oss-minor {
  margin: 20px var(--pad) 0; max-width: 1350px;
  border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(20px, 2.4vw, 32px);
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  transition: border-color 0.3s;
}
.oss-minor:hover { border-color: rgba(201, 162, 75, 0.35); }
.oss-minor h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 2vw, 24px); }
.oss-minor p { font-size: 13.5px; color: var(--dim); max-width: 58ch; margin-top: 6px; }
.oss-minor p strong { color: var(--ink); font-weight: 400; }
.oss-next { border-style: dashed; }
.oss-soon { font-size: 10px; letter-spacing: 0.22em; color: var(--gold); white-space: nowrap; }

/* ============ TIMELINE ============ */
.timeline-sec { padding: clamp(50px, 9vh, 110px) 0; }
.timeline { margin: 0 var(--pad); max-width: 860px; border-top: 1px solid var(--line); }
.timeline-row {
  display: grid; grid-template-columns: 86px 1fr auto;
  gap: 18px; align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.04em;
  color: var(--dim);
}
.timeline-row span:first-child { font-family: var(--font-mono); font-size: 11px; color: var(--dim-2); }
.timeline-row span:nth-child(2) { color: var(--ink); font-weight: 400; }
.timeline-row span:last-child { text-align: right; color: var(--dim-2); font-family: var(--font-mono); font-size: 11px; }
.timeline-row.now span:first-child, .timeline-row.now span:last-child { color: var(--gold); }
@media (max-width: 560px) {
  .timeline-row { grid-template-columns: 70px 1fr; }
  .timeline-row span:last-child { grid-column: 2; text-align: left; margin-top: -6px; padding-bottom: 4px; }
}

/* ============ ASK THE RECORD ============ */
.ask-sec { padding: clamp(80px, 14vh, 160px) 0; }
.ask-shell {
  margin: 0 var(--pad); max-width: 980px;
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: rgba(8, 10, 17, 0.85);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}
.ask-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
}
.ask-bar .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 10px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.ask-toggle {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--dim); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 6px 14px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.ask-toggle:hover, .ask-toggle[aria-pressed="true"] { color: var(--gold-bright); border-color: var(--gold); }
.ask-log {
  height: min(420px, 52vh); overflow-y: auto;
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 18px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.msg { max-width: 82%; font-size: 14.5px; line-height: 1.65; }
.msg.user {
  align-self: flex-end;
  background: var(--gold-soft); border: 1px solid rgba(201, 162, 75, 0.3);
  border-radius: 14px 14px 3px 14px; padding: 12px 16px;
  color: var(--ink);
}
.msg.bot { align-self: flex-start; color: var(--dim); }
.msg.bot strong { color: var(--ink); font-weight: 400; }
.msg.bot a { color: var(--gold-bright); border-bottom: 1px solid rgba(201, 162, 75, 0.4); }
.msg.bot .msg-kicker {
  display: block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.msg.typing::after { content: "▍"; color: var(--gold); animation: pulse 1s infinite; }
.ask-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 24px 18px; }
.ask-chip {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--dim); font-size: 12px; padding: 8px 16px; cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.ask-chip:hover { color: var(--ink); border-color: var(--gold); background: var(--gold-soft); }
.ask-input-row {
  display: flex; gap: 10px; padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}
.ask-input {
  flex: 1; background: rgba(16, 20, 32, 0.6);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: var(--font-body); font-size: 14.5px;
  padding: 13px 16px; outline: none;
  transition: border-color 0.25s;
}
.ask-input:focus { border-color: var(--gold); }
.ask-input::placeholder { color: var(--dim-2); }
.ask-send {
  background: var(--gold); border: none; border-radius: 12px;
  color: #140e03; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0 22px; cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.ask-send:hover { background: var(--gold-bright); transform: translateY(-1px); }

/* under the hood panel */
.hood { display: none; border-top: 1px solid var(--line); padding: 22px 24px; }
.hood.open { display: block; }
.hood-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hood-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.hood-cell { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.hood-cell dt { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim-2); }
.hood-cell dd { margin-top: 5px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); }
.hood-note { margin-top: 14px; font-size: 12px; color: var(--dim-2); line-height: 1.6; }
.hood-note a { color: var(--gold-bright); }

.ask-foot {
  margin: 18px var(--pad) 0; max-width: 980px;
  font-size: 12px; color: var(--dim-2); line-height: 1.6;
}

/* ============ CONTACT ============ */
.contact {
  min-height: 88svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14vh var(--pad) 0;
}
.contact-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 5.6vw, 84px); line-height: 1.06; letter-spacing: -0.01em;
  max-width: 1100px; margin: 4vh 0 7vh;
}
.contact-title .sl-line { opacity: 0.12; transition: opacity 0.6s ease; }
.contact-title .sl-line.lit { opacity: 1; }
.contact-title em { font-style: italic; color: var(--gold-bright); }
.contact-mail {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: clamp(17px, 2.3vw, 27px);
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(201, 162, 75, 0.45);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}
.contact-mail:hover { color: var(--ink); border-color: var(--ink); }
.contact-links { display: flex; gap: clamp(16px, 3.5vw, 44px); margin-top: 5vh; flex-wrap: wrap; }
.contact-links a {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; color: var(--dim);
  transition: color 0.3s;
}
.contact-links a:hover { color: var(--ink); }
.contact-thesis {
  margin-top: 12vh;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(17px, 1.9vw, 24px); line-height: 1.55; color: var(--dim);
}
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 6vh 0 28px;
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.22em; color: var(--dim-2); text-transform: uppercase;
}

/* ============ REVEAL UTILITIES ============ */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.shown { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}
.paper-spread a:focus-visible, .paper-spread button:focus-visible { outline-color: var(--ink-paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-title .word { opacity: 1 !important; transform: none !important; }
  .sl-line { opacity: 1 !important; }
  .book-3d { transform: none; }
}
