/* Resume engine — shared FX + layout for all five lane resumes.
   Lanes override the custom properties below in their inline theme block.
   Every hidden-until-revealed state is gated on html.js-motion so no-JS / print stays readable. */

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --bg: #08070C;
  --bg2: #110E19;
  --ink: #F3F0FA;
  --muted: #A39DB4;
  --a1: #FFBD5F;
  --a2: #FF3D8B;
  --a3: #3DF5FF;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(20, 17, 30, .55);
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 50%, var(--a3));
  --f-display: system-ui, sans-serif;
  --f-mono: ui-monospace, monospace;
  --f-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1080px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-size: 15px; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--a2); color: var(--bg); }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--a1) 50%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--a1); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; border-radius: 4px; }
strong { color: #fff; font-weight: 650; }
.mono { font-family: var(--f-mono); }
.skip-link { position: absolute; left: -999px; top: 1rem; z-index: 999; background: var(--a1); color: var(--bg); padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grad {
  background: var(--grad); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 7s linear infinite;
}
@keyframes gradShift { to { background-position: 200% 0; } }

/* ---------- global FX ---------- */
.fx-grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(1%,3%)} }
.fx-scan {
  position: fixed; inset: 0; z-index: 89; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
}
.fx-vignette {
  position: fixed; inset: 0; z-index: 88; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55));
}

.xpbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; background: rgba(255,255,255,.05); }
.xpbar__fill {
  display: block; height: 100%; transform-origin: left; transform: scaleX(var(--p, 0));
  background: var(--grad); box-shadow: 0 0 12px var(--a2);
}
.xpbar__label { position: absolute; right: .75rem; top: 8px; font: .68rem var(--f-mono); color: var(--a1); opacity: .75; letter-spacing: .08em; }

.reticle {
  position: fixed; top: 0; left: 0; width: 30px; height: 30px; z-index: 200; pointer-events: none;
  margin: -15px 0 0 -15px; border: 1.5px solid var(--a1); border-radius: 50%;
  box-shadow: 0 0 12px var(--a1); mix-blend-mode: screen; opacity: 0;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), border-color .25s, background .25s;
}
.reticle::after { content: ''; position: absolute; inset: 50%; width: 4px; height: 4px; margin: -2px; background: var(--a1); border-radius: 50%; }
.reticle.is-hot { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--a2); background: color-mix(in srgb, var(--a2) 14%, transparent); }
html.has-reticle .reticle { opacity: 1; }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 500; background: #000; display: none; place-items: center;
  transition: opacity .45s, visibility .45s;
}
html.is-booting .boot { display: grid; }
html.is-booting body { overflow: hidden; }
.boot.is-done { opacity: 0; visibility: hidden; }
.boot.is-flash { animation: crtOn .5s var(--ease) forwards; }
@keyframes crtOn {
  0% { filter: brightness(1); transform: scale(1,1); }
  45% { filter: brightness(6); transform: scale(1,.004); }
  100% { filter: brightness(10); transform: scale(0,.004); opacity: 0; }
}
.boot__inner { width: min(560px, 88vw); font: clamp(.8rem, 2vw, 1rem) var(--f-mono); color: var(--a1); text-shadow: 0 0 8px var(--a1); }
.boot__line { min-height: 1.7em; white-space: pre; }
.boot__line:last-child { font-size: 1.6em; color: #fff; text-shadow: 0 0 12px var(--a2), 0 0 28px var(--a1); margin-top: .6rem; }
.boot__skip { position: absolute; bottom: 1.5rem; right: 1.5rem; background: none; border: 1px solid color-mix(in srgb, var(--a1) 40%, transparent); color: var(--a1); padding: .35rem .8rem; border-radius: 4px; cursor: pointer; font: .75rem var(--f-mono); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 110;
  width: min(var(--max), calc(100% - 1.5rem)); display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .45rem .5rem .45rem 1rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bg2) 60%, transparent);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--line); transition: transform .4s var(--ease);
}
.nav.is-hidden { transform: translate(-50%, -150%); }
.nav__mark { font: 700 .85rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.nav__mark b { color: var(--a1); }
.nav__menu { list-style: none; display: flex; gap: .1rem; margin: 0; padding: 0; }
.nav__menu a { display: block; padding: .45rem .8rem; border-radius: 999px; text-decoration: none; font-size: .85rem; color: var(--muted); transition: color .2s, background .2s; }
.nav__menu a:hover, .nav__menu a.is-on { color: var(--ink); background: rgba(255,255,255,.07); }
.btn-pdf {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .55rem 1.05rem; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: .85rem;
  color: var(--bg); background: var(--a1); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn-pdf:hover { color: var(--bg); background: #fff; transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--a1) 45%, transparent); }
@media (max-width: 820px) { .nav__menu { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; isolation: isolate;
  padding: 7rem var(--pad) 4rem; overflow: hidden;
}
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__glow {
  position: absolute; inset: auto -20% -40% -20%; height: 80%; z-index: -2; pointer-events: none; filter: blur(60px); opacity: .55;
  background: radial-gradient(40% 50% at 30% 50%, color-mix(in srgb, var(--a2) 55%, transparent), transparent 70%),
              radial-gradient(35% 45% at 70% 60%, color-mix(in srgb, var(--a3) 45%, transparent), transparent 70%);
}
.hero__inner { position: relative; width: min(var(--max), 100%); margin: 0 auto; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); } }
.hero__art { position: relative; justify-self: center; width: min(380px, 80vw); aspect-ratio: 1; }
@media (max-width: 899px) { .hero__art { width: min(300px, 70vw); order: -1; } }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem; font: .74rem var(--f-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--a1); padding: .4rem .8rem; border: 1px solid color-mix(in srgb, var(--a1) 35%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--a1) 8%, transparent);
}
.kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 10px var(--a1); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

