/* ==========================================================================
   Pratekk Arvinnd Dekaate — portfolio
   Light theme · ivory / deep navy / emerald / muted gold
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin, variable) ---------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Metric-matched fallbacks (measured in Chrome against the woff2 files) */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 105.72%; ascent-override: 91.75%; descent-override: 22.70%; line-gap-override: 0%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"), local("Times New Roman"); size-adjust: 106.66%; ascent-override: 91.88%; descent-override: 24.38%; line-gap-override: 0%; }
@font-face { font-family: "JetBrains Mono Fallback"; src: local("Courier New"), local("Courier"); size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30.00%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  --bg: #FAF8F3;
  --bg-2: #F3EFE5;
  --surface: #FFFFFF;
  --ink: #0F1F3D;
  --ink-2: #2E3E5C;
  --muted: #56637A;
  --line: rgba(15, 31, 61, .12);
  --line-2: rgba(15, 31, 61, .2);
  --emerald: #0E7C66;
  --emerald-ink: #0A5E4D;
  --emerald-soft: #E1F0EB;
  --gold: #A9853A;
  --gold-ink: #7E6224;
  --gold-soft: #F3EAD3;
  --red: #B2432F;
  --red-soft: #F7E3DE;

  --f-display: "Fraunces", "Fraunces Fallback", Georgia, serif;
  --f-body: "Inter", "Inter Fallback", Arial, sans-serif;
  --f-mono: "JetBrains Mono", "JetBrains Mono Fallback", "Courier New", monospace;

  --shadow-sm: 0 1px 2px rgba(15, 31, 61, .06), 0 2px 8px rgba(15, 31, 61, .04);
  --shadow: 0 2px 4px rgba(15, 31, 61, .04), 0 12px 32px -8px rgba(15, 31, 61, .12);
  --shadow-lg: 0 4px 8px rgba(15, 31, 61, .05), 0 28px 60px -16px rgba(15, 31, 61, .22);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(15, 31, 61, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 31, 61, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 0; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold-soft); color: var(--ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

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

/* ---------- WebGL world ---------- */
#world {
  position: fixed; left: 0; top: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .8s ease;
}
#world.is-ready { opacity: 1; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Buttons & chips ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: var(--h); padding: 0 1.25em; border-radius: 999px;
  font-size: 15px; font-weight: 550; letter-spacing: .005em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn--small { --h: 38px; font-size: 14px; padding: 0 1em; }
.btn--primary { background: var(--emerald); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -6px rgba(14, 124, 102, .55); }
.btn--primary:hover { background: var(--emerald-ink); transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1b2f57; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn__meta { font-family: var(--f-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px; line-height: 1; padding: 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.chips--sm li { font-size: 12.5px; padding: 7px 10px; }

.kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--emerald-ink); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.h2 { font-family: var(--f-display); font-size: clamp(30px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -.015em; font-weight: 450; max-width: 22ch; }
.eyebrow { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); display: inline-block; flex: none; }
.dot--live { box-shadow: 0 0 0 4px rgba(14, 124, 102, .15); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); transition: background-color .3s ease, box-shadow .3s ease; }
.nav.is-scrolled { background: rgba(250, 248, 243, .82); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.nav__inner { height: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.nav__mark { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.nav__mono { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--bg); font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.nav__name { font-family: var(--f-display); font-size: 18px; font-weight: 500; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { text-decoration: none; font-size: 14.5px; color: var(--ink-2); position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav__links a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow-x: clip; padding: calc(var(--nav-h) + 48px) 0 56px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 18px; }
.hero__name { font-family: var(--f-display); font-size: clamp(46px, 5.4vw, 78px); line-height: .98; letter-spacing: -.025em; font-weight: 450; }
.hero__role { font-size: 18px; color: var(--ink-2); max-width: 32ch; }
.hero__rotate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5em; font-size: 18px; }
.hero__rotate-label { color: var(--muted); }
.rotator { display: inline-grid; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 1.3em; color: var(--emerald-ink); line-height: 1.25; }
.rotator > span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(.45em); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.rotator > span.is-active { opacity: 1; transform: none; }
.rotator > span.is-leaving { opacity: 0; transform: translateY(-.45em); }
.hero__lede { font-size: 17.5px; color: var(--ink-2); max-width: 54ch; }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Orbit + portrait */
.hero__visual { display: flex; justify-content: center; }
.orbit { --size: min(560px, 44vw); --r-outer: calc(var(--size) * .55); --r-inner: calc(var(--size) * .38); position: relative; width: var(--size); height: calc(var(--size) * 1.06); display: grid; place-items: center; }
.orbit__ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; z-index: 3; animation: spin 90s linear infinite; }
.orbit__ring--inner { animation-duration: 70s; animation-direction: reverse; }
.orbit__ring::before { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(169, 133, 58, .45); }
.orbit__ring--outer::before { width: calc(var(--r-outer) * 2); height: calc(var(--r-outer) * 2); left: calc(var(--r-outer) * -1); top: calc(var(--r-outer) * -1); border-color: rgba(15, 31, 61, .14); }
.orbit__ring--inner::before { width: calc(var(--r-inner) * 2); height: calc(var(--r-inner) * 2); left: calc(var(--r-inner) * -1); top: calc(var(--r-inner) * -1); }
.slot { position: absolute; left: 0; top: 0; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(var(--a) * -1)); }
.orbit__ring--outer .slot { --r: var(--r-outer); }
.orbit__ring--inner .slot { --r: var(--r-inner); }
.chip {
  position: absolute; left: 0; top: 0; translate: -50% -50%;
  animation: spin 90s linear infinite reverse;
  font-size: 12.5px; line-height: 1; white-space: nowrap; padding: 8px 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.orbit__ring--outer { z-index: 2; }
.orbit__ring--inner { z-index: 3; }
.orbit__ring--inner .chip { animation-duration: 70s; animation-direction: normal; }
/* outer ring: quiet mono labels that pass beneath the gold chips */
.orbit__ring--outer .chip { background: rgba(250, 248, 243, .9); border-color: transparent; box-shadow: none; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); padding: 5px 8px; }
.orbit__ring--outer .chip::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--emerald); margin-right: 7px; vertical-align: middle; }
.chip--gold { background: #FFFDF7; border-color: rgba(169, 133, 58, .35); color: var(--gold-ink); }
@keyframes spin { to { rotate: 360deg; } }

.portrait { position: relative; z-index: 4; margin: 0; width: calc(var(--size) * .5); top: -2%; }
.portrait__frame { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #E3DFDA; box-shadow: var(--shadow-lg); outline: 1px solid rgba(15, 31, 61, .08); }
.portrait__frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 12px; pointer-events: none; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__badge {
  position: absolute; left: 50%; bottom: -18px; translate: -50% 0;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: 12.5px; box-shadow: var(--shadow);
}
.portrait__sep { color: var(--gold); }

/* Stats */
.stats { margin: 64px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .86); box-shadow: var(--shadow-sm); }
.stat { padding: 20px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat__fig { font-size: 26px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.stat dd { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; scroll-margin-top: var(--nav-h); }
.section--paper { background: linear-gradient(180deg, rgba(243, 239, 229, .0), rgba(243, 239, 229, .82) 12%, rgba(243, 239, 229, .82) 88%, rgba(243, 239, 229, 0)); }
.section__head { margin-bottom: 48px; }
.section__sub { margin-top: 14px; color: var(--muted); font-size: 15px; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1040px; color: var(--ink-2); margin-bottom: 56px; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; perspective: 1200px; }
.pillar { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 24px; box-shadow: var(--shadow); }
.pillar::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: linear-gradient(90deg, var(--emerald), var(--gold)); border-radius: 0 0 2px 2px; }
.pillar__no { font-size: 12px; color: var(--gold-ink); }
.pillar h3 { font-family: var(--f-display); font-size: 22px; line-height: 1.2; margin: 10px 0 10px; }
.pillar p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- Story ---------- */
.story { position: relative; }
.chapter { min-height: 100vh; display: flex; align-items: center; scroll-margin-top: 0; }
.chapter__wrap { display: flex; }
.chapter__card { max-width: 30rem; padding: 32px 0; }
.chapter__no { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 18px; }
.chapter__title { font-family: var(--f-display); font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -.02em; font-weight: 450; margin-bottom: 18px; }
.chapter__copy { font-size: 18px; color: var(--ink-2); margin-bottom: 22px; max-width: 34ch; }

/* ---------- Experience ---------- */
.timeline { position: relative; display: grid; gap: 22px; perspective: 1400px; }
.timeline::before { content: ""; position: absolute; left: 206px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--gold), var(--line-2) 30%, var(--line-2)); }
.job { position: relative; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 52px; }
.job::before { content: ""; position: absolute; left: 201px; top: 30px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--emerald); }
.job__meta { display: flex; flex-direction: column; gap: 2px; padding-top: 24px; text-align: right; font-size: 13.5px; color: var(--muted); }
.job__meta .mono { color: var(--ink); font-size: 13px; }
.job__body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.job__role { font-family: var(--f-display); font-size: 22px; line-height: 1.25; }
.job__org { color: var(--emerald-ink); font-weight: 550; font-size: 15px; margin: 4px 0 14px; }
.job__list { display: grid; gap: 8px; margin-bottom: 18px; }
.job__list li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.job__list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 1px; background: var(--gold); }
.job--compact .job__body { background: rgba(255, 255, 255, .6); box-shadow: none; }
.job--compact .job__org { margin-bottom: 6px; }
.job__note { font-size: 15px; color: var(--ink-2); }

