:root {
  --bg: #f7f4ee; --paper: #ffffff; --ink: #0b0b0c; --muted: #4a463f; --line: #d8d2c5;
  --signal: #c2410c; --signal-on: #ffffff; --ok: #0f9d58;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0a0a0b; --paper: #151517; --ink: #f6f2ea; --muted: #bdb7ab; --line: #34312d; --signal: #ffb020; --signal-on: #0a0a0b; --ok: #3ddc97; }
}
:root[data-theme="dark"] { --bg: #0a0a0b; --paper: #151517; --ink: #f6f2ea; --muted: #bdb7ab; --line: #34312d; --signal: #ffb020; --signal-on: #0a0a0b; --ok: #3ddc97; }

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
html.theming *, html.theming *::before, html.theming *::after { transition: background-color .35s, color .35s, border-color .35s !important; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 90; }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); }
.small { font-size: .78rem; letter-spacing: .09em; font-weight: 500; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: 1.02; margin: 0; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand { font: 800 1.15rem var(--display); text-decoration: none; letter-spacing: -.02em; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { position: relative; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .96rem; transition: color .2s; }
nav a:not(.navbtn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease); }
nav a:hover, nav a[aria-current="true"] { color: var(--ink); }
nav a:hover::after, nav a[aria-current="true"]::after { transform: scaleX(1); }
.navbtn { border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 16px; color: var(--ink) !important; transition: background .25s, color .25s !important; }
.navbtn:hover { background: var(--ink); color: var(--bg) !important; }
.theme { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.theme:hover { border-color: var(--ink); }
.theme svg { width: 17px; height: 17px; }

/* ---------- buttons / links ---------- */
.btn { font: 600 .98rem var(--body); display: inline-block; padding: 13px 24px; border-radius: 999px; border: 1.5px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 0% 100%; color: var(--ink); text-decoration: none; cursor: pointer; transition: background-size .35s var(--ease), color .25s, transform .2s; }
.btn:hover { background-size: 100% 100%; color: var(--bg); transform: translateY(-2px); }
.btn.primary { background-color: var(--signal); border-color: var(--signal); color: var(--signal-on); }
.btn.primary:hover { background-image: linear-gradient(var(--ink), var(--ink)); color: var(--bg); border-color: var(--ink); }
.link { font-weight: 600; text-decoration: none; padding-bottom: 2px; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 100% 2px; transition: background-size .3s var(--ease), color .25s; }
.link:hover { background-size: 100% 100%; color: var(--bg); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; padding: 56px 0 72px; min-height: calc(100svh - 60px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 .82rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.hero h1 { font-size: clamp(2rem, 4.3vw, 3.9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.04; margin-bottom: 20px; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--signal); display: inline-block; transform-origin: 50% 0; animation: hangsway 4.6s ease-in-out infinite; }
@keyframes hangsway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 42ch; margin: 0 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hanging things (ID card + badges) ---------- */
.straps { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.straps path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.straps .rail { stroke-width: 5; opacity: .9; }
.straps .hook { fill: var(--bg); stroke: var(--ink); stroke-width: 3; }
.hang { position: relative; z-index: 2; transform-origin: 50% 0; cursor: grab; touch-action: pan-y; user-select: none; will-change: transform; transform-style: preserve-3d; }
.hang:active { cursor: grabbing; animation: none; }
.hang { animation: idlesway 9.4s ease-in-out infinite; }
@keyframes idlesway { 0%, 50%, 100% { rotate: 0deg; } 25% { rotate: .9deg; } 75% { rotate: -.9deg; } }
.face { position: absolute; inset: 0; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .85s cubic-bezier(.3, 1.28, .45, 1); box-shadow: 0 30px 60px -28px rgba(10, 20, 40, .5); }
.front { transform: rotateY(0); }
.back { transform: rotateY(180deg); }
.hang.flipped .front { transform: rotateY(-180deg); }
.hang.flipped .back { transform: rotateY(0); }

/* ID card */
.card-stage { position: relative; height: 620px; display: grid; justify-items: center; align-content: end; perspective: 1200px; }
.idcard { width: min(300px, 80vw); aspect-ratio: 300 / 440; margin-bottom: 80px; }
.idcard .ring { position: absolute; inset: -9px; border-radius: 28px; border: 2px solid var(--signal); opacity: 0; pointer-events: none; animation: ring 2.2s ease-out infinite; }
.touched .idcard .ring { display: none; }
@keyframes ring { 0% { opacity: .7; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.08); } }
.back-list { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 12px; font-weight: 500; }
.back-list a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 8px; display: block; font-size: .98rem; word-break: break-all; }
.back-list a:hover { color: var(--signal); }
.flip { position: absolute; left: 50%; translate: -50% 0; bottom: 24px; font: 500 .8rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); cursor: pointer; }
.flip:hover { border-color: var(--ink); }

/* the "drag me" cue */
.cue { position: absolute; z-index: 5; left: -14%; top: 3%; display: flex; align-items: flex-start; gap: 4px; color: var(--signal); font: 700 2.15rem/.95 var(--hand); transform: rotate(-7deg); pointer-events: none; transition: opacity .5s, transform .5s var(--ease); }
.cue svg { width: 70px; height: 56px; margin-top: 40px; flex: none; transform: rotate(18deg); }
.cue span { background: var(--bg); padding: 4px 10px; border-radius: 12px; }
.cue.gone { opacity: 0; transform: rotate(-7deg) translateY(10px); }
.js .cue { animation: cuebob 1.6s ease-in-out infinite; }
@keyframes cuebob { 0%, 100% { translate: 0 0; } 50% { translate: 6px -4px; } }

/* ---------- sections ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.sec-head { margin-bottom: 36px; }
.label { color: var(--signal); margin: 0 0 14px; }
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 700; max-width: 22ch; letter-spacing: -.035em; }
.sub { color: var(--muted); margin: 14px 0 0; }

/* rack of product badges */
.rack { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 130px; padding-bottom: 20px; perspective: 1400px; }
.badge { width: min(100%, 250px); aspect-ratio: 250 / 350; justify-self: center; }
.badge .face { border: 1px solid transparent; }
.badge .wm { font-size: 1.55rem; font-weight: 800; margin: 14px 0 6px; letter-spacing: -.03em; }
.badge .tag { margin: 0; font-size: .98rem; line-height: 1.3; opacity: .82; }
.badge .logo { width: 76px; height: 76px; border-radius: 20px; overflow: hidden; flex: none; }
.badge .logo svg { width: 100%; height: 100%; display: block; }
.badge .chips { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badge .chips span { border: 1px solid currentColor; border-radius: 999px; padding: 2px 9px; opacity: .85; }
.badge .back p.small { margin: 0 0 14px; opacity: .7; }
.badge .back ul { margin: 0 0 16px; padding-left: 1.1em; font-size: .98rem; line-height: 1.4; display: grid; gap: 10px; }
.badge .go { margin-top: auto; align-self: flex-start; font: 600 .9rem var(--body); text-decoration: none; border-radius: 999px; padding: 9px 18px; }
.badge .stack { margin: auto 0 0 !important; opacity: .7; }

.b-scan .face { color: #f3f0ff; background: radial-gradient(120% 70% at 0% 0%, rgba(76, 242, 181, .22), transparent 60%), radial-gradient(100% 70% at 100% 100%, rgba(143, 184, 255, .24), transparent 60%), #0A0712; border-color: #2a2440; }
.b-scan .wm { font-family: "Unbounded", var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.b-scan .wm i { font-style: normal; color: #4CF2B5; }
.b-scan .chips span:first-child { color: #4CF2B5; }
.b-scan .go { background: linear-gradient(135deg, #4CF2B5, #8FB8FF); color: #0A0712; }
.b-page .face { color: #10131f; background: #f6f5f1; border-color: #dcd9cf; }
.b-page .wm { color: #2447f5; }
.b-page .chips span { color: #2447f5; }
.b-page .go { background: #2447f5; color: #fff; }
.b-page .clip { background: rgba(36, 71, 245, .1); border-color: rgba(36, 71, 245, .25); }
.b-setu .face { color: #eaf2ff; background: linear-gradient(160deg, #11305a, #0b1b33 60%); border-color: #1d3b66; }
.b-setu .logo { box-shadow: 0 0 0 1.5px #1d3b66; }
.b-setu .chips span:first-child { color: #ff8a1f; }
.b-hyper .face { color: #E9E4D8; background: #0B0B0D; border-color: #2a2a2e; }
.b-hyper .logo { box-shadow: 0 0 0 1.5px #2a2a2e; }
.b-hyper .wm { color: #E9E4D8; }
.b-hyper .chips span { color: #D9A867; }

/* proof strip */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stats b { display: block; font: 700 clamp(2.6rem, 6vw, 4.6rem)/.95 var(--display); letter-spacing: -.05em; color: var(--ink); }
.stats i { font-style: normal; color: var(--signal); }
.stats span { display: block; margin-top: 12px; color: var(--muted); }

/* about */
.about-line { font: 500 clamp(1.05rem, 1.7vw, 1.3rem)/1.4 var(--display); letter-spacing: -.01em; max-width: 44ch; margin: 0 0 26px; }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li { font: 500 .92rem var(--body); padding: 6px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.skills li.ai { background: none; color: var(--ink); border: 1.5px dashed var(--muted); }
.legend { margin: 14px 0 0; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 22px; height: 12px; border-radius: 99px; border: 1.5px dashed var(--muted); }
.edu { margin: 28px 0 0; color: var(--muted); }

/* contact */
.mail { display: inline-block; font-family: var(--display); font-weight: 700; letter-spacing: -.035em; font-size: clamp(1.7rem, 3.8vw, 3rem); line-height: 1.1; text-decoration: none; margin: 4px 0 30px; overflow-wrap: anywhere; background: linear-gradient(var(--signal), var(--signal)) no-repeat 0 100% / 0% 5px; transition: background-size .5s var(--ease), color .3s; padding-bottom: 6px; }
.mail:hover { background-size: 100% 5px; color: var(--signal); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0 40px; color: var(--muted); font-size: .9rem; }

/* entrance */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .rack { grid-template-columns: repeat(2, 1fr); row-gap: 120px; padding-top: 110px; }
  .hero { grid-template-columns: 1fr; gap: 12px; padding: 36px 0 56px; min-height: 0; }
  .card-stage { height: 600px; }
  .cue { left: 2%; top: 0%; font-size: 1.75rem; }
  .stats { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  nav { gap: 14px; }
  nav a:not(.navbtn) { display: none; }
  .brand-rest { display: none; }
  .rack { gap: 12px; row-gap: 110px; }
  .badge .face { padding: 11px; border-radius: 16px; }
  .badge .logo { width: 48px; height: 48px; border-radius: 13px; }
  .badge .wm { font-size: 1.1rem; margin-top: 10px; }
  .b-scan .wm { font-size: .85rem; }
  .badge .tag { font-size: .8rem; }
  .badge .chips span { font-size: .62rem; padding: 1px 6px; }
  .badge .back ul { font-size: .78rem; gap: 6px; }
  .badge .go { padding: 7px 12px; font-size: .8rem; }
  .clip { width: 44px; height: 9px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .idcard .ring { display: none; }
}

/* ====================== CINEMA ====================== */
/* page-wide film grain (very light) and the opening letterbox */
.grain-global { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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"); }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.intro-bars { position: fixed; inset: 0; z-index: 85; pointer-events: none; }
.intro-bars i { position: absolute; left: 0; right: 0; height: 50vh; background: #000; }
.intro-bars i:first-child { top: 0; animation: barTop 1.5s cubic-bezier(.7, 0, .2, 1) .15s forwards; }
.intro-bars i:last-child { bottom: 0; animation: barBot 1.5s cubic-bezier(.7, 0, .2, 1) .15s forwards; }
@keyframes barTop { to { transform: translateY(-100%); } }
@keyframes barBot { to { transform: translateY(100%); } }

/* hero: a spotlight on the card, dark room */
.card-stage::before { content: ""; position: absolute; inset: -140px -80px -60px; z-index: 0; pointer-events: none; background: radial-gradient(52% 60% at 50% 40%, color-mix(in srgb, var(--signal) 26%, transparent), transparent 70%); }
:root[data-theme="light"] .card-stage::before { opacity: .35; }

/* ====== handwritten notes and toast ====== */
.scrawl { font: 700 1.5rem/1 var(--hand); color: var(--signal); margin: 0; transform: rotate(-3deg); }
.sec-head { position: relative; }
.s-work { position: absolute; right: 2%; top: 6px; font-size: 1.7rem; transform: rotate(4deg); max-width: 14ch; text-align: center; }
.s-about { margin-top: 14px; font-size: 1.7rem; }
.s-about::before { content: "↳ "; }
.s-mail { margin: 4px 0 22px; font-size: 1.8rem; }
.s-mail::after { content: " ↓"; }
.stats li { position: relative; }
.stats .scrawl { display: block; margin-top: 8px; font-size: 1.35rem; font-style: normal; transform: rotate(-2deg); }
.badge .back .scrawl.q { margin: 0 0 4px; font-size: 1.35rem; opacity: .95; transform: rotate(-2deg); }
.b-scan .back .q { color: #4CF2B5; } .b-page .back .q { color: #2447f5; } .b-setu .back .q { color: #ff8a1f; } .b-hyper .back .q { color: #D9A867; }
.skills li { cursor: pointer; transition: transform .2s var(--ease); }
.skills li:hover { transform: translateY(-3px) rotate(-1.5deg); }
.toast { position: fixed; z-index: 95; left: 50%; bottom: 26px; translate: -50% 20px; max-width: min(92vw, 560px); padding: 12px 22px; border-radius: 16px; background: var(--ink); color: var(--bg); font: 700 1.5rem/1.1 var(--hand); text-align: center; opacity: 0; pointer-events: none; transition: opacity .3s, translate .35s var(--ease); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); }
.toast.show { opacity: 1; translate: -50% 0; }
@media (max-width: 1000px) { .s-work { position: static; text-align: left; margin-top: 10px; transform: rotate(-2deg); max-width: none; } }

/* ====== ID card v3: real ID format, creative skin ====== */
.idcard { aspect-ratio: 300 / 470; width: min(300px, 80vw); }
.idcard .face { background: #f4f1ea; color: #121a26; border: 1px solid rgba(255, 255, 255, .5); padding: 0; overflow: hidden; box-shadow: 0 34px 70px -26px rgba(0, 0, 0, .75), 0 0 0 1px rgba(15, 23, 42, .3); }
.slot { position: absolute; z-index: 7; left: 50%; top: 10px; translate: -50% 0; width: 52px; height: 9px; border-radius: 9px; background: #0b1218; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .55); }
.id-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 0; padding: 26px 14px 9px; background: #2f3bff; color: #fff; }
.id-top .idk { font: 600 .66rem var(--mono); letter-spacing: .15em; text-transform: uppercase; flex: 1; }
.id-top .open { display: inline-flex; align-items: center; gap: 6px; font: 600 .6rem var(--mono); letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .18); border-radius: 99px; padding: 4px 9px; }
.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 3px rgba(61, 220, 151, .35); }
.arch { position: relative; margin: 12px 18px 0; height: 205px; border-radius: 999px 999px 14px 14px; overflow: hidden; background: #7fb4ee; box-shadow: inset 0 0 0 3px #121a26; }
.arch .rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 108%, rgba(255, 255, 255, .42) 0 7deg, transparent 7deg 14deg); }
.arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; pointer-events: none; transform: scale(1.04); transform-origin: 50% 20%; }
.medal { position: absolute; z-index: 4; right: -2px; bottom: -4px; width: 82px; height: 82px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fields { padding: 12px 18px 0; }
.fields .nm { margin: 0 0 8px; font: 800 1.55rem/1 var(--display); letter-spacing: -.04em; color: #121a26; }
.fields dl { margin: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 7px 10px; }
.fields dt { font: 600 .56rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #6a7684; }
.fields dd { margin: 1px 0 0; font: 600 .78rem/1.2 var(--body); color: #121a26; }
.id-foot { position: absolute; left: 18px; right: 18px; bottom: 12px; display: flex; align-items: flex-end; gap: 12px; }
.sig { font: 700 1.55rem/.9 var(--hand); color: #2f3bff; transform: rotate(-4deg); flex: none; }
.barcode { flex: 1; height: 28px; background: repeating-linear-gradient(90deg, #121a26 0 2px, transparent 2px 4px, #121a26 4px 5px, transparent 5px 9px, #121a26 9px 12px, transparent 12px 14px); border-radius: 2px; }
.holo { position: absolute; z-index: 5; right: 0; top: 52px; bottom: 0; width: 9px; pointer-events: none; background: linear-gradient(180deg, #ff6ad5, #7aa2ff, #5affd2, #ffe66d, #ff6ad5); background-size: 100% 300%; background-position: 0 calc(50% + var(--tilt, 0) * 7%); opacity: .85; }
.idcard .back { background: #f4f1ea; padding: 34px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.idcard .back .small { color: #6a7684; margin: 0; }
.idcard .back .back-list a { border-bottom-color: #d4cfc3; color: #121a26; }
.idcard .back .meta2 { margin-top: auto; line-height: 1.7; }
.idcard .back .barcode { flex: none; width: 100%; height: 30px; margin-top: 8px; }
.idcard .ring { inset: -10px; }


/* ====== v12: one story section, high contrast, straight handwriting ====== */
.hero { min-height: calc(100svh - 60px); padding: 40px 0 56px; gap: 56px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.8rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.02; max-width: 14ch; margin-bottom: 22px; }
.hero h1 em { animation: none; transform: none; display: inline; font-style: normal; color: var(--signal); }
.lead { font-size: 1.15rem; line-height: 1.55; color: var(--muted); max-width: 46ch; margin: 0 0 28px; }
.proof { list-style: none; margin: 40px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 44px; }
.proof b { display: block; font: 700 clamp(2rem, 3.6vw, 3rem)/1 var(--display); letter-spacing: -.04em; color: var(--signal); }
.proof span { display: block; margin-top: 6px; font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); max-width: 18ch; line-height: 1.35; }
.eyebrow { color: var(--muted); }
.btn.primary { background-color: var(--signal); border-color: var(--signal); color: var(--signal-on); }
.btn.primary:hover { color: var(--bg); }

.film { padding: 72px 0 24px; border-top: 1px solid var(--line); }
.sec-head h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); font-weight: 700; max-width: 22ch; }
.label2 { margin: 0; color: var(--signal); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 40px 90px -40px #000, 0 0 0 1px var(--line); -webkit-tap-highlight-color: transparent; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; z-index: 3; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 14px; background: var(--signal); color: var(--signal-on); border: 0; border-radius: 999px; padding: 16px 30px; font: 700 .95rem var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: opacity .3s, transform .3s var(--ease); box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .7); }
.play i { width: 0; height: 0; border-left: 13px solid var(--signal-on); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.player:hover .play { transform: scale(1.04); }
.player.playing .play { opacity: 0; pointer-events: none; }
.chs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ch { position: relative; width: 100%; height: 100%; text-align: left; display: grid; align-content: start; gap: 4px; padding: 0 0 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .25s, transform .25s var(--ease); }
.ch img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; filter: grayscale(.4) brightness(.8); transition: filter .3s; }
.ch .n { position: absolute; left: 10px; top: 8px; font: 700 .72rem var(--mono); letter-spacing: .12em; color: #fff; text-shadow: 0 1px 6px #000; }
.ch b { font: 700 1rem var(--display); letter-spacing: -.02em; padding: 8px 12px 0; }
.ch em { font: 500 .8rem var(--body); font-style: normal; color: var(--muted); padding: 0 12px; }
.ch u { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--signal); }
.ch:hover { transform: translateY(-3px); border-color: var(--ink); }
.ch:hover img, .ch.on img { filter: none; }
.ch.on { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.built { margin-top: 64px; }
.built-head { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.toolbox { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.toolbox .skills { margin-top: 14px; }

/* handwriting stays straight */
.scrawl, .cue, .cue.gone, .sig, .badge .back .scrawl.q, .s-mail { transform: none; }
.cue.gone { transform: translateY(10px); }
.scrawl { color: var(--signal); font-size: 1.55rem; }
.s-mail { margin: 4px 0 18px; font-size: 1.7rem; }
.s-mail::after { content: ""; }
.cue { color: var(--signal); top: 4%; left: -6%; }
.cue span { background: transparent; padding: 0; }

/* ID card, accent follows the theme */
.id-top { background: #ffb020; color: #0a0a0b; padding-left: 16px; }
.id-top .idk { color: #0a0a0b; }
.id-top .open { background: rgba(10, 10, 11, .12); color: #0a0a0b; }
.sig { color: #0a0a0b; }
.skills li { background: var(--ink); color: var(--bg); }
.skills li.ai { background: none; color: var(--ink); }
.b-scan .go, .b-page .go { font-weight: 700; }
.stat, .stats { display: none; }
.section { padding: 72px 0; }

@media (max-width: 1000px) {
  .hero { gap: 12px; padding: 28px 0 40px; min-height: 0; }
  .hero h1 { max-width: none; }
  .chs { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .chs li { scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .proof { grid-template-columns: repeat(3, auto); gap: 10px 22px; margin-top: 28px; }
  .proof span { font-size: .66rem; }
  .play { padding: 12px 20px; font-size: .8rem; }
  .player { border-radius: 12px; }
  .cue { left: 0; top: 0; }
}

.badge { aspect-ratio: 250 / 322; }
.rack { padding-top: 112px; }
.cue { left: -17%; top: 2%; }

@media (max-width: 1000px) { .card-stage { margin-top: 20px; } .chs { grid-template-columns: repeat(5, minmax(172px, 1fr)); } }
@media (max-width: 1000px) { .cue { left: 2%; top: -10px; font-size: 1.6rem; } .cue svg { display: none; } }
@media (max-width: 700px) { .play { top: auto; bottom: 16px; translate: -50% 0; } }

.edu + .edu { margin-top: 10px; }
.toolbox .edu .link { background-size: 100% 1px; }

/* bigger story: player and chapters break out of the page column */
.film .player, .film .chs { width: min(1560px, 97vw); position: relative; left: 50%; translate: -50% 0; }
.film .player { border-radius: 20px; }
.film .chs { margin-top: 14px; }
@media (max-width: 1000px) { .film .chs { width: min(1560px, 97vw); } }
@media (max-width: 700px) { .film .player, .film .chs { width: 100vw; } .film .player { border-radius: 0; } .film .chs { padding-inline: 16px; } }
.player { scroll-margin-top: 72px; }

/* ====== cut the thread ====== */
.straps .strap-hit { stroke: transparent; stroke-width: 46px; pointer-events: stroke; cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 24 24' fill='none' stroke-linecap='round'><g stroke='%230a0a0b' stroke-width='4.6'><path d='M8.1 8.1 20 20M8.1 15.9 20 4'/><circle cx='6' cy='6' r='3'/><circle cx='6' cy='18' r='3'/></g><g stroke='%23fff' stroke-width='2'><path d='M8.1 8.1 20 20M8.1 15.9 20 4'/><circle cx='6' cy='6' r='3'/><circle cx='6' cy='18' r='3'/></g></svg>") 17 17, crosshair; }
.cuttable #card-strap { stroke: var(--signal); stroke-width: 8px; }
.is-cut #card-strap { stroke-width: 6px; }
.is-cut .idcard, .is-cut .cue, .is-cut .stage-btns, .is-cut .ring { visibility: hidden; }
.stage-btns { position: absolute; left: 50%; translate: -50% 0; bottom: 24px; display: flex; gap: 10px; z-index: 6; }
.stage-btns .flip { position: static; left: auto; translate: none; bottom: auto; }
.cutbtn { font: 500 .8rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--signal); color: var(--signal-on); border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.cutbtn:hover { filter: brightness(1.1); }
.cue.cutmode { left: calc(50% + 28px); top: 2%; }
.cue.cutmode svg { display: none; }
.gone { position: absolute; left: 50%; bottom: 80px; translate: -50% 0; width: min(300px, 80vw); aspect-ratio: 300 / 470; border-radius: 20px; overflow: hidden; background: #0b0b0c; color: #f6f2ea; box-shadow: 0 30px 60px -28px rgba(11,11,12,.55), 0 0 0 1px rgba(11,11,12,.9); display: grid; align-items: end; isolation: isolate; }
.gone[hidden] { display: none; }
.g-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 82% 50%; z-index: -2; filter: saturate(.85) contrast(1.05); }
.gone::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(11,11,12,.97) 12%, rgba(11,11,12,.72) 50%, rgba(11,11,12,.3)); }
.g-holes { position: absolute; top: 0; bottom: 0; width: 14px; background: repeating-linear-gradient(to bottom, transparent 0 10px, rgba(246,242,234,.55) 10px 22px, transparent 22px 32px); background-size: 6px 32px; background-repeat: repeat-y; background-position: center; opacity: .55; }
.g-holes.l { left: 4px; } .g-holes.r { right: 4px; }
.g-rec { position: absolute; top: 14px; left: 26px; display: flex; align-items: center; gap: 7px; font-size: .72rem; letter-spacing: .16em; }
.g-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff4a3d; animation: recblink 1.4s steps(2, jump-none) infinite; }
@keyframes recblink { 0% { opacity: 1; } 50% { opacity: .15; } }
.g-body { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 20px 26px 26px; }
.gone p { margin: 0; font: 700 1.25rem/1.15 var(--display); letter-spacing: -.02em; color: #f6f2ea; }
.g-sub { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(246,242,234,.7); margin-bottom: 6px; }
.gbtn { font: 600 .92rem var(--body); width: 100%; padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--signal); background: var(--signal); color: var(--signal-on); cursor: pointer; transition: transform .2s, background .25s, color .25s; }
.gbtn:hover { transform: translateY(-2px); background: #f6f2ea; border-color: #f6f2ea; color: #0b0b0c; }
.gbtn.ghost { background: transparent; border-color: rgba(246,242,234,.55); color: #f6f2ea; }
.gbtn.ghost:hover { background: #f6f2ea; color: #0b0b0c; }
@media (prefers-reduced-motion: reduce) { .g-rec i { animation: none; } }
html.noscroll { overflow: hidden; scrollbar-gutter: stable; }
.idcard.falling { position: absolute !important; left: 0; top: 0; margin: 0 !important; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; cursor: default; }
.idcard.falling .face { transition: none; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8); }
.idcard.falling .tail { position: absolute; left: 50%; top: -86px; width: 6px; height: 90px; margin-left: -3px; background: var(--ink); border-radius: 3px 3px 0 0; }
.fall-fx { position: fixed; inset: 0; z-index: 91; pointer-events: none; opacity: 0; background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .22) 46px 47px, transparent 47px 112px, rgba(255, 255, 255, .12) 112px 113px), radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, .65) 100%); background-size: auto, auto; }
.player.opening { animation: opening 1.6s var(--ease); }
@keyframes opening { 0% { transform: scale(1.05); filter: brightness(2.2) saturate(.6); } 100% { transform: none; filter: none; } }
@media (max-width: 1000px) { .cue.cutmode { left: calc(50% + 20px); top: -6px; } }
@media (prefers-reduced-motion: reduce) { main.shake, .player.opening { animation: none; } }

.stage-btns button { white-space: nowrap; }
@media (max-width: 1000px) { .card-stage { height: 640px; } .stage-btns { bottom: 14px; } }
@media (max-width: 480px) { .stage-btns { gap: 8px; } .stage-btns button { padding: 7px 12px; font-size: .72rem; } }

/* ====== fullscreen theater ====== */
.fs-btn { position: absolute; z-index: 4; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 10, 11, .55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .25s; }
.fs-btn svg { width: 20px; height: 20px; }
.player:hover .fs-btn, .fs-btn:focus-visible, .player.playing .fs-btn { opacity: 1; }
@media (hover: none) { .fs-btn { opacity: 1; } }
.t-x, .t-hud { display: none; }
.film .player.theater { position: fixed; inset: 0; left: 0; top: 0; translate: none; width: 100vw; height: 100vh; height: 100dvh; max-width: none; aspect-ratio: auto; border-radius: 0; z-index: 110; margin: 0; box-shadow: none; background: #000; scroll-margin-top: 0; animation: theaterIn 1.1s var(--ease); }
@keyframes theaterIn { from { opacity: 0; transform: scale(1.06); filter: brightness(.35); } to { opacity: 1; transform: none; filter: none; } }
.player.theater video { object-fit: contain; }
.player.theater .fs-btn { display: none; }
.player.theater .t-x { display: grid; position: absolute; z-index: 5; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(10, 10, 11, .55); color: #fff; font: 400 1.7rem/1 var(--body); place-items: center; cursor: pointer; }
.player.theater .t-x:hover { background: var(--signal); color: var(--signal-on); border-color: var(--signal); }
.player.theater .t-hud { display: flex; align-items: center; gap: 16px; position: absolute; z-index: 5; left: 22px; right: 22px; bottom: 18px; color: #fff; font: 600 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 8px #000; }
.t-hud span { white-space: nowrap; }
.t-hud i { flex: 1; height: 3px; background: rgba(255, 255, 255, .28); border-radius: 3px; overflow: hidden; }
.t-hud b { display: block; height: 100%; width: 0; background: var(--signal); }
.player.theater:fullscreen { width: 100vw; height: 100vh; }
.toast { z-index: 130; }
@media (prefers-reduced-motion: reduce) { .film .player.theater { animation: none; } }

.t-rot { display: none; }
@media (orientation: portrait) { .player.theater.rotate-hint .t-rot { display: block; position: absolute; z-index: 5; left: 0; right: 0; top: 67%; margin: 0; text-align: center; color: #fff; font: 700 1.5rem/1.2 var(--hand); animation: hintfade 1s 3.4s forwards; text-shadow: 0 2px 10px #000; } }

/* ====== v18: cue fix + cinematic polish ====== */
.cue.cutmode { left: calc(50% + 26px); top: -8px; max-width: 190px; font-size: 1.7rem; line-height: .95; }
@media (max-width: 1000px) { .cue.cutmode { left: calc(50% + 18px); top: -14px; } }
/* focus-pull entrance for the hero copy */
.js .hero-copy > * { animation: focusIn 1.1s var(--ease) both; }
.js .hero-copy > :nth-child(1) { animation-delay: .15s; } .js .hero-copy > :nth-child(2) { animation-delay: .25s; animation-duration: 1s; } .js .hero-copy > :nth-child(3) { animation-delay: .5s; } .js .hero-copy > :nth-child(4) { animation-delay: .62s; } .js .hero-copy > :nth-child(5) { animation-delay: .74s; }
/* cursor spotlight + soft vignette on the hero */
.hero { position: relative; isolation: isolate; --sx: 72%; --sy: 40%; }
.hero::before { content: ""; position: absolute; inset: -40px -20px; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--sx) var(--sy), color-mix(in srgb, var(--signal) 17%, transparent), transparent 70%); }
:root[data-theme="light"] .hero::before { background: radial-gradient(520px circle at var(--sx) var(--sy), color-mix(in srgb, var(--signal) 12%, transparent), transparent 70%); }
/* buttons */
.mutebtn { font: 500 .8rem var(--mono); letter-spacing: .08em; text-transform: uppercase; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.mutebtn:hover { border-color: var(--ink); }
.stage-btns { flex-wrap: wrap; justify-content: center; width: max-content; max-width: 96vw; }
.t-keys { display: none; }
.player.theater .t-keys { display: block; position: absolute; z-index: 5; top: 26px; left: 22px; margin: 0; color: rgba(255, 255, 255, .7); font: 600 .72rem var(--mono); letter-spacing: .14em; animation: hintfade 1s 5s forwards; text-shadow: 0 1px 8px #000; }
@media (hover: none) { .player.theater .t-keys { display: none; } }
/* contact reads like the next scene's title card */
#contact .label { letter-spacing: .22em; }
@media (prefers-reduced-motion: reduce) { .js .hero-copy > * { animation: none; } }

/* ====== end credits card ====== */
.credits { position: absolute; inset: 0; z-index: 6; display: grid; align-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; background: radial-gradient(ellipse at 50% 45%, rgba(5, 5, 6, .86), rgba(0, 0, 0, .97)); opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s; cursor: default; }
.player.ended .credits { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }
.player.ended .play { display: none; }
.credits > * { margin: 0; opacity: 0; transform: translateY(14px); }
.player.ended .credits > * { animation: creditsUp .9s var(--ease) forwards; }
.player.ended .credits > :nth-child(1) { animation-delay: .5s; } .player.ended .credits > :nth-child(2) { animation-delay: .8s; } .player.ended .credits > :nth-child(3) { animation-delay: 1.05s; } .player.ended .credits > :nth-child(4) { animation-delay: 1.35s; } .player.ended .credits > :nth-child(5) { animation-delay: 1.65s; } .player.ended .credits > :nth-child(6) { animation-delay: 1.95s; }
@keyframes creditsUp { to { opacity: 1; transform: none; } }
.c-end { font: 600 .8rem var(--mono); letter-spacing: .4em; text-transform: uppercase; color: var(--signal); }
.c-name { font: 700 clamp(2.2rem, 6vw, 5rem)/1 var(--display); letter-spacing: -.045em; color: #f6f2ea; }
.c-role { font: 500 clamp(.9rem, 1.6vw, 1.15rem) var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(246, 242, 234, .75); }
.c-line { font: 700 clamp(1.3rem, 2.4vw, 1.9rem)/1.2 var(--hand); color: var(--signal); margin-top: 8px !important; }
.c-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 14px !important; }
.c-links a { color: #f6f2ea; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--signal); padding-bottom: 2px; }
.c-links a:hover { color: var(--signal); }
.c-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px !important; }
.credits .btn { color: #f6f2ea; border-color: rgba(246, 242, 234, .6); }
.credits .btn.primary { color: var(--signal-on); border-color: var(--signal); }
.c-close { display: none; }
.player.theater .c-close { display: inline-block; }
@media (max-width: 700px) { .credits { gap: 6px; padding: 14px; } .c-line { font-size: 1.1rem; } .c-links { gap: 4px 14px; font-size: .85rem; margin-top: 8px !important; } .c-btns { margin-top: 10px !important; } .c-role { letter-spacing: .06em; font-size: .72rem; } }
@media (prefers-reduced-motion: reduce) { .credits > *, .player.ended .credits > * { animation: none; opacity: 1; transform: none; } }

/* ====== badge ground shadows ====== */
.rack { padding-bottom: 64px; }
.bshadow { position: absolute; left: 0; top: 0; width: 190px; height: 20px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255, 176, 32, .26), rgba(255, 176, 32, 0) 70%); filter: blur(6px); pointer-events: none; z-index: 0; will-change: transform, opacity; }
:root[data-theme="light"] .bshadow { background: radial-gradient(ellipse at center, rgba(40, 30, 10, .45), rgba(40, 30, 10, 0) 70%); }
@media (max-width: 560px) { .bshadow { width: 120px; } }

.skills li button { background: none; border: 0; color: inherit; font: inherit; padding: 0; margin: 0; cursor: pointer; }
.skills li { padding: 0; }
.skills li button { padding: 6px 16px; border-radius: 999px; }
.skills li:hover { transform: translateY(-3px) rotate(0deg); }

.player.buffering::after { content: ""; position: absolute; z-index: 5; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--signal); animation: spin 0.9s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* cut the thread, cinematic pass: set pieces driven from app.js */
.fall-wrap { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; will-change: transform; }
.fall-dark { position: fixed; inset: 0; z-index: 92; pointer-events: none; opacity: 0; background: radial-gradient(circle 560px at var(--cx, 50%) var(--cy, 50%), transparent 36%, rgba(0, 0, 0, .84) 100%); }
.fall-cv { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 96; pointer-events: none; }
.fall-bar { position: fixed; left: 0; right: 0; height: 50.5vh; background: #000; z-index: 120; pointer-events: none; will-change: transform; }
.fall-bar.t { top: 0; } .fall-bar.b { bottom: 0; }

/* ---- cinematic pass 2: rolling intro, chapter cuts, lamp, flip sheen, clapperboard ---- */
.roll, .cutcard { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: none; }
.roll.on, .cutcard.on { display: block; }
.roll { background: #000; }
.roll i { position: absolute; left: 0; right: 0; height: 13%; background: #000; z-index: 1; }
.roll i:first-child { top: 0; } .roll i:nth-child(2) { bottom: 0; }
.roll .slate { position: absolute; z-index: 2; left: 3.2%; top: 17%; display: flex; align-items: center; gap: 10px; font: 600 .78rem var(--mono); letter-spacing: .2em; color: #fff; text-shadow: 0 1px 8px #000; }
.roll .slate b { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 10px #ff3b30; animation: recblink 1s steps(2) infinite; }
.roll .slate em { font-style: normal; }
@keyframes recblink { 50% { opacity: .2; } }
.cutcard { background: rgba(0, 0, 0, .94); display: none; place-content: center; text-align: center; gap: 6px; }
.cutcard.on { display: grid; }
.cutcard b { font: 700 clamp(3rem, 9vw, 7rem)/1 var(--display); color: var(--signal); letter-spacing: .02em; }
.cutcard span { font: 600 clamp(.8rem, 1.6vw, 1.15rem) var(--mono); letter-spacing: .32em; text-transform: uppercase; color: #fff; }
/* the studio lamp warms up behind the hero, like a light switched on */
.js .card-stage::before { animation: lamp 2.2s 1s both; }
@keyframes lamp { 0% { opacity: 0; } 7% { opacity: .95; } 12% { opacity: .1; } 20% { opacity: .75; } 27% { opacity: .25; } 42% { opacity: 1; } 100% { opacity: 1; } }
@keyframes focusIn { from { opacity: 0; filter: blur(16px); transform: translateY(20px) scale(1.04); letter-spacing: .02em; } to { opacity: 1; filter: blur(0); transform: none; } }
/* a glint travels across the face as it flips */
.face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .5) 47%, rgba(255, 255, 255, .12) 55%, transparent 70%); background-size: 280% 100%; background-position: 120% 0; }
.hang.flipping .face::after { animation: sheen .9s ease-out; }
@keyframes sheen { 0% { opacity: 0; background-position: 120% 0; } 20% { opacity: 1; } 100% { opacity: 0; background-position: -50% 0; } }
/* contact: a title card lit by one lamp */
#contact { position: relative; isolation: isolate; }
#contact::before { content: ""; position: absolute; z-index: -1; inset: -60px -4vw -40px; pointer-events: none; opacity: .55; transition: opacity .6s var(--ease); background: radial-gradient(60% 70% at 25% 45%, color-mix(in srgb, var(--signal) 16%, transparent), transparent 70%); }
#contact:has(.mail:hover, .mail:focus-visible, .btn:hover)::before { opacity: 1; }
.clap { position: fixed; z-index: 97; left: 50%; top: 50%; width: min(380px, 86vw); transform: translate(-50%, -50%); pointer-events: none; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); }
.clap-top { height: 44px; border-radius: 8px 8px 0 0; background: repeating-linear-gradient(115deg, #111 0 20px, #f2efe6 20px 40px); border: 3px solid #111; transform-origin: 0 100%; margin-bottom: 3px; }
.clap-body { background: #161616; border: 3px solid #111; border-radius: 0 0 10px 10px; padding: 16px 20px 18px; color: #f2efe6; display: grid; gap: 7px; font: 600 .88rem var(--mono); letter-spacing: .14em; }
.clap-body p { margin: 0; border-bottom: 1px dashed rgba(242, 239, 230, .28); padding-bottom: 6px; display: flex; gap: 12px; }
.clap-body span { color: var(--signal); min-width: 64px; }
.clap.hit .clap-body { animation: clapshake .22s; }
@keyframes clapshake { 25% { transform: translate(3px, 2px); } 55% { transform: translate(-3px, -1px); } }
@media (prefers-reduced-motion: reduce) { .js .card-stage::before { animation: none; } .hang.flipping .face::after { animation: none; } }
.idcard.falling { animation: none; }

/* touch: tap targets of a comfortable size */
@media (pointer: coarse) {
  .stage-btns button, .skills li, .chips button, .btn.sm { min-height: 42px; }
  .skills li button { padding-block: 9px; }
  .foot-bar a, .contact-row .link { display: inline-block; padding-block: 8px; }
  .brand { display: inline-block; padding-block: 10px; }
}

/* small / touch screens: same entrance without the blur (blur on large text is what slows a phone's first paint) */
@keyframes focusInLite { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px), (pointer: coarse) {
  .js .hero-copy > * { animation-name: focusInLite; animation-duration: .7s; }
  .js .hero-copy > :nth-child(2) { animation-duration: .7s; }
}