.hero h1 {
  font-family: var(--f-display); font-weight: 800; line-height: .92; letter-spacing: -.03em;
  font-size: clamp(3rem, 10.5vw, 7.4rem); margin: 1.1rem 0 .35rem;
}
.hero h1 .word { display: inline-block; white-space: nowrap; }
.hero h1 .char { display: inline-block; }
html.js-motion .hero h1 .char { opacity: 0; transform: translateY(.6em) rotate(8deg); filter: blur(8px); }
html.js-motion.is-live .hero h1 .char {
  opacity: 1; transform: none; filter: none;
  transition: opacity .7s var(--ease), transform .8s var(--spring), filter .7s var(--ease);
  transition-delay: calc(var(--ci) * 38ms + 120ms);
}
.aka { font: .85rem var(--f-mono); color: var(--muted); letter-spacing: .06em; }
.role-line {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.15;
  margin: 1rem 0 1.4rem; max-width: 24em;
}
.contact { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.contact li > * {
  display: inline-flex; align-items: center; padding: .4rem .8rem; border-radius: 999px; font-size: .8rem; text-decoration: none;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink); transition: border-color .2s, transform .2s var(--ease), color .2s;
}
.contact li > a:hover { border-color: var(--a1); color: var(--a1); transform: translateY(-2px); }
.contact li:first-child > * { color: var(--a1); border-color: color-mix(in srgb, var(--a1) 35%, transparent); }

.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1.6rem 2.6rem; margin-top: 2.2rem; }
.stat__num { font: 800 clamp(1.8rem, 4vw, 2.6rem)/1 var(--f-display); }
.stat__label { font: .7rem var(--f-mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: .35rem; }
@media (max-width: 480px) { .stats { gap: 1.2rem 1.4rem; } }

.scroll-cue { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); font: .68rem var(--f-mono); letter-spacing: .3em; color: var(--muted); text-transform: uppercase; text-decoration: none; }
.scroll-cue::after { content: ''; display: block; width: 1px; height: 34px; margin: .6rem auto 0; background: linear-gradient(var(--a1), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

html.js-motion .hero .rise { opacity: 0; transform: translateY(26px); filter: blur(10px); }
html.js-motion.is-live .hero .rise {
  opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms + 350ms);
}

/* ---------- sections ---------- */
main { position: relative; z-index: 1; }
.sec { width: min(var(--max), 100% - 2 * var(--pad)); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7rem) 0 0; }
.chap { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 2rem; }
.chap__num {
  font: 800 clamp(3rem, 8vw, 5.5rem)/.8 var(--f-display); color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--a1) 70%, transparent);
}
.chap h2 { font: 700 clamp(1.5rem, 3.6vw, 2.4rem)/1 var(--f-display); margin: 0; letter-spacing: -.01em; }
.chap__rule { flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, var(--line), transparent); }

