/* ==========================================================
   ASLIDDIN BOYNAZAROV — "From Kitob to the World"
   Silk Road portfolio · design system
   ========================================================== */

:root {
  --night: #05081a;
  --ink: #0a1030;
  --ink-2: #111a45;
  --lapis: #1e3a8a;
  --turq: #35d0c6;
  --turq-dim: #1b7f86;
  --gold: #e2b866;
  --gold-2: #f6dc9e;
  --paper: #f4ecdc;
  --muted: #8f97b8;
  --line: rgba(226, 184, 102, .22);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--night); }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.serif { font-family: var(--serif); font-weight: 400; }
.gold { color: var(--gold); }
.turq { color: var(--turq); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- film grain + vignette ---------- */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 90; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0) } 20% { transform: translate(-3%, 2%) } 40% { transform: translate(2%, -4%) }
  60% { transform: translate(-4%, -1%) } 80% { transform: translate(3%, 3%) } 100% { transform: translate(0, 0) }
}
.vignette { pointer-events: none; position: fixed; inset: 0; z-index: 89;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--night);
  display: grid; place-items: center; text-align: center;
}
.loader__star { width: min(38vw, 220px); color: var(--gold); }
.loader__star path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.loader__count { font-family: var(--serif); font-size: clamp(56px, 9vw, 120px); line-height: 1; margin-top: 24px; font-style: italic; }
.loader__meta { margin-top: 10px; color: var(--muted); }

/* ---------- cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; border-radius: 50%; }
.cursor { width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1px solid rgba(226,184,102,.6);
  display: grid; place-items: center; transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .3s, border-color .3s; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold); }
.cursor span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--night); opacity: 0; transition: opacity .2s; }
.cursor.is-hover { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--gold); border-color: var(--gold); }
.cursor.is-hover span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad); mix-blend-mode: difference;
}
.nav__logo { font-family: var(--serif); font-size: 26px; font-style: italic; letter-spacing: .01em; }
.nav__logo b { font-style: normal; font-weight: 400; color: var(--gold); }
.nav__links { display: flex; gap: 34px; }
.nav__links a { position: relative; font-size: 14px; letter-spacing: .02em; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__clock { display: flex; gap: 10px; align-items: center; }
.nav__clock i { width: 7px; height: 7px; border-radius: 50%; background: var(--turq); box-shadow: 0 0 12px var(--turq); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3 } }
@media (max-width: 820px) { .nav__links { display: none; } }

/* progress rail */
.rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 14px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); }
.rail a span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; opacity: 0; transform: translateX(6px); transition: .4s var(--ease); }
.rail a i { width: 18px; height: 1px; background: currentColor; transition: width .4s var(--ease), background .3s; }
.rail a:hover span, .rail a.is-active span { opacity: 1; transform: none; }
.rail a.is-active { color: var(--gold); }
.rail a.is-active i { width: 34px; background: var(--gold); }
@media (max-width: 1100px) { .rail { display: none; } }

