/* ============================================================
   JAKOB VISIC — ZEROTYPE restyle
   Three looks: SCHEDULE (blue/cream) · CATALOG (orange/charcoal) · CAPSULE (riso)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; }

/* ---------- THEME TOKENS ---------- */
.page {
  /* defaults overridden per theme */
  --bg: #FFFDF4;
  --bg2: #ffffff;
  --ink: #14224B;
  --ink-soft: #59617E;
  --ink-faint: #9aa0b4;
  --line: #d8d1ba;
  --line-on-light: rgba(20,34,75,.14);
  --accent: #2C57F0;
  --accent-press: #1f43cc;
  --accent-2: #2C57F0;
  --decor: var(--accent);
  --on-accent: #F4EFDC;
  --field: rgba(20,34,75,.028);
  --grid: rgba(20,34,75,.055);
  --halftone: rgba(20,34,75,.05);
  --footer-bg: #e6e3d6;
}

.page[data-theme="schedule"] {
  --bg: #FFFDF4;        --bg2: #ffffff;
  --ink: #14224B;       --ink-soft: #59617E;  --ink-faint: #9aa0b4;
  --line: #d9d2bb;
  --accent: #2C57F0;    --accent-press: #1d40c2;  --accent-2: #2C57F0;
  --on-accent: #F4EFDC;
  --field: rgba(20,34,75,.028);
  --grid: rgba(20,34,75,.06);
  --halftone: rgba(44,87,240,.07);
  --footer-bg: #e6e2d2;
}

.page[data-theme="catalog"] {
  --bg: #E8E7E1;        --bg2: #F2F1EB;
  --ink: #25231E;       --ink-soft: #6c685f;  --ink-faint: #a6a299;
  --line: #cdcabf;
  --accent: #FF8442;    --accent-press: #E5631C;  --accent-2: #FF8442;
  --on-accent: #F4F1E8;
  --field: rgba(37,35,30,.03);
  --grid: rgba(37,35,30,.07);
  --halftone: rgba(255,132,66,.08);
  --footer-bg: #dcdad1;
}

.page[data-theme="capsule"] {
  --bg: #F3EECC;        --bg2: #FCF8E4;
  --ink: #242a66;       --ink-soft: #6168a0;  --ink-faint: #a9adcf;
  --line: #ddd6b4;
  --accent: #2C86D8;    --accent-press: #1e6cb6;  --accent-2: #EE6B86;
  --on-accent: #F6F1D6;
  --field: rgba(36,42,102,.03);
  --grid: rgba(36,42,102,.07);
  --halftone: rgba(238,107,134,.16);
  --footer-bg: #e7e1bf;
}

.page[data-theme="arcade"] {
  --bg: #F1F4F9;        --bg2: #ffffff;
  --ink: #112138;       --ink-soft: #54607a;  --ink-faint: #98a2b8;
  --line: #d8deea;
  --accent: #2C9CFF;    --accent-press: #1685f0;  --accent-2: #FF8442;
  --decor: #FF8442;
  --on-accent: #F2F8FF;
  --field: rgba(17,33,56,.03);
  --grid: rgba(17,33,56,.06);
  --halftone: rgba(255,132,66,.12);
  --footer-bg: #e6ebf3;
}

/* ---------- BASE ---------- */
.page {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
  transition: background .5s ease, color .5s ease;
}

/* engineering grid ground */
.page::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0;
  transition: opacity .5s ease;
}
.page[data-grid="on"]::before { opacity: 1; }

/* riso grain */
.grain {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .5s ease;
  background-image: var(--grain-tex);
  background-size: 180px 180px;
}
.page[data-grain="on"] .grain { opacity: .24; }
.page[data-theme="catalog"][data-grain="on"] .grain { opacity: .32; }

main, .topbar, .footer { position: relative; z-index: 1; }

/* ---------- TYPE PRIMITIVES ---------- */
.display {
  font-family: "Archivo", sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.005em;
  margin: 0;
}

/* ---- display font variations (bigger / bolder / blockier) ---- */
.page[data-font="wide"] .display,
.page[data-font="wide"] .rolewrap { font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 900; letter-spacing: -.01em; }
.page[data-font="black"] .display,
.page[data-font="black"] .rolewrap { font-family: "Archivo Black", "Archivo", sans-serif; font-stretch: normal; font-weight: 400; letter-spacing: -.02em; }
.page[data-font="anton"] .display,
.page[data-font="anton"] .rolewrap { font-family: "Anton", sans-serif; font-stretch: normal; font-weight: 400; letter-spacing: .01em; }
.page[data-font="grotesk"] .display,
.page[data-font="grotesk"] .rolewrap { font-family: "Bricolage Grotesque", sans-serif; font-stretch: normal; font-weight: 800; letter-spacing: -.025em; }
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  font-weight: 500;
}
.mono-sm { font-size: 10px; letter-spacing: .18em; }
.accent { color: var(--accent); }