/* ---------- Finance Lab ---------- */
.lab { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.lab__tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.lab__tabs::-webkit-scrollbar { display: none; }
.lab__tab { flex: none; border: 1px solid transparent; background: transparent; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.lab__tab:hover { color: var(--ink); }
.lab__tab[aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); font-weight: 550; }
.lab__panel { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.lab__info { padding: 30px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.lab__title { font-family: var(--f-display); font-size: 26px; line-height: 1.15; }
.lab__desc { font-size: 15px; color: var(--ink-2); min-height: 9.6em; }
.lab__used { margin-top: auto; padding: 14px 16px; border-radius: 10px; background: var(--emerald-soft); font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; min-height: 7.6em; }
.lab__used-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-ink); }
.lab__stage { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lab__canvas-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.lab__canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab__controls { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; font-size: 14px; color: var(--ink-2); }
.ctl { display: flex; flex-direction: column; gap: 6px; min-width: 200px; flex: 1 1 200px; }
.ctl__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.ctl__val { font-family: var(--f-mono); color: var(--ink); }
.ctl input[type="range"] { width: 100%; accent-color: var(--emerald); height: 22px; margin: 0; }
.ctl-note { font-family: var(--f-mono); font-size: 13px; line-height: 1.5; color: var(--ink); flex: 1 1 240px; min-height: 3em; display: flex; align-items: center; }

/* ---------- AI demo ---------- */
.ai { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.ai__text { display: grid; gap: 16px; color: var(--ink-2); }
.ai__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--muted); }
.ai__legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw--ok { background: var(--emerald); }
.sw--hold { background: var(--red); }
.sw--review { background: var(--gold); }
.ai__demo { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ai__bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ai__summary { margin-left: auto; font-size: 12.5px; color: var(--ink-2); min-width: 17em; text-align: right; }
.ai__table-wrap { overflow-x: auto; }
.ai__table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ai__table th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom; }
.ai__table th small { font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.ai__table td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); height: 44px; transition: background-color .3s ease; }
.ai__table tr:last-child td { border-bottom: 0; }
.ai__table .bad { color: var(--red); font-weight: 600; }
.ai__table tr.is-scan td { background: rgba(169, 133, 58, .1); }
.res { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: var(--bg-2); min-width: 14.5em; white-space: nowrap; }
.res__short { display: none; }
.res--ok { background: var(--emerald-soft); color: var(--emerald-ink); }
.res--hold { background: var(--red-soft); color: var(--red); }
.res--review { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- Skills / Education ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.skill h3 { font-family: var(--f-display); font-size: 20px; margin-bottom: 14px; }
.skill .chips li { background: var(--bg); }
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; perspective: 1200px; }
.edu__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.edu__card--wide { grid-column: 1 / -1; }
.edu__tag { font-size: 12px; color: var(--gold-ink); margin-bottom: 10px; letter-spacing: .04em; }
.edu__card h3 { font-family: var(--f-display); font-size: 24px; line-height: 1.2; }
.edu__org { color: var(--emerald-ink); font-weight: 550; font-size: 15px; margin-top: 6px; }
.edu__note { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.edu__card--wide .chips li { background: var(--bg); }

/* ---------- Contact ---------- */
.contact__card { position: relative; background: var(--ink); color: var(--bg); border-radius: 22px; padding: clamp(32px, 6vw, 72px); box-shadow: var(--shadow-lg); overflow: hidden; }
.contact__card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.contact__card > * { position: relative; }
.contact .kicker { color: #8FD3C1; }
.contact__title { font-size: clamp(44px, 7vw, 84px); }
.contact__lede { margin: 16px 0 30px; color: rgba(250, 248, 243, .78); max-width: 48ch; font-size: 18px; }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }
.contact__addr { font-size: clamp(16px, 2.6vw, 26px); color: #fff; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact .btn--ghost { background: transparent; color: var(--bg); border-color: rgba(250, 248, 243, .35); box-shadow: none; min-width: 8.5em; }
.contact .btn--ghost:hover { border-color: var(--bg); }
.contact__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; border-top: 1px solid rgba(250, 248, 243, .14); padding-top: 24px; }
.contact__list li { display: flex; flex-direction: column; gap: 4px; font-size: 15px; min-width: 0; }
.contact__list a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.contact__list a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.contact__k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(250, 248, 243, .55); }