/* ---------- generic ---------- */
section { position: relative; }
.wrap { padding: 0 var(--pad); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.line-mask { display: block; overflow: hidden; padding-bottom: .06em; }
.line-mask > span { display: inline-block; will-change: transform; }
.reveal { opacity: 0; transform: translateY(40px); }
.no-js .reveal, .reduced .reveal { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero { height: 100svh; min-height: 640px; overflow: hidden; display: flex; align-items: flex-end; padding: 0 var(--pad) 8vh; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__aurora { position: absolute; inset: -20%; filter: blur(80px); opacity: .55;
  background:
    radial-gradient(40% 35% at 70% 30%, rgba(53,208,198,.35), transparent 70%),
    radial-gradient(35% 40% at 85% 75%, rgba(30,58,138,.7), transparent 70%),
    radial-gradient(30% 30% at 20% 20%, rgba(226,184,102,.18), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translate3d(-4%, 3%, 0) rotate(6deg) scale(1.08); } }
.hero__rosette { position: absolute; right: -14vw; top: 50%; width: min(78vw, 980px); aspect-ratio: 1; transform: translateY(-50%); color: var(--gold); opacity: .55; }
.hero__rosette svg { width: 100%; height: 100%; animation: spin 140s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__portrait {
  position: absolute; right: calc(var(--pad) + 6vw); top: 20vh; width: clamp(180px, 20vw, 300px); aspect-ratio: 4/5;
  border-radius: 999px 999px 18px 18px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 10px rgba(226,184,102,.06);
}
.hero__portrait video, .hero__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; filter: saturate(.85) contrast(1.05); }
.hero__portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5,8,26,.7)); }
.hero__portrait-tag { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; text-align: center; color: var(--gold-2); }
.hero__content { position: relative; z-index: 2; width: 100%; }
.hero__kicker { margin-bottom: 26px; }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 12.5vw, 220px); line-height: .86; letter-spacing: -.02em; }
.hero__title em { font-style: italic; color: var(--gold); }
.hero__title .char { display: inline-block; will-change: transform; }
.hero__bottom { margin-top: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.hero__sub { max-width: 440px; color: #c9cde0; font-size: 17px; }
.hero__sub b { color: var(--paper); font-weight: 600; }
.scroll-cue { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.scroll-cue__line { width: 1px; height: 54px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-cue__line::after { content: ""; position: absolute; left: 0; top: -30%; width: 1px; height: 30%; background: var(--paper); animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 110%; } }
@media (max-width: 820px) {
  .hero__portrait { top: 14vh; right: var(--pad); width: 42vw; }
  .hero__rosette { right: -40vw; width: 120vw; }
}

/* ---------- marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--night); }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 46px); white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee__track span::after { content: "✦"; font-size: .5em; color: var(--gold); }
.marquee__track em { color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- PROLOGUE ---------- */
.prologue { padding: 22vh var(--pad); background: var(--night); }
.prologue__grid { display: grid; grid-template-columns: 1fr 3fr; gap: 6vw; }
.prologue__text { font-family: var(--serif); font-size: clamp(30px, 4.2vw, 68px); line-height: 1.12; letter-spacing: -.01em; }
.prologue__text .w { opacity: .14; transition: none; }
.prologue__text em { color: var(--gold); }
.prologue__meta { display: flex; flex-direction: column; gap: 14px; }
.prologue__meta div { border-top: 1px solid var(--line); padding-top: 12px; }
.prologue__meta b { display: block; font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--paper); text-transform: none; letter-spacing: 0; }
@media (max-width: 820px) { .prologue__grid { grid-template-columns: 1fr; } }

/* ---------- ROUTE (pinned map) ---------- */
.route { height: 100svh; overflow: hidden; background: radial-gradient(ellipse at 60% 50%, var(--ink-2), var(--night) 70%); }
.route__head { position: absolute; top: 12vh; left: var(--pad); z-index: 3; max-width: 520px; }
.route__head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.4vw, 88px); line-height: .95; margin-top: 16px; }
.route__head h2 em { color: var(--gold); }
.route__map { position: absolute; inset: 0; }
.route__map svg { width: 100%; height: 100%; }
.route__stopcard {
  position: absolute; left: var(--pad); bottom: 10vh; z-index: 3; width: min(420px, 80vw);
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(10,16,48,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.route__stopcard .yr { font-family: var(--serif); font-size: 54px; line-height: 1; color: var(--gold); font-style: italic; }
.route__stopcard h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 6px 0 6px; }
.route__stopcard p { color: #c3c8dd; font-size: 15px; }
.route__count { position: absolute; right: var(--pad); bottom: 10vh; z-index: 3; text-align: right; }
.route__count b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 8vw, 130px); line-height: 1; letter-spacing: -.03em; }
.map-label { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; fill: var(--paper); text-transform: uppercase; }
.map-sub { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
@media (max-width: 820px) { .route__head { top: 10vh; } .route__count { display: none; } .map-label { font-size: 20px; } .map-sub { font-size: 17px; } }

/* ---------- CHAPTERS ---------- */
.chapter { padding: 20vh 0 14vh; }
.chapter__head { display: grid; grid-template-columns: auto 1fr; gap: 3vw; align-items: end; padding: 0 var(--pad); margin-bottom: 10vh; }
.chapter__num { font-family: var(--serif); font-style: italic; font-size: clamp(110px, 17vw, 300px); line-height: .75; color: transparent; -webkit-text-stroke: 1px var(--gold); opacity: .9; }
.chapter__title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7.4vw, 132px); line-height: .9; letter-spacing: -.02em; }
.chapter__title em { color: var(--gold); }
.chapter__lede { max-width: 560px; color: #c3c8dd; font-size: 18px; margin-top: 22px; }
@media (max-width: 820px) { .chapter__head { grid-template-columns: 1fr; } }

.frame { position: relative; overflow: hidden; border-radius: 6px; background: var(--ink); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.frame figcaption, .cap { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; }
.frame--arch { border-radius: 999px 999px 8px 8px; }
[data-lightbox] { cursor: zoom-in; }

/* Chapter I — arrival */
.arrival { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 0 var(--pad); align-items: center; }
.arrival__img { grid-column: 1 / 8; aspect-ratio: 3/2; }
.arrival__text { grid-column: 9 / 13; }
.arrival__text .big { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 56px); line-height: 1.05; margin-bottom: 22px; }
.arrival__text p { color: #c3c8dd; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #cd7f32; box-shadow: 0 0 10px #cd7f32; }
.badge.silver i { background: #d9dde8; box-shadow: 0 0 10px #d9dde8; }
.badge.gold i { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
@media (max-width: 820px) { .arrival__img, .arrival__text { grid-column: 1 / -1; } }

/* Chapter II — voice (horizontal) */
.voice { overflow: hidden; }
.voice__pin { height: 100svh; display: flex; align-items: center; }
.voice__track { display: flex; gap: 4vw; padding: 0 var(--pad); align-items: center; will-change: transform; }
.voice__intro { flex: 0 0 min(560px, 80vw); }
.voice__intro .chapter__num { font-size: clamp(110px, 14vw, 240px); }
.voice__card { flex: 0 0 auto; }
.voice__card .frame { height: 62svh; }
.voice__card.w-tall .frame { width: calc(62svh * .75); }
.voice__card.w-wide .frame { width: calc(62svh * 1.5); }
.voice__card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-top: 16px; }
.voice__card p { color: var(--muted); max-width: 440px; font-size: 15px; }
.voice__quote { flex: 0 0 min(620px, 80vw); font-family: var(--serif); font-size: clamp(34px, 3.8vw, 62px); line-height: 1.08; }
.voice__quote em { color: var(--gold); }
.voice__quote small { display: block; margin-top: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.voice__list { flex: 0 0 min(460px, 80vw); border-top: 1px solid var(--line); }
.voice__list li { list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.voice__list li span:last-child { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; align-self: center; text-align: right; }
@media (max-width: 820px) {
  .voice__pin { height: auto; padding: 0; }
  .voice__track { flex-direction: column; align-items: stretch; gap: 60px; transform: none !important; }
  .voice__card .frame { height: auto; width: 100% !important; aspect-ratio: 4/3; }
  .voice__card.w-tall .frame { aspect-ratio: 3/4; }
}

/* Chapter III — economist */
.econ { background: linear-gradient(180deg, var(--night), #070c26 30%, #070c26 70%, var(--night)); }
.econ__hero { padding: 0 var(--pad); display: grid; grid-template-columns: 1.35fr 1fr; gap: 4vw; align-items: stretch; }
.econ__video { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.econ__video video { width: 100%; height: 100%; object-fit: cover; }
.econ__video button { position: absolute; left: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 99px; background: rgba(5,8,26,.6); backdrop-filter: blur(10px); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.econ__video button i { width: 0; height: 0; border-left: 9px solid var(--gold); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.econ__video .tag { position: absolute; top: 18px; left: 20px; }
.econ__medal { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.medal { position: relative; width: 150px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 210deg, #f4f6fb, #9aa3b5, #eef1f7, #7b8497, #e7eaf2, #f4f6fb);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.18), inset 0 -10px 30px rgba(0,0,0,.35), 0 30px 80px rgba(217,221,232,.18);
  display: grid; place-items: center; color: #2a3044; text-align: center; }
.medal b { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; font-style: italic; }
.medal small { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.medal.bronze { background: conic-gradient(from 210deg, #f2c79a, #9b5b2b, #e8b385, #7a421c, #f0be8f, #f2c79a); color: #3b1f0c; box-shadow: inset 0 0 0 8px rgba(255,255,255,.14), inset 0 -10px 30px rgba(0,0,0,.35), 0 30px 80px rgba(205,127,50,.2); }
.medals { display: flex; gap: 20px; }
.econ__medal h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.6vw, 58px); line-height: 1; }
.econ__medal p { color: #c3c8dd; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12vh var(--pad) 0; border-top: 1px solid var(--line); }
.stat { padding: 34px 24px 0 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat + .stat { padding-left: 24px; }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 6vw, 104px); line-height: 1; letter-spacing: -.03em; }
.stat b sup { font-size: .4em; color: var(--gold); vertical-align: top; position: relative; top: .3em; }
.stat > span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 220px; }
@media (max-width: 960px) { .econ__hero { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(3) { padding-left: 0; } }
.econ__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 12vh var(--pad) 0; }
.econ__duo .frame { aspect-ratio: 4/3; }
.econ__duo .frame + .cap { margin-top: 12px; }
.econ__duo > div:nth-child(2) { margin-top: 14vh; }
@media (max-width: 820px) { .econ__duo { grid-template-columns: 1fr; } .econ__duo > div:nth-child(2) { margin-top: 0; } }
.timeline { margin: 14vh var(--pad) 0; border-top: 1px solid var(--line); }
.timeline__row { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: padding .5s var(--ease), background .4s; }
.timeline__row:hover { padding-left: 16px; background: linear-gradient(90deg, rgba(226,184,102,.07), transparent); }
.timeline__row .y { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--gold); }
.timeline__row h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.1; }
.timeline__row p { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .timeline__row { grid-template-columns: 1fr; gap: 6px; } }

/* Chapter IV — east */
.east { background: var(--night); }
.east__pattern { position: absolute; inset: 0; opacity: .08; color: var(--turq); pointer-events: none; }
.east__grid { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; padding: 0 var(--pad); }
.east__grid .frame { height: 100%; }
.e1 { grid-column: 1 / 5; grid-row: span 2; aspect-ratio: 9/16; }
.e2 { grid-column: 5 / 10; aspect-ratio: 4/3; }
.e3 { grid-column: 10 / 13; aspect-ratio: 3/4; }
.e4 { grid-column: 5 / 8; aspect-ratio: 3/4; }
.e5 { grid-column: 8 / 13; aspect-ratio: 4/3; }
.e6 { grid-column: 1 / 6; aspect-ratio: 4/3; }
.e7 { grid-column: 6 / 9; aspect-ratio: 9/16; }
.e8 { grid-column: 9 / 13; align-self: center; }
.east__note { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 42px); line-height: 1.12; }
.east__note em { color: var(--turq); }
.east__note .cap { margin-top: 20px; }
.east__chinese { position: absolute; right: var(--pad); top: 18vh; font-family: "Noto Serif SC", serif; font-size: clamp(90px, 14vw, 240px); line-height: 1; writing-mode: vertical-rl; color: transparent; -webkit-text-stroke: 1px rgba(53,208,198,.35); pointer-events: none; }
.east__awards { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 820px) {
  .east__grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .e1, .e7 { aspect-ratio: 3/4; }
  .east__chinese { display: none; }
}

/* Chapter V — builder (bento) */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(240px, auto); gap: 18px; padding: 0 var(--pad); }
.tile { position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 30px; overflow: hidden; background: linear-gradient(160deg, rgba(17,26,69,.9), rgba(10,16,48,.6)); transition: border-color .4s, transform .6s var(--ease); isolation: isolate; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(226,184,102,.16), transparent 60%); opacity: 0; transition: opacity .4s; }
.tile:hover { border-color: rgba(226,184,102,.55); }
.tile:hover::before { opacity: 1; }
.tile .mono { color: var(--gold); }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 2.8vw, 48px); line-height: 1; margin: 14px 0 12px; }
.tile p { color: #bfc5dc; font-size: 15px; max-width: 460px; }
.tile .arrow { position: absolute; top: 26px; right: 26px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s; }
.tile:hover .arrow { transform: rotate(-45deg); background: var(--gold); color: var(--night); }
.t-econ { grid-column: 1 / 8; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; }
.t-ai { grid-column: 8 / 13; }
.t-hack { grid-column: 8 / 13; padding: 0; }
.t-hack img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: -2; opacity: .6; transition: opacity .5s, transform 1s var(--ease); }
.t-hack:hover img { opacity: .85; transform: scale(1.04); }
.t-hack .inner { position: absolute; inset: 0; padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(180deg, transparent 30%, rgba(5,8,26,.9)); }
.t-forum { grid-column: 1 / 6; }
.t-research { grid-column: 6 / 9; }
.t-bot { grid-column: 9 / 13; padding: 0; }
.t-bot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
.t-bot .inner { position: absolute; inset: 0; padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(180deg, transparent 20%, rgba(5,8,26,.92)); }
.t-bank { grid-column: 1 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; min-height: 200px; }
.t-bank h3 { font-size: clamp(34px, 4vw, 66px); }
.mock { position: relative; margin-top: 30px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: #070b22; padding: 18px; overflow: hidden; }
.mock__bar { display: flex; gap: 6px; margin-bottom: 16px; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3366; }
.mock__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.mock__chart { height: 150px; border-radius: 10px; background: linear-gradient(180deg, rgba(53,208,198,.1), transparent); border: 1px solid rgba(53,208,198,.18); position: relative; }
.mock__chart svg { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.mock__q { border-radius: 10px; border: 1px solid rgba(226,184,102,.2); padding: 14px; font-size: 13px; color: #c3c8dd; }
.mock__q b { display: block; color: var(--paper); font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.mock__q span { display: block; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); margin-top: 6px; }
.mock__q span.ok { border-color: var(--turq); color: var(--turq); }
.chat { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.chat span { max-width: 80%; padding: 9px 14px; border-radius: 14px; font-size: 13px; background: rgba(255,255,255,.06); opacity: 0; transform: translateY(8px); }
.chat span.me { align-self: flex-end; background: var(--gold); color: var(--night); }
.tile.in .chat span { animation: chatIn .6s var(--ease) forwards; }
.tile.in .chat span:nth-child(2) { animation-delay: .5s } .tile.in .chat span:nth-child(3) { animation-delay: 1s }
@keyframes chatIn { to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .bento > * { grid-column: 1 / -1 !important; grid-row: auto !important; } .t-hack, .t-bot { min-height: 320px; } .t-bank { grid-template-columns: 1fr; } }

/* Chapter VI — giving back */
.give__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 0 var(--pad); align-items: start; }
.g1 { grid-column: 1 / 8; aspect-ratio: 16/8; }
.g2 { grid-column: 8 / 13; margin-top: 18vh; }
.g2 .big { font-family: var(--serif); font-size: clamp(80px, 9vw, 160px); line-height: .9; letter-spacing: -.03em; }
.g2 .big sup { font-size: .35em; color: var(--gold); }
.g3 { grid-column: 2 / 6; aspect-ratio: 16/10; margin-top: 6vh; }
.g4 { grid-column: 6 / 13; aspect-ratio: 3/2; margin-top: 14vh; }
.g5 { grid-column: 1 / 5; margin-top: 10vh; }
.g6 { grid-column: 5 / 8; aspect-ratio: 9/19; margin-top: 4vh; }
.g7 { grid-column: 8 / 13; aspect-ratio: 4/3; margin-top: 12vh; }
.give__text { font-family: var(--serif); font-size: clamp(26px, 2.5vw, 40px); line-height: 1.12; }
.give__text em { color: var(--gold); }
@media (max-width: 820px) { .give__grid > * { grid-column: 1 / -1 !important; margin-top: 0 !important; } .g6 { aspect-ratio: 3/4; } }

/* ---------- EPILOGUE ---------- */
.epilogue { min-height: 100svh; padding: 22vh var(--pad) 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(ellipse at 50% 100%, rgba(30,58,138,.55), var(--night) 60%); }
.epilogue__rosette { position: absolute; left: 50%; bottom: -55vw; width: 120vw; aspect-ratio: 1; transform: translateX(-50%); color: var(--gold); opacity: .25; pointer-events: none; }
.epilogue__rosette svg { width: 100%; height: 100%; animation: spin 200s linear infinite reverse; }
.epilogue h2 { position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 11vw, 200px); line-height: .88; letter-spacing: -.02em; }
.epilogue h2 .city-wrap { display: inline-block; position: relative; height: 1.25em; overflow: hidden; vertical-align: bottom; }
.epilogue h2 .city { display: block; font-style: italic; color: var(--gold); line-height: 1.25; padding: 0 0.05em; }
.epilogue__row { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-top: 10vh; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 14px; padding: 22px 34px; border-radius: 99px; background: var(--gold); color: var(--night); font-weight: 600; font-size: 17px; overflow: hidden; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--paper); transform: translateY(101%); border-radius: 50% 50% 0 0; transition: transform .6s var(--ease), border-radius .6s var(--ease); }
.btn:hover::before { transform: none; border-radius: 0; }
.btn > * { position: relative; }
.btn--ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.btn--ghost::before { background: var(--gold); }
.btn--ghost:hover { color: var(--night); }
.epilogue__links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer { position: relative; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 12vh; color: var(--muted); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 180; background: rgba(5,8,26,.94); display: grid; place-items: center; padding: 6vh 6vw; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 6px; box-shadow: 0 40px 120px rgba(0,0,0,.6); }
.lightbox p { margin-top: 16px; text-align: center; color: var(--muted); }
.lightbox button { position: absolute; top: 24px; right: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* v2 additions */
.prologue__kitob { margin-top: 14vh; aspect-ratio: 21/9; border-radius: 10px; }
.prologue__cap { margin-top: 12px; }
@media (max-width: 820px) { .prologue__kitob { aspect-ratio: 4/3; } }
.frame > .tag { position: absolute; left: 16px; bottom: 16px; z-index: 2; background: rgba(5,8,26,.6); backdrop-filter: blur(10px); }
.econ__video .tag.hm { top: auto; bottom: 20px; background: rgba(5,8,26,.6); backdrop-filter: blur(10px); }
.medals { flex-wrap: wrap; }
.medal.pin { border-radius: 0; background: conic-gradient(from 200deg, #f6dc9e, #a8792c, #f2d48d, #7c5419, #f6dc9e); color: #2c1c05;
  clip-path: polygon(50% 0%, 61% 12%, 77% 7%, 80% 23%, 95% 28%, 89% 43%, 100% 55%, 88% 65%, 91% 81%, 75% 83%, 67% 98%, 53% 90%, 39% 99%, 29% 85%, 13% 85%, 13% 69%, 0% 58%, 10% 45%, 4% 30%, 19% 24%, 21% 8%, 37% 11%);
  box-shadow: none; filter: drop-shadow(0 20px 40px rgba(226,184,102,.25)); }
.medal.pin b { font-size: 38px; }
.medal.pin small { font-size: 8px; }
.medal.pin .hmx { opacity: .7; }
.mock.shot { padding: 0; }
.mock.shot .mock__bar { margin: 0; padding: 12px 14px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.mock.shot .mock__bar span { margin-left: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.mock.shot img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease); }
.t-econ:hover .mock.shot img { transform: scale(1.04); }

.econ__video .tag { top: auto; bottom: 20px; left: 20px; background: rgba(5,8,26,.6); backdrop-filter: blur(10px); }