/* ---------- LAYOUT ---------- */
.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 80px);
}
.section { padding-block: clamp(56px, 8vw, 120px); }

/* ---------- FURNITURE ---------- */
/* corner brackets */
.brackets { position: absolute; inset: 0; pointer-events: none; }
.brk {
  position: absolute; width: 13px; height: 13px;
  border: 1.5px solid var(--decor);
}
.brk.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.brk.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.brk.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.brk.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* registration mark */
.reg {
  width: 16px; height: 16px; position: relative; flex: none;
  color: var(--decor);
}
.reg::before, .reg::after {
  content: ""; position: absolute; background: currentColor;
}
.reg::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-.5px); }
.reg::after { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-.5px); }

/* badge (cat-x style square) */
.badge {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  border-radius: 5px;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 12px;
}

/* chevron group */
.chev { display: inline-flex; gap: 3px; color: var(--accent); }
.chev svg { display: block; }

/* mono pill label */
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 10px; border: 1.5px solid var(--ink);
  color: var(--ink); border-radius: 4px; background: transparent;
}
.tag.solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* hairline label (eyebrow) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}

/* button */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; gap: 14px;
  font-family: "IBM Plex Mono", monospace; font-weight: 700;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-accent); background: var(--b);
  padding: 16px 22px; border: none; border-radius: 8px;
  cursor: pointer; text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 1px var(--b);
}
.btn:hover { background: var(--accent-press); transform: translateY(-2px); box-shadow: 0 8px 0 -2px color-mix(in srgb, var(--ink) 18%, transparent); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translate(4px,-4px); }

.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); box-shadow: none; }

/* ---------- TOPBAR ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 80px) 14px;
  position: relative; z-index: 40;
  background: transparent;
}
.topbar .brand { display: flex; align-items: center; gap: 11px; }
.topbar .brand .name {
  font-family: "IBM Plex Mono", monospace; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; font-size: 12px; color: var(--ink);
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav a {
  font-family: "IBM Plex Mono", monospace; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px;
  color: var(--ink-soft); text-decoration: none; position: relative;
  transition: color .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--accent); }
.nav a.active::before { content: "["; margin-right: 3px; }
.nav a.active::after { content: "]"; margin-left: 3px; }

/* tiny status strip under topbar */
.statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px clamp(20px, 5vw, 80px) 10px;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  position: relative; z-index: 39;
  background: transparent;
}
.statusbar .seg { display: flex; gap: 18px; align-items: center; }

/* ---------- HERO ---------- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 80px) clamp(36px, 5vw, 64px); }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(58px, 12.5vw, 172px);
  letter-spacing: -.015em;
}
.hero h1 .pn { color: var(--accent); }
.hero-arrow {
  position: absolute; right: clamp(20px,5vw,80px); top: 50%;
  transform: translateY(-50%);
  color: var(--decor);
  display: none;
}
@media (min-width: 1080px){ .hero-arrow { display: block; } }
.hero-divider { height: 1px; background: var(--line); margin-top: clamp(28px,4vw,48px); }

/* reveal lines for hero */
.line-mask { display: block; overflow: hidden; }
.line-mask > span { display: block; will-change: transform; }

/* ---------- BIO ---------- */
.bio { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(32px, 5vw, 76px); align-items: start; }
@media (max-width: 860px){ .bio { grid-template-columns: 1fr; } }

.portrait-frame { position: relative; }
.portrait {
  position: relative; aspect-ratio: 4/5; width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
}
.portrait .ph {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); text-align: center; line-height: 1.8;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.portrait-cap {
  display: flex; justify-content: space-between; margin-top: 10px;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
}

.bio-body .lead {
  font-size: clamp(20px, 2.3vw, 29px); line-height: 1.32; font-weight: 500;
  letter-spacing: -.01em; color: var(--ink); margin: 0 0 26px;
  text-wrap: pretty;
}
.bio-body .lead em { font-style: normal; color: var(--accent); }
.bio-body p.body {
  font-size: 15.5px; line-height: 1.62; color: var(--ink-soft); margin: 0 0 22px; max-width: 60ch;
  text-wrap: pretty;
}

