@charset "UTF-8";
/* ============================================================
   胡宇博 · v4 — v3.1 editorial palette (ink / paper / acid / purple)
   merged with the HYB-2001 bench instruments.
   ============================================================ */
:root {
  --ink: #151611;
  --ink-2: #1b1d16;
  --ink-3: #25271f;
  --paper: #f1f0e7;
  --acid: #d4ff3f;
  --purple: #8176ed;
  --purple-lite: #a79fff;
  --muted: #b5b7aa;
  --line: rgba(241,240,231,.25);
  --pad: clamp(22px,4.7vw,90px);
  --sans: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  --mono: "SFMono-Regular","SF Mono",Menlo,Consolas,"Liberation Mono","PingFang SC",monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath d='M0 0h160v160H0z' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
::selection { color: var(--ink); background: var(--acid); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
button:disabled { cursor: wait; }
img { display: block; max-width: 100%; }
svg { display: block; }
h1,h2,h3,p { margin: 0; }
a,button,summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 6px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.print-contact, .sep { display: none; }
.t-print { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 300; padding: 15px; background: var(--acid); color: var(--ink); }
.skip-link:focus { top: 15px; }
.section-pad { padding: 88px var(--pad); }
.eyebrow { font: 10px/1.5 var(--mono); letter-spacing: .07em; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 40px; }
.section-heading h2 { font-size: clamp(34px,4vw,60px); line-height: 1.2; font-weight: 650; letter-spacing: -.045em; margin-top: 12px; }
.heading-dot { color: var(--purple); font-family: Arial,sans-serif; margin-left: 5px; }
.section-note { font-size: 12px; line-height: 1.9; text-align: right; }
.section-note>span { color: var(--muted); font-size: 11px; }

/* Covers the page until the boot overlay mounts; fades on its own if scripts never run. */
html.js-boot body::before { content: ""; position: fixed; inset: 0; z-index: 999; background: var(--ink); animation: cover-out .3s 3s forwards; }
@keyframes cover-out { to { opacity: 0; visibility: hidden; } }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; pointer-events: none; background: var(--acid); transform: scaleX(var(--scroll,0)); transform-origin: left; }

/* ---------- Cursor follower (fine pointers only) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none; display: none; }
.cursor span { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--paper); border-radius: 50%; mix-blend-mode: difference; font: 700 9px/1 var(--mono); letter-spacing: .08em; color: transparent; transition: width .25s cubic-bezier(.2,.8,.2,1), height .25s cubic-bezier(.2,.8,.2,1), margin .25s cubic-bezier(.2,.8,.2,1), background .2s, color .2s, border-color .2s, opacity .2s; }
.cursor.is-hover span { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.cursor.has-label span { width: 74px; height: 74px; margin: -37px 0 0 -37px; background: var(--acid); border-color: var(--acid); color: var(--ink); mix-blend-mode: normal; }
.cursor.is-down span { transform: scale(.82); }
.cursor.is-hidden span { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .cursor.on { display: block; } }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; display: flex; align-items: center; gap: 28px; height: 78px; padding: 0 var(--pad); background: var(--ink); border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: baseline; font-size: 30px; font-weight: 900; letter-spacing: -3px; line-height: 1; }
.wordmark span { font-style: italic; }
.wordmark i { margin-left: 8px; font: 10px var(--mono); align-self: start; letter-spacing: 0; display: inline-block; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.wordmark:hover i { transform: rotate(180deg); }
.header-note { font: 10px var(--mono); color: var(--muted); margin-right: auto; }
.site-header nav { display: flex; gap: 26px; align-items: center; font-size: 12px; }
.site-header nav a { position: relative; padding: 12px 0; }
.site-header nav a::after { content: ""; position: absolute; bottom: 4px; left: 0; right: 0; height: 1px; background: var(--acid); transform: scaleX(0); transform-origin: right; transition: transform .3s; }
.site-header nav a:hover::after, .site-header nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.site-header nav a[aria-current] { color: var(--acid); }
.site-header sup { font: 9px var(--mono); color: var(--acid); margin-left: 3px; }
.pdf-link { display: grid; white-space: nowrap; place-items: center; height: 34px; padding: 0 14px; background: var(--acid); color: var(--ink); font: 700 11px/1 var(--mono); letter-spacing: .04em; transition: transform .2s, box-shadow .2s; }
.pdf-link:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--purple); }
.lang { display: flex; flex-shrink: 0; border: 1px solid var(--line); }
.lang a { display: grid; place-items: center; min-width: 36px; height: 32px; padding: 0 9px; font: 700 11px/1 var(--mono); letter-spacing: .04em; color: var(--muted); transition: color .2s, background .2s; }
.lang a:hover { color: var(--paper); }
.lang a[aria-current] { background: var(--paper); color: var(--ink); }

/* ---------- English page ---------- */
html[lang="en"] .identity h1 { font-size: clamp(60px,8.2vw,134px); }
html[lang="en"] .identity h1 .name-cn { white-space: nowrap; }
.job-heading h3 small { display: inline-block; margin-left: 10px; font-size: .48em; font-weight: 500; letter-spacing: 0; opacity: .7; }
html[lang="en"] .tp dl { grid-template-columns: 70px minmax(0,1fr); }
html[lang="en"] .case-facts>div { grid-template-columns: 78px 1fr; }
html[lang="en"] .sort-buttons { flex-wrap: wrap; }
@media screen { html[lang="en"] .experience-points li, html[lang="en"] .case-story>p:not(.case-role) { line-height: 1.8; } }

/* ---------- Hero ---------- */
.resume-hero { padding: 116px var(--pad) 23px; }
.hero-kicker { display: flex; justify-content: space-between; gap: 24px; font: 10px/1.5 var(--mono); color: var(--muted); letter-spacing: .07em; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; color: var(--acid); }
.hero-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: led 2.2s ease-in-out infinite; }
@keyframes led { 50% { opacity: .35; box-shadow: none; } }
.identity-grid { display: grid; grid-template-columns: 1.25fr 1fr; align-items: end; gap: 6vw; padding: 52px 0 46px; }
.identity h1 { font-size: clamp(86px,11.8vw,182px); line-height: 1.04; letter-spacing: -.075em; font-weight: 700; }
.identity h1 .name-cn { display: block; }
.identity h1 .name-en { display: inline-block; font: 500 clamp(28px,4.6vw,70px)/1.05 var(--sans); letter-spacing: -.055em; margin-top: 8px; white-space: pre; cursor: default; }
.identity h1 .name-dot { font: 500 clamp(28px,4.6vw,70px)/1.05 var(--sans); color: var(--acid); }
.identity h1 .scr { color: var(--acid); }
/* Hide the name until it decodes in; reveal anyway if scripts never run. */
html.js-name .identity h1 [data-scramble] { visibility: hidden; animation: name-fallback 0s 2.5s forwards; }
@keyframes name-fallback { to { visibility: visible; } }
.identity-caption { font-size: 13px; letter-spacing: .09em; color: var(--muted); margin-top: 24px; }
.resume-goals { padding: 3px 0 5px 28px; border-left: 1px solid var(--line); }
.resume-goals>.eyebrow { color: var(--acid); }
.resume-goals>p { font-size: clamp(22px,2.75vw,43px); line-height: 1.28; letter-spacing: -.055em; font-weight: 500; margin-top: 20px; }
.resume-goals>p>span { color: var(--purple); }
.text-link { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; margin-top: 24px; font-size: 11px; max-width: 260px; }
.text-link span { color: var(--acid); font-size: 23px; transition: transform .25s; }
.text-link:hover span { transform: translate(-3px,3px); }
.profile-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 6vw; border-top: 1px solid var(--line); padding: 30px 0; }
.profile-label { display: flex; align-items: center; gap: 25px; }
.profile-star { font-variant-emoji: text; display: block; color: var(--purple); font: 75px/1 var(--sans); transition: transform .7s cubic-bezier(.2,.7,.2,1); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.profile-label>p { font-size: 21px; font-weight: 500; line-height: 1.7; letter-spacing: -.03em; }
.profile-summary>p { font-size: 14px; line-height: 1.95; color: #d0d1c7; }
.profile-summary b { color: var(--paper); font-weight: 600; box-shadow: inset 0 -.45em 0 rgba(212,255,63,.28); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 10px; margin-top: 18px; color: var(--muted); }
.profile-meta>a { color: var(--paper); }
.profile-meta>a:hover { color: var(--acid); }
.hero-foot { display: flex; justify-content: space-between; gap: 20px; font: 9px/1.5 var(--mono); letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 17px; }
.hero-foot span:last-child { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--acid); color: var(--ink); border-block: 1px solid var(--ink); padding: 16px 0; }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; font-size: clamp(22px,2.6vw,38px); font-weight: 700; letter-spacing: -.04em; white-space: nowrap; animation: marquee 48s linear infinite; }
.marquee-track i { font-style: normal; color: var(--purple); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Signal: scope + LCD ---------- */
.signal { border-bottom: 1px solid var(--line); }
.signal-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); gap: 5vw; align-items: center; }
.signal-copy>.eyebrow { color: var(--acid); }
.signal-copy h2 { font-size: clamp(40px,5vw,78px); line-height: 1.1; letter-spacing: -.06em; font-weight: 650; margin-top: 14px; }
.signal-copy>p { font-size: 14px; line-height: 1.95; color: #d0d1c7; margin-top: 22px; max-width: 520px; }
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 32px; background: var(--line); border: 1px solid var(--line); }
.lcd { --c: var(--acid); padding: 16px 16px 14px; background: var(--ink); }
.lcd[data-color="purple"] { --c: var(--purple-lite); }
.lcd[data-color="paper"] { --c: var(--paper); }
.lcd-num { display: flex; align-items: center; height: 58px; padding: 0 12px; margin-bottom: 12px; background: #0d0e0a; box-shadow: inset 0 2px 10px rgba(0,0,0,.8); font: 700 36px/1 var(--mono); color: var(--c); }
.lcd-num svg { height: 38px; width: auto; overflow: visible; }
.lcd-num .seg { fill: var(--c); opacity: .07; }
.lcd-num .seg.on { opacity: 1; filter: drop-shadow(0 0 4px var(--c)); }
.lcd b { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.lcd small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.55; color: var(--muted); }

.scope { margin: 0; padding: 14px; background: linear-gradient(180deg,#23261d,#171912); border: 1px solid #45483b; box-shadow: 18px 18px 0 -1px var(--ink-2), 18px 18px 0 0 #45483b; }
.scope-head { display: flex; align-items: center; gap: 12px; padding: 0 2px 10px; font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--muted); }
.scope-brand { color: var(--paper); }
.scope-state { margin-left: auto; padding: 4px 8px; color: var(--ink); background: var(--acid); }
.scope-state[data-run="false"] { color: var(--paper); background: #e0443c; }
.scope-screen { position: relative; aspect-ratio: 10/8; overflow: hidden; background: radial-gradient(120% 90% at 50% 45%, #13150e 0%, #080906 72%); border: 1px solid #000; touch-action: pan-y;
  background-image:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(241,240,231,.2) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(0deg, transparent calc(50% - .5px), rgba(241,240,231,.2) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(90deg, rgba(241,240,231,.075) 1px, transparent 1px),
    linear-gradient(0deg, rgba(241,240,231,.075) 1px, transparent 1px),
    radial-gradient(120% 90% at 50% 45%, #13150e 0%, #080906 72%);
  background-size: 100% 100%, 100% 100%, 10% 100%, 100% 12.5%, 100% 100%; }
.scope-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
#scope-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope-top, .scope-readout { position: absolute; left: 10px; right: 10px; display: flex; gap: 14px; font: 500 10.5px/1.3 var(--mono); pointer-events: none; }
.scope-top { top: 8px; color: var(--muted); }
.scope-top .mode-label { margin-left: auto; color: var(--acid); }
.scope-readout { bottom: 8px; flex-wrap: wrap; row-gap: 2px; }
.scope-readout .c1 { color: var(--acid); }
.scope-readout .c2 { color: var(--purple-lite); }
.scope-readout .c3 { color: var(--paper); }
.scope-readout b { font-weight: 600; }
.scope.is-xy .scope-readout .c1, .scope.is-xy .scope-readout .c3 { display: none; }
.scope-panel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 2px; }
.scope-keys, .scope-ch { display: flex; gap: 6px; }
.key { min-width: 44px; height: 32px; padding: 0 10px; font: 600 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--muted); background: var(--ink-3); border: 1px solid #45483b; box-shadow: 0 3px 0 #0b0c08; transition: transform .08s, box-shadow .08s, color .15s, border-color .15s; }
.key:active { transform: translateY(3px); box-shadow: 0 0 0 #0b0c08; }
.key[aria-pressed="true"] { color: var(--paper); }
.key[data-mode][aria-pressed="true"] { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.key.run[aria-pressed="true"] { color: var(--acid); }
.key.run[aria-pressed="false"] { color: #ff6b62; }
.key.ch.c1[aria-pressed="true"] { color: var(--acid); }
.key.ch.c2[aria-pressed="true"] { color: var(--purple-lite); }
.key.ch.c3[aria-pressed="true"] { color: var(--paper); }
.key.ch[aria-pressed="false"] { color: #5d6053; }
.knob { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--muted); }
.knob-cap { --rot: 0deg; position: relative; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(from 0deg,#45483b,#1b1d16,#45483b,#1b1d16,#45483b); border: 1px solid #0b0c08; box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1); transform: rotate(var(--rot)); transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.knob-cap::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 11px; margin-left: -1.5px; background: var(--acid); box-shadow: 0 0 6px var(--acid); }
.knob-label { font: 600 9.5px/1 var(--mono); letter-spacing: .06em; }
.knob:hover .knob-cap { box-shadow: 0 3px 8px rgba(0,0,0,.6), 0 0 0 2px var(--acid); }
.scope figcaption { padding: 12px 2px 0; font-size: 11.5px; line-height: 1.8; color: var(--muted); }
.scope figcaption b { color: var(--acid); font-family: var(--mono); }

/* ---------- Experience ---------- */
.experience { background: var(--acid); color: var(--ink); }
.experience .heading-dot { color: var(--ink); }
.experience-item { display: grid; grid-template-columns: .4fr 1fr; gap: 45px; padding: 31px 0 36px; border-top: 1px solid rgba(21,22,17,.45); }
.experience-date { padding-top: 4px; }
.experience-date>span { font: 500 clamp(16px,1.7vw,26px)/1.4 var(--mono); letter-spacing: -.06em; }
.experience-date>small { display: block; font: 9px var(--mono); margin-top: 13px; }
.job-heading h3 { font-size: clamp(22px,2.15vw,33px); letter-spacing: -.04em; font-weight: 600; line-height: 1.35; }
.job-heading>span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; margin-top: 10px; }
.badge { font: normal 600 10px/1 var(--mono); padding: 6px 9px; background: var(--ink); color: var(--acid); }
.experience-points { padding-left: 16px; margin: 20px 0 0; }
.experience-points li { font-size: 14px; line-height: 1.95; padding-left: 4px; margin-top: 8px; }
.experience-points li::marker { font-size: 9px; }
.experience-points a { border-bottom: 1px solid var(--ink); font-weight: 600; }
.experience-points a:hover { background: var(--ink); color: var(--acid); }
.stack { margin-top: 16px !important; font: 10px/1.8 var(--mono); letter-spacing: .02em; opacity: .75; }
.key-item .experience-date>span { position: relative; }
.education { display: grid; grid-template-columns: .4fr 1fr; gap: 12px 45px; border-top: 1px solid rgba(21,22,17,.45); padding-top: 26px; align-items: start; }
.education p { font-size: 14px; line-height: 1.8; }
.education b { font-weight: 600; font-size: 16px; }
.education p>span { display: block; font: 11px/1.9 var(--mono); }
.awards { grid-column: 2; margin: 8px 0 0; padding: 0; list-style: none; }
.awards li { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; padding: 10px 0; border-top: 1px dashed rgba(21,22,17,.35); font-size: 14px; font-weight: 600; line-height: 1.6; }
.awards li>span { grid-row: span 2; font: 500 13px/1.6 var(--mono); }
.awards small { font-size: 12px; font-weight: 400; }

/* ---------- Projects ---------- */
.case { border-top: 1px solid #707267; }
.case:last-child { border-bottom: 1px solid #707267; }
.case>summary { list-style: none; display: grid; grid-template-columns: 40px 1fr 170px 28px; align-items: center; gap: 22px; padding: 28px 0; cursor: pointer; transition: color .25s, padding .35s cubic-bezier(.2,.7,.2,1); }
summary::-webkit-details-marker { display: none; }
.case>summary:hover { padding-left: 12px; }
.case>summary:hover,.case[open]>summary { color: var(--acid); }
.case-index { font: 12px var(--mono); align-self: start; margin-top: 7px; color: var(--muted); }
.case-name { font-size: clamp(20px,2.2vw,34px); letter-spacing: -.04em; font-weight: 550; }
.case-name small { display: block; font-size: 11px; line-height: 1.9; letter-spacing: 0; font-weight: 400; margin-top: 11px; color: var(--muted); }
.case-discipline { font: 9px var(--mono); letter-spacing: .02em; justify-self: end; }
.case-plus { font-size: 32px; font-weight: 200; justify-self: end; line-height: 1; transition: transform .3s; }
.case[open]>summary .case-plus { transform: rotate(45deg); }
.case-body { display: grid; grid-template-columns: .85fr 1fr; background: var(--paper); color: var(--ink); margin-bottom: 32px; animation: case-enter .45s cubic-bezier(.2,.7,.2,1); }
@keyframes case-enter { from { opacity: .2; transform: translateY(14px); clip-path: inset(0 0 60% 0); } to { clip-path: inset(0 0 0 0); } }
.case-image-block { position: relative; min-height: 420px; overflow: hidden; }
.image-button { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: #36372d; display: block; cursor: zoom-in; }
.case-image-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.65); transition: filter .6s,transform .8s; }
.image-button:hover img { filter: saturate(1); transform: scale(1.035); }
.image-expand { position: absolute; bottom: 20px; left: 22px; font: 11px var(--sans); padding: 12px 18px; background: var(--acid); color: var(--ink); border-radius: 40px; }
.photo-label { position: absolute; top: 22px; left: 22px; max-width: 85%; font: 9px var(--mono); padding: 8px 10px; color: var(--ink); background: var(--paper); pointer-events: none; }
.case-story { padding: clamp(27px,3.4vw,52px); }
.case-role { font-size: 10px; line-height: 1.7; }
.case-story h3 { font-size: clamp(24px,2.6vw,38px); line-height: 1.35; letter-spacing: -.05em; font-weight: 600; margin-top: 22px; }
.case-story>p:not(.case-role) { font-size: 14px; line-height: 1.95; margin-top: 18px; }
.case-facts { margin: 24px 0 0; }
.case-facts>div { padding: 12px 0; border-top: 1px solid #bdbeb1; display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.case-facts dt { font-size: 10px; line-height: 1.9; }
.case-facts dd { font-size: 12px; line-height: 1.7; margin: 0; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font: 9px var(--mono); }
.project-tags span { border: 1px solid #b0b1a7; padding: 6px 9px; }
.debug-note { grid-column: 1/-1; display: grid; grid-template-columns: .85fr 1fr; gap: 18px 35px; background: var(--acid); padding: 24px 30px; }
.debug-note>span { font: 11px/1.8 var(--mono); }
.debug-note>p { font-size: 12px; line-height: 1.9; }
.debug-note>small { grid-column: 1/-1; font-size: 10px; padding-top: 15px; border-top: 1px solid rgba(21,22,17,.25); }
.case-follow .case-body { background: var(--purple); }
.case-follow .case-facts>div { border-color: rgba(21,22,17,.3); }
.case-follow .project-tags span { border-color: rgba(21,22,17,.45); }
.power-art, .spike-art { position: relative; display: grid; place-items: center; color: var(--ink); background: var(--acid); overflow: hidden; }
.power-art svg, .spike-art svg { width: 100%; }
.power-art text, .spike-art text { font-size: 80px; font-family: var(--sans); font-weight: 900; letter-spacing: -5px; fill: currentColor; }
.power-art .power-small, .spike-art .spike-small { font-size: 14px; font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.power-art .wave { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-dasharray: 16 3; animation: wave-flow 4s linear infinite; }
.power-art .wave-two { animation-direction: reverse; }
.power-art>span, .spike-art>span { position: absolute; bottom: 15px; left: 24px; font-size: 9px; }
@keyframes wave-flow { to { stroke-dashoffset: -76; } }
.spike-art { background: var(--ink); color: var(--paper); }
.spike-art .sig { fill: none; stroke: var(--acid); stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(212,255,63,.6)); }
.spike-art .trig-line { stroke: var(--purple-lite); stroke-width: 1.5; stroke-dasharray: 8 6; }
.spike-art .spike-ring { fill: none; stroke: var(--purple-lite); stroke-width: 3; }

.case-diagram { grid-column: 1/-1; display: grid; justify-items: center; gap: 12px; padding: 26px 30px 22px; background: var(--ink); color: var(--paper); }
.case-diagram .diagram-label { justify-self: start; font: 10px/1.5 var(--mono); color: var(--acid); letter-spacing: .06em; }
.case-diagram small { justify-self: start; font-size: 10px; color: var(--muted); }
.diagram { width: 100%; max-width: 540px; height: auto; overflow: visible; }
.diagram .blk rect { fill: var(--ink-3); stroke: #707267; stroke-width: 1.2; }
.diagram .blk.hot rect { fill: rgba(212,255,63,.1); stroke: var(--acid); }
.diagram .blk.warn rect { fill: rgba(129,118,237,.16); stroke: var(--purple-lite); }
.diagram text { fill: var(--paper); font-family: var(--sans); font-size: 13px; font-weight: 700; text-anchor: middle; }
.diagram text.sub { fill: var(--muted); font-size: 10.5px; font-weight: 500; }
.diagram .blk.warn text { fill: #cfc9ff; }
.diagram .lbl { fill: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.diagram .wire { fill: none; stroke: #b5b7aa; stroke-width: 1.3; }
.diagram .wire.dash { stroke-dasharray: 4 4; }
.diagram .flow { fill: none; stroke: var(--acid); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 17; animation: flow .9s linear infinite; filter: drop-shadow(0 0 3px var(--acid)); }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* Nested optional demo (v3.1). */
.project-demo { grid-column: 1/-1; background: var(--ink-2); color: var(--paper); border: 1px solid #45483b; }
.project-demo>summary { cursor: pointer; display: flex; align-items: center; gap: 24px; padding: 20px 28px; font-size: 12px; list-style: none; transition: background .25s; }
.project-demo>summary:hover { background: #2b2e23; }
.project-demo>summary>span:first-child { color: var(--muted); font-size: 10px; }
.project-demo>summary>b { font-weight: 400; }
.demo-toggle { margin-left: auto; font-size: 22px; color: var(--acid); transition: transform .3s; }
.project-demo[open] .demo-toggle { transform: rotate(45deg); }
.demo-content { display: grid; grid-template-columns: 1fr 300px; align-items: center; border-top: 1px solid var(--line); padding-right: 28px; }
.arm-wrap { position: relative; height: 390px; min-width: 0; overflow: hidden; }
#arm-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#arm-canvas:active { cursor: grabbing; }
.drag-cue { position: absolute; bottom: 18px; left: 25px; color: var(--muted); font: 9px var(--mono); pointer-events: none; }
.canvas-fallback { position: absolute; top: 40%; padding: 20px; font-size: 12px; }
.play-controls { padding: 10px 0 10px 22px; border-left: 2px solid var(--acid); }
.play-caption { display: flex; align-items: center; gap: 9px; font-size: 11px; line-height: 1.7; min-height: 38px; }
.live-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--acid); animation: led 1.4s ease-in-out infinite; }
.sort-buttons { display: flex; gap: 7px; margin: 16px 0; }
.sort-buttons button { display: flex; align-items: center; gap: 7px; background: transparent; border: 1px solid #5c6051; padding: 10px 11px; font-size: 10px; transition: transform .2s,background .2s,border-color .2s; }
.sort-buttons button:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--paper); }
.sort-buttons button:active:not(:disabled) { transform: translateY(1px); }
.sort-buttons button.is-current { border-color: var(--acid); background: #303624; }
.sort-buttons button:disabled:not(.is-current) { opacity: .4; }
.swatch { width: 9px; height: 9px; border-radius: 2px; }
.red { background: #ff6865; }.yellow { background: #e7f375; }.green { background: #b0db5e; }.blue { background: #9683ed; }
.demo-note { color: var(--muted); font-size: 9px; line-height: 1.8; display: block; }

.more-head { display: flex; align-items: baseline; gap: 14px; margin: 56px 0 18px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.more-head span { font: 10px var(--mono); color: var(--muted); letter-spacing: .07em; }
.more { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; background: #45483b; border: 1px solid #45483b; }
.more li { padding: 18px 20px; background: var(--ink); transition: background .25s, color .25s; }
.more li:hover { background: var(--ink-3); }
.more b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.more span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.75; color: var(--muted); }

/* ---------- Capabilities: pinout on paper ---------- */
.toolbox { background: var(--paper); color: var(--ink); }
.toolbox .section-note>span { color: #626455; }
.pinout { --chip: clamp(290px,31vw,380px); display: grid; grid-template-columns: minmax(0,1fr) var(--chip) minmax(0,1fr); grid-template-rows: auto var(--chip) auto; justify-content: center; max-width: 940px; margin: 0 auto 56px; }
.pins { margin: 0; padding: 0; list-style: none; display: flex; }
.pins>li { display: flex; flex: 1; min-width: 0; min-height: 0; }
.side-l { grid-area: 2/1; flex-direction: column; padding-left: 8px; }
.side-b { grid-area: 3/2; }
.side-r { grid-area: 2/3; flex-direction: column-reverse; }
.side-t { grid-area: 1/2; flex-direction: row-reverse; }
.pin { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: #3b3d33; font-size: 13.5px; font-weight: 600; text-align: left; transition: color .15s; }
.pin::before { content: ""; flex-shrink: 0; background: linear-gradient(180deg,#d4d6cc,#8b8d80 60%,#aeb0a4); transition: background .15s, box-shadow .15s; }
.pin-lv, .pin-ev { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pin-no { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 18px; font: 600 9.5px/1 var(--mono); color: #6d6f62; border: 1px solid #b9baaf; }
.pin[data-lv="work"] .pin-no { color: var(--acid); background: var(--ink); border-color: var(--ink); }
.pin[data-lv="proj"] .pin-no { color: var(--ink); border-color: var(--ink); }
.pin[data-lv="learn"] .pin-no { border-style: dashed; border-color: var(--purple); color: var(--purple); }
.pin.nc::before { background: repeating-linear-gradient(90deg,#8b8d80 0 3px,transparent 3px 6px); }
.side-l .pin, .side-r .pin { height: 100%; }
.side-l .pin { justify-content: flex-end; }
.side-l .pin-name { order: 1; }
.side-l .pin-no { order: 2; }
.side-l .pin::before { order: 3; width: 30px; height: 11px; }
.side-r .pin { justify-content: flex-start; }
.side-r .pin::before { width: 30px; height: 11px; }
.side-t .pin { flex-direction: column-reverse; justify-content: flex-start; gap: 7px; }
.side-t .pin::before { width: 11px; height: 30px; }
.side-b .pin { flex-direction: column; justify-content: flex-start; gap: 7px; }
.side-b .pin::before { width: 11px; height: 30px; }
.side-t .pin-name, .side-b .pin-name { writing-mode: vertical-rl; text-orientation: mixed; min-height: 70px; line-height: 1; }
.pin:hover, .pin:focus-visible, .pin.is-on { color: var(--ink); outline: none; }
.pin:hover::before, .pin:focus-visible::before, .pin.is-on::before { background: var(--acid); box-shadow: 0 0 0 1px var(--ink), 0 0 16px rgba(129,118,237,.7); }
.pin.is-on .pin-name { color: var(--purple); }
.pin:focus-visible .pin-name { text-decoration: underline; text-underline-offset: 4px; }
.chip { grid-area: 2/2; position: relative; display: grid; place-items: center; padding: 26px; text-align: center; color: var(--paper); background: radial-gradient(120% 120% at 30% 20%,#2a2d23,#151611 62%); border: 1px solid #000; box-shadow: 14px 14px 0 rgba(21,22,17,.12), inset 0 1px 0 rgba(255,255,255,.06); }
.chip::before { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(241,240,231,.08); pointer-events: none; }
.chip-dot { position: absolute; left: 20px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: #0b0c08; box-shadow: inset 0 2px 3px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06); }
.chip-part { font: 800 clamp(26px,3vw,36px)/1 var(--mono); letter-spacing: .06em; color: #d9dacd; }
.chip-sub { margin-top: 10px; font: 500 10px/1.8 var(--mono); color: var(--muted); letter-spacing: .08em; }
.chip-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 11.5px; color: #d0d1c7; text-align: left; }
.chip-legend li { display: flex; align-items: center; gap: 7px; }
.chip-legend li::before { content: ""; width: 14px; height: 11px; border: 1px solid #d0d1c7; }
.chip-legend [data-lv="work"]::before { background: var(--acid); border-color: var(--acid); }
.chip-legend [data-lv="base"]::before { border-color: #5d6053; }
.chip-legend [data-lv="learn"]::before { border-style: dashed; border-color: var(--purple-lite); }
.cd-meta { display: flex; justify-content: center; gap: 10px; font: 600 10px/1 var(--mono); color: var(--muted); letter-spacing: .08em; }
.cd-no { color: var(--acid); }
.cd-name { margin-top: 12px; font-size: clamp(28px,3vw,38px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: var(--acid); text-shadow: 0 0 22px rgba(212,255,63,.35); }
.cd-lv { display: inline-block; margin-top: 12px; padding: 4px 10px; font: 600 10.5px/1 var(--mono); color: var(--ink); background: var(--paper); }
.cd-ev { margin-top: 14px; font-size: 13.5px; line-height: 1.75; color: #d0d1c7; }
.skill-list { margin: 0; }
.skill-list>div { display: grid; grid-template-columns: .4fr 1fr; gap: 45px; padding: 23px 0; border-top: 1px solid #c3c4b8; align-items: start; }
.skill-list dt { font-size: 14px; line-height: 1.7; }
.skill-list dt>span { font: 10px var(--mono); color: #626455; margin-right: 25px; }
.skill-list dd { margin: 0; }
.skill-list b { font-size: clamp(17px,1.75vw,26px); line-height: 1.5; font-weight: 500; letter-spacing: -.035em; }
.skill-list p { font-size: 13px; line-height: 1.9; margin-top: 8px; color: #56594b; }

/* ---------- Debug + learning ---------- */
.debug .eyebrow { color: var(--acid); }
.tps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: #45483b; border: 1px solid #45483b; }
.tp { padding: 24px 26px 22px; background: var(--ink); font-family: var(--mono); transition: background .25s; }
.tp:hover { background: var(--ink-2); }
.tp-id { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed #45483b; font-size: 11px; font-weight: 600; color: var(--acid); letter-spacing: .06em; }
.tp-id b { font-family: var(--sans); font-size: 17px; color: var(--paper); letter-spacing: -.02em; }
.tp-ring { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--acid); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 8px var(--acid); }
.tp:hover .tp-ring { animation: probe .6s ease-out; }
@keyframes probe { 50% { box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 8px var(--acid), 0 0 0 8px rgba(212,255,63,.25); } }
.tp-state { margin-left: auto; padding: 4px 8px; font: normal 700 9.5px/1 var(--mono); letter-spacing: .06em; color: var(--ink); background: var(--acid); }
.tp:first-child .tp-state { background: var(--purple-lite); }
.tp dl { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 8px 10px; margin: 0; font-size: 13px; line-height: 1.7; }
.tp dt { color: var(--muted); }
.tp dt::before { content: "["; color: #5d6053; }
.tp dt::after { content: "]"; color: #5d6053; }
.tp dd { margin: 0; font-family: var(--sans); color: #d0d1c7; }
.tp em { font-style: normal; font-family: var(--mono); font-weight: 700; color: var(--acid); }
.fw-wrap { margin-top: 88px; }
.fw { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: #45483b; border: 1px solid #45483b; }
.fw-item { padding: 24px 26px; background: var(--ink); }
.fw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fw-top b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.fw-state { padding: 4px 9px; font: 600 10.5px/1.3 var(--mono); }
.fw-state.learn { color: var(--ink); background: var(--acid); }
.fw-state.plan { color: var(--muted); border: 1px dashed #707267; }
.fw-bar { position: relative; height: 8px; margin: 18px 0 16px; overflow: hidden; background: var(--ink-3); }
.fw-bar span { position: absolute; inset: 0 auto 0 0; width: 38%; background: repeating-linear-gradient(-45deg,var(--acid) 0 8px,#a8cc2b 8px 16px); background-size: 22.6px 22.6px; animation: stripes 1s linear infinite; }
.fw-bar.plan span { width: 8%; background: #45483b; animation: none; }
@keyframes stripes { to { background-position: 22.6px 0; } }
.fw-item p { font-size: 13.5px; line-height: 1.85; color: #d0d1c7; }

/* ---------- Contact ---------- */
.contact { color: var(--ink); background: var(--purple); padding-bottom: 26px; }
.contact-heading { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.contact h2 { font-size: clamp(28px,4.1vw,66px); font-weight: 600; line-height: 1.3; letter-spacing: -.055em; margin-top: 16px; }
.contact h2 span { color: var(--acid); }
.contact-arrow { flex: 0 0 auto; width: 78px; height: 78px; border: 1px solid var(--ink); border-radius: 50%; font-size: 48px; display: grid; place-items: center; font-weight: 300; transition: background .3s, transform .3s; will-change: transform; }
.contact-arrow:hover { background: var(--acid); }
.contact-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 40px; margin-top: 44px; align-items: end; }
.contact-left>p { font-size: 13px; line-height: 1.9; }
.contact-focus { display: block; font: 9px/1.8 var(--mono); margin-top: 10px; }
.email-copy { display: block; background: none; border: 0; border-bottom: 1px solid var(--ink); text-align: left; padding: 12px 0; margin-top: 26px; }
.email-copy>span { font-size: clamp(22px,2.3vw,30px); letter-spacing: -.04em; }
.email-copy small { display: block; font-size: 10px; margin-top: 8px; }
.email-copy:hover small { text-decoration: underline; text-underline-offset: 4px; }
.contact-more { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; font: 11px/1.6 var(--mono); }
.contact-more a { border-bottom: 1px solid rgba(21,22,17,.4); }
.contact-more a:hover { border-color: var(--ink); background: var(--acid); }
.term { display: flex; flex-direction: column; min-height: 330px; overflow: hidden; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--acid); font: 13px/1.7 var(--mono); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid #45483b; color: var(--muted); font-size: 11px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #45483b; }
.term-bar i:nth-child(1) { background: #ff6865; }
.term-bar i:nth-child(2) { background: #e7f375; }
.term-bar i:nth-child(3) { background: var(--acid); }
.term-bar span { margin-left: 8px; }
.term-out { flex: 1; max-height: 290px; overflow-y: auto; padding: 14px 16px 4px; color: #d0d1c7; overscroll-behavior: contain; }
.term-out p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.term-out b { color: var(--acid); font-weight: 600; }
.term-out .cmd { color: var(--paper); }
.term-out .cmd::before { content: "hyb@bench:~$ "; color: var(--acid); }
.term-out .ok { color: var(--acid); }
.term-out .warn { color: var(--purple-lite); }
.term-out .y { color: var(--acid); }
.term-out a { color: var(--acid); text-decoration: underline; text-underline-offset: 3px; }
.term-in { display: flex; align-items: center; gap: 10px; padding: 6px 16px 12px; }
.term-in label { color: var(--acid); white-space: nowrap; }
.term-in input { flex: 1; min-width: 0; padding: 4px 0; border: 0; outline: 0; background: none; color: var(--paper); font: inherit; font-size: 16px; caret-color: var(--acid); }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid #45483b; }
.term-chips button { padding: 4px 10px; border: 1px solid #45483b; background: none; color: #d0d1c7; font: 500 11px/1.5 var(--mono); transition: color .15s, border-color .15s, background .15s; }
.term-chips button:hover { color: var(--ink); background: var(--acid); border-color: var(--acid); }
footer { display: flex; justify-content: space-between; gap: 30px; border-top: 1px solid rgba(21,22,17,.4); margin-top: 60px; padding-top: 22px; font: 9px/1.5 var(--mono); }

/* ---------- Dialog / toast ---------- */
.media-dialog { width: min(94vw,1200px); max-height: 94svh; margin: auto; border: 0; padding: 45px 12px 12px; background: var(--ink); color: var(--paper); }
.media-dialog[open] { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.media-dialog::backdrop { background: rgba(0,0,0,.9); backdrop-filter: blur(12px); }
.media-dialog img { width: 100%; max-height: 78svh; object-fit: contain; }
.dialog-close { position: absolute; right: 15px; top: 12px; background: none; border: 0; font-size: 12px; padding: 5px; }
.media-dialog>p { font: 9px var(--mono); text-align: center; margin: 14px 0 4px; }
.media-dialog.is-fallback-open { display: block; position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); z-index: 120; box-shadow: 0 0 0 100vmax rgba(0,0,0,.9); }
body.dialog-open { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 200; transform: translate(-50%,20px); opacity: 0; pointer-events: none; background: var(--paper); color: var(--ink); padding: 16px 24px; font-size: 12px; border: 1px solid var(--ink); box-shadow: 5px 5px 0 var(--acid); transition: opacity .25s,transform .25s; max-width: calc(100% - 40px); }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

/* ---------- Boot overlay ---------- */
.boot { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px 20px; background: var(--ink); color: var(--muted); font: 13px/1.75 var(--mono); }
.boot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg,rgba(255,255,255,.022) 0 1px,transparent 1px 3px); }
.boot-box { position: relative; z-index: 1; width: min(660px,100%); }
.boot-brand { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; color: var(--paper); font: 900 34px/1 var(--sans); letter-spacing: -3px; }
.boot-brand i { font: 10px var(--mono); letter-spacing: .08em; color: var(--acid); font-style: normal; }
.boot-log { margin: 0; min-height: 17.5em; white-space: pre-wrap; word-break: break-word; }
.boot-log .ok { color: var(--acid); }
.boot-log .warn { color: var(--purple-lite); }
.boot-log .hi { color: var(--paper); }
.boot-log .dim { color: #707267; }
.boot-log .prompt { color: var(--acid); }
.boot-log .typed { color: var(--paper); }
.boot.gate-mode { cursor: pointer; }
.boot-gate { position: relative; z-index: 1; display: grid; justify-items: center; gap: 34px; }
.gate-mark { font: 900 clamp(96px,18vw,230px)/.9 var(--sans); letter-spacing: -.07em; color: var(--paper); animation: gate-in .9s cubic-bezier(.2,.8,.2,1) both; }
.gate-click { display: inline-flex; align-items: center; padding: 11px 16px 11px 22px; border: 1px solid var(--acid); background: none; color: var(--acid); font: 700 13px/1 var(--mono); letter-spacing: .42em; opacity: 0; animation: gate-click-in .5s .6s cubic-bezier(.2,.8,.2,1) forwards; transition: background .2s, color .2s; }
.gate-click::after { content: ""; width: .62em; height: 1.05em; margin-left: .1em; background: currentColor; animation: blink 1s steps(1) infinite; }
.gate-click:hover, .gate-click:focus-visible { background: var(--acid); color: var(--ink); outline: none; }
.boot-gate.leaving { animation: gate-out .32s cubic-bezier(.6,0,.4,1) forwards; }
.boot-box:not([hidden]) { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes gate-in { from { opacity: 0; transform: scale(.92); filter: blur(8px); } }
@keyframes gate-click-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes gate-out { to { opacity: 0; transform: scale(1.08); filter: blur(6px); } }
.boot-log .cursor-blk { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--acid); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.boot.off { animation: crt-off .5s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes crt-off { 0% { clip-path: inset(0 0 0 0); } 45% { clip-path: inset(49.6% 0 49.6% 0); filter: brightness(2.5); } 100% { clip-path: inset(50% 50% 50% 50%); opacity: 0; } }
body.booting { overflow: hidden; }
body.powered .hero-kicker, body.powered .identity-caption, body.powered .resume-goals, body.powered .profile-grid, body.powered .hero-foot { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
body.powered .resume-goals { animation-delay: .12s; }
body.powered .identity-caption { animation-delay: .18s; }
body.powered .profile-grid { animation-delay: .26s; }
body.powered .hero-foot { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Scroll reveal ---------- */
.reveal { transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-pending { opacity: 0; transform: translateY(32px); }
h2.split .word { display: inline-block; white-space: nowrap; }
h2.split .ch { display: inline-block; transform: translateY(105%); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
h2.split { overflow: hidden; padding-bottom: .08em; }
h2.split.in .ch { transform: none; }

/* ---------- Responsive ---------- */
@media (min-width:1700px) {
  .resume-hero { padding-top: 145px; }
  .identity-grid { padding-top: 65px; padding-bottom: 65px; }
}
@media (max-width:1180px) {
  .header-note { display: none; }
  .site-header nav { margin-left: auto; gap: 20px; }
}
@media (max-width:1100px) {
  .identity-grid,.profile-grid { gap: 35px; grid-template-columns: 1fr 1fr; }
  .identity h1 { font-size: 12.5vw; }
  .profile-label>p { font-size: 18px; }
  .experience-item,.education,.skill-list>div { gap: 30px; grid-template-columns: .4fr 1fr; }
  .case>summary { grid-template-columns: 32px 1fr 28px; gap: 18px; }
  .case-discipline { display: none; }
  .demo-content { grid-template-columns: 1fr 260px; padding-right: 20px; }
  .sort-buttons button { padding: 10px 8px; }
  .signal-grid { grid-template-columns: 1fr; gap: 48px; }
  .signal-copy>p { max-width: 640px; }
  .readouts { grid-template-columns: repeat(4,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width:900px) {
  .site-header nav a[href="#debug"], .site-header nav a[href="#capabilities"] { display: none; }
  .readouts { grid-template-columns: 1fr 1fr; }
  .tps, .fw { grid-template-columns: 1fr; }
  /* Pinout becomes a datasheet pin-description table. */
  .hint-desktop { display: none; }
  .pinout { display: flex; flex-direction: column; gap: 12px; max-width: none; }
  .chip { order: -1; padding: 24px 18px; }
  .chip-dot { left: 14px; top: 14px; }
  .chip-detail { display: none !important; }
  .chip-idle { display: block !important; }
  .pins { flex-direction: column !important; padding: 12px 16px 4px !important; background: #e8e7dc; border: 1px solid #c3c4b8; }
  .pins::before { content: attr(data-title); padding: 0 0 8px; font: 600 11px/1.5 var(--mono); letter-spacing: .06em; color: var(--purple); border-bottom: 1px solid #c3c4b8; }
  .pins>li { border-bottom: 1px dashed #c3c4b8; }
  .pins>li:last-child { border-bottom: 0; }
  .pin, .side-l .pin, .side-r .pin, .side-t .pin, .side-b .pin { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; grid-template-areas: "no name lv" "no ev ev"; align-items: center; gap: 2px 10px; height: auto; padding: 10px 0; text-align: left; }
  .pin::before { display: none; }
  .pin-no { grid-area: no; align-self: start; margin-top: 2px; }
  .pin-name, .side-t .pin-name, .side-b .pin-name { grid-area: name; writing-mode: horizontal-tb; min-height: 0; color: var(--ink); font-size: 15px; line-height: 1.5; }
  .pin-lv, .pin-ev { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .pin-lv { grid-area: lv; font: 500 10px/1.5 var(--mono); color: #626455; }
  .pin-ev { grid-area: ev; font-size: 12.5px; font-weight: 400; line-height: 1.65; color: #56594b; }
  .pin.is-on .pin-name { color: var(--ink); }
}
@media (max-width:760px) {
  html { scroll-padding-top: 80px; }
  .section-pad { padding: 56px var(--pad); }
  .site-header { height: 66px; gap: 14px; }
  .wordmark { font-size: 25px; }
  .wordmark i { display: none; }
  .site-header nav { gap: 16px; font-size: 11px; }
  .site-header nav a[href="#contact"] { display: none; }
  .pdf-link { padding: 0 10px; }
  .resume-hero { padding-top: 95px; padding-bottom: 20px; }
  .hero-kicker { font-size: 8px; gap: 12px; letter-spacing: .01em; }
  .hero-kicker>span:first-child { display: none; }
  .identity-grid { grid-template-columns: 1fr; gap: 28px; padding: 34px 0 30px; }
  .identity h1 { font-size: clamp(80px,18vw,135px); }
  .identity h1 .name-en, .identity h1 .name-dot { font-size: 32px; }
  .identity-caption { font-size: 11px; margin-top: 18px; }
  .resume-goals { padding: 2px 0 2px 18px; border-left: 2px solid var(--purple); }
  .resume-goals>p { font-size: 21px; margin-top: 10px; max-width: 420px; line-height: 1.45; }
  .resume-goals>p>span { display: block; }
  .resume-goals .text-link { display: none; }
  .profile-grid { grid-template-columns: 1fr; gap: 20px; padding: 25px 0; }
  .profile-label { gap: 16px; }
  .profile-star { font-size: 45px; }
  .profile-label>p { font-size: 16px; line-height: 1.6; }
  .profile-summary>p { font-size: 13px; line-height: 1.95; }
  .profile-meta { font-size: 10px; margin-top: 15px; gap: 10px 18px; }
  .hero-foot { font-size: 8px; gap: 12px; }
  .marquee { padding: 12px 0; }
  .signal-copy h2 { font-size: 40px; }
  .signal-copy>p { font-size: 13px; }
  .lcd { padding: 12px; }
  .lcd-num { height: 48px; padding: 0 9px; }
  .lcd-num svg { height: 30px; }
  .lcd b { font-size: 12px; }
  .lcd small { font-size: 10.5px; }
  .scope { padding: 10px; box-shadow: 10px 10px 0 -1px var(--ink-2), 10px 10px 0 0 #45483b; }
  .scope-top, .scope-readout { font-size: 9px; gap: 8px; left: 8px; right: 8px; }
  .scope-spec, .knob-label { display: none; }
  .key { min-width: 38px; padding: 0 8px; height: 34px; }
  .section-heading { margin-bottom: 28px; align-items: flex-start; gap: 16px; }
  .section-heading h2 { font-size: 34px; margin-top: 8px; }
  .eyebrow { font-size: 9px; }
  .section-note { font-size: 10px; max-width: 150px; padding-top: 4px; }
  .section-note>span { font-size: 9px; }
  .experience-item { grid-template-columns: 1fr; gap: 18px; padding: 25px 0 28px; }
  .experience-date { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 0; }
  .experience-date>span { font-size: 17px; }
  .experience-date>small { font-size: 8px; margin: 0; }
  .job-heading h3 { font-size: 22px; }
  .job-heading>span { font-size: 11px; }
  .experience-points { margin-top: 15px; }
  .experience-points li { font-size: 13px; padding-left: 2px; }
  .education { grid-template-columns: 1fr; gap: 12px; padding-top: 22px; }
  .awards { grid-column: 1; }
  .awards li { font-size: 13px; }
  .case>summary { grid-template-columns: 24px 1fr 22px; gap: 10px; padding: 23px 0; }
  .case>summary:hover { padding-left: 0; }
  .case-index { font-size: 10px; margin-top: 6px; }
  .case-name { font-size: 20px; line-height: 1.4; }
  .case-name small { font-size: 10px; line-height: 1.8; margin-top: 8px; }
  .case-plus { font-size: 26px; }
  .case-body { grid-template-columns: 1fr; margin-bottom: 25px; }
  .case-image-block { height: 350px; min-height: 0; }
  .case-image-block img { object-position: center 54%; }
  .case-story { padding: 27px 23px; }
  .case-story h3 { font-size: 25px; margin-top: 18px; }
  .case-story>p:not(.case-role) { font-size: 13px; }
  .case-role { font-size: 9px; }
  .debug-note { grid-template-columns: 1fr; gap: 15px; padding: 22px; }
  .debug-note>small { grid-column: 1; line-height: 1.8; }
  .case-follow .case-image-block { height: 310px; }
  .power-art, .spike-art { aspect-ratio: 1; }
  .case-diagram { padding: 20px 14px 18px; }
  .diagram text { font-size: 14px; }
  .diagram text.sub { font-size: 12px; }
  .diagram .lbl { font-size: 11.5px; }
  .project-demo>summary { padding: 17px 20px; gap: 14px; font-size: 11px; }
  .project-demo>summary>span:first-child { font-size: 9px; }
  .demo-content { display: block; padding: 0 0 22px; }
  .arm-wrap { height: 330px; }
  .drag-cue { left: 20px; bottom: 15px; }
  .play-controls { margin: 0 20px; padding: 0 0 0 16px; }
  .play-caption { min-height: 22px; }
  .sort-buttons button { padding: 10px 14px; }
  .skill-list>div { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
  .skill-list dt { font-size: 12px; }
  .skill-list dt>span { margin-right: 16px; font-size: 9px; }
  .skill-list b { font-size: 19px; }
  .skill-list p { font-size: 12px; }
  .tp, .fw-item { padding: 20px; }
  .fw-wrap { margin-top: 64px; }
  .contact-heading { gap: 20px; align-items: flex-end; }
  .contact h2 { font-size: 30px; max-width: 310px; margin-top: 12px; }
  .contact-arrow { width: 49px; height: 49px; font-size: 31px; }
  .contact-grid { margin-top: 28px; gap: 32px; }
  .email-copy>span { font-size: 23px; }
  .term { min-height: 290px; font-size: 12px; box-shadow: 6px 6px 0 var(--acid); }
  .contact footer { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 8px; }
  .contact footer>span { grid-column: 1/-1; grid-row: 2; }
  .contact footer>a:last-child { text-align: right; }
  .media-dialog img { max-height: 72svh; }
}
@media (max-width:560px) {
  /* Narrow screens: keep the wordmark, language switch and PDF; sections are a scroll away. */
  .site-header nav { display: none; }
  .lang { margin-left: auto; }
  .pdf-link { white-space: nowrap; }
}
@media (max-width:380px) {
  .site-header nav { gap: 12px; }
  .site-header nav sup { display: none; }
  .identity h1 { font-size: 78px; }
  .resume-goals>p { font-size: 18px; }
  .section-heading h2 { font-size: 30px; }
  .case-name { font-size: 18px; }
  .arm-wrap { height: 270px; }
  .project-demo>summary>span:first-child { display: none; }
  .contact h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  h2.split .ch { transform: none; }
}

/* ============================================================
   Print — a clean two-page A4 résumé built from the same DOM.
   ============================================================ */
@page { size: A4; margin: 13mm 14mm 14mm; }
@media print {
  :root { --paper: #111; --muted: #555; color-scheme: light; }
  html, body { background: #fff !important; color: #111; font-size: 10pt; line-height: 1.6; }
  body::after, html.js-boot body::before, .skip-link, .progress, .cursor, .site-header, .marquee, .signal, .hero-kicker, .hero-foot, .profile-label, .text-link, .image-expand, .photo-label, .case-plus, .case-discipline, .case-index, .project-demo, .toast, .media-dialog, .contact, .boot, .case-image-block, .power-art, .spike-art, .case-diagram, .debug-note, .project-tags, .pinout, .section-note, .eyebrow, .heading-dot, .badge, .stack, .tp-ring, .tp-state, .fw-bar, .more-head span { display: none !important; }
  .section-pad { padding: 0; background: #fff !important; color: #111 !important; }
  .resume-hero { padding: 0 0 4pt; }
  .identity-grid { display: block; padding: 0; }
  .identity h1 { display: flex; align-items: baseline; gap: 12pt; font-size: 26pt; letter-spacing: 0; line-height: 1.15; }
  .identity h1 .name-en, .identity h1 .name-dot { font: 600 10pt/1 var(--mono); letter-spacing: .2em; color: #555; margin: 0; }
  .identity h1 .name-dot { display: none; }
  .identity-caption { margin-top: 4pt; font-size: 12pt; font-weight: 700; letter-spacing: 0; color: #111; }
  .identity-caption { font-size: 0 !important; }
  .identity-caption::before { content: "嵌入式系统与测试验证工程师"; font-size: 12pt; }
  .sep { display: inline; font-style: normal; }
  .t-print { display: inline !important; }
  .t-screen { display: none !important; }
  .resume-goals { display: block; margin-top: 3pt; padding: 0; border: 0; }
  .resume-goals>p { display: inline; font-size: 9.5pt; letter-spacing: 0; line-height: 1.5; color: #333; }
  .resume-goals>p br { display: none; }
  .resume-goals>p::before { content: "目标方向："; }
  .resume-goals>p>span { color: #333; }
  .profile-grid { display: block; border: 0; padding: 4pt 0 0; }
  .profile-summary>p { font-size: 9.5pt; line-height: 1.7; color: #333; }
  .profile-summary b { box-shadow: none; color: #111; }
  .profile-meta { display: none; }
  .print-contact { display: block; margin: 5pt 0 0; padding-bottom: 5pt; border-bottom: 1.2pt solid #111; font: 500 9pt/1.5 var(--mono); color: #111; }
  .experience, .work, .toolbox, .debug { padding-top: 9pt; }
  .section-heading { display: block; margin: 0 0 5pt; padding-bottom: 3pt; border-bottom: 1.2pt solid #111; }
  .section-heading h2 { font-size: 12.5pt; letter-spacing: 0; margin: 0; }
  h2 .ch { transform: none !important; }
  .education::before { content: "教育与竞赛"; display: block; margin: 4pt 0 3pt; padding-bottom: 3pt; border-bottom: 1.2pt solid #111; font-size: 12.5pt; font-weight: 650; }
  .experience { color: #111; }
  .experience-item { display: block; padding: 0 0 5pt; border: 0; break-inside: avoid; }
  .experience-date { float: right; padding: 0; }
  .experience-date>span { font: 600 9pt/1.6 var(--mono); letter-spacing: 0; }
  .experience-date>small { display: none; }
  .job-heading { display: flex; align-items: baseline; gap: 8pt; }
  .job-heading h3 { font-size: 10.5pt; letter-spacing: 0; }
  .job-heading>span { display: inline; margin: 0; font-size: 9.5pt; color: #555; }
  .experience-points { margin: 2pt 0 0; padding-left: 12pt; }
  .experience-points li { margin: 0; font-size: 9.5pt; line-height: 1.6; color: #333; }
  .experience-points a { border: 0; font-weight: 400; color: inherit; }
  .education { display: block; border: 0; padding: 3pt 0 0; }
  .education p { font-size: 10pt; }
  .education b { font-size: 10.5pt; }
  .education p>span { display: inline; margin-left: 8pt; font-size: 9pt; }
  .awards { margin-top: 2pt; }
  .awards li { display: block; padding: 0; border: 0; font-size: 9.5pt; font-weight: 600; }
  .awards li>span { font-size: 9.5pt; margin-right: 6pt; }
  .awards small { margin-left: 6pt; font-size: 9pt; color: #555; }
  .section-heading { break-after: avoid; }
  .case { border: 0 !important; break-inside: avoid; }
  .case>summary { display: block; padding: 4pt 0 0; color: #111 !important; }
  .case-name { display: block; font-size: 10.5pt; letter-spacing: 0; font-weight: 700; }
  .case-name small { display: inline; margin-left: 6pt; font-size: 9pt; color: #555; }
  .case-body { display: block; margin: 0 0 3pt; background: none !important; color: #111; animation: none; }
  .case-story { padding: 0; }
  .case-role { font-size: 8.5pt; color: #555; }
  .case-story h3 { display: none; }
  .case-story>p:not(.case-role) { margin-top: 1pt; font-size: 9.5pt; line-height: 1.6; color: #333; }
  .case-facts { margin: 1pt 0 0; }
  .case-facts>div { display: grid; grid-template-columns: 44pt 1fr; gap: 6pt; padding: 0; border: 0; }
  .case-facts dt { font-size: 8.5pt; color: #555; }
  .case-facts dd { font-size: 9.5pt; line-height: 1.55; color: #333; }
  .more-head { margin: 6pt 0 2pt; font-size: 10.5pt; }
  .more { display: grid; grid-template-columns: 1fr 1fr; gap: 1pt 12pt; background: none; border: 0; }
  .more li { padding: 0; background: none; }
  .more b { display: inline; font-size: 9.5pt; margin-right: 5pt; }
  .more span { display: inline; font-size: 9pt; color: #444; }
  .toolbox { color: #111; }
  .skill-list>div { display: grid; grid-template-columns: 70pt 1fr; gap: 6pt; padding: 1pt 0; border: 0; }
  .skill-list dt { font-size: 9.5pt; font-weight: 700; }
  .skill-list dt>span { display: none; }
  .skill-list b { display: inline; font-size: 9.5pt; font-weight: 600; letter-spacing: 0; }
  .skill-list p { display: inline; margin-left: 6pt; font-size: 9pt; color: #444; }
  .skill-list>div:nth-child(1) p::after { content: "CAN（学习中）。"; }
  html[lang="en"] .identity h1 { font-size: 26pt; }
  html[lang="en"] .identity-caption::before { content: "Embedded Systems & Validation Engineer"; }
  html[lang="en"] .resume-goals>p::before { content: "Target roles: "; }
  html[lang="en"] .education::before { content: "Education & Awards"; }
  html[lang="en"] .skill-list>div:nth-child(1) p::after { content: " CAN (learning)."; }
  html[lang="en"] .tp dl { grid-template-columns: 42pt 1fr; }
  html[lang="en"] .case-facts>div { grid-template-columns: 60pt 1fr; }
  .job-heading h3 small { font-size: 8.5pt; }
  html[lang="en"] .job-heading { display: block; }
  html[lang="en"] .job-heading h3 { display: inline; }
  html[lang="en"] .job-heading>span { display: inline; margin-left: 6pt; }
  html[lang="en"] .experience-points li, html[lang="en"] .case-story>p:not(.case-role), html[lang="en"] .case-facts dd, html[lang="en"] .profile-summary>p { font-size: 9pt; line-height: 1.5; }
  html[lang="en"] .case-name small { display: none; }
  html[lang="en"] .skill-list p { font-size: 8.8pt; }
  /* English runs longer: compact test points into one line each and leave the minor builds to the website. */
  html[lang="en"] .more-head, html[lang="en"] .more { display: none !important; }
  html[lang="en"] .skill-list>div { grid-template-columns: 108pt 1fr; padding: 0; }
  html[lang="en"] .skill-list dt, html[lang="en"] .skill-list dd, html[lang="en"] .skill-list p { line-height: 1.5; }
  html[lang="en"] .tp { padding: 3pt 6pt; }
  html[lang="en"] .fw-item p { line-height: 1.45; font-size: 8.8pt; }
  html[lang="en"] .fw-wrap { margin-top: 4pt; }
  html[lang="en"] .case-facts dt, html[lang="en"] .case-facts dd { line-height: 1.45; }
  html[lang="en"] .case { padding-bottom: 1pt; }
  html[lang="en"] .section-pad { padding-top: 6pt; }
  html[lang="en"] .tp dl { display: block; font-size: 8.4pt; line-height: 1.5; }
  html[lang="en"] .tp dt { display: none; }
  html[lang="en"] .tp dd { display: inline; }
  html[lang="en"] .tp dd:not(:last-of-type)::after { content: " → "; color: #888; }
  html[lang="en"] .tp-id { border-bottom: 0; margin-bottom: 1pt; padding-bottom: 0; }
  .debug { color: #111; }
  .tps { grid-template-columns: repeat(2,1fr); gap: 5pt; background: none; border: 0; }
  .tp { padding: 4pt 6pt; background: none; border: .7pt solid #bbb; break-inside: avoid; }
  .tp-id { margin: 0 0 2pt; padding: 0 0 2pt; color: #555; font-size: 8pt; border-bottom: .6pt dashed #bbb; }
  .tp-id b { font-size: 9.5pt; color: #111; }
  .tp dl { grid-template-columns: 26pt 1fr; gap: 0 4pt; font-size: 8.5pt; line-height: 1.5; }
  .tp dt { color: #666; }
  .tp dt::before, .tp dt::after { content: none; }
  .tp dd { color: #333; }
  .tp em { color: #111; }
  .fw-wrap { margin-top: 8pt; }
  .fw { grid-template-columns: 1fr 1fr; gap: 10pt; background: none; border: 0; }
  .fw-item { padding: 0; background: none; break-inside: avoid; }
  .fw-top { justify-content: flex-start; }
  .fw-top b { font-size: 10pt; }
  .fw-state { padding: 0 5pt; font-size: 8pt; color: #555 !important; background: none !important; border: .6pt solid #999 !important; }
  .fw-item p { margin-top: 2pt; font-size: 9pt; line-height: 1.55; color: #333; }
  .reveal.is-pending { opacity: 1 !important; transform: none !important; }
  a { color: inherit; }
}
