/* Pagna Air terminal: the portfolio's styles.
   Palette and shapes follow the profile artwork (scripts/build_assets.py). */

@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/sora.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kantumruy Pro"; src: url("../fonts/khmer.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/han.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --void: #08031A;
  --deep: #0D0624;
  --panel: #130A30;
  --panel-2: #1C1146;
  --edge: #3B2A7C;
  --line: #241659;
  --ink: #F6F3FF;
  --muted: #C4BAEC;
  --dim: #9187CC;
  --volt: #FCEE0A;
  --magenta: #FF2E88;
  --cyan: #19E6FF;
  --violet: #A974FF;
  --acid: #3CFFA4;
  --orange: #FF8A1F;
  --blue: #4F8DFF;
  --lime: #C4FF3D;
  --red: #FF3B5C;

  --head: "Unbounded", "Sora", system-ui, sans-serif;
  --hud: "Chakra Petch", "Sora", system-ui, sans-serif;
  --body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --khmer: "Kantumruy Pro", "Khmer UI", "Noto Sans Khmer", sans-serif;
  --han: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --cut: 18px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, video, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--magenta); color: var(--void); }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.km { font-family: var(--khmer); }
.zh { font-family: var(--han); }

/* texture shared by panels: circuit grid and scanlines */
.grid-bg {
  background-color: var(--void);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1.3px, transparent 1.3px 4px),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--volt); color: var(--void); padding: 10px 14px; font: 700 14px var(--hud); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ chrome: top bar */

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px var(--gutter);
  transition: background .3s, border-color .3s, transform .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.solid { background: rgba(8, 3, 26, .82); backdrop-filter: blur(12px); border-color: var(--line); }
.topbar.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px var(--hud); letter-spacing: .14em; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--void); background: var(--volt);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  font: 800 13px var(--head);
}
.brand small { display: block; font: 600 10px var(--hud); letter-spacing: .2em; color: var(--dim); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font: 700 13px var(--hud); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 8px 12px; color: var(--muted); position: relative;
}
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.clock { font: 600 12px var(--hud); letter-spacing: .14em; color: var(--dim); white-space: nowrap; }
.clock b { color: var(--cyan); font-weight: 700; }
.kbtn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--edge); background: var(--panel);
  font: 600 12px var(--hud); letter-spacing: .1em; color: var(--muted); cursor: pointer;
}
.kbtn:hover { border-color: var(--cyan); color: var(--ink); }
kbd { font: 700 11px var(--hud); padding: 1px 5px; border: 1px solid var(--edge); background: var(--void); color: var(--muted); }
.menu-btn { display: none; }

@media (max-width: 980px) {
  .nav, .clock { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .topbar.open .nav {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(8, 3, 26, .97); padding: 8px var(--gutter) 18px; border-bottom: 1px solid var(--line);
  }
  .topbar.open .nav a { padding: 12px 4px; font-size: 15px; }
  .kbtn, .menu-btn { min-height: 44px; }
}

/* ------------------------------------------------------------ buttons, tags, chips */

.btn {
  --c: var(--volt);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  font: 700 14px var(--hud); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--void); background: var(--c); border: 0; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: transform .2s var(--ease), filter .2s;
  position: relative;
}
.btn:hover { transform: translateY(-2px); filter: drop-shadow(0 0 12px var(--c)) brightness(1.08); }
.btn.ghost { background: transparent; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.btn.ghost:hover { background: color-mix(in srgb, var(--c) 14%, transparent); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.tag {
  --c: var(--acid);
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px;
  font: 700 11px var(--hud); letter-spacing: .14em; text-transform: uppercase;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 12%, var(--void));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.tag.solid { background: var(--c); color: var(--void); border-color: var(--c); }
.tag.pulse::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px;
  font: 600 13px var(--body); color: var(--ink);
  background: var(--panel-2); border: 1px solid color-mix(in srgb, var(--c, var(--edge)) 45%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}
.chip::before { content: ""; width: 6px; height: 6px; background: var(--c, var(--cyan)); }
button.chip { cursor: pointer; }
button.chip:hover, button.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--cyan)) 22%, var(--panel-2)); border-color: var(--c, var(--cyan)); }

/* ------------------------------------------------------------ hero */