/* meta strip */
.meta {
  margin-top: clamp(30px,4vw,46px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px){ .meta { grid-template-columns: repeat(2,1fr); } }
.meta .cell {
  padding: 16px 18px 16px 0; border-right: 1px solid var(--line);
  position: relative;
}
.meta .cell:last-child { border-right: 0; }
.meta .cell .k {
  display: flex; align-items: center; gap: 7px;
  color: var(--ink-faint); margin-bottom: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
}
.meta .cell .k::before { content: ""; width: 5px; height: 5px; background: var(--decor); border-radius: 1px; }
.meta .cell .v {
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink); line-height: 1.5;
}

/* ---------- TOOLKIT ---------- */
.toolkit { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.toolkit .tk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px,4vw,44px); }
.toolkit h2 { font-size: clamp(44px, 7vw, 102px); }
.toolkit .tk-desc {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint); max-width: 280px; text-align: right; line-height: 1.9;
}
@media (max-width: 700px){ .toolkit .tk-desc { text-align: left; } }

.tk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px){ .tk-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .tk-grid { grid-template-columns: 1fr; } }

.tk-card {
  position: relative; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px 16px; background: var(--bg);
  min-height: 178px; display: flex; flex-direction: column;
}
.tk-card .tk-cat {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--accent); margin-bottom: 16px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}
.tk-card .tk-cat .idx { color: var(--ink-faint); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: .03em;
  padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 6px; color: var(--ink); background: var(--bg2);
  cursor: default; transition: transform .12s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.chip .cd { width: 5px; height: 5px; border-radius: 50%; background: var(--decor); transition: transform .2s ease; }
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip:hover .cd { transform: scale(1.6); }

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: var(--on-accent); position: relative; overflow: hidden; }
.cta .wrap { position: relative; z-index: 2; }
.cta h2 {
  font-size: clamp(56px, 13vw, 188px); color: var(--on-accent);
  letter-spacing: -.02em; line-height: .86;
}
.cta .cta-sub {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--on-accent); opacity: .8; margin: 18px 0 28px;
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
}
.cta .blink { animation: blink 1.1s steps(1) infinite; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--on-accent); color: var(--accent);
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  padding: 16px 24px; border-radius: 8px; text-decoration: none;
  transition: transform .14s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 0 rgba(0,0,0,.2);
}
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 0 -3px rgba(0,0,0,.18); }
.cta-btn .arrow { transition: transform .2s ease; }
.cta-btn:hover .arrow { transform: translate(4px,-4px); }
/* big faint chevrons decor */
.cta-chev {
  position: absolute; right: -2%; bottom: -10%; z-index: 1;
  color: var(--on-accent); opacity: .12; pointer-events: none;
}
.cta-halftone {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--on-accent) 30%, transparent) 1.4px, transparent 1.6px);
  background-size: 16px 16px; opacity: .25;
  mask-image: linear-gradient(105deg, transparent 40%, #000 100%);
}

