/* =========================================================
   Muhammad Khalil — cinematic portfolio
   Palette: warm black, brass gold, cream paper, ember
   ========================================================= */
:root {
  --ink: #0d0a08;
  --ink-2: #15100c;
  --ink-3: #1d1712;
  --line: rgba(239, 228, 210, 0.12);
  --line-2: rgba(239, 228, 210, 0.22);
  --cream: #efe4d2;
  --mute: #a4968a;
  --gold: #d6a44e;
  --gold-2: #f2cd83;
  --ember: #b8642a;
  --f-d: "Bodoni Moda", "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
  --f-b: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-m: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gut: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-b);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--gold); color: var(--ink); padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gut); }

/* ---------- type ---------- */
.eyebrow, .label {
  font-family: var(--f-m);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
  font-weight: 500;
}
.display {
  font-family: var(--f-d);
  font-weight: 500;
  font-size: clamp(3rem, 7.4vw, 7.6rem);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.display em, .h2 em, .mega em, .role-title em, .footer-big em {
  color: var(--gold-2);
  font-weight: 400;
  text-shadow: 0 0 40px rgba(214, 164, 78, .35);
}
.h2 {
  font-family: var(--f-d);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.lede { font-size: clamp(1rem, 1.25vw, 1.15rem); color: #d8ccba; max-width: 46ch; margin: 0; }
.char { display: inline-block; will-change: transform, opacity; }
.word { display: inline-block; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font: 600 14px/1 var(--f-b); letter-spacing: .02em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .4s;
}
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #a8742c); color: #1a120a; box-shadow: 0 10px 40px -10px rgba(214, 164, 78, .6); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(214, 164, 78, .8); }
.btn-ghost { border-color: var(--line-2); color: var(--cream); background: rgba(239, 228, 210, .05); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- chrome: loader, grain, embers, cursor, progress ---------- */
.loader {
  position: fixed; inset: 0; z-index: 300; background: var(--ink);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s cubic-bezier(.77, 0, .18, 1);
}
.loader.done { clip-path: inset(0 0 100% 0); }
.loader-inner { display: grid; justify-items: center; gap: 18px; }
.loader-mark { font-family: var(--f-d); font-style: italic; font-size: 64px; color: var(--gold-2); line-height: 1; }
.loader-bar { width: 160px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.loader-count { font-family: var(--f-m); font-size: 12px; letter-spacing: .2em; color: var(--mute); }
html:not(.js) .loader { display: none; }

.embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: .06; will-change: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scroll-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--gold-2)); transform-origin: left; transform: scaleX(0); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 150; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(242, 205, 131, .7); border-radius: 50%; pointer-events: none;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s;
  opacity: 0; mix-blend-mode: difference;
}
.cursor.on { opacity: 1; }
.cursor.hover { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(242, 205, 131, .9); }
@media (pointer: coarse) { .cursor { display: none; } .grain { display: none; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 110;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gut) 18px;
  transition: transform .6s var(--ease), background .4s, padding .4s;
}
.site-header.scrolled { background: linear-gradient(180deg, rgba(13, 10, 8, .9), rgba(13, 10, 8, 0)); }
.site-header.hide { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(214, 164, 78, .55); font-family: var(--f-d); font-style: italic; font-size: 16px; color: var(--gold-2);
}
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.main-nav { display: flex; gap: 30px; }
.main-nav a { font-family: var(--f-m); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #cfc2b0; position: relative; padding: 4px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.main-nav a:hover { color: var(--gold-2); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.main-nav a.active { color: var(--gold-2); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(13, 10, 8, .5); cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--cream); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav-toggle span { top: 18px; }
.nav-toggle span::before { content: ""; left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(-90deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 105; background: rgba(13, 10, 8, .97);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 80px var(--gut) 40px;
  clip-path: circle(0 at calc(100% - 40px) 40px); transition: clip-path .8s cubic-bezier(.77, 0, .18, 1);
  visibility: hidden;
}
.mobile-nav.open { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; }
.mobile-nav a { font-family: var(--f-d); font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.15; text-decoration: none; opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .7s var(--ease); transition-delay: calc(.15s + var(--i) * .06s); }
.mobile-nav a.mobile-cv { font-family: var(--f-m); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-top: 24px; }
.mobile-nav.open a { opacity: 1; transform: none; }

/* ---------- scenes (pinned) ---------- */
.scene { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; contain: layout paint style; }
.scene-hero { height: 520vh; }
.scene-exp { height: 620vh; }
.scene-ach { height: 340vh; }

/* ---------- HERO ---------- */
.scene-hero .stage { background: radial-gradient(120% 90% at 50% 110%, #2a1a0e 0%, var(--ink) 60%); }
.hero-glow {
  position: absolute; left: 50%; top: 50%; width: 70vmax; height: 70vmax; margin: -35vmax 0 0 -35vmax;
  background: radial-gradient(circle, rgba(214, 164, 78, .28) 0%, rgba(184, 100, 42, .12) 32%, rgba(13, 10, 8, 0) 62%);
  pointer-events: none; will-change: transform;
}
.portrait {
  position: absolute; left: 50%; top: 50%; z-index: 20;
  width: clamp(230px, 26vw, 420px); will-change: transform, opacity; backface-visibility: hidden;
}
.portrait img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 97%);
          mask-image: linear-gradient(180deg, #000 72%, transparent 97%);
  filter: saturate(.94) contrast(1.03);
}
.flyers { position: absolute; inset: 0; pointer-events: none; contain: layout paint style; }
.fly { position: absolute; left: 0; top: 0; will-change: transform, opacity; backface-visibility: hidden; contain: layout style paint; }
.fly img { display: block; width: 100%; height: 100%; }

.chap { position: absolute; z-index: 40; max-width: min(42vw, 620px); }
.chap-0, .chap-2 { left: var(--gut); top: 50%; transform: translateY(-50%); }
.chap-1 { right: var(--gut); top: 50%; transform: translateY(-50%); max-width: min(40vw, 560px); }
.chap-3 { left: 50%; bottom: 7vh; transform: translateX(-50%); text-align: center; max-width: 900px; width: calc(100% - 2 * var(--gut)); }
.chap-3 .display { font-size: clamp(2.6rem, 6vw, 6rem); margin-bottom: 26px; }
.chap-inner { will-change: transform, opacity, filter; }
.chap-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
html.js .chap:not(.chap-0) { visibility: hidden; }

.award { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 9px 18px 9px 12px;
  border: 1px solid rgba(214, 164, 78, .5); border-radius: 999px; background: rgba(214, 164, 78, .09);
  font-family: var(--f-m); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-2); }
.award-medal { width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe7a8, #e0ad4f 55%, #8a5a1c);
  box-shadow: 0 0 0 1px rgba(122, 77, 20, .6) inset, 0 0 14px rgba(242, 205, 131, .45); }

.hero-stats { display: flex; gap: 34px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-family: var(--f-m); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.hero-stats dd { margin: 0; font-family: var(--f-d); font-size: 30px; color: var(--gold-2); line-height: 1.2; font-variant-numeric: tabular-nums; }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; display: grid; justify-items: center; gap: 10px; font-family: var(--f-m); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- sections ---------- */
.section { position: relative; padding-block: clamp(90px, 13vw, 180px); }
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 70px); }

html.js .rv { opacity: 0; transform: translateY(46px); filter: blur(8px); transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; filter: none; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo-inner { border-radius: 400px 400px 20px 20px; overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%; border: 1px solid var(--line); will-change: clip-path; }
.about-photo-inner img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 30%; will-change: transform; filter: sepia(.18) saturate(.9); }
.about-photo figcaption { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; font-family: var(--f-m); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; background: var(--ink); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 99px; color: var(--gold); }
.about-copy > p { color: #d8ccba; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 36px 0; }
.facts div { padding: 16px 0; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--f-m); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts a { text-decoration: none; }
.facts a:hover { color: var(--gold-2); }
.edu .label { margin-top: 10px; }
.edu-row { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.edu-row b { display: block; font-family: var(--f-d); font-weight: 500; font-size: 1.3rem; }
.edu-row span { color: var(--mute); font-size: 14px; }
.edu-row time { font-family: var(--f-m); font-size: 13px; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 26px 0; background: var(--ink-2); }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee span { font-family: var(--f-d); font-size: clamp(2.4rem, 6vw, 5.4rem); white-space: nowrap; line-height: 1.1; color: transparent; -webkit-text-stroke: 1px rgba(239, 228, 210, .45); }
.marquee em { color: var(--gold); -webkit-text-stroke: 0; padding: 0 .3em; font-style: normal; }

/* ---------- EXPERIENCE ---------- */
.scene-exp .stage { background: radial-gradient(90% 70% at 80% 50%, #22170f 0%, var(--ink-2) 55%, var(--ink) 100%); }
.exp-top { position: absolute; left: var(--gut); right: var(--gut); top: calc(96px + env(safe-area-inset-top, 0px)); z-index: 5; max-width: 820px; }
.exp-top .h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); margin: 0; }
.exp-rail { position: absolute; left: var(--gut); bottom: 8vh; margin: 0; padding: 0 0 0 18px; list-style: none; z-index: 6; display: grid; gap: 14px; }
.exp-rail::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.exp-rail-fill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--gold-2); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 10px var(--gold); }
.exp-rail li { display: flex; gap: 14px; align-items: baseline; font-family: var(--f-m); font-size: 12px; color: var(--mute); transition: color .4s; }
.exp-rail li b { font-weight: 500; }
.exp-rail li.on { color: var(--gold-2); }
.roles { position: absolute; left: 0; right: 0; top: calc(200px + env(safe-area-inset-top, 0px)); bottom: 0; }
.role {
  position: absolute; left: var(--gut); right: var(--gut); top: 50%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center;
  padding-left: clamp(110px, 12vw, 180px);
  transform: translateY(-50%);
}
.role-head, .role-card { will-change: transform, opacity; backface-visibility: hidden; }
.role-head { position: relative; }
.role-ghost { position: absolute; left: -0.08em; top: -.62em; font-family: var(--f-d); font-size: clamp(9rem, 17vw, 16rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(214, 164, 78, .22); z-index: -1; pointer-events: none; }
.role-dates { font-family: var(--f-m); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.role-title { font-family: var(--f-d); font-weight: 500; font-size: clamp(2.4rem, 4.6vw, 4.4rem); line-height: 1; margin: 0 0 14px; letter-spacing: -.015em; }
.role-co { font-size: 1.1rem; color: #d8ccba; margin: 0; font-weight: 600; }
.role-card {
  background: linear-gradient(160deg, rgba(239, 228, 210, .07), rgba(239, 228, 210, .015));
  border: 1px solid var(--line-2); border-radius: 22px; padding: clamp(24px, 2.6vw, 38px);
  background-color: rgba(26, 19, 13, .72);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
}
.role-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.role-card li { position: relative; padding-left: 26px; color: #ddd1bf; font-size: 15px; line-height: 1.55; }
.role-card li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 1px; background: var(--gold); }
.role-photo { margin: 22px 0 0; width: min(150px, 45%); transform: rotate(-4deg); background: #f3ead9; padding: 8px 8px 30px; border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); position: relative; }
.role-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }
.role-photo figcaption { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-family: var(--f-d); font-style: italic; font-size: 13px; color: #3a2f26; }
html.js .scene-exp:not(.static) .role { opacity: 0; }

/* ---------- SKILLS ---------- */
.skills { background: var(--ink); }
.skills-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 90px); }
.skills .label { margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.chip { will-change: transform, opacity; }
.chips .chip { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(239, 228, 210, .03); font-weight: 600; font-size: 15px; transition: border-color .3s, color .3s, background .3s; }
.chips .chip:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(214, 164, 78, .08); }
.strengths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chip-block { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--ink-2); }
.chip-block b { display: block; font-family: var(--f-d); font-weight: 500; font-size: 1.35rem; margin-bottom: 6px; color: var(--gold-2); }
.chip-block span { color: #cfc2b0; font-size: 14.5px; }
.langs { display: grid; gap: 10px; }
.lang { display: grid; grid-template-columns: 86px minmax(0, 1fr) 96px; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.lang span { font-family: var(--f-d); font-size: 1.2rem; }
.lang i { height: 2px; background: var(--line); position: relative; border-radius: 2px; overflow: hidden; }
.lang i b { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ember), var(--gold-2)); transform-origin: left; transform: scaleX(var(--lv, 0)); }
.lang em { font-family: var(--f-m); font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); text-align: right; }

/* ---------- ACHIEVEMENTS ---------- */
.scene-ach .stage { background: radial-gradient(80% 60% at 50% 55%, #26190e 0%, var(--ink) 70%); }
.ach-top { position: absolute; left: var(--gut); right: var(--gut); top: calc(96px + env(safe-area-inset-top, 0px)); z-index: 5; text-align: center; }
.ach-top .h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
.coins { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.coins .fly { opacity: .95; }
.ach-row { position: absolute; left: var(--gut); right: var(--gut); bottom: 10vh; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); max-width: 1320px; margin: 0 auto; z-index: 4; }
.ach-card {
  backface-visibility: hidden;
  padding: clamp(24px, 2.6vw, 36px); border-radius: 22px; border: 1px solid var(--line-2);
  background: linear-gradient(170deg, rgba(36, 26, 18, .92), rgba(20, 15, 11, .92));
  will-change: transform, opacity, filter; transform-origin: 50% 50%;
}
.ach-fig { display: block; font-family: var(--f-d); font-size: clamp(2.8rem, 4.6vw, 4.4rem); line-height: 1; color: var(--gold-2); margin-bottom: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 0 50px rgba(214, 164, 78, .35); }
.ach-fig small { font-family: var(--f-m); font-size: .2em; letter-spacing: .14em; vertical-align: super; margin-right: 6px; color: var(--gold); }
.ach-fig sup { font-size: .4em; font-style: italic; }
.ach-card h3 { font-family: var(--f-d); font-weight: 500; font-size: 1.35rem; margin: 0 0 8px; }
.ach-card p { margin: 0; color: #cfc2b0; font-size: 14.5px; }
.ach-card--gold { border-color: rgba(214, 164, 78, .55); background: linear-gradient(170deg, rgba(58, 40, 20, .95), rgba(24, 17, 11, .95)); }

/* ---------- TRAINING ---------- */
.training { background: var(--ink-2); border-top: 1px solid var(--line); }
.train-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.train-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease), color .3s; flex-wrap: wrap; }
.train-list li:hover { padding-left: 14px; color: var(--gold-2); }
.train-list b { font-family: var(--f-d); font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 2rem); }
.train-list span { font-family: var(--f-m); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

/* ---------- CONTACT ---------- */
.contact { background: radial-gradient(70% 50% at 50% 0%, #24170d 0%, var(--ink) 70%); overflow: hidden; }
.contact-head { text-align: center; margin-bottom: clamp(50px, 7vw, 90px); display: grid; justify-items: center; }
.contact-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--gold); padding: 4px; background: var(--ink); margin-bottom: 26px; }
.mega { font-family: var(--f-d); font-weight: 500; font-size: clamp(3.2rem, 10vw, 9.5rem); line-height: .92; letter-spacing: -.03em; margin: 0 0 22px; }
.contact-head p { color: #cfc2b0; margin: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); }
.channels { display: grid; align-content: start; border-top: 1px solid var(--line); }
.channel { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .5s var(--ease); }
.channel span { font-family: var(--f-m); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.channel b { font-weight: 600; overflow-wrap: anywhere; }
.channel i { font-style: normal; color: var(--gold); font-size: 18px; transition: transform .4s var(--ease); }
.channel:hover { padding-left: 12px; }
.channel:hover b { color: var(--gold-2); }
.channel:hover i { transform: translate(4px, -4px); }
.contact-form { background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 3vw, 38px); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-m); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); color: var(--cream); font: 500 16px/1.5 var(--f-b); padding: 10px 0; resize: vertical; transition: border-color .3s; border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.form-note { font-size: 13px; color: var(--mute); max-width: 34ch; }
.form-success { margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(214, 164, 78, .5); background: rgba(214, 164, 78, .08); color: var(--gold-2); font-size: 14px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 60px 34px; background: var(--ink); position: relative; z-index: 5; }
.footer-big { font-family: var(--f-d); font-size: clamp(3rem, 12vw, 11rem); line-height: .9; margin: 0 0 40px; letter-spacing: -.03em; }
.footer-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-m); font-size: 12px; letter-spacing: .08em; color: var(--mute); }
.footer-meta a { text-decoration: none; color: var(--gold); }

/* ---------- static fallback when a scene is not pinned ---------- */
.scene.static { height: auto !important; }
.scene.static .stage { position: relative; height: auto; overflow: visible; padding-block: clamp(90px, 13vw, 160px); }
.scene-exp.static .exp-top, .scene-ach.static .ach-top { position: relative; left: auto; right: auto; top: auto; padding-inline: var(--gut); margin: 0 auto 50px; max-width: 1240px; }
.scene-exp.static .exp-rail { display: none; }
.scene-exp.static .roles { position: relative; display: grid; gap: 70px; }
.scene-exp.static .role { position: relative; top: auto; transform: none; opacity: 1; padding-left: 0; }
.scene-ach.static .coins { display: none; }
.scene-ach.static .ach-row { position: relative; left: auto; right: auto; bottom: auto; padding-inline: var(--gut); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .ach-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-block; }
  .role { grid-template-columns: minmax(0, 1fr); padding-left: 0; gap: 26px; }
  .role-photo { display: none; }
}
@media (max-width: 760px) {
  .header-actions .btn { display: none; }
  .brand-name { display: none; }
  .chap, .chap-1, .chap-0, .chap-2 { left: var(--gut); right: var(--gut); top: auto; bottom: calc(5svh + env(safe-area-inset-bottom, 0px)); transform: none; max-width: none; }
  .chap-3 { left: var(--gut); right: var(--gut); width: auto; transform: none; bottom: calc(5svh + env(safe-area-inset-bottom, 0px)); }
  .display { font-size: clamp(2.6rem, 12vw, 3.6rem); margin-bottom: 14px; }
  .chap-3 .display { font-size: clamp(2.3rem, 10.5vw, 3.2rem); }
  .chap .lede { font-size: 15px; }
  .chap .eyebrow { margin-bottom: 10px; }
  .hero-stats { gap: 20px; margin-top: 18px; padding-top: 14px; }
  .hero-stats dd { font-size: 22px; }
  .portrait { width: min(56vw, 260px); }
  .scroll-cue { display: none; }
  .about-grid, .skills-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .about-photo { max-width: 360px; margin: 0 auto 20px; }
  .facts, .strengths { grid-template-columns: minmax(0, 1fr); }
  .lang { grid-template-columns: 70px minmax(0, 1fr) 86px; padding: 14px 16px; gap: 12px; }
  .ach-row { grid-template-columns: minmax(0, 1fr); }
  .award { font-size: 11px; padding: 8px 14px 8px 10px; }
  .channel { grid-template-columns: 80px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .rv { transition: none; opacity: 1; transform: none; filter: none; }
  .scroll-cue i { animation: none; }
  .loader { display: none; }
}