/* ---------- Footer ---------- */
.footer { padding: 28px 0 40px; font-size: 13.5px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding-top: 22px; }

/* ---------- Back to top ---------- */
.totop { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s, visibility .3s; }
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop svg { width: 100%; height: 100%; display: block; }
.totop__track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.totop__ring { fill: none; stroke: var(--emerald); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 24px 24px; }
.totop__arrow { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Reveal initial states (JS only; transform/opacity only) ---------- */
.js [data-reveal], .js [data-hero], .js [data-ch] { opacity: 0; }
.reduced [data-reveal], .reduced [data-hero], .reduced [data-ch] { opacity: 1 !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .lab__panel { grid-template-columns: minmax(0, 1fr); }
  .lab__info { border-right: 0; border-bottom: 1px solid var(--line); }
  .lab__desc, .lab__used { min-height: 0; }
  .ai { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { min-height: 0; padding-top: calc(var(--nav-h) + 28px); }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero__visual { order: 2; }
  .orbit { --size: min(92vw, 440px); }
  .about { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .timeline::before { left: 7px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-left: 30px; }
  .job::before { left: 2px; top: 5px; }
  .job__meta { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; padding-top: 0; text-align: left; }
  .chapter__card { max-width: 100%; }
}

@media (max-width: 600px) {
  .nav__name { display: none; }
  .hero__name { font-size: clamp(42px, 13vw, 56px); }
  .hero__role, .hero__rotate { font-size: 16.5px; }
  .hero__lede { font-size: 16px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .hero__cta .btn--primary { flex-basis: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 52px; }
  .stat { padding: 16px; }
  .stat:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .stat:nth-child(2n) { border-left: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; border-left: 0; }
  .stat__fig { font-size: 22px; }
  .pillars, .skills, .edu { grid-template-columns: minmax(0, 1fr); }
  .chips li { white-space: normal; max-width: 100%; line-height: 1.3; }
  .lab__stage { padding: 12px; }
  .lab__info { padding: 22px 18px; }
  .lab__canvas-wrap { aspect-ratio: 4 / 3.4; }
  .ai__summary { flex-basis: 100%; margin-left: 0; text-align: left; }
  .ai__table thead { display: none; }
  .ai__table, .ai__table tbody { display: block; }
  .ai__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .ai__table tr:last-child { border-bottom: 0; }
  .ai__table td { padding: 0; border: 0; height: auto; font-size: 12px; }
  .ai__table td:nth-child(1) { grid-area: 1 / 1; font-weight: 600; }
  .ai__table td:nth-child(5) { grid-area: 1 / 2; justify-self: end; }
  .ai__table td:nth-child(2) { grid-area: 2 / 1; color: var(--muted); }
  .ai__table td:nth-child(3) { grid-area: 3 / 1; color: var(--muted); }
  .ai__table td:nth-child(4) { grid-area: 2 / 2 / 4 / 3; justify-self: end; color: var(--muted); }
  .ai__table td:nth-child(2)::before { content: "nights billed / booked  "; white-space: pre; }
  .ai__table td:nth-child(3)::before { content: "rate billed / agreed  "; white-space: pre; }
  .ai__table .res { min-width: 10.5em; font-size: 11px; }
  .res__long { display: none; }
  .res__short { display: inline; }
  .contact__list { grid-template-columns: minmax(0, 1fr); }
  .totop { right: 14px; bottom: 14px; }
}

/* ---------- Phones & tablets (touch): story layout, no backdrop-filter ---------- */
@media (hover: none) and (pointer: coarse) {
  .nav.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(250, 248, 243, .97); }
}
@media (max-width: 860px) {
  .chapter { min-height: 100vh; align-items: flex-end; padding-bottom: 8vh; }
  .chapter__card { background: rgba(250, 248, 243, .92); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
  .chapter__title { font-size: clamp(30px, 8.4vw, 40px); }
  .chapter__copy { font-size: 16px; max-width: none; }
}

/* Single orbit ring with cycling chips on small screens */
@media (max-width: 600px) {
  .orbit { --size: min(84vw, 400px); }
  .orbit__ring--outer { display: none; }
  .orbit__ring--inner { --r-inner: calc(var(--size) * .4); }
  .portrait { width: calc(var(--size) * .46); }
  .chip { font-size: 11px; padding: 6px 9px; transition: opacity .45s ease; }
}
.orbit--mobile .chip.is-swapping { opacity: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .orbit__ring, .chip { animation: none !important; }
  .rotator > span { transition: none; }
  .btn, .totop { transition: none; }
}