/* ---------- FOOTER ---------- */
.footer { background: var(--footer-bg); border-top: 1px solid var(--line); }
.footer .wrap { padding-block: clamp(40px,6vw,72px); }
.footer .f-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer .f-fields { display: flex; gap: clamp(40px,8vw,120px); flex-wrap: wrap; }
.footer .f-fields .k { color: var(--ink-faint); margin-bottom: 8px; }
.footer .f-fields .v { color: var(--ink); }
.footer .f-fields .k, .footer .f-fields .v {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.footer .colophon {
  margin-top: clamp(36px,5vw,56px); padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
}

/* ---------- MOTION ---------- */
@keyframes blink { 0%,50%{opacity:1;} 50.01%,100%{opacity:0;} }
@keyframes nudgeX { 0%,100%{transform:translateX(0);} 50%{transform:translateX(8px);} }
@keyframes nudgeY { 0%,100%{transform:translateY(0);} 50%{transform:translateY(6px);} }
.anim-nudge-x { animation: nudgeX 1.7s ease-in-out infinite; }
.anim-nudge-y { animation: nudgeY 1.6s ease-in-out infinite; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* hero line reveal */
.line-mask > span { transform: translateY(105%); transition: transform .85s cubic-bezier(.16,1,.3,1); }
.page.booted .line-mask > span { transform: translateY(0); }
.page.booted .line-mask:nth-child(2) > span { transition-delay: .08s; }

@media (prefers-reduced-motion: reduce) {
  .anim-nudge-x, .anim-nudge-y, .cta .blink { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .line-mask > span { transform: none !important; }
}

/* ---------- BOOT OVERLAY ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center; gap: 0;
  transition: opacity .5s ease, visibility .5s ease;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(440px, 78vw); text-align: left; }
.boot-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.boot-title {
  font-family: "Archivo",sans-serif; font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 4vw, 40px); letter-spacing: -.01em; line-height: .95; color: var(--ink);
  margin-bottom: 26px;
}
.boot-log { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); line-height: 2.1; text-transform: uppercase; min-height: 70px; }
.boot-log .ok { color: var(--accent); }
.boot-bar { height: 8px; border: 1px solid var(--ink); border-radius: 2px; margin-top: 18px; overflow: hidden; }
.boot-bar > i { display: block; height: 100%; background: var(--accent); width: 0%; }
.boot-press {
  margin-top: 16px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent); cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 10px;
}

/* skip booting if reduced motion handled in JS */

/* ---------- RESPONSIVE topbar ---------- */
@media (max-width: 560px){
  .topbar .brand .name { font-size: 11px; }
  .statusbar .seg.hide-sm { display: none; }
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.page-head { position: relative; padding-block: clamp(40px,6vw,84px) clamp(28px,4vw,52px); }
.page-head h1 { font-size: clamp(54px, 11.5vw, 158px); letter-spacing: -.018em; }
.page-head .lede {
  margin-top: 20px; max-width: 46ch; color: var(--ink-soft); font-size: clamp(15px,1.5vw,18px); line-height: 1.5;
}
.page-head .hero-divider { margin-top: clamp(26px,4vw,44px); }

/* filters */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: clamp(26px,4vw,40px); }
.filter {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink);
  background: transparent; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .12s ease;
}
.filter:hover { border-color: var(--accent); transform: translateY(-1px); }
.filter .cnt { font-size: 10px; color: var(--ink-faint); }
.filter.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter.active .cnt { color: var(--on-accent); opacity: .75; }

/* work grid */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1080px){ .work-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 760px){ .work-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px){ .work-grid { grid-template-columns: 1fr; } }

.work-card {
  position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--bg2); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 0 -6px color-mix(in srgb, var(--ink) 14%, transparent); }
.work-card .thumb {
  position: relative; aspect-ratio: 4/3; border-bottom: 1px solid var(--line);
  background: var(--bg);
  display: grid; place-items: center; overflow: hidden;
}
.work-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-card .thumb .ph {
  font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); text-align: center; line-height: 1.9; padding: 0 14px;
}
.work-card .thumb .badge-idx {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: var(--on-accent); background: var(--accent); padding: 3px 7px; border-radius: 4px;
}
.work-card .wmeta { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.work-card .wtitle { font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.work-card .wcat {
  font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 6px; margin-top: auto;
}
.work-card .wcat::before { content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.work-card .open-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2; opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease; color: var(--accent);
}
.work-card:hover .open-tag { opacity: 1; transform: none; }

@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.work-card { animation: pop .45s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce){ .work-card { animation: none !important; } }

/* ============================================================
   TIMELINE
   ============================================================ */
.tl { position: relative; max-width: 1120px; margin: 0 auto; padding-block: 10px clamp(30px,5vw,60px); }
.tl::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: var(--line); transform: translateX(-.5px);
}
.tl-list { display: flex; flex-direction: column; gap: 26px; }

.tl-node { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.tl-dot {
  position: absolute; left: 50%; top: 26px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); transform: translate(-50%, -50%); z-index: 2;
}
.tl-node.edu .tl-dot { border-radius: 2px; }
.tl-node.open .tl-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.tl-year {
  position: relative; display: grid; place-items: center; padding: 6px 0;
}
.tl-year span {
  position: relative; z-index: 2; background: var(--bg); padding: 4px 12px;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--ink-faint);
}