.summary { font-size: clamp(1.1rem, 2.1vw, 1.45rem); line-height: 1.55; max-width: 46ch; margin: 0; color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.summary strong { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--a2) 40%, transparent) 0); }

.panel {
  position: relative; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.skills { display: grid; gap: 1rem; }
@media (min-width: 720px) { .skills { grid-template-columns: repeat(3, 1fr); } }
.skill { padding: 1.3rem 1.3rem 1.1rem; transform-style: preserve-3d; transition: transform .35s var(--ease), border-color .3s; }
.skill:hover { border-color: color-mix(in srgb, var(--a1) 45%, transparent); }
.skill h3 { font: .75rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--a1); margin: 0 0 .9rem; display: flex; justify-content: space-between; }
.skill h3 span { color: var(--muted); }
.skill ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.skill li { font-size: .85rem; padding: .32rem .7rem; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: background .2s, color .2s, transform .2s var(--ease); }
.skill li:hover { background: color-mix(in srgb, var(--a1) 18%, transparent); color: #fff; transform: translateY(-2px); }

/* animated conic border for proof cards */
.proof { display: grid; gap: 1.1rem; }
@media (min-width: 720px) { .proof { grid-template-columns: 1fr 1fr; } }
.proof-card { padding: 1.6rem; overflow: hidden; }
.proof-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 60%, var(--a1), var(--a2), var(--a3), transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite;
}
.proof-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--a1) 16%, transparent), transparent 70%);
}
.proof-card:hover::after { opacity: 1; }
@keyframes spin { to { --angle: 360deg; } }
.proof-card h3 { font: 700 1.15rem/1.25 var(--f-display); margin: 0 0 .5rem; }
.proof-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.proof-card a { color: var(--a1); }

/* timeline */
.timeline { position: relative; padding-left: clamp(1.4rem, 4vw, 2.6rem); }
.timeline::before, .timeline__fill { content: ''; position: absolute; left: 5px; top: .4rem; bottom: .4rem; width: 2px; border-radius: 2px; background: var(--line); }
.timeline__fill { background: var(--grad); transform-origin: top; transform: scaleY(var(--tl, 0)); box-shadow: 0 0 10px var(--a2); }
.job { position: relative; padding: 1.35rem 1.4rem 1.2rem; margin-bottom: 1rem; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.job::before {
  content: ''; position: absolute; top: 1.7rem; left: calc(-1 * clamp(1.4rem, 4vw, 2.6rem) + 0px); width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--a1); box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--a1);
}
.job:hover { transform: translateX(6px); border-color: color-mix(in srgb, var(--a1) 40%, transparent); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--a2) 45%, transparent); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; }
.job-org { font: 700 clamp(1.15rem, 2.4vw, 1.45rem)/1.2 var(--f-display); margin: 0; }
.job-dates { font: .78rem var(--f-mono); color: var(--a1); letter-spacing: .05em; white-space: nowrap; padding: .2rem .55rem; border-radius: 6px; background: color-mix(in srgb, var(--a1) 10%, transparent); }
.job-title { font-weight: 650; color: color-mix(in srgb, var(--a3) 75%, var(--ink)); margin-top: .3rem; }
.job-meta { font: .78rem var(--f-mono); color: var(--muted); margin: .15rem 0 .7rem; }
.job-overview { color: var(--muted); margin: 0 0 .6rem; max-width: 70ch; }
.job ul { margin: 0; padding-left: 1.1rem; }
.job li { margin-bottom: .35rem; max-width: 75ch; }
.job li::marker { color: var(--a1); }
.job .light { font-size: .85rem; color: var(--muted); font-style: italic; margin: .6rem 0 0; }
.job.compact { padding-top: 1rem; padding-bottom: .9rem; }
.job.compact .job-org { font-size: 1.05rem; }
.job.compact li { font-size: .88rem; }
.job.compact::before { width: 9px; height: 9px; top: 1.35rem; margin-left: 1.5px; }

