/* Layout: the board lies on an ESD bench mat under a lab lamp. Each part's datasheet is a paper sheet laid
   beside it, its header a strip of amber Kapton tape; part callouts are printed label-maker tape. */
:root{
  --mat:#93a3ad;            /* anti-static bench mat */
  --mat-deep:#7c8d98;
  --paper:#f7f8f5;          /* datasheet paper */
  --paper-2:#eceee9;
  --ink:#15191d;
  --ink-2:#4b565f;
  --ink-3:#77828a;
  --rule:rgb(21 25 29 / .14);
  --kapton:#d98a26;         /* polyimide tape: the one accent */
  --kapton-t:rgb(226 146 40 / .58);
  --kapton-ink:#7a4608;
  --screen:#0d1113;         /* instrument screens */
  --led:#2fc463;
  --ch:#f5d33b;             /* per-section scope channel colour (only ever drawn on a screen) */
  --display:'Archivo','Arial Narrow',Arial,sans-serif;
  --sans:'Instrument Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'Martian Mono',ui-monospace,'Cascadia Code',Consolas,monospace;
  --gutter:clamp(1rem,3.5vw,3.5rem);
  --bar:3.9rem;
  --ease:cubic-bezier(.16,1,.3,1);
  color-scheme:light;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:clamp(11px,min(1.07vw,1.9vh),19px);background:#d9d6cf;color:var(--ink);-webkit-text-size-adjust:100%;scrollbar-width:none}   /* the office behind the desk, as in the 3D scene */
html::-webkit-scrollbar{display:none}   /* the page scrolls, but the tour is driven by the rail and wheel: no scrollbar eating 15px of the canvas */
body{background:var(--mat);font-family:var(--sans);font-size:clamp(.95rem,.92rem + .18vw,1.05rem);line-height:1.55;overflow-x:clip;-webkit-font-smoothing:antialiased;min-height:100vh}
body.loading{overflow:hidden}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;text-align:inherit}
ul{list-style:none}
.mono{font-family:var(--mono);font-stretch:87.5%}
::selection{background:var(--kapton);color:var(--ink)}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.skip{position:fixed;top:1rem;left:1rem;z-index:999;padding:.6rem 1rem;background:var(--ink);color:var(--paper);transform:translateY(-200%)}
.skip:focus{transform:none}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---------- flashing screen: the mat, an esptool log, a strip of tape filling up ---------- */

/* ---------- chrome ---------- */
.top{position:fixed;top:0;left:0;right:0;z-index:60;display:flex;justify-content:space-between;align-items:center;padding:.9rem var(--gutter);pointer-events:none}
.top>*{pointer-events:auto}
.brand{display:flex;align-items:center;gap:.75rem;color:var(--ink)}
.brand svg{width:40px;height:28px;flex:none}
.brand span{display:flex;flex-direction:column;line-height:1.1}
.brand b{font-family:var(--display);font-stretch:118%;font-weight:800;font-size:1.02rem;letter-spacing:.02em}
.brand small{font-family:var(--mono);font-stretch:87.5%;font-size:.58rem;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-2)}
.top__right{display:flex;align-items:center;gap:1.1rem}
.top__pwr{display:flex;align-items:center;gap:.5rem;font-size:.62rem;letter-spacing:.12em;color:var(--ink-2)}
.top__pwr i{width:7px;height:7px;border-radius:50%;background:var(--led);box-shadow:0 0 0 2px rgb(47 196 99 / .22),0 0 8px var(--led)}
@media (max-width:820px){.brand small,.top__pwr{display:none}.brand b{font-size:.8rem;white-space:nowrap}.brand svg{width:30px}}

#gl{position:fixed;inset:0;width:100%;height:100%;z-index:0;display:block;touch-action:pan-y}
.track{position:relative;z-index:-1;pointer-events:none}
.rail{position:absolute;left:-9999px}

/* bottom strip: the mat's printed ruler, serial line on the left, one section per division */
.bar{position:fixed;left:0;right:0;bottom:0;height:var(--bar);z-index:70;display:grid;grid-template-columns:minmax(0,22rem) 1fr 14rem;grid-template-rows:minmax(0,1fr);overflow:hidden;align-items:stretch;background:var(--paper);border-top:1px solid var(--rule)}
.bar::before{content:"";position:absolute;left:0;right:0;top:0;height:7px;pointer-events:none;background:
  repeating-linear-gradient(90deg,var(--ink-3) 0 1px,transparent 1px 10px),
  repeating-linear-gradient(90deg,var(--ink-2) 0 1px,transparent 1px 50px);background-size:100% 4px,100% 7px;background-repeat:no-repeat;opacity:.55}