.tl-card {
  position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px;
  background: var(--bg2);
  cursor: pointer; transition: border-color .2s ease, transform .14s ease, box-shadow .2s ease;
}
.tl-node.left .tl-card { grid-column: 1; margin-right: 46px; }
.tl-node.right .tl-card { grid-column: 2; margin-left: 46px; }
.tl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tl-card .tl-toggle {
  position: absolute; top: 16px; right: 16px; color: var(--accent);
  transition: transform .25s ease;
}
.tl-node.open .tl-card .tl-toggle { transform: rotate(180deg); }
.tl-card .tl-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-family: "IBM Plex Mono", monospace; font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
}
.tl-card .tl-tag .d { width: 5px; height: 5px; border-radius: 50%; background: var(--decor); }
.tl-card .tl-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; margin: 0 0 4px; line-height: 1.2; }
.tl-card .tl-org { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.tl-card .tl-meta { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 5px; }
.tl-card .tl-body { max-height: 0; overflow: hidden; transition: max-height .35s ease, margin .35s ease, opacity .3s ease; opacity: 0; }
.tl-node.open .tl-card .tl-body { max-height: 640px; opacity: 1; margin-top: 14px; }
.tl-card .tl-body ul { margin: 0; padding-left: 16px; }
.tl-card .tl-body li { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 7px; }
.tl-card .tl-projects { margin-top: 12px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--on-accent) 30%, transparent); }
.tl-card .tl-projects-lbl { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--on-accent) 72%, transparent); margin-bottom: 9px; }
.tl-card .tl-project-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--on-accent); text-decoration: none; padding: 6px 12px; margin: 0 7px 7px 0;
  border: 1px solid color-mix(in srgb, var(--on-accent) 40%, transparent); border-radius: 999px;
  transition: background .18s ease, transform .12s ease;
}
.tl-card .tl-project-link:hover { background: color-mix(in srgb, var(--on-accent) 16%, transparent); transform: translateY(-1px); }

/* highlighted (open) entry */
.tl-node.open .tl-card {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.tl-node.open .tl-card .tl-title,
.tl-node.open .tl-card .tl-org { color: var(--on-accent); }
.tl-node.open .tl-card .tl-meta { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.tl-node.open .tl-card .tl-tag { border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); color: var(--on-accent); }
.tl-node.open .tl-card .tl-tag .d { background: var(--on-accent); }
.tl-node.open .tl-card .tl-toggle { color: var(--on-accent); }
.tl-node.open .tl-card .tl-body li { color: color-mix(in srgb, var(--on-accent) 88%, transparent); }

/* timeline responsive → single column */
@media (max-width: 760px){
  .tl::before { left: 15px; }
  .tl-node { grid-template-columns: 1fr; }
  .tl-dot { left: 15px; top: 28px; }
  .tl-node.left .tl-card, .tl-node.right .tl-card { grid-column: 1; margin-left: 42px; margin-right: 0; }
  .tl-year { justify-items: start; padding-left: 0; }
  .tl-year span { margin-left: 0; }
}

/* ============================================================
   HOME / LANDING
   ============================================================ */
.home-hero {
  position: relative; overflow: hidden; background: var(--accent); color: var(--on-accent);
  height: 100vh; height: 100dvh; display: flex; align-items: stretch;
}
/* portrait: absolute so the text copy can span the full viewport width */
.home-portrait {
  position: absolute; right: 0; top: 0; bottom: 0; width: 60%; pointer-events: none;
}
.home-portrait .ph {
  position: absolute; inset: 0;
  background: var(--accent);
  display: grid; place-items: center;
}
.home-portrait .ph span {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: color-mix(in srgb, var(--on-accent) 78%, transparent); text-align: center; line-height: 2;
}
.home-portrait img {
  position: absolute; bottom: 0; right: 0; height: clamp(440px, 86vh, 1280px); width: auto;
  /* the PNG has ~34% empty space on its right; nudge right so the subject hugs the screen edge */
  transform: translateX(30%);
  /* two fades intersected: soften the bottom edge AND the left edge (left shoulder/shirt) */
  -webkit-mask-image: linear-gradient(to bottom, #000 94%, transparent 100%), linear-gradient(to right, transparent 0, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 94%, transparent 100%), linear-gradient(to right, transparent 0, #000 10%);
  mask-composite: intersect;
}
.home-hero-copy {
  /* top-anchored so the headline stays ABOVE the bottom-anchored portrait
     instead of centering into the face on tall/portrait viewports */
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; text-align: left;
  padding: clamp(92px, 12vw, 150px) clamp(16px, 3vw, 52px) clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px);
  position: relative; z-index: 10; width: 100%;
}
.home-hero-copy h1 { font-family: "Archivo Black", "Archivo", sans-serif; font-stretch: normal; font-weight: 400; font-size: clamp(44px, 14vw, 320px); color: var(--on-accent); line-height: .88; letter-spacing: -.025em; white-space: nowrap; }
.home-hero-copy .sub {
  margin-top: 20px; font-family: "IBM Plex Mono", monospace; font-size: clamp(11px,1.3vw,15px); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--on-accent); opacity: .85;
}
.home-hero .scrollcue {
  position: absolute; right: clamp(20px, 5vw, 80px); bottom: 22px; color: var(--on-accent); opacity: .8; z-index: 3;
}
/* Narrow screens keep the same bottom-anchored overlay (no stacking),
   so the portrait always sits flush against the bottom of the hero. */