.hero { position: relative; height: 100svh; min-height: 620px; max-height: 1100px; overflow: hidden; background: #04010C; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.hero-copy {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 90px var(--gutter) 34vh; pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.greet { display: flex; gap: 18px; align-items: center; font-size: clamp(22px, 3.2vw, 34px); font-weight: 700; margin-bottom: 8px; min-height: 1.5em; }
.greet span { transition: opacity .4s, transform .4s var(--ease), filter .4s; }
.greet .km { color: var(--volt); text-shadow: 0 0 18px rgba(252, 238, 10, .6); }
.greet .zh { color: var(--magenta); text-shadow: 0 0 18px rgba(255, 46, 136, .6); }
.greet .en { color: var(--cyan); font-family: var(--hud); letter-spacing: .08em; text-shadow: 0 0 18px rgba(25, 230, 255, .6); }
.greet i { width: 7px; height: 7px; background: var(--muted); transform: rotate(45deg); }
.greet span.dim { opacity: .35; filter: blur(.5px); }
.greet span.lit { transform: translateY(-3px) scale(1.06); }

.name {
  margin: 0; font: 800 clamp(40px, 9vw, 124px)/.95 var(--head); letter-spacing: -.01em; text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0 2px #fff, 0 0 26px rgba(255, 46, 136, .55), 3px 0 0 rgba(255, 46, 136, .8), -3px 0 0 rgba(25, 230, 255, .8);
  position: relative;
}
.name .line { display: block; }
.name.glitch { animation: glitch .45s steps(2) 1; }
@keyframes glitch {
  0% { transform: translate(0); clip-path: inset(0 0 0 0); }
  20% { transform: translate(-4px, 1px); clip-path: inset(12% 0 55% 0); }
  40% { transform: translate(4px, -1px); clip-path: inset(60% 0 8% 0); }
  60% { transform: translate(-2px, 0); clip-path: inset(30% 0 30% 0); }
  80% { transform: translate(2px, 1px); clip-path: inset(0 0 70% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); }
}
.subline {
  margin-top: 22px; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  padding: 10px 20px; background: rgba(8, 3, 26, .72); border: 1px solid var(--edge);
  font: 700 clamp(11px, 1.3vw, 14px) var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.subline em { font-style: normal; color: var(--muted); }
.subline b { color: var(--magenta); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-hint {
  position: absolute; z-index: 2; bottom: 18px; left: 50%; transform: translateX(-50%);
  font: 600 11px var(--hud); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; white-space: nowrap;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.hero-hint::before { content: ""; width: 6px; height: 6px; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); animation: pulse 1.4s infinite; }
.coords {
  position: absolute; z-index: 2; bottom: 18px; font: 700 11px var(--hud); letter-spacing: .14em; padding: 6px 10px;
  background: rgba(8, 3, 26, .8); pointer-events: none;
}
.coords.kh { left: var(--gutter); color: var(--orange); border: 1px solid rgba(255, 138, 31, .6); }
.coords.hk { right: var(--gutter); color: var(--cyan); border: 1px solid rgba(25, 230, 255, .6); }
@media (max-width: 700px) {
  .coords { display: none; }
  .hero-copy { padding-bottom: 30vh; }
}

/* ------------------------------------------------------------ sections */

main { position: relative; }
.section { position: relative; padding: clamp(56px, 7vw, 96px) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }
.sec-head { display: flex; align-items: stretch; gap: 0; margin-bottom: clamp(28px, 4vw, 48px); position: relative; }
.sec-num {
  flex: none; width: 76px; display: grid; place-items: center; background: var(--c, var(--magenta)); color: var(--void);
  font: 800 24px var(--head); clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%);
}
.sec-title { flex: 1; display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--void); border: 1px solid var(--line); border-left: 0; min-width: 0; }
.sec-title h2 { margin: 0; font: 800 clamp(20px, 3vw, 30px)/1.1 var(--head); letter-spacing: .03em; text-transform: uppercase; }
.sec-title .rule { flex: 1; height: 2px; background: linear-gradient(90deg, var(--c, var(--magenta)), transparent); opacity: .6; min-width: 20px; }
.sec-title .alt { font-size: 15px; color: var(--dim); white-space: nowrap; }
.lede { max-width: 760px; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); margin: 0 0 32px; }
.lede strong { color: var(--ink); }
@media (max-width: 600px) { .sec-num { width: 54px; font-size: 18px; } .sec-title .alt { display: none; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ boarding pass */

.pass {
  display: grid; grid-template-columns: 1fr 300px; position: relative;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .5));
  transform-style: preserve-3d; transition: transform .3s var(--ease);
}
.pass-main, .pass-stub { position: relative; }
.pass-main { clip-path: polygon(0 12px, 12px 0, 100% 0, 100% 100%, 0 100%); background: linear-gradient(135deg, #2A1760, #150A3A 55%, #10082C); }
.pass-stub { background: linear-gradient(160deg, #10203F, #0D0A2E); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%); border-left: 2px dashed rgba(196, 186, 236, .35); }
.pass::before, .pass::after {
  content: ""; position: absolute; left: calc(100% - 300px); width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: var(--void); z-index: 2;
}
.pass::before { top: -17px; }
.pass::after { bottom: -17px; }
.pass-band { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--volt); color: var(--void); }
.pass-band b { font: 800 clamp(16px, 2.2vw, 24px) var(--head); letter-spacing: .02em; }
.pass-band .zh { font-weight: 700; font-size: 18px; }
.pass-band span:last-child { margin-left: auto; font: 700 13px var(--hud); letter-spacing: .3em; }
.pass-stub .pass-band { background: var(--magenta); }
.pass-stub .pass-band span { margin: 0; font: 700 13px var(--hud); letter-spacing: .3em; }
.pass-body { padding: 26px 28px 28px; background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.2) 0 1px, transparent 1px 4px); }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 26px; }
.airport small { display: block; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); }
.airport b { display: block; font: 800 clamp(48px, 7vw, 84px)/1 var(--head); }
.airport span { font: 700 12px var(--hud); letter-spacing: .16em; }
.airport.from b { color: var(--magenta); text-shadow: 0 0 22px rgba(255, 46, 136, .45); }
.airport.to { text-align: right; }
.airport.to b { color: var(--cyan); text-shadow: 0 0 22px rgba(25, 230, 255, .45); }
.flightpath { position: relative; height: 70px; }
.flightpath svg { width: 100%; height: 100%; overflow: visible; }
.flightpath .via { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; }
.field small { display: flex; align-items: center; gap: 8px; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.field small::before { content: ""; width: 3px; height: 12px; background: var(--volt); }
.field b { display: block; font: 700 clamp(15px, 1.7vw, 20px)/1.25 var(--body); text-transform: uppercase; margin-top: 4px; }
.field span { font-size: 13px; color: var(--muted); }
.stub-body { padding: 26px 24px; }
.stub-body h3 { margin: 4px 0 12px; font: 800 30px var(--head); letter-spacing: .02em; }
.stub-body ul { list-style: none; padding: 0; margin: 0 0 20px; }
.stub-body li { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 6px 0; }
.stub-body li::before { content: ""; width: 9px; height: 9px; background: var(--c); }
.barcode { height: 54px; margin-top: 18px; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 8px, #fff 8px 11px, transparent 11px 12px); opacity: .9; }
.pass-code { margin-top: 8px; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); }
.about-copy { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 48px; align-items: start; }
.about-copy p { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.about-copy p strong { color: var(--ink); }
.fact-list { display: grid; gap: 10px; }
.fact { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); }
.fact b { font: 800 26px var(--head); color: var(--c); min-width: 64px; }
.fact span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .pass { grid-template-columns: 1fr; }
  .pass::before, .pass::after { display: none; }
  .pass-stub { border-left: 0; border-top: 2px dashed rgba(196, 186, 236, .35); }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-copy { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .route { grid-template-columns: 1fr 1fr; }
  .flightpath { display: none; }
  .fields { grid-template-columns: 1fr; }
  .pass-band span:last-child { display: none; }
}

/* ------------------------------------------------------------ departures board */

.board { background: #0B0522; border: 1px solid var(--edge); position: relative; overflow: hidden; }
.board::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); z-index: 1; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 18px 22px; border-bottom: 1px solid var(--edge); background: linear-gradient(90deg, rgba(252,238,10,.08), transparent 40%); }
.board-head h3 { margin: 0; display: flex; align-items: center; gap: 14px; font: 800 clamp(20px, 2.6vw, 30px) var(--head); color: var(--volt); text-shadow: 0 0 16px rgba(252, 238, 10, .5); }
.board-head h3 svg { width: 30px; height: 30px; }
.board-head .alt { font-size: 18px; color: var(--muted); }
.board-head .meta { margin-left: auto; display: flex; gap: 14px; align-items: center; font: 700 12px var(--hud); letter-spacing: .16em; color: var(--dim); }
.board-table { width: 100%; border-collapse: collapse; position: relative; }
.board-table th { text-align: left; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); padding: 12px 14px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board-table td { padding: 7px 14px; border-bottom: 1px solid rgba(36, 22, 89, .7); vertical-align: middle; }
.board-table tbody tr { cursor: pointer; transition: background .2s; }
.board-table tbody tr:nth-child(odd) { background: rgba(28, 17, 70, .45); }
.board-table tbody tr:hover, .board-table tbody tr:focus-visible { background: rgba(252, 238, 10, .08); outline: none; }
.board-table tbody tr:hover .dest .flap { color: #fff; }
.flaps { display: flex; gap: 3px; }
.flap {
  width: 22px; height: 32px; flex: none; display: grid; place-items: center;
  background: linear-gradient(#1F1248 0 49%, #08031A 49% 51%, #1B0F40 51%); border-radius: 2px;
  font: 700 18px var(--hud); color: var(--volt); text-shadow: 0 0 8px rgba(252, 238, 10, .45);
}
.flap.spin { animation: flip .07s linear; }
@keyframes flip { 0% { transform: scaleY(1); } 50% { transform: scaleY(.1); } 100% { transform: scaleY(1); } }
.board .route-cell { color: var(--ink); font-weight: 500; min-width: 220px; }
.board .gate { font: 700 13px var(--hud); letter-spacing: .12em; color: var(--cyan); white-space: nowrap; }
.ticker { display: flex; overflow: hidden; background: var(--volt); color: var(--void); font: 700 13px var(--hud); letter-spacing: .16em; text-transform: uppercase; position: relative; z-index: 2; }
.ticker::before, .ticker::after { content: ""; flex: none; width: 34px; background: repeating-linear-gradient(45deg, var(--void) 0 7px, var(--volt) 7px 14px); position: relative; z-index: 1; }
.ticker-track { display: flex; gap: 40px; padding: 9px 0; white-space: nowrap; animation: ticker 40s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (max-width: 860px) {
  .board-table thead { display: none; }
  .board-table, .board-table tbody, .board-table tr, .board-table td { display: block; }
  .board-table tr { display: grid !important; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .board-table td { border: 0; padding: 0; }
  .board-table td.flight { grid-row: span 2; }
  .board-table td.gate, .board-table td.status { grid-column: 2; }
  .board .route-cell { min-width: 0; font-size: 14px; }
  .flap { width: 17px; height: 25px; font-size: 14px; }
  .board-table td.status { display: flex; }
  .board-table td.gate { display: none; }
}
@media (max-width: 480px) { .board-table td.flight { display: none; } .board-table tr { grid-template-columns: 1fr; } .board-table td.gate, .board-table td.status { grid-column: 1; } }

/* ------------------------------------------------------------ projects */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  font: 700 12px var(--hud); letter-spacing: .14em; text-transform: uppercase; padding: 9px 14px; cursor: pointer;
  background: var(--panel); color: var(--muted); border: 1px solid var(--edge);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.filters button[aria-pressed="true"] { background: var(--volt); color: var(--void); border-color: var(--volt); }
.filters button:not([aria-pressed="true"]):hover { color: var(--ink); border-color: var(--cyan); }
.filters .count { opacity: .6; margin-left: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(16px, 2vw, 26px); }
.card {
  --c: var(--volt);
  position: relative; display: flex; flex-direction: column; background: var(--deep); isolation: isolate;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: transform .35s var(--ease);
}
.card::before { content: ""; position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--edge)); z-index: 3; pointer-events: none; }
.card::after { content: ""; position: absolute; right: 0; bottom: 0; width: calc(var(--cut) * 1.42); height: 2px; background: var(--c); transform: rotate(-45deg); transform-origin: right bottom; z-index: 3; }
.card:hover { transform: translateY(-6px); }
.card.feature { grid-column: span 2; }
@media (max-width: 820px) { .card.feature { grid-column: auto; } }
.card[hidden] { display: none; }
.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0B0620; border-bottom: 2px solid var(--c); }
.card.feature .shot { aspect-ratio: 21 / 9; }
@media (max-width: 820px) { .card.feature .shot { aspect-ratio: 16 / 10; } }
.shot-bar { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: rgba(8, 3, 26, .88); font: 600 12px var(--hud); letter-spacing: .06em; color: var(--muted); }
.shot-bar i { width: 8px; height: 8px; background: var(--c); }
.shot-bar i + i { background: color-mix(in srgb, var(--c) 55%, transparent); }
.shot-bar i + i + i { background: color-mix(in srgb, var(--c) 25%, transparent); }
.shot-bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-bar .tag { margin-left: auto; flex: none; }
.shot-bar span:not(.tag) { min-width: 0; }
.shot .scan { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(transparent 60%, rgba(8, 3, 26, .75)), repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px); }
.shot .play-badge { position: absolute; z-index: 2; right: 12px; bottom: 12px; }
.card-body { position: relative; padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
.card-body::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 6, 36, .55), rgba(13, 6, 36, .92)); z-index: -1; }
.card-kicker { display: flex; align-items: center; gap: 10px; font: 700 12px var(--hud); letter-spacing: .2em; color: var(--c); text-transform: uppercase; }
.card h3 { margin: 0; font: 800 clamp(22px, 2.4vw, 30px)/1.1 var(--head); }
.card .tagline { margin: 0; color: var(--c); font-weight: 600; font-size: 16px; }
.card .summary { margin: 0; color: var(--muted); font-size: 15px; }
.card .stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card .stack .chip { --c: var(--card-c, var(--cyan)); font-size: 12px; padding: 3px 9px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.card-actions .btn { --c: var(--card-accent, var(--volt)); }
.card h3 .open { all: unset; cursor: pointer; }
.card h3 .open:hover { color: var(--c); }
.card h3 .open:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }
.card-actions, .shot-bar { position: relative; z-index: 4; }
.cards.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.slides { position: absolute; inset: 30px 0 0; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .5s; }
.slides img.on { opacity: 1; }
.noshot { position: absolute; inset: 0; display: grid; place-items: center; font: 800 28px var(--head); color: var(--c); background: repeating-linear-gradient(45deg, #0B0620 0 12px, #100828 12px 24px); }
.dots { position: absolute; z-index: 2; left: 14px; bottom: 12px; display: flex; gap: 5px; }
.dots i { width: 14px; height: 3px; background: rgba(246, 243, 255, .35); transition: background .3s, width .3s; }
.dots i.on { background: var(--c); width: 24px; }
.subhead { margin: 56px 0 18px; font: 700 13px var(--hud); letter-spacing: .24em; color: var(--dim); text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.filter-link { align-self: center; min-height: 36px; padding: 0 8px; margin-left: 6px; font: 700 12px var(--hud); letter-spacing: .14em; text-transform: uppercase; color: var(--lime); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.filter-link:hover { text-decoration: underline; }
.filters button .count, .btn .count { opacity: .6; margin-left: 6px; }
.course { margin-top: 36px; border: 1px solid var(--line); background: var(--deep); }
.course summary { cursor: pointer; padding: 14px 18px; font: 700 13px var(--hud); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.course summary .count { color: var(--volt); margin-left: 6px; }
.course ul { list-style: none; margin: 0; padding: 0 18px 16px; display: grid; gap: 10px; }
.course li { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.course li a, .course li b { color: var(--ink); font-weight: 600; }
.course li span { color: var(--muted); }
@media (max-width: 640px) { .course li { grid-template-columns: 1fr; gap: 2px; } }

/* ------------------------------------------------------------ dossier (project detail) */

.overlay { position: fixed; inset: 0; z-index: 60; display: none; }
.overlay.open { display: block; }
.overlay-bg { position: absolute; inset: 0; background: rgba(4, 1, 12, .82); backdrop-filter: blur(6px); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.dossier {
  --c: var(--volt);
  position: absolute; inset: clamp(0px, 3vh, 36px) clamp(0px, 3vw, 48px); overflow: auto; overscroll-behavior: contain;
  background: var(--deep); border: 1px solid var(--edge); animation: rise .45s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.98); } }
.dossier-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: rgba(8, 3, 26, .94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--c); }
.dossier-head .code { font: 700 13px var(--hud); letter-spacing: .2em; color: var(--c); }
.dossier-head h2 { margin: 0; font: 800 18px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dossier-head .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--edge); cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--c, var(--volt)); color: var(--c, var(--volt)); }
.icon-btn svg { width: 18px; height: 18px; }
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 0; }
.stage { padding: 20px; border-right: 1px solid var(--line); min-width: 0; }
.stage-main { position: relative; background: #05020F; border: 1px solid var(--line); aspect-ratio: 16 / 10; overflow: hidden; }
.stage-main img { width: 100%; height: 100%; object-fit: contain; background: #05020F; cursor: zoom-in; }
.stage-main iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.stage-main .frame-wrap { position: absolute; inset: 0; display: flex; justify-content: center; background: #05020F; }
.stage-main .frame-wrap iframe { transition: width .4s var(--ease); }
.stage-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.stage-tabs .spacer { flex: 1; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.thumbs button { flex: none; width: 128px; aspect-ratio: 16 / 10; padding: 0; border: 2px solid var(--line); background: #05020F; cursor: pointer; overflow: hidden; opacity: .7; }
.thumbs button[aria-current="true"] { border-color: var(--c); opacity: 1; }
.thumbs button:hover { opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.caption { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.info { padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.info h3 { margin: 0 0 8px; font: 700 12px var(--hud); letter-spacing: .22em; color: var(--c); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.info h3::before { content: ""; width: 3px; height: 12px; background: var(--c); }
.info .big-title { font: 800 clamp(26px, 3vw, 38px)/1.05 var(--head); margin: 0; }
.info .tagline { color: var(--c); font-weight: 600; margin: 6px 0 0; font-size: 17px; }
.info p { margin: 0; color: var(--muted); }
.info ul.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.info ul.features li { position: relative; padding-left: 20px; color: var(--ink); font-size: 15px; }
.info ul.features li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--c); transform: rotate(45deg); }
.info .links { display: flex; flex-wrap: wrap; gap: 8px; }
.info .links .btn { --c: var(--card-accent, var(--volt)); }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.meta-grid div { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); }
.meta-grid small { display: block; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.meta-grid b { font-size: 14px; }
.note { padding: 12px 14px; border: 1px dashed var(--edge); background: rgba(28, 17, 70, .35); color: var(--muted); font-size: 14px; }
.dossier-nav { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px 20px; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .dossier-grid { grid-template-columns: 1fr; }
  .stage { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .dossier { inset: 0; }
}

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; display: none; background: rgba(4, 1, 12, .95); cursor: zoom-out; padding: 20px; }
.lightbox.open { display: grid; place-items: center; }
.lightbox img { max-height: calc(100vh - 40px); width: auto; max-width: 100%; box-shadow: 0 0 0 1px var(--edge), 0 30px 80px rgba(0,0,0,.6); }

/* ------------------------------------------------------------ arcade */

.arcade { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; border: 1px solid var(--edge); background: #070215; }
.cabinet { position: relative; padding: clamp(10px, 2vw, 22px); background: radial-gradient(ellipse at 50% 0%, rgba(169, 116, 255, .18), transparent 60%); min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 10; background: #000; border: 2px solid var(--edge); box-shadow: 0 0 0 6px #120829, 0 0 40px rgba(25, 230, 255, .15) inset; overflow: hidden; }
.screen iframe, .screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-cover { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background-size: cover; background-position: center; }
.screen-cover::before { content: ""; position: absolute; inset: 0; background: rgba(4, 1, 12, .8); }
.screen-cover > div { position: relative; padding: 20px; }
.screen-cover h3 { font: 800 clamp(24px, 3.4vw, 44px) var(--head); margin: 0 0 6px; }
.screen-cover p { margin: 0 auto 18px; color: var(--muted); max-width: 460px; }
.screen-cover .insert { font: 700 12px var(--hud); letter-spacing: .3em; color: var(--volt); animation: pulse 1.2s infinite; margin-top: 14px; }
.screen-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.screen-tools .spacer { flex: 1; }
.screen-tools small { color: var(--dim); font-size: 12px; }
.game-list { border-left: 1px solid var(--edge); display: flex; flex-direction: column; }
.game-list h3 { margin: 0; padding: 14px 16px; font: 700 12px var(--hud); letter-spacing: .22em; color: var(--dim); border-bottom: 1px solid var(--line); }
.game-list button {
  --c: var(--cyan);
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-align: left; padding: 12px 16px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink);
}
.game-list button:hover { background: rgba(28, 17, 70, .6); }
.game-list button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 3px 0 0 var(--c); }
.game-list .thumb { width: 56px; height: 56px; background-size: cover; background-position: center; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.game-list b { display: block; font: 700 15px var(--body); }
.game-list span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.game-list .kind { font: 700 11px var(--hud); letter-spacing: .16em; color: var(--c); text-transform: uppercase; }
@media (max-width: 960px) {
  .arcade { grid-template-columns: 1fr; }
  .game-list { border-left: 0; border-top: 1px solid var(--edge); display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .game-list h3 { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ game dev lab */

.lab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
@media (max-width: 900px) { .lab { grid-template-columns: 1fr; } }
.lab-card { --c: var(--lime); position: relative; background: var(--deep); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--edge)); overflow: hidden; }
.lab-hero { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.lab-hero img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lab-card:hover .lab-hero img { transform: scale(1.04); }
.lab-hero .hud { position: absolute; inset: 0; pointer-events: none; }
.lab-hero .hud::before, .lab-hero .hud::after { content: ""; position: absolute; width: 40px; height: 40px; border: 2px solid var(--c); }
.lab-hero .hud::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.lab-hero .hud::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.lab-hero .engine { position: absolute; top: 14px; right: 14px; }
.lab-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--void); }
.lab-strip button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; cursor: zoom-in; background: #05020F; }
.lab-strip img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .4s; }
.lab-strip button:hover img { opacity: 1; transform: scale(1.06); }
.lab-body { padding: 20px 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lab-body h3 { margin: 0; font: 800 28px var(--head); }
.lab-body .tagline { margin: 0; color: var(--c); font-weight: 600; }
.lab-body p { margin: 0; color: var(--muted); font-size: 15px; }
.lab-body ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink); font-size: 14px; display: grid; gap: 3px; }

/* ------------------------------------------------------------ build loop */

.loop { display: grid; grid-template-columns: 420px 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
@media (max-width: 900px) { .loop { grid-template-columns: 1fr; } }
.loop-wheel { position: relative; aspect-ratio: 1; max-width: 420px; width: 100%; margin: 0 auto; }
.loop-wheel svg { width: 100%; height: 100%; overflow: visible; }
.loop-wheel .center { position: absolute; inset: 30%; display: grid; place-items: center; text-align: center; }
.loop-wheel .center b { display: block; font: 800 20px var(--head); }
.loop-wheel .center span { display: block; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); }
.loop-steps { display: grid; gap: 12px; }
.step { --c: var(--cyan); display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, background .3s, transform .3s var(--ease); cursor: pointer; text-align: left; color: inherit; width: 100%; }
.step.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel)); box-shadow: inset 4px 0 0 var(--c); }
.step .n { font: 800 26px var(--head); color: var(--c); }
.step b { display: block; font: 700 18px var(--body); }
.step span { color: var(--muted); font-size: 15px; }
.honest { margin-top: 26px; padding: 18px 20px; border-left: 3px solid var(--magenta); background: rgba(255, 46, 136, .06); color: var(--muted); }
.honest strong { color: var(--ink); }

/* ------------------------------------------------------------ toolbox */

.tools { display: grid; gap: 14px; }
.tool-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; }
.tool-row h3 { margin: 0; padding: 10px 14px; background: var(--c); color: var(--void); font: 700 13px var(--hud); letter-spacing: .14em; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); }
.tool-row .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-row .chip { --c: var(--row-c); }
.tool-hint { margin-top: 18px; color: var(--dim); font-size: 14px; display: flex; gap: 10px; align-items: center; min-height: 28px; flex-wrap: wrap; }
.tool-hint b { color: var(--ink); }
.tool-hint a { color: var(--cyan); }
@media (max-width: 700px) { .tool-row { grid-template-columns: 1fr; } .tool-row h3 { justify-self: start; } }

/* ------------------------------------------------------------ timeline */

.timeline { position: relative; overflow-x: auto; padding: 10px 0 18px; scrollbar-width: thin; }
.timeline ol { list-style: none; margin: 0; padding: 0 20px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); position: relative; width: max-content; min-width: 100%; }
.timeline ol::before { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; height: 3px; background: linear-gradient(90deg, var(--blue), var(--cyan) 35%, var(--volt) 60%, var(--magenta) 86%, var(--dim) 86%); }
.timeline li { --c: var(--cyan); position: relative; height: 290px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.timeline li .dot { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -8px 0 0 -9px; transform: rotate(45deg); background: var(--void); border: 3px solid var(--c); z-index: 1; }
.timeline li .dot::after { content: ""; position: absolute; inset: 3px; background: var(--c); }
.timeline li .txt { position: absolute; width: 160px; left: 50%; margin-left: -80px; }
.timeline li:nth-child(odd) .txt { bottom: calc(50% + 24px); }
.timeline li:nth-child(even) .txt { top: calc(50% + 24px); }
.timeline li small { display: block; font: 700 12px var(--hud); letter-spacing: .16em; color: var(--c); }
.timeline li b { display: block; font: 700 15px/1.25 var(--body); margin: 4px 0 2px; }
.timeline li span { font-size: 13px; color: var(--muted); }
.timeline li.now .dot { box-shadow: 0 0 0 6px rgba(255, 46, 136, .25), 0 0 24px var(--magenta); animation: ping 2s infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 12px rgba(255, 46, 136, 0), 0 0 24px var(--magenta); } }
.timeline li.future .dot { border-style: dashed; }
.timeline .here { display: inline-block; margin-top: 6px; }

/* ------------------------------------------------------------ activity */

.activity { display: grid; gap: 16px; }
.activity img { width: 100%; height: auto; background: var(--void); border: 1px solid var(--line); }
.activity .fallback { padding: 18px; color: var(--muted); border: 1px dashed var(--edge); }

/* ------------------------------------------------------------ contact */

.contact { position: relative; overflow: hidden; text-align: center; padding-bottom: 60px; }
.neon-sign { display: inline-block; padding: 30px clamp(20px, 5vw, 60px); border: 3px solid var(--magenta); box-shadow: 0 0 24px rgba(255, 46, 136, .6), inset 0 0 24px rgba(255, 46, 136, .35); position: relative; }
.neon-sign h2 { margin: 0; font: 800 clamp(28px, 5.4vw, 64px)/1.05 var(--head); text-transform: uppercase; color: #FFE3F0; text-shadow: 0 0 6px #fff, 0 0 18px var(--magenta), 0 0 42px var(--magenta); }
.neon-sign h2 .flick { animation: flicker 6s infinite; }
@keyframes flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .25; } }
.neon-sign p { margin: 10px 0 0; font: 700 13px var(--hud); letter-spacing: .24em; color: var(--cyan); text-shadow: 0 0 10px var(--cyan); text-transform: uppercase; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; max-width: 1040px; margin: 44px auto 0; text-align: left; }
.contact-card { --c: var(--volt); display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s var(--ease); font: inherit; width: 100%; text-align: left; }
.contact-card:hover { border-color: var(--c); transform: translateY(-3px); }
.contact-card svg { width: 26px; height: 26px; color: var(--c); flex: none; }
.contact-card small { display: block; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.contact-card b { font-size: 15px; word-break: break-word; }
.thanks { margin-top: 40px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 20px; font-weight: 700; }
.thanks .km { color: var(--volt); }
.thanks .zh { color: var(--magenta); }
.thanks .en { color: var(--cyan); font-family: var(--hud); letter-spacing: .08em; }
footer.foot { border-top: 1px solid var(--line); padding: 22px var(--gutter); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13px; color: var(--dim); }
footer.foot a { color: var(--muted); }

/* ------------------------------------------------------------ command palette & toast */

.palette { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(4, 1, 12, .7); backdrop-filter: blur(4px); padding: 12vh 16px 16px; }
.palette.open { display: block; }
.palette-box { max-width: 620px; margin: 0 auto; background: var(--deep); border: 1px solid var(--edge); box-shadow: 0 0 0 1px rgba(25,230,255,.15), 0 30px 80px rgba(0,0,0,.6); animation: rise .25s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input span { font: 700 14px var(--hud); color: var(--acid); }
.palette-input input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font: 500 17px var(--body); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; color: var(--muted); }
.palette li[aria-selected="true"] { background: rgba(25, 230, 255, .1); color: var(--ink); box-shadow: inset 2px 0 0 var(--cyan); }
.palette li .k { margin-left: auto; font: 700 10px var(--hud); letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.palette li i { width: 8px; height: 8px; flex: none; background: var(--c, var(--cyan)); }
.palette .empty { padding: 16px; color: var(--dim); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 30px); opacity: 0; transition: .3s var(--ease); padding: 12px 18px; background: var(--acid); color: var(--void); font: 700 13px var(--hud); letter-spacing: .12em; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

body.glitch-mode main { animation: hue 3s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ additions */

.open-to { margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; font: 600 12px var(--hud); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kb-label { display: inline; }
@media (max-width: 1180px) { .kb-label { display: none; } }
.stub-body .photo { width: 108px; height: 132px; margin: 0 0 14px; position: relative; border: 2px solid var(--cyan); padding: 4px; background: #0B0622; box-shadow: 0 0 18px rgba(25, 230, 255, .3); }
.stub-body .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: saturate(.9) contrast(1.05); }
.stub-body .photo::after { content: "PASSENGER"; position: absolute; left: -2px; right: -2px; bottom: -18px; font: 700 9px var(--hud); letter-spacing: .3em; color: var(--cyan); text-align: center; }
.stub-label { display: block; margin-top: 26px; font: 700 11px var(--hud); letter-spacing: .2em; color: var(--dim); }
.pass-plane { position: absolute; left: 50%; top: 2px; margin-left: -15px; color: var(--volt); filter: drop-shadow(0 0 6px var(--volt)); animation: hop 4s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translate(-40px, 16px) rotate(-12deg); } 50% { transform: translate(40px, 16px) rotate(12deg); } }
.stage-main img.phone, .stage-main img.render, .stage-main img.art { object-fit: contain; }
.lab-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 16px 10px; font: 600 12px var(--hud); letter-spacing: .1em; color: var(--ink); background: linear-gradient(transparent, rgba(4, 1, 12, .9)); }
.lab-body .card-kicker { flex-wrap: wrap; row-gap: 8px; }
.card-kicker > span:first-child { white-space: nowrap; flex: none; }
.lab-body .card-kicker .tag { margin-left: auto; }
.lab-body .card-actions { padding-top: 6px; }
.screen-cover .warn { color: var(--orange); font-size: 14px; }
.screen-cover .tag { margin-bottom: 12px; }
.booting { position: absolute; inset: 0; display: grid; place-items: center; background: #05020F; font: 700 13px var(--hud); letter-spacing: .3em; color: var(--acid); pointer-events: none; }
.booting span { animation: pulse 1s infinite; }
#wheel .arc { color: var(--c); opacity: .35; transition: opacity .4s; }
#wheel .arc.on { opacity: 1; filter: drop-shadow(0 0 8px var(--c)); }
#wheel .arc text { fill: currentColor; font: 800 20px var(--head); stroke: none; }
#wheel .runner { transition: cx .8s var(--ease), cy .8s var(--ease); filter: drop-shadow(0 0 8px var(--volt)); }
.hero-cta .btn svg { width: 16px; height: 16px; }
.contact-card span { display: block; min-width: 0; }
.info .note a { color: var(--c); }
.thumbs button img { pointer-events: none; }

@media (min-width: 901px) {
  .lab-card:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
  .lab-card:last-child:nth-child(odd) .lab-hero { aspect-ratio: auto; min-height: 100%; grid-row: span 2; }
  .lab-card:last-child:nth-child(odd) .lab-hero img { object-position: left center; }
  .lab-card:last-child:nth-child(odd) .lab-strip { grid-column: 2; grid-row: 2; }
  .lab-card:last-child:nth-child(odd) .lab-body { grid-column: 2; grid-row: 1; }
}
.contact-card b { font-size: 15px; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .brand small { display: none; }
  .kbtn kbd { display: none; }
  .topbar { gap: 10px; }
  .subline { flex-direction: column; gap: 4px; }
  .subline b { display: none; }
  .board-head h3 .alt { display: none; }
  .board-head .meta span:first-child { display: none; }
  .screen-cover p:not(.insert):not(.warn) { display: none; }
  .screen-cover h3 { font-size: 22px; }
  .screen-cover > div { padding: 12px; }
  .screen-cover .insert, .screen-cover .tag { display: none; }
  .screen-cover .warn { font-size: 13px; margin-bottom: 10px; }
  .game-list button { grid-template-columns: 48px 1fr; }
  .game-list .thumb { width: 48px; height: 48px; }
}
@media (max-width: 700px) {
  .dossier-head [data-nav], .dossier-head .code { display: none; }
  .dossier-head h2 { font-size: 16px; }
  .info { padding: 18px 16px 30px; }
}
/* scaled desktop-only apps (see fitFrame in main.js) */
.frame-wrap, .screen { overflow: hidden; }
.frame-wrap iframe[style*="scale"], .screen iframe[style*="scale"] { position: absolute; left: 0; top: 0; max-width: none; transition: none; }

/* [hidden] must win over display rules such as .thumbs { display: flex } */
[hidden] { display: none !important; }
/* keyboard hints make no sense on touch screens (main.js adds .touch) */
.touch .kb-hint, .touch .kbtn kbd { display: none; }
/* dossier "Play here" for a desktop-only game on a touch screen */
.stage-main .desk-only { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 20px; text-align: center; background: #05020F; color: var(--muted); }
.stage-main .desk-only p { margin: 0; max-width: 420px; }