.bar__ser{padding:.55rem var(--gutter) 0;display:flex;align-items:center;font-size:.6rem;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--rule)}
.bar__ser .lv{display:inline-block;margin-right:.4rem;font-weight:600}
.bar__ser .I{color:#145c31} .bar__ser .W{color:var(--kapton-ink)} .bar__ser .D{color:#1d4a6b}
#la{width:100%;height:100%;min-height:0;display:block;cursor:pointer}
.bar__read{display:flex;align-items:center;gap:.35rem;padding:.45rem var(--gutter) 0 1rem;font-size:.62rem;color:var(--ink-3);border-left:1px solid var(--rule);white-space:nowrap}
.bar__read b{font-family:var(--display);font-stretch:125%;font-weight:800;font-size:1.6rem;color:var(--ink);line-height:1;font-variant-numeric:tabular-nums}
.bar__read em{font-style:normal;margin-left:.55rem;color:var(--ink-2);letter-spacing:.06em;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis}
@media (max-width:1100px){.bar{grid-template-columns:1fr 8.5rem}.bar__ser{display:none}.bar__read em{display:none}.bar__read{padding-right:1rem}}
@media (max-width:820px){html{font-size:16px}:root{--bar:50px}.bar{grid-template-columns:1fr}.bar__read{display:none}}

/* ---------- part callouts: label-maker tape ---------- */
.tags{position:fixed;inset:0;z-index:20;pointer-events:none}
.tags svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.tags line{stroke:var(--ink);stroke-width:1;opacity:.7}
.tags circle{fill:var(--paper);stroke:var(--ink);stroke-width:1.5}
.tag{position:absolute;left:0;top:0;display:flex;align-items:stretch;background:var(--paper);font-family:var(--mono);font-stretch:87.5%;font-size:.6rem;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;pointer-events:auto;opacity:0;box-shadow:0 1px 0 rgb(0 0 0 / .08),0 4px 10px -4px rgb(20 30 40 / .45);transition:opacity .3s,background .2s;will-change:transform}
.tag b{display:grid;place-items:center;min-width:2.3rem;padding:0 .5rem;background:var(--ink);color:var(--paper);font-weight:600}
.tag span{padding:.42rem .7rem;color:var(--ink)}
.tag small{align-self:center;padding-right:.7rem;color:var(--ink-3);font-size:.56rem}
.tag:hover{background:var(--kapton)}
.tags.hero .tag small{display:none}
.tag--hw{pointer-events:none;transition:opacity .25s}
.tag--hw span{padding:.32rem .55rem}
@media (max-width:900px){.tags{display:none}}

/* ---------- datasheet sheets ---------- */
.stage{position:fixed;inset:0;bottom:var(--bar);z-index:30;pointer-events:none}
.panel{position:absolute;top:50%;width:min(33rem,41vw);max-height:calc(100vh - var(--bar) - 6.5rem);overflow:hidden;padding:0 1.5rem 1.5rem;background:var(--paper);color:var(--ink);
  box-shadow:0 1px 0 rgb(255 255 255 / .6) inset,0 2px 3px rgb(20 30 40 / .12),0 22px 44px -18px rgb(20 30 40 / .55);
  opacity:0;visibility:hidden;transform:translateY(-46%);transition:opacity .35s ease,transform .7s var(--ease),visibility 0s linear .35s;pointer-events:none}
.panel.is-active{opacity:1;visibility:visible;transform:translateY(-50%);pointer-events:auto;transition-delay:0s}
.panel[data-side=l]{left:var(--gutter)}
.panel[data-side=r]{right:var(--gutter)}
.panel>*+*{margin-top:1.05rem}
.panel p{color:var(--ink-2);max-width:62ch}
.panel--hero{background:var(--paper);box-shadow:0 22px 44px -18px rgb(20 30 40 / .55);width:fit-content;max-width:62vw;overflow:visible;padding:1.6rem 1.8rem}   /* a card: the desk mat under it is black */

/* sheet header: a strip of Kapton tape holding the sheet, with the reference designator */
.dsh{position:sticky;top:0;z-index:4;display:flex;align-items:stretch;margin:0 -1.5rem;padding:.9rem 1.5rem .7rem;background:var(--paper);font-size:.58rem;letter-spacing:.08em;text-transform:uppercase;border-bottom:1px solid var(--rule)}
.dsh b{display:grid;place-items:center;padding:.35rem .6rem;background:var(--kapton-t);color:var(--ink);font-weight:600;letter-spacing:.04em;box-shadow:inset 0 0 0 1px rgb(122 70 8 / .18)}
.dsh span{padding:.35rem .75rem;color:var(--ink);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dsh em{font-style:normal;padding:.35rem 0;color:var(--ink-3);white-space:nowrap}
.panel>.dsh+*{margin-top:1.2rem}

.eyebrow{font-size:.64rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink)}
.title{font-family:var(--display);font-stretch:118%;font-weight:800;text-transform:uppercase;font-size:clamp(1.7rem,2.9vw,2.6rem);line-height:.98;letter-spacing:-.01em;text-wrap:balance}
/* the highlighted words get a strip of tape laid over them */
.title .hl{background:linear-gradient(transparent 18%,var(--kapton-t) 18%,var(--kapton-t) 88%,transparent 88%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .08em}
.title--hero{font-stretch:112%;font-size:clamp(2.6rem,6vw,5.8rem);line-height:.86;letter-spacing:-.02em;display:block}
.title--hero .l1,.title--hero .l2{display:block}
.title--hero .l2{width:fit-content;background:linear-gradient(transparent 14%,var(--kapton-t) 14%,var(--kapton-t) 90%,transparent 90%);padding:0 .06em;margin-left:-.06em}
.caret{display:none}
.lede{font-size:clamp(1rem,.95rem + .3vw,1.18rem);max-width:32rem;color:var(--ink)}
.panel--hero>*+*{margin-top:1.2rem}
.strip{display:flex;flex-wrap:wrap;gap:.45rem;font-size:.6rem}
.strip li{display:flex;align-items:center;gap:.6rem;padding:0 .7rem 0 0;background:var(--paper);color:var(--ink);box-shadow:0 3px 8px -5px rgb(20 30 40 / .5)}
.strip span{padding:.38rem .55rem;background:var(--ink);color:var(--paper);letter-spacing:.08em}

/* scope: a small instrument screen inset into the sheet */
.scope{display:block;width:100%;height:108px;background:var(--screen);border:5px solid #23292e;border-radius:3px;box-shadow:inset 0 0 0 1px rgb(255 255 255 / .04)}

/* reveals */
.rv{opacity:0;transform:translateY(12px);transition:opacity .6s ease,transform .8s var(--ease);transition-delay:calc(var(--d,0) * 60ms + .2s)}
.panel.is-active .rv{opacity:1;transform:none}

/* spec table, ruled like a datasheet */
.spec{display:grid;border-top:2px solid var(--ink)}
.spec>div{display:grid;grid-template-columns:6.4rem 1fr;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--rule);font-size:.92rem}
.spec dt{font-family:var(--mono);font-stretch:87.5%;font-size:.58rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);padding-top:.25rem}
.spec dd{color:var(--ink)}
.lcds{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}
.lcds>div{background:var(--paper-2);padding:.8rem .9rem}
.lcds b{display:block;font-family:var(--display);font-stretch:125%;font-weight:800;font-size:clamp(1.8rem,2.8vw,2.5rem);line-height:.95;color:var(--ink);font-variant-numeric:tabular-nums}
.lcds span{display:block;font-size:.8rem;color:var(--ink-2);line-height:1.3;margin-top:.3rem}
.job{padding:.2rem 0 1rem;border-bottom:1px solid var(--rule)}
.job:last-child{border-bottom:0;padding-bottom:0}
.job__when{display:inline-block;font-size:.56rem;letter-spacing:.08em;color:var(--ink);background:var(--kapton-t);padding:.25rem .45rem}
.job h3{font-family:var(--display);font-stretch:112%;font-weight:800;text-transform:uppercase;font-size:1.22rem;letter-spacing:0;margin-top:.55rem;line-height:1.05}
.job__org{color:var(--ink-3);font-size:.86rem;margin:.2rem 0 .5rem}
.job p,.job li{font-size:.92rem;color:var(--ink-2)}
.job ul{padding-left:1.1rem;list-style:square}.job li+li{margin-top:.3rem}.job li::marker{color:var(--kapton)}
.pins{display:grid;gap:0;border-top:2px solid var(--ink)}
.pins li{display:flex;gap:1rem;align-items:center;padding:.55rem 0;border-bottom:1px solid var(--rule);font-size:.66rem}
.pins b{min-width:4.8rem;text-align:center;padding:.3rem .4rem;background:var(--ink);color:var(--paper);font-weight:500}
.pins span{color:var(--ink-2)}
.pins .c-i2c{box-shadow:inset 0 -3px 0 #2f6fd6}.pins .c-uart{box-shadow:inset 0 -3px 0 #d63a2f}.pins .c-spi{box-shadow:inset 0 -3px 0 #1f9d55}
.pins li{align-items:flex-start}.pins li span{line-height:1.6}
/* protocol chart: a Telemetry Viewer window set into the sheet */
.scopehint{margin:0;font-size:.62rem;line-height:1.5;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.chips{display:flex;flex-wrap:wrap;gap:.35rem}
.chips span{font-family:var(--mono);font-stretch:87.5%;font-size:.6rem;padding:.3rem .55rem;border:1px solid var(--rule);color:var(--ink-2);background:var(--paper)}
.group h3{font-size:.58rem;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3);font-weight:500;margin-bottom:.5rem}
.group+.group{margin-top:1rem}
.edu{display:grid;border-top:2px solid var(--ink)}
.edu>div{display:grid;grid-template-columns:3.6rem 1fr;column-gap:1rem;padding:.8rem 0;border-bottom:1px solid var(--rule)}
.edu span{grid-row:1/3;color:var(--ink);font-size:.7rem;padding-top:.2rem;font-variant-numeric:tabular-nums}
.edu b{font-weight:600}.edu small{color:var(--ink-2);font-size:.85rem}
.mail{display:block;width:fit-content;max-width:100%;overflow-wrap:anywhere;font-family:var(--mono);font-stretch:87.5%;font-size:clamp(.8rem,1.4vw,1.02rem);font-weight:500;padding:.6rem .85rem;color:var(--ink);background:var(--kapton-t)}
.mail:hover{background:var(--kapton)}
.foot{font-size:.56rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}

/* buttons: tactile switches */
.row{display:flex;flex-wrap:wrap;gap:.6rem}
.btn{position:relative;display:inline-flex;white-space:nowrap;align-items:center;gap:.65rem;padding:.72rem 1.1rem .72rem .85rem;background:var(--paper);color:var(--ink);font-family:var(--mono);font-stretch:87.5%;font-size:.66rem;font-weight:500;letter-spacing:.07em;text-transform:uppercase;box-shadow:0 1px 0 rgb(255 255 255 / .7) inset,0 0 0 1px var(--rule),0 3px 0 var(--ink-3);transition:transform .12s,box-shadow .12s,background .2s}
.btn i{width:8px;height:8px;border-radius:50%;background:#b9c0c4;box-shadow:inset 0 0 0 1px rgb(0 0 0 / .25);transition:.2s}
.btn:hover i,.btn:focus-visible i{background:var(--led);box-shadow:0 0 8px var(--led)}
.btn:active{transform:translateY(3px);box-shadow:0 0 0 1px var(--rule),0 0 0 var(--ink-3)}
.btn--solid{background:var(--ink);color:var(--paper);box-shadow:0 0 0 1px var(--ink),0 3px 0 #000}
.btn--solid i{background:#3a434a}
.btn--solid:hover,.btn--solid:focus-visible{background:#262d33}
.btn--sm{padding:.5rem .85rem .5rem .7rem;font-size:.58rem}

/* crosshair cursor */
.cursor{position:fixed;left:0;top:0;z-index:300;pointer-events:none;display:none}
.cursor i{position:absolute;left:-13px;top:-13px;width:26px;height:26px;background:
  linear-gradient(var(--ink),var(--ink)) center/1px 100% no-repeat,
  linear-gradient(var(--ink),var(--ink)) center/100% 1px no-repeat;opacity:.85;transition:transform .25s var(--ease)}
.cursor i::after{content:'';position:absolute;inset:7px;border:1px solid var(--ink);border-radius:50%}
.cursor span{position:absolute;left:18px;top:12px;font-family:var(--mono);font-stretch:87.5%;font-size:.55rem;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;padding:.2rem .4rem;background:var(--paper);color:var(--ink);box-shadow:0 3px 8px -4px rgb(20 30 40 / .5)}
.cursor.is-link i{transform:rotate(45deg) scale(1.25)}
.cursor.has-label span{background:var(--kapton)}
@media (pointer:fine){html.has-cursor .cursor{display:block} html.has-cursor body,html.has-cursor a,html.has-cursor button,html.has-cursor [role=button],html.has-cursor #la{cursor:none}}

/* ---------- mobile: the sheet slides up from the bottom ---------- */
@media (max-width:820px),(max-aspect-ratio:23/20){
  .stage{bottom:var(--bar)}
  .panel,.panel--hero{left:10px!important;right:10px!important;width:auto;top:auto;bottom:10px;max-height:56vh;transform:translateY(24px)}
  .panel[data-i="6"]{max-height:47vh}
  .panel.is-active{transform:none}
  .panel--hero{background:var(--paper);box-shadow:0 22px 44px -18px rgb(20 30 40 / .55);padding:1.1rem;overflow-y:auto;max-width:none}
  .dsh{margin:0 -1.5rem}
  .panel{padding:0 1.1rem 1.2rem}.dsh{margin:0 -1.1rem;padding:.8rem 1.1rem .6rem}
  .title{font-size:clamp(1.6rem,7.4vw,2.3rem)}.title--hero{font-size:clamp(2rem,9.6vw,3.4rem)}
  .scope{height:84px}
}

/* ---------- plain fallback (no WebGL / CDN blocked) ---------- */
.no-3d body{overflow:auto}
.no-3d .pre,.no-3d #gl,.no-3d #dim,.no-3d .tags,.no-3d .rail,.no-3d .bar,.no-3d .track,.no-3d .cursor{display:none!important}
.no-3d .stage{position:static;padding:5rem var(--gutter) 3rem;display:grid;gap:1.4rem;max-width:46rem;margin:auto}
.no-3d .panel{position:static;opacity:1;visibility:visible;transform:none;width:auto;max-height:none;pointer-events:auto}
.no-3d .rv{opacity:1;transform:none}
.no-3d .panel--hero{background:none;box-shadow:none;padding:0}

@media (prefers-reduced-motion:reduce){
  .rv,.panel,.top,.bar,.tags,.stage{transition-duration:.01ms!important;transition-delay:0s!important}
}

/* bench focus: hardware chips and protocol rows */
.chips--hw button{font-family:var(--mono);font-stretch:87.5%;font-size:.6rem;padding:.3rem .55rem;border:1px solid var(--rule);color:var(--ink-2);background:var(--paper);cursor:pointer;transition:background .15s,color .15s,opacity .15s,border-color .15s}
.chips--hw button:hover,.chips--hw button.is-on{background:var(--kapton);border-color:var(--kapton);color:var(--ink)}
.chips--hw button.is-dim{opacity:.45}
.chips--hw button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--ink)}
.group h3 small{font-size:inherit;letter-spacing:.04em;text-transform:none;color:var(--ink-3)}
.pins li[data-proto]{cursor:pointer;transition:opacity .15s,background .15s}
.pins li[data-proto]:hover,.pins li[data-proto].is-on{background:rgb(226 146 40 / .16)}
.pins li[data-proto].is-dim{opacity:.4}
.pins li[data-proto][aria-pressed=true] b{outline:2px solid var(--kapton);outline-offset:2px}
.tag--hw.is-on{background:var(--kapton)}

body.loading .cursor{display:none!important}

.tag--note .nt{white-space:normal;width:13.5rem;line-height:1.4;text-transform:none;letter-spacing:.02em;font-size:.66rem}
.tags.hero .tag--note .nt,.tags:not(.hero) .tag--note .nm{display:none}


/* Section 1: the card IS the chip. JS sizes it to the on-screen footprint of the real 3D package (font-size = size / 36),
   so everything below is in em: epoxy body, 12 gold leads per side, pin-1 dimple, notch, marking */
.panel.win{--lead:#d6b45c;--ll:3em;--pt:3em;--lw:1.65em;position:absolute;left:0;top:0;right:auto;width:600px;height:600px;max-height:none;padding:0;overflow:visible;border:0;border-radius:.45em;display:flex;flex-direction:column;font-size:16px;background:linear-gradient(145deg,#1b1f24,#0b0d10 60%,#14171b);color:#e6eaec;transform:none!important;transition:none;box-shadow:inset 0 0 0 1px rgb(255 255 255 / .07),inset 0 1px 0 rgb(255 255 255 / .12)}
.panel.win.is-active{transform:none!important}
.panel.win::after{content:"";position:absolute;left:50%;top:0;width:1.6em;height:.8em;transform:translateX(-50%);border-radius:0 0 1.6em 1.6em;background:#040506;box-shadow:inset 0 -1px 0 rgb(255 255 255 / .1)}
.win__bar{flex:none;display:flex;align-items:center;gap:.8em;padding:.9em 1.3em .1em;color:#aeb5ba;font-family:var(--mono);font-stretch:87.5%;font-size:.62em;letter-spacing:.14em;text-transform:uppercase}
.win__bar i{display:none}
.win__bar i:first-child{display:block;width:1.2em;height:1.2em;border-radius:50%;flex:none;background:radial-gradient(circle at 40% 35%,#2a2f35,#050607);box-shadow:inset 0 0 0 1px rgb(255 255 255 / .18)}
.win__bar span{flex:1;text-align:center;color:#d6dadd}
.win__bar em{font-style:normal;color:#8a9298}
.win__body{position:relative;flex:1;min-height:0;display:grid;grid-template-rows:auto auto 1fr;gap:1em;margin:.45em 1em 1em;padding:1.5em 1.7em 1.5em;border:1px solid rgb(230 234 236 / .55);border-radius:.2em;overflow:hidden;
  background:radial-gradient(circle,rgb(230 234 236 / .11) .09em,transparent .1em) 0 0 / 1.4em 1.4em,linear-gradient(160deg,#0e1318,#070a0d);
  box-shadow:inset 0 0 0 .3em #0a0d10,inset 0 0 0 calc(.3em + 1px) rgb(230 234 236 / .35)}
/* bond pads running round the inside edge, like the pad ring of a die */
.win__body::before{content:"";position:absolute;inset:.42em;pointer-events:none;opacity:.6;
  background:
    repeating-linear-gradient(90deg,#e6eaec 0 .32em,transparent .32em .82em) 0 0 / 100% .32em no-repeat,
    repeating-linear-gradient(90deg,#e6eaec 0 .32em,transparent .32em .82em) 0 100% / 100% .32em no-repeat,
    repeating-linear-gradient(0deg,#e6eaec 0 .32em,transparent .32em .82em) 0 0 / .32em 100% no-repeat,
    repeating-linear-gradient(0deg,#e6eaec 0 .32em,transparent .32em .82em) 100% 0 / .32em 100% no-repeat}
/* the section title stays in the page for screen readers but is not drawn */
.win__body .title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
/* every block is a macro: outlined, pin stubs both sides, a reference designator */
.win__body>p,.win__body .spec>div{position:relative;margin:0;border:1.5px solid #e6eaec;background:#0a0e11;border-radius:.1em}
.win__body>p::before,.win__body .spec>div::before,.win__body>p::after,.win__body .spec>div::after{content:"";position:absolute;top:.55em;bottom:.55em;width:.55em;pointer-events:none}
.win__body>p::before,.win__body .spec>div::before{left:calc(-.55em - 1.5px);background:repeating-linear-gradient(180deg,#e6eaec 0 2px,transparent 2px 1.1em)}
.win__body>p::after,.win__body .spec>div::after{right:calc(-.55em - 1.5px);background:repeating-linear-gradient(180deg,#e6eaec 0 2px,transparent 2px 1.1em)}
.win__body .ref{position:absolute;top:.3em;right:.55em;font-family:var(--mono);font-size:.55em;letter-spacing:.1em;color:#79828a}
.win__body>p{padding:.7em .9em;font-size:1.2em;line-height:1.3;color:#d3d9dc}
.win__body .scope{height:5em;min-height:0;border:1.5px solid #e6eaec;border-radius:.1em}
/* the macros are wired together: a bus through the gaps with a junction dot where they cross */
.win__body .spec{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:1.1em;border:0;
  background:linear-gradient(#e6eaec,#e6eaec) 50% 0 / 2px 100% no-repeat,linear-gradient(#e6eaec,#e6eaec) 0 50% / 100% 2px no-repeat,radial-gradient(circle,#e6eaec .22em,transparent .24em) 50% 50% / 1em 1em no-repeat}
.win__body .spec>div{display:block;padding:.65em .85em}
.win__body .spec dt{display:block;padding:0 0 .35em;border-bottom:1px solid rgb(230 234 236 / .3);margin-bottom:.4em;color:#9aa1a6;font-size:.72em}
.win__body .spec dd{font-size:1.1em;line-height:1.28;color:#f1f3f4}

/* no reveal or title animation inside the window: it only zooms out of the chip */
.panel.win .rv{opacity:1!important;transform:none!important;transition:none!important}

/* Section 1: the scene goes dark, and the window opens like the chip's cover blurring away to show the inside */
#dim{position:fixed;inset:0;z-index:2;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 50% 50%,rgb(3 5 8 / .8),rgb(1 2 4 / .93))}
.win__cover{position:absolute;inset:0;margin:0!important;z-index:5;border-radius:inherit;display:grid;place-content:center;justify-items:center;gap:.5em;pointer-events:none;color:#e8e8e8;background:linear-gradient(145deg,#1b1f24,#0b0d10 60%,#14171b);box-shadow:inset 0 0 0 1px rgb(255 255 255 / .07);opacity:calc(1 - var(--cv,0));filter:blur(calc(var(--cv,0) * 1.8em))}
.win__cover i{position:absolute;left:1.4em;top:1.4em;width:1.2em;height:1.2em;border-radius:50%;background:radial-gradient(circle at 40% 35%,#2a2f35,#050607);box-shadow:inset 0 0 0 1px rgb(255 255 255 / .18)}
.win__cover b{font:800 4.6em/1 Arial,Helvetica,sans-serif;letter-spacing:.02em}
.win__cover span{font:600 2.8em/1 Arial,Helvetica,sans-serif}
.win__cover small{font:500 1.7em/1 Arial,Helvetica,sans-serif;color:#9a9a9a;letter-spacing:.06em}

/* Section 1: the blocks are wired like a die: a central bus through all of them, pins out to the pad ring */
.win__body{background:linear-gradient(#e6eaec,#e6eaec) 50% 0 / 2px 100% no-repeat,radial-gradient(circle,rgb(230 234 236 / .11) .09em,transparent .1em) 0 0 / 1.4em 1.4em,linear-gradient(160deg,#0e1318,#070a0d)}
.win__body .scopebox{position:relative;height:5em;border:1.5px solid #e6eaec;background:#0a0e11;border-radius:.1em}
.win__body .scopebox .scope{display:block;width:100%;height:100%;border:0;border-radius:0}
.win__body .scopebox::before,.win__body .scopebox::after{content:"";position:absolute;top:.5em;bottom:.5em;width:1.05em;pointer-events:none;background:repeating-linear-gradient(180deg,#e6eaec 0 2px,transparent 2px 1.1em)}
.win__body .scopebox::before{left:calc(-1.05em - 1.5px)}.win__body .scopebox::after{right:calc(-1.05em - 1.5px)}
.win__body>p::before,.win__body>p::after{width:1.05em}
.win__body>p::before{left:calc(-1.05em - 1.5px)}.win__body>p::after{right:calc(-1.05em - 1.5px)}
.win__body .spec>div:nth-child(odd)::before{width:1.05em;left:calc(-1.05em - 1.5px)}
.win__body .spec>div:nth-child(even)::after{width:1.05em;right:calc(-1.05em - 1.5px)}

/* Section 1 as the module board: black PCB, antenna, QFN with the graph in it, crystals, gold pads, white callouts */
.win__bar,.panel.win::after{display:none!important}
.panel.win{background:#0b0b0e}
.win__art{position:absolute;inset:0;width:100%;height:100%;display:block;border-radius:inherit}
.win__body{position:absolute!important;inset:0;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;overflow:hidden;display:block!important;border-radius:inherit}
.win__body::before{display:none!important}
.win__body .spec{display:contents!important;background:none!important}
.win__body .call,.win__body .spec>div{position:absolute;margin:0;padding:.55em .8em;background:#f3f4f0!important;color:#15191d;border:0!important;border-radius:.7em;box-shadow:0 .15em .45em rgb(0 0 0 / .55);font-size:1em}
.win__body .call::before,.win__body .spec>div::before{content:none!important}
.win__body .call::after,.win__body .spec>div::after{content:""!important;position:absolute;top:auto;right:auto;bottom:auto;left:auto;width:0;height:0;background:none;border:.5em solid transparent}
.win__body .c-intro{left:4%;top:4%;width:59%;font-size:1.08em;line-height:1.28;color:#15191d}
.win__body .c-intro::after{left:100%;top:1.2em;border-left-color:#f3f4f0;border-right-width:0}
.win__body .spec>div:nth-child(1){left:4%;top:29%;width:42%}.win__body .spec>div:nth-child(1)::after{top:100%;left:62%;border-top-color:#f3f4f0;border-bottom-width:0}
.win__body .spec>div:nth-child(2){right:4%;top:29%;width:42%}.win__body .spec>div:nth-child(2)::after{top:100%;left:28%;border-top-color:#f3f4f0;border-bottom-width:0}
.win__body .spec>div:nth-child(3){left:4%;bottom:4%;width:42%}.win__body .spec>div:nth-child(3)::after{bottom:100%;left:62%;border-bottom-color:#f3f4f0;border-top-width:0}
.win__body .spec>div:nth-child(4){right:4%;bottom:4%;width:42%}.win__body .spec>div:nth-child(4)::after{bottom:100%;left:28%;border-bottom-color:#f3f4f0;border-top-width:0}
.win__body .spec dt{display:block;padding:0;margin:0 0 .25em;border:0;font-family:var(--mono);font-size:.6em;letter-spacing:.14em;color:#6d737a;text-transform:uppercase}
.win__body .spec dd{margin:0;font-size:.98em;line-height:1.25;color:#15191d}
.win__body .scopebox{position:absolute;left:37.5%;top:47.5%;width:25%;height:22.5%;border:0!important;border-radius:.3em;background:#0a0e11}
.win__body .scopebox::before,.win__body .scopebox::after{content:none!important}
.win__body .scopebox .scope{display:block;width:100%;height:100%;border:0;border-radius:.3em}

/* the description is printed on the chip: laser-etched grey text on the black epoxy, no boxes */
.win__body .call,.win__body .spec>div{background:none!important;box-shadow:none!important;border-radius:0;padding:.55em 0 0!important;color:#d9dcdf;border:0!important;border-top:1px solid rgb(217 220 223 / .38)!important;text-shadow:0 0 .6px rgb(255 255 255 / .4)}
.win__body .call::after,.win__body .spec>div::after{display:none!important}
.win__body .c-intro{color:#e6e8ea;font-size:1.12em;line-height:1.3}
.win__body .c-intro::before{content:attr(data-label)!important;display:block;font-family:var(--mono);font-size:.55em;letter-spacing:.18em;color:#8f959b;margin-bottom:.35em}
.win__body .spec dt{color:#8f959b;font-size:.58em;letter-spacing:.18em}
.win__body .spec dd{color:#d9dcdf;font-size:1em}
.win__body .spec>div:nth-child(3),.win__body .spec>div:nth-child(4){bottom:10%}
.win__body .c-intro{left:5%}
.win__body .c-intro::before{position:static!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:auto!important;height:auto!important;background:none!important}

/* the content blocks are IC bodies drawn in the board art (pins + traces); the text is printed inside them */
.win__body .call,.win__body .spec>div{box-sizing:border-box;overflow:hidden;border-top:0!important;padding:.6em .8em!important;text-shadow:0 0 .6px rgb(255 255 255 / .35)}
.win__body .c-intro{left:4%;top:4%;width:58%;height:19%;font-size:.98em;line-height:1.26}
.win__body .spec>div:nth-child(1){left:3%;top:29%;width:31%;height:17%;right:auto;bottom:auto}
.win__body .spec>div:nth-child(2){left:66%;top:29%;width:31%;height:17%;right:auto;bottom:auto}
.win__body .spec>div:nth-child(3){left:3%;top:79%;width:34%;height:14%;right:auto;bottom:auto}
.win__body .spec>div:nth-child(4){left:63%;top:79%;width:34%;height:14%;right:auto;bottom:auto}
.win__body .spec dt{font-size:.52em;letter-spacing:.16em;margin:0 0 .2em}
.win__body .spec dd{font-size:.82em;line-height:1.22}
.win__body .c-intro::before{font-size:.5em}

/* the chip window may run over the bottom bar, so the stage sits above it */
.stage{z-index:75}

/* while the scene is dark (Section 1) the header reads light */
.brand,.brand small{transition:color .3s}
.on-dark .brand{color:#eef1f3}
.on-dark .brand small{color:#aeb5ba}
/* inside the chip there is no timeline: the bottom bar slides away */
.bar{transition:transform .45s cubic-bezier(.16,1,.3,1),opacity .7s ease 1.9s}
/* while the upload runs on the desk monitor the page chrome stays out of the shot; it fades in as the camera lands */
html:not(.no-3d) body.loading :is(.top,.brand,.bar,.stage,.tags){opacity:0;pointer-events:none}
.top,.brand,.stage,.tags{transition:opacity .7s ease 1.9s}
.on-dark .bar{transform:translateY(100%);opacity:0;pointer-events:none}

/* Experience: a dark flash log instead of a white card */
.panel.flash{background:#0b0f12;color:#d9dcdf;border:1px solid #2a3036;box-shadow:0 30px 60px -20px rgb(0 0 0 / .7)}
.fl__bar{display:flex;align-items:center;gap:.5rem;margin:0 -1.5rem;padding:.65rem 1.1rem;background:#161b20;color:#9aa1a6;font-family:var(--mono);font-stretch:87.5%;font-size:.58rem;letter-spacing:.12em;text-transform:uppercase}
.fl__bar i{width:.65rem;height:.65rem;border-radius:50%;border:1.5px solid #6d747a;flex:none}
.fl__bar span{margin-left:.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.panel.flash .title{color:#f1f3f4;margin-top:1.1rem;font-size:clamp(1.5rem,2.4vw,2.1rem)}
.panel.flash .title .hl{background:none;border-bottom:.2em solid #ffd23f;padding:0}
.panel.flash .scope{margin-top:1rem}
.fl__line{margin:.9rem 0 0;font-family:var(--mono);font-stretch:87.5%;font-size:.64rem;line-height:1.5;letter-spacing:.04em;color:#8f959b}
.fl__job{margin-top:.9rem;padding:.8rem .95rem;border:1px solid #2f353b;background:#0e1317}
.fl__hd{display:flex;gap:.9rem;font-family:var(--mono);font-stretch:87.5%;font-size:.58rem;letter-spacing:.12em;text-transform:uppercase;color:#ffd23f}
.fl__hd span:last-child{margin-left:auto;color:#8f959b}
.fl__job h3{margin:.45rem 0 .1rem;font-size:1.05rem;color:#fff;text-transform:none}
.fl__org{font-size:.78rem;color:#8f959b}
.fl__prog{display:flex;align-items:center;gap:.6rem;margin:.55rem 0;font-family:var(--mono);font-size:.56rem;color:#ffd23f}
.fl__prog i{flex:1;height:.42rem;background:#1b2126;position:relative;overflow:hidden}
.fl__prog i::after{content:"";position:absolute;inset:0;width:0;background:#ffd23f;transition:width 1.4s steps(20) calc(var(--fd,0s) + 1.6s)}
.panel.flash.is-active .fl__prog i::after{width:100%}
.fl__job p,.fl__job li{font-size:.86rem;line-height:1.45;color:#c4cacf}
.fl__job ul{margin:.2rem 0 0;padding-left:1.1rem}
.fl__ok{opacity:0;transition:opacity .5s 5.2s;color:#9fe0b0}
.panel.flash.is-active .fl__ok{opacity:1}

/* layout v3: four IC cards stacked in two columns either side of a smaller QFN chip */
.win__body .spec>div:nth-child(3){left:3%;top:50%;width:31%;height:14%;right:auto;bottom:auto}
.win__body .spec>div:nth-child(4){left:66%;top:50%;width:31%;height:14%;right:auto;bottom:auto}
.win__body .scopebox{left:39.4%;top:37.4%;width:21.2%;height:21.2%}

/* ---------- AirSync film: caption tape, and the card waits until the film is done ---------- */
.aircap{position:fixed;left:50%;bottom:calc(var(--bar) + 22px);transform:translate(-50%,10px);z-index:76;max-width:min(92vw,46rem);padding:.55rem .95rem;background:#f3f4f0;color:#15191d;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;text-align:center;box-shadow:0 14px 30px -14px rgb(0 0 0 / .65);border-left:4px solid var(--kapton);opacity:0;transition:opacity .3s,transform .3s;pointer-events:none}
.aircap.is-on{opacity:1;transform:translate(-50%,0)}
.panel[data-i="3"]{transition:opacity .6s ease,transform .6s ease,visibility .6s}
body.air-run .panel[data-i="3"]{opacity:0!important;visibility:hidden!important;pointer-events:none}
body.air-run .tags{opacity:0}
.tags{transition:opacity .4s}

/* experience panel: two tabs, one job at a time, big readable text */
.panel.flash .scope{height:150px}
.panel.flash [hidden]{display:none!important}
.fl__tabs{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-top:1rem}
.fl__tabs button{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;padding:.7rem .8rem;text-align:left;font:600 .95rem/1.2 var(--sans,inherit);color:#e6eaec;background:#0e1317;border:1px solid #2f353b;border-bottom:3px solid #2f353b;cursor:pointer}
.fl__tabs button span{font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;color:#ffd23f}
.fl__tabs button em{font-style:normal;font-family:var(--mono);font-size:.72rem;color:#b4bbc0}
.fl__tabs button[aria-selected=true]{background:#171d22;border-bottom-color:#ffd23f}
.fl__line{font-size:.82rem;color:#b4bbc0}
.fl__hd{font-size:.76rem}
.fl__job h3{font-size:1.5rem;margin:.6rem 0 .2rem}
.fl__org{font-size:1rem;color:#c4cacf}
.fl__prog{font-size:.72rem}
.fl__job p,.fl__job li{font-size:1.1rem;line-height:1.5;color:#e6eaec}
.fl__job li+li{margin-top:.5rem}

/* experience: a wider panel, two real tabs, each with its own page */
.panel.flash{width:min(46rem,50vw);padding-bottom:1.8rem}
.panel.flash .title{font-size:clamp(1.9rem,3vw,2.7rem)}
.panel.flash .scope{height:170px}
.fl__tabs{gap:0;margin-top:1.3rem;border-bottom:1px solid #2f353b}
.fl__tabs button{padding:1rem 1.2rem;font-size:1.15rem;border:1px solid #2f353b;border-bottom:0;margin-bottom:-1px;background:#0e1317;color:#b4bbc0}
.fl__tabs button+button{border-left:0}
.fl__tabs button[aria-selected=true]{background:#171d22;color:#fff;box-shadow:inset 0 3px 0 #ffd23f}
.fl__tabs button span{font-size:.8rem}.fl__tabs button em{font-size:.82rem}
.fl__pane{padding-top:.4rem}
.fl__job{margin-top:1rem;padding:1.4rem 1.5rem}
.fl__job h3{font-size:1.9rem;margin:0 0 .35rem}
.fl__org{font-size:1.1rem}
.fl__prog{margin:1rem 0;font-size:.8rem}
.fl__job p,.fl__job li{font-size:1.2rem;line-height:1.6}
.fl__line{font-size:.9rem;margin-top:1.1rem}

/* experience tabs: vertical index tabs hanging off the panel's right edge */
.panel.flash{overflow:visible}
.fl__tabs{position:absolute;left:100%;top:4.2rem;display:flex;flex-direction:column;gap:.4rem;margin:0;border:0}
.fl__tabs button{writing-mode:vertical-rl;flex-direction:row;align-items:center;justify-content:flex-start;gap:.9rem;width:3.6rem;min-height:15rem;margin:0;padding:1rem .5rem;border:1px solid #2f353b;border-left:0;border-radius:0 .6rem .6rem 0;background:#161b20;color:#c4cacf;font-size:1.05rem;box-shadow:4px 4px 10px rgb(0 0 0 / .45);transition:background .15s,color .15s,transform .15s}
.fl__tabs button:hover{background:#1f272e;color:#fff;transform:translateX(4px)}
.fl__tabs button+button{border-left:0}
.fl__tabs button span{display:none}
.fl__tabs button em{font-size:.78rem;color:#8f959b}
.fl__tabs button::after{content:"›";writing-mode:horizontal-tb;margin-top:auto;font-size:1.4rem;color:#ffd23f}
.fl__tabs button[aria-selected=true]{background:#ffd23f;color:#0b0f12;box-shadow:4px 4px 10px rgb(0 0 0 / .45);transform:translateX(2px);font-weight:700}
.fl__tabs button[aria-selected=true] em{color:#3a3213}
.fl__tabs button[aria-selected=true]::after{color:#0b0f12}

/* experience is two scroll steps: the internship first, then a zoom into the chip with the current job */
.panel.flash{overflow:hidden}
.fl__tabs{display:none}
.fl__pane{display:none}
.panel.flash[data-phase="0"] [data-pane="0"],.panel.flash[data-phase="1"] [data-pane="1"]{display:block;animation:flpane .5s ease both}
@keyframes flpane{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.fl__step{margin-left:auto;display:flex;gap:.35rem}
.fl__step u{width:1.6rem;height:.28rem;background:#2f353b;display:block}
.fl__step u.on{background:#ffd23f}
.fl__job h3{margin-top:.8rem}

/* the "Written to flash" heading stays for screen readers but is not drawn */
.panel.flash .title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0}
.panel.flash .scope{margin-top:1.2rem}

/* a taller Experience sheet: the job card grows to fill it */
.panel.flash{min-height:calc(100vh - 11rem);display:flex;flex-direction:column}
.panel.flash[data-phase="0"] [data-pane="0"],.panel.flash[data-phase="1"] [data-pane="1"]{display:flex;flex-direction:column;flex:1}
.panel.flash .fl__job{flex:1;display:flex;flex-direction:column;justify-content:center;padding:1.8rem 1.9rem}
.panel.flash .fl__job h3{font-size:2.1rem}
.panel.flash .fl__job p,.panel.flash .fl__job li{font-size:1.25rem}

/* taller still */
.panel.flash{min-height:calc(100vh - 8rem);max-height:calc(100vh - 6rem)}

/* keep the sheet clear of the name header above and the timeline below */
.panel.flash{min-height:calc(100vh - 12.5rem);max-height:calc(100vh - 12.5rem)}

/* pinned just under the header: the sheet's top edge stays put and it grows downward to the timeline */
.panel.flash,.panel.flash.is-active{top:5rem;transform:none;min-height:calc(100vh - 11rem);max-height:calc(100vh - 11rem)}

/* content on top, the waveform underneath */
.panel.flash .fl__pane{order:1}
.panel.flash .scope{order:2;margin-top:1rem;flex:none}

/* the name inverts against whatever is behind it: white text with difference blending, so each letter turns dark over light areas and light over dark ones */
.brand{position:fixed;top:0;left:0;z-index:61;padding:.9rem var(--gutter);color:#fff;mix-blend-mode:difference;pointer-events:auto}
.brand small{color:#fff}
.top{justify-content:flex-end}
.tag:not(.tag--hw){display:none!important}   /* the part callouts are switched off */
/* a soft frosted wash behind the title so the 3D scene's cables and screens never cut through the letters */
body::before{content:"";position:fixed;top:0;left:0;width:min(34rem,60vw);height:4.6rem;z-index:59;pointer-events:none;-webkit-backdrop-filter:blur(7px) brightness(.9);backdrop-filter:blur(7px) brightness(.9);-webkit-mask-image:radial-gradient(ellipse 100% 100% at 0 0,#000 55%,transparent 100%);mask-image:radial-gradient(ellipse 100% 100% at 0 0,#000 55%,transparent 100%)}

.panel[data-i="6"]{overflow-y:auto;scrollbar-width:thin}   /* the merged skills sheet can outgrow a short screen */

/* ---------- loading screen: the upload log fills the window, then wipes up to reveal the desk ---------- */
.pre{position:fixed;inset:0;z-index:200;background:#1b1f23;color:#d4d7d9;display:flex;flex-direction:column;font-family:system-ui,"Segoe UI",sans-serif;font-size:13px;transition:clip-path .9s cubic-bezier(.76,0,.24,1),opacity .3s linear .85s;clip-path:inset(0 0 0 0)}
.pre.is-done{clip-path:inset(0 0 100% 0);opacity:0;pointer-events:none}
.ide__outtabs{display:flex;background:#111417}
.ide__outtabs span{padding:8px 18px;color:#8d9498;font-size:12px}
.ide__outtabs .on{color:#e1e4e6;background:#14181b;border-top:2px solid #00b5c0}
.ide__log{flex:1;overflow:hidden;padding:10px var(--gutter,24px) 24px;font-family:Consolas,"Cascadia Mono",monospace;font-size:clamp(11px,1.3vw,14px);line-height:1.55;color:#c8cdd0;white-space:pre-wrap}
/* the loading log dissolves into the monitor shot (no wipe), so the log becomes the screen instead of a slide change */
.pre{transition:opacity 1.6s cubic-bezier(.4,0,.2,1);clip-path:none}
.pre.is-done{clip-path:none;opacity:0;pointer-events:none}

/* the loading screen is the monitor picture, cropped exactly as the opening camera crops it */
.pre{background:#0d1114}
.pre canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.847)}
@media (max-aspect-ratio:23/20){.pre canvas{object-position:49% 66%}}

/* until the first frame the page is the monitor's dark, never a light flash */
html:not(.no-3d):has(body.loading){background:#0d1114}
body.loading::before{display:none}   /* the title's frosted wash must not blur the top edge of the opening close-up */

.chips span[data-lang]{cursor:pointer;transition:background .2s,box-shadow .2s}
.chips span[data-lang]:hover,.chips span[data-lang]:focus-visible{background:var(--kapton-t);box-shadow:inset 0 0 0 1px var(--ink);outline:none}

/* ---------- responsive overrides (must stay last) ---------- */
/* phones / narrow windows / squarish and portrait windows: every sheet, Experience included, slides up full width above the bar so the scene keeps the top */
@media (max-width:820px),(max-aspect-ratio:23/20){
  .panel.flash,.panel.flash.is-active{left:10px!important;right:10px!important;top:auto;bottom:10px;width:auto;min-height:0;max-height:calc(100vh - var(--bar) - 5rem);max-height:calc(100dvh - var(--bar) - 5rem);overflow-y:auto}
  .panel.flash{transform:translateY(24px)}
  .panel.flash.is-active{transform:none}
  .panel.flash .fl__job{padding:1rem 1.1rem;justify-content:flex-start}
  .panel.flash .fl__job h3{font-size:1.35rem}
  .panel.flash .fl__job p,.panel.flash .fl__job li{font-size:1rem;line-height:1.5}
  .fl__org{font-size:.95rem}
  .panel.flash .scope{height:72px}
  .fl__bar{margin:0 -1.1rem}
  .panel,.panel--hero{max-height:calc(100vh - var(--bar) - 5rem);max-height:calc(100dvh - var(--bar) - 5rem)}
  .panel[data-i="6"]{max-height:calc(100vh - var(--bar) - 5rem);max-height:calc(100dvh - var(--bar) - 5rem)}
  .aircap{font-size:.62rem}
}
/* portrait / squarish: never let a sheet take more than ~62% of the height, the rest stays for the scene; longer sheets scroll inside */
@media (max-aspect-ratio:23/20){
  .panel,.panel--hero,.panel[data-i="6"],.panel.flash,.panel.flash.is-active{max-height:min(62vh,calc(100vh - var(--bar) - 5rem));max-height:min(62dvh,calc(100dvh - var(--bar) - 5rem));overflow-y:auto}
}
/* very small phones */
@media (max-width:360px){
  .btn{padding:.6rem .8rem .6rem .65rem}
  .dsh em{display:none}
  .row{gap:.5rem}
}
/* short landscape screens (phones on their side, wide-and-short windows): sheets get compact */
@media (max-height:520px) and (min-width:821px){
  .panel{max-height:calc(100vh - var(--bar) - 4.6rem);padding-bottom:1rem}
  .panel>*+*{margin-top:.6rem}
  .scope{height:64px}
  .panel.flash,.panel.flash.is-active{top:4rem;min-height:0;max-height:calc(100vh - var(--bar) - 4.6rem);overflow-y:auto}
  .panel.flash .scope{height:64px}
  .panel.flash .fl__job h3{font-size:1.4rem}
  .panel.flash .fl__job p,.panel.flash .fl__job li{font-size:1rem}
  .panel[data-i]{overflow-y:auto}
}
@media (max-height:520px) and (max-width:820px){
  .panel,.panel--hero,.panel.flash{max-height:calc(100vh - var(--bar) - 4rem);overflow-y:auto}
  .scope{height:56px}
}
/* narrow desktops / tablets (821-1100): sheets need more of the width than 41vw */
@media (min-width:821px) and (max-width:1100px) and (min-aspect-ratio:23/20){
  .panel{width:min(33rem,46vw)}
  .panel.flash{width:min(46rem,54vw)}
}
@media (max-width:420px){
  .brand{gap:.5rem}.brand svg{width:24px;height:18px}.brand b{font-size:.68rem}
  .top .btn--sm{padding:.45rem .6rem .45rem .5rem;font-size:.5rem;gap:.4rem}
}
/* phones on their side: the sheet becomes a side card so the scene stays visible */
@media (max-height:520px) and (orientation:landscape) and (max-width:900px){
  .panel:not(.win),.panel.flash,.panel.flash.is-active,.panel--hero{width:min(27rem,56vw);max-width:none;max-height:calc(100vh - var(--bar) - 4.4rem);max-height:calc(100dvh - var(--bar) - 4.4rem);overflow-y:auto}
  .panel.panel--hero{width:fit-content;max-width:60vw}
  .panel[data-side=l]:not(.win),.panel.flash[data-side=l]{left:10px!important;right:auto!important}
  .panel[data-side=r]:not(.win){right:10px!important;left:auto!important}
  .panel.flash[data-side=l],.panel.flash.is-active[data-side=l]{left:10px!important;right:auto!important}
  .panel:not(.win){bottom:calc(var(--bar) * 0 + 10px)}
  .title{font-size:clamp(1.2rem,4.6vw,1.7rem)}
  .title--hero{font-size:clamp(1.8rem,8vw,3rem)}
  .scope{height:48px}.panel.flash .scope{height:48px}
}
@media (min-width:821px) and (min-height:521px) and (min-aspect-ratio:23/20){
  .panel.flash,.panel.flash.is-active{top:max(5rem,70px);min-height:calc(100vh - 11rem - 10px);max-height:calc(100vh - 11rem - 10px)}
}
/* short wide windows: pin sheets just under the name header so they never run into it */
@media (max-height:520px) and (min-width:821px){
  .panel:not(.win):not(.panel--hero),.panel:not(.win):not(.panel--hero).is-active{top:60px;transform:none;max-height:calc(100vh - var(--bar) - 60px - 8px)}
  .panel.flash,.panel.flash.is-active{top:60px;max-height:calc(100vh - var(--bar) - 60px - 8px)}
}