@media (max-width: 640px){
  .home-portrait { right: -2%; width: 78%; }
}

/* rotating roles */
.home-roles {
  position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center;
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--bg)) 50%, var(--bg) 100%);
  padding: clamp(40px,8vw,90px) 20px;
}
.home-roles .rolewrap {
  font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(28px, 6vw, 100px); line-height: 1.05; letter-spacing: -.01em; color: var(--on-accent);
  display: block; text-align: center;
}
.home-roles .role-rot { position: relative; display: inline-block; min-width: 1ch; }
@keyframes roleIn { from { opacity: 0; transform: translateY(.42em); } to { opacity: 1; transform: none; } }
.home-roles .role-rot > span { display: inline-block; animation: roleIn .5s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce){ .home-roles .role-rot > span { animation: none; } }

/* scroll-triggered role animations */
@keyframes roles-slide-up {
  from { opacity: 0; transform: translateY(0.4em); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes roles-slam-in {
  0%   { opacity: 0; transform: scale(1.18); filter: blur(6px); }
  60%  { opacity: 1; filter: blur(0); }
  80%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}
@keyframes roles-cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.roles-cursor {
  display: inline-block; width: .5em; height: .88em;
  background: currentColor; margin-left: .1em; vertical-align: text-bottom;
  animation: roles-cursor-blink .65s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
  .roles-cursor { animation: none; }
}

/* ---- Page curtain transition ---- */
.zt-curtain { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.zt-curtain.is-exit { pointer-events: auto; }
.zt-curtain-top {
  position: fixed; top: 0; left: 0; right: 0; height: 51vh;
  background: #2C9CFF; display: none;
}
.zt-curtain-bot {
  position: fixed; bottom: 0; left: 0; right: 0; height: 51vh;
  background: #2C9CFF; display: none;
}
.zt-curtain.is-active .zt-curtain-top,
.zt-curtain.is-active .zt-curtain-bot { display: block; }
.zt-curtain.is-enter .zt-curtain-top { animation: zt-c-top-out 0.6s cubic-bezier(0.76,0,0.24,1) both; }
.zt-curtain.is-enter .zt-curtain-bot { animation: zt-c-bot-out 0.6s cubic-bezier(0.76,0,0.24,1) both; }
.zt-curtain.is-exit  .zt-curtain-top { animation: zt-c-top-in  0.5s cubic-bezier(0.76,0,0.24,1) both; }
.zt-curtain.is-exit  .zt-curtain-bot { animation: zt-c-bot-in  0.5s cubic-bezier(0.76,0,0.24,1) both; }
@keyframes zt-c-top-out { from { transform: translateY(0);     } to { transform: translateY(-100%); } }
@keyframes zt-c-bot-out { from { transform: translateY(0);     } to { transform: translateY(100%);  } }
@keyframes zt-c-top-in  { from { transform: translateY(-100%); } to { transform: translateY(0);     } }
@keyframes zt-c-bot-in  { from { transform: translateY(100%);  } to { transform: translateY(0);     } }

/* what i make */
.featured-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px,3vw,40px); }
.featured-head h2 { font-size: clamp(40px, 6.5vw, 94px); }
.featured-link {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--accent);
  font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.featured-link .arrow { transition: transform .2s ease; }
.featured-link:hover .arrow { transform: translate(4px,-4px); }
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 680px){ .featured-grid { grid-template-columns: 1fr; } }
.featured-grid .work-card .thumb { aspect-ratio: 16/10; }
.featured-grid .work-card .wtitle { font-size: 18px; }