.edu { display: grid; gap: 1rem; }
@media (min-width: 720px) { .edu { grid-template-columns: 1fr 1fr; } }
.edu-item { padding: 1.3rem 1.4rem; }
.edu-item strong { display: block; font: 700 1.05rem/1.3 var(--f-display); margin-bottom: .4rem; }
.edu-item span { font-size: .85rem; color: var(--muted); }

/* footer */
.foot { width: min(var(--max), 100% - 2 * var(--pad)); margin: clamp(4rem, 10vw, 8rem) auto 0; padding: 0 0 2.5rem; text-align: center; }
.foot__cta { font: 800 clamp(1.4rem, 4.6vw, 3.6rem)/1.05 var(--f-display); text-decoration: none; display: inline-block; max-width: 100%; overflow-wrap: anywhere; letter-spacing: -.02em; }
.foot__cta:hover { color: transparent; }
.foot__row { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between; font: .75rem var(--f-mono); color: var(--muted); }

/* ---------- reveals ---------- */
html.js-motion .reveal { opacity: 0; transform: translateY(46px); }
html.js-motion .reveal.is-in { opacity: 1; transform: none; transition: opacity .75s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js-motion .job.reveal.is-in:hover { transform: translateX(6px); transition-delay: 0s; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js-motion .reveal, html.js-motion .hero .rise, html.js-motion .hero h1 .char { opacity: 1 !important; transform: none !important; filter: none !important; }
  .fx-grain, .reticle, .hero__fx { display: none !important; }
}

/* ---------- print (index.print.html / resume.pdf stay the primary print path) ---------- */
@media print {
  .fx-grain, .fx-scan, .fx-vignette, .xpbar, .reticle, .boot, .nav, .hero__fx, .hero__glow, .hero__art, .scroll-cue, .stats, .timeline::before, .timeline__fill, .foot__cta { display: none !important; }
  html, body { background: #fff !important; color: #111 !important; }
  html.js-motion .reveal, html.js-motion .hero .rise, html.js-motion .hero h1 .char { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero { min-height: 0; padding: 0 0 1rem; }
  .hero h1 { font-size: 26pt; }
  .grad, .hero h1, .role-line { color: #111 !important; -webkit-text-fill-color: #111 !important; background: none !important; }
  .panel { background: none !important; border: 0 !important; backdrop-filter: none !important; padding: .3rem 0 !important; }
  .sec { padding-top: 1rem; width: 100%; }
  .chap__num { display: none; }
  strong, .job-org, .edu-item strong { color: #111 !important; }
  .job { break-inside: avoid; }
  .job::before, .proof-card::before, .proof-card::after { display: none; }
  .timeline { padding-left: 0; }
}

/* v4 Google Play block */
.play-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.play-card h3 a{color:inherit;text-decoration:none;border-bottom:1px solid currentColor}
.play-card .play-n{font-family:var(--f-mono);font-size:1.05rem;color:var(--a1);margin:.35rem 0}
.play-card .play-url{font-family:var(--f-mono);font-size:.68rem;opacity:.6;word-break:break-all;margin-top:.5rem}

/* failsafe: html.motion-done is added 3s after load by the inline head script; nothing may stay hidden */
html.motion-done.is-booting .boot{display:none!important}html.motion-done.is-booting body{overflow:auto!important}
html.motion-done .hero .rise,html.motion-done .hero h1 .char{opacity:1!important;transform:none!important;filter:none!important}
html.motion-done:not(.motion-ok) .reveal{opacity:1!important;transform:none!important}