/* logos strip */
.logos {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding-block: clamp(26px,4vw,40px);
}
.logos .logos-lbl { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.logos .logos-row { display: flex; align-items: center; gap: clamp(22px,4vw,54px); flex-wrap: wrap; }
.logos .lw {
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: clamp(15px,1.6vw,19px); letter-spacing: -.01em;
  color: var(--ink); opacity: .42; transition: opacity .2s ease; text-transform: uppercase;
}
.logos .lw:hover { opacity: .9; }

/* recommendations */
.rec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1080px){ .rec-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .rec-grid { grid-template-columns: 1fr; } }
.rec-card {
  position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 20px 18px 18px;
  background: var(--bg2);
  display: flex; flex-direction: column;
}
.rec-card .qmark {
  font-family: "Archivo", sans-serif; font-weight: 900; font-style: italic; font-size: 40px; line-height: .6;
  color: var(--decor); margin-bottom: 14px;
}
.rec-card .qmark.qmark-close { text-align: right; margin: 2px 0 14px; }
.rec-card .qt { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 20px; flex: 1; text-wrap: pretty; }
.rec-card .who { font-weight: 800; font-size: 15px; letter-spacing: -.01em; padding-top: 14px; border-top: 1px solid var(--line); }
.rec-card .role { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 5px; line-height: 1.5; }
a.rec-card .who, a.rec-card .role { transition: color .18s ease; }
.rec-card a.who:hover { color: var(--accent); }
.rec-card a.role:hover { color: var(--ink-soft); }

/* ============================================================
   "WILD" — scroll-triggered animations (variations via Tweaks)
   ============================================================ */
.wild {
  display: inline-block; position: relative; color: var(--on-accent);
  transform-origin: center center; transform-style: preserve-3d; will-change: transform;
}
/* extruded depth layers (built in JS by shell.jsx) sit behind the front face in 3D */
.wild .wild-layer {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  pointer-events: none; user-select: none;
}

/* 1 — WOBBLE (3D jelly — tumbles on all axes) */
@keyframes wild-wobble {
  0%   { transform: perspective(700px) rotateX(0) rotateY(0) rotateZ(0) scale(1); }
  15%  { transform: perspective(700px) rotateX(24deg) rotateY(-30deg) rotateZ(-10deg) scale(1.3); }
  30%  { transform: perspective(700px) rotateX(-18deg) rotateY(24deg) rotateZ(8deg) scale(1.18); }
  45%  { transform: perspective(700px) rotateX(13deg) rotateY(-16deg) rotateZ(-6deg) scale(1.2); }
  60%  { transform: perspective(700px) rotateX(-9deg) rotateY(11deg) rotateZ(4deg) scale(1.1); }
  75%  { transform: perspective(700px) rotateX(5deg) rotateY(-5deg) rotateZ(-2deg) scale(1.04); }
  100% { transform: perspective(700px) rotateX(0) rotateY(0) rotateZ(0) scale(1); }
}
.wild-go[data-wild="wobble"] { animation: wild-wobble 1.05s ease-out both, wild-flash 1.05s ease both; }

/* 2 — SHAKE (3D jitter — rattles in depth) */
@keyframes wild-shake {
  0%,100% { transform: perspective(700px) translate3d(0,0,0) rotateY(0) rotateX(0); }
  10% { transform: perspective(700px) translate3d(-16px,6px,40px) rotateY(-20deg) rotateX(9deg); }
  20% { transform: perspective(700px) translate3d(16px,-8px,18px) rotateY(20deg) rotateX(-10deg); }
  30% { transform: perspective(700px) translate3d(-18px,4px,52px) rotateY(-24deg) rotateX(11deg); }
  40% { transform: perspective(700px) translate3d(18px,-6px,20px) rotateY(24deg) rotateX(-11deg); }
  50% { transform: perspective(700px) translate3d(-13px,7px,42px) rotateY(-16deg) rotateX(7deg); }
  60% { transform: perspective(700px) translate3d(12px,-3px,18px) rotateY(14deg) rotateX(-6deg); }
  70% { transform: perspective(700px) translate3d(-9px,4px,30px) rotateY(-9deg) rotateX(4deg); }
  80% { transform: perspective(700px) translate3d(6px,-3px,14px) rotateY(6deg) rotateX(-3deg); }
  90% { transform: perspective(700px) translate3d(-3px,1px,8px) rotateY(-3deg) rotateX(1deg); }
}
.wild-go[data-wild="shake"] { animation: wild-shake .85s cubic-bezier(.36,.07,.19,.97) both, wild-flash .85s ease both; }

/* 3 — POP (3D springy — punches toward you in depth) */
@keyframes wild-pop {
  0%   { transform: perspective(650px) translateZ(0) rotateX(0) rotateY(0) scale(1); }
  25%  { transform: perspective(650px) translateZ(150px) rotateX(-14deg) rotateY(10deg) scale(1.42); }
  45%  { transform: perspective(650px) translateZ(-60px) rotateX(8deg) rotateY(-6deg) scale(.84); }
  65%  { transform: perspective(650px) translateZ(70px) rotateX(-5deg) rotateY(3deg) scale(1.2); }
  85%  { transform: perspective(650px) translateZ(-18px) rotateX(2deg) rotateY(-1deg) scale(.95); }
  100% { transform: perspective(650px) translateZ(0) rotateX(0) rotateY(0) scale(1); }
}
@keyframes wild-flash {
  0%,100% { color: var(--on-accent); }
  25%,70% { color: var(--decor); }
}
.wild-go[data-wild="pop"] {
  animation: wild-pop .85s cubic-bezier(.34,1.56,.64,1) both, wild-flash .85s ease both;
}

/* 4 — SPIN (double flip) */
@keyframes wild-spin {
  0%   { transform: perspective(700px) rotateY(0) rotateZ(0) scale(1); }
  50%  { transform: perspective(700px) rotateY(360deg) rotateZ(10deg) scale(1.5); }
  100% { transform: perspective(700px) rotateY(720deg) rotateZ(0) scale(1); }
}
.wild-go[data-wild="spin"] { animation: wild-spin 1.15s ease-in-out both, wild-flash 1.15s ease both; }

/* 5 — FLIP3D (coin flip on the horizontal axis) */
@keyframes wild-flip3d {
  0%   { transform: perspective(800px) rotateX(0) scale(1); }
  45%  { transform: perspective(800px) rotateX(190deg) scale(1.18); }
  72%  { transform: perspective(800px) rotateX(338deg) scale(1.05); }
  100% { transform: perspective(800px) rotateX(360deg) scale(1); }
}
.wild-go[data-wild="flip3d"] { animation: wild-flip3d 1s cubic-bezier(.5,.05,.2,1) both, wild-flash 1s ease both; }

/* 6 — TUMBLE (diagonal double-flip, X+Y) */
@keyframes wild-tumble {
  0%   { transform: perspective(900px) rotateX(0) rotateY(0) scale(1); }
  50%  { transform: perspective(900px) rotateX(180deg) rotateY(180deg) scale(1.45); }
  100% { transform: perspective(900px) rotateX(360deg) rotateY(360deg) scale(1); }
}
.wild-go[data-wild="tumble"] { animation: wild-tumble 1.2s ease-in-out both, wild-flash 1.2s ease both; }

/* 7 — SWING (pendulum hinged at the top edge) */
@keyframes wild-swing {
  0%   { transform: perspective(800px) rotateX(0); }
  22%  { transform: perspective(800px) rotateX(62deg); }
  44%  { transform: perspective(800px) rotateX(-40deg); }
  62%  { transform: perspective(800px) rotateX(24deg); }
  80%  { transform: perspective(800px) rotateX(-10deg); }
  100% { transform: perspective(800px) rotateX(0); }
}
.wild-go[data-wild="swing"] { transform-origin: center top; animation: wild-swing 1.1s cubic-bezier(.36,.07,.19,.97) both, wild-flash 1.1s ease both; }

/* 8 — PUNCH (lunges toward the viewer in Z, then settles) */
@keyframes wild-punch {
  0%   { transform: perspective(600px) translateZ(0) rotateX(0); }
  28%  { transform: perspective(600px) translateZ(170px) rotateX(-12deg); }
  52%  { transform: perspective(600px) translateZ(-90px) rotateX(7deg); }
  74%  { transform: perspective(600px) translateZ(40px) rotateX(-3deg); }
  100% { transform: perspective(600px) translateZ(0) rotateX(0); }
}
.wild-go[data-wild="punch"] { animation: wild-punch .9s cubic-bezier(.34,1.56,.64,1) both, wild-flash .9s ease both; }

/* 9 — UNFOLD (door swinging open from the left hinge — lingers at oblique angles to show depth) */
@keyframes wild-unfold {
  0%   { transform: perspective(800px) rotateY(-90deg) translateZ(-24px); }
  32%  { transform: perspective(800px) rotateY(-44deg) translateZ(0); }
  58%  { transform: perspective(800px) rotateY(34deg); }
  78%  { transform: perspective(800px) rotateY(-14deg); }
  92%  { transform: perspective(800px) rotateY(6deg); }
  100% { transform: perspective(800px) rotateY(0); }
}
.wild-go[data-wild="unfold"] { transform-origin: left center; animation: wild-unfold 1.15s cubic-bezier(.32,.64,.32,1) both, wild-flash 1.15s ease both; }

/* hover/scroll triggering is JS-driven (see shell.jsx) for fresh-random each time.
   Scroll auto-play respects reduced-motion in JS; hover is user-initiated so it always plays. */
.wild { cursor: pointer; }
