/* ============================================================
   OOBOTX — cyber / anime personal site
   01 tokens   02 base   03 fx   04 cursor   05 boot   06 hud
   07 components   08 hero   09 ticker   10 sections   11 about
   12 projects   13 lab   14 terminal   15 contact   16 footer
   17 overlays   18 responsive   19 a11y / motion
   ============================================================ */

/* ---------- 01 tokens ---------- */
:root {
  --c1: #07839a;
  --c2: #d93a86;
  --c3: #6d55e0;
  --c1-rgb: 7, 131, 154;
  --c2-rgb: 217, 58, 134;
  --c3-rgb: 109, 85, 224;

  --bg: #f5f8fd;
  --bg-2: #eef4fb;
  --bg-3: #e4edf8;
  --ink: #101c2e;
  --dim: #536a83;
  --dim-2: #62778d;
  --ok: #0c8f63;

  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.92);
  --line: rgba(16, 40, 70, 0.12);
  --line-2: rgba(16, 40, 70, 0.22);

  --font-display: "Orbitron", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Rajdhani", "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;

  --r: 4px;
  --pad: 22px;
  --container: 1220px;
  --hud-h: 66px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-c1: 0 12px 30px rgba(var(--c1-rgb), 0.18);
  --glow-c2: 0 12px 30px rgba(var(--c2-rgb), 0.16);
}

[data-theme="ember"] {
  --c1: #c26a14;
  --c2: #cf3d63;
  --c3: #b45a24;
  --c1-rgb: 194, 106, 20;
  --c2-rgb: 207, 61, 99;
  --c3-rgb: 180, 90, 36;
  --bg: #fbf6f0;
  --bg-2: #f7efe7;
  --ink: #241a12;
  --dim: #6b5a4c;
  --dim-2: #8a7a6b;
  --line: rgba(70, 40, 20, 0.12);
  --line-2: rgba(70, 40, 20, 0.22);
}

[data-theme="verdant"] {
  --c1: #0b8a68;
  --c2: #14879b;
  --c3: #3367c7;
  --c1-rgb: 11, 138, 104;
  --c2-rgb: 20, 135, 155;
  --c3-rgb: 51, 103, 199;
  --bg: #f2faf7;
  --bg-2: #e9f5f0;
  --ink: #0c211c;
  --dim: #4f6f66;
  --dim-2: #719087;
  --line: rgba(10, 60, 50, 0.12);
  --line-2: rgba(10, 60, 50, 0.22);
}

[data-theme="violet"] {
  --c1: #7451d0;
  --c2: #c03a93;
  --c3: #4a63cf;
  --c1-rgb: 116, 81, 208;
  --c2-rgb: 192, 58, 147;
  --c3-rgb: 74, 99, 207;
  --bg: #f7f5fd;
  --bg-2: #f0ecfa;
  --ink: #1a1430;
  --dim: #665c82;
  --dim-2: #877da3;
  --line: rgba(45, 30, 80, 0.12);
  --line-2: rgba(45, 30, 80, 0.22);
}

/* ---------- 02 base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.012em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(var(--c2-rgb), 0.1), transparent 60%),
    radial-gradient(1000px 700px at 8% 8%, rgba(var(--c1-rgb), 0.11), transparent 62%),
    radial-gradient(700px 500px at 50% 110%, rgba(var(--c3-rgb), 0.09), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, blockquote, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection {
  background: rgba(var(--c2-rgb), 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px dashed var(--c1);
  outline-offset: 3px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05080f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--c1), var(--c3));
  border: 2px solid #05080f;
}

[hidden] { display: none !important; }

main { position: relative; z-index: 2; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.mono { font-family: var(--font-mono); font-size: 0.72em; letter-spacing: 0.08em; }
.dim { color: var(--dim); }
.accent { color: var(--c1); }
.ok { color: var(--ok); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 500;
  padding: 10px 16px;
  background: var(--c1);
  color: #001018;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 10px; }

.kbd,
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--dim);
}

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 400;
  padding: 14px;
  text-align: center;
  background: var(--c2);
  color: #20001a;
  font-weight: 700;
}

/* ---------- 03 fx layers ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fx-grid {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--c1-rgb), 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--c1-rgb), 0.055) 1px, transparent 1px);
  background-size: 86px 86px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 72%);
  animation: gridDrift 40s linear infinite;
}

@keyframes gridDrift {
  to { transform: translate3d(86px, 86px, 0); }
}

.fx-scan {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.55;
  mix-blend-mode: overlay;
}
.fx-scan::after {
  content: "";
  position: absolute;
  inset: -20% 0 auto;
  height: 28vh;
  background: linear-gradient(to bottom, transparent, rgba(var(--c1-rgb), 0.055), transparent);
  animation: scanSweep 9s linear infinite;
}

@keyframes scanSweep {
  0% { transform: translateA(-30vh); }
  100% { transform: translateA(140vh); }
}

.fx-noise {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#matrix-canvas.is-on { opacity: 1; }

/* ---------- 04 cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-ready { opacity: 1; }
.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot {
  width: 5px; height: 5px;
  background: var(--c1);
  box-shadow: 0 0 10px var(--c1);
}
.cursor__ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(var(--c1-rgb), 0.55);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s, background-color 0.25s;
}
.cursor.is-hover .cursor__ring {
  width: 54px; height: 54px;
  border-color: var(--c2);
  background: rgba(var(--c2-rgb), 0.08);
}
.cursor.is-down .cursor__ring {
  width: 22px; height: 22px;
  border-color: var(--c2);
}
.cursor.is-hidden { opacity: 0; }

/* ---------- 05 boot ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 500px at 50% 45%, rgba(var(--c1-rgb), 0.07), transparent 70%),
    #03060c;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  opacity: 0.5;
}
.boot__inner {
  position: relative;
  width: min(560px, 88vw);
  text-align: left;
}
.boot__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 7.4vw, 3.4rem);
  letter-spacing: 0.1em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(var(--c1-rgb), 0.5);
}
.boot__sub {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--c1);
}
.boot__log {
  margin: 26px 0 14px;
  min-height: 132px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--dim);
  white-space: pre-wrap;
}
.boot__log .ok { color: var(--c1); }
.boot__log .warn { color: var(--c2); }
.boot__log .done { color: var(--ok); }
.boot__bar {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.boot__bar span {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  box-shadow: 0 0 16px var(--c1);
  transition: width 0.25s linear;
}
.boot__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dim-2);
}
.boot__skip {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.boot__skip:hover { color: var(--c1); border-color: var(--c1); }

/* ---------- 06 hud ---------- */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}
.hud.is-scrolled {
  background: rgba(4, 8, 15, 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.hud__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--hud-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand__mark {
  color: var(--c1);
  filter: drop-shadow(0 0 8px rgba(var(--c1-rgb), 0.55));
  display: grid;
  place-items: center;
}
.brand__text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.16em;
}
.brand__text span { color: var(--c2); }
.brand__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--dim-2);
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dim);
  transition: color 0.2s;
}
.nav__idx {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim-2);
  transition: color 0.2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(0.5); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active .nav__idx { color: var(--c1); }

.hud__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.hud__clock {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
}
.hud__clock .mono { font-size: 11px; letter-spacing: 0.12em; }
.led {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: ledPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ledPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.icon-btn:hover {
  color: var(--c1);
  border-color: var(--line-2);
  box-shadow: 0 0 18px rgba(var(--c1-rgb), 0.18);
}
.icon-btn .ic--off { display: none; }
html:not([data-sound="on"]) .icon-btn .ic--on { display: none; }
html:not([data-sound="on"]) .icon-btn .ic--off { display: block; }
.swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: conic-gradient(var(--c1), var(--c3), var(--c2), var(--c1));
  box-shadow: 0 0 10px rgba(var(--c1-rgb), 0.55);
}

.cmd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  transition: color 0.2s, border-color 0.2s;
}
.cmd-trigger:hover { color: var(--ink); border-color: var(--line-2); }
.cmd-trigger kbd { font-size: 9px; }

.menu-btn {
  display: none;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  place-items: center;
  gap: 4px;
  padding: 9px;
}
.menu-btn span {
  display: block;
  width: 15px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateA(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateA(-5.5px) rotate(-45deg); }

.progress {
  height: 1px;
  background: transparent;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c3), var(--c2));
  box-shadow: 0 0 12px var(--c1);
}

/* ---------- 07 components ---------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--panel);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 42%; height: 1px;
  background: linear-gradient(90deg, var(--c1), transparent);
  opacity: 0.65;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.panel__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.panel__dot {
  width: 6px; height: 6px;
  background: var(--c1);
  box-shadow: 0 0 9px var(--c1);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.panel__badge {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--dim);
  font-size: 10px;
}
.panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(120, 190, 255, 0.13);
  font-size: 11px;
}
.panel__foot .mono { font-size: 9.5px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, border-color 0.25s, color 0.25s;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ease);
}
.btn:hover::after { left: 130%; }
.btn--primary {
  background: linear-gradient(100deg, var(--c1), var(--c2));
  border-color: transparent;
  color: #03101a;
  box-shadow: 0 8px 30px -12px rgba(var(--c1-rgb), 0.8);
}
.btn--primary:hover {
  transform: translateA(-2px);
  box-shadow: 0 14px 38px -12px rgba(var(--c1-rgb), 0.9);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--c1);
  color: var(--c1);
  box-shadow: 0 0 26px -6px rgba(var(--c1-rgb), 0.5);
  transform: translateA(-2px);
}
.btn--plain {
  min-height: 40px;
  padding: 0 12px;
  border-color: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
}
.btn--plain:hover { color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn--icon { padding: 0; width: 42px; min-height: 42px; }

.link-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.link-btn:hover { color: var(--c1); border-color: var(--c1); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.chip--live { color: var(--ok); border-color: rgba(77, 255, 184, 0.28); }
.chip--live i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}

.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(3, 8, 15, 0.7);
  color: var(--ink);
  font-size: 14.5px;
  font-family: var(--font-ui);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--dim-2); }
.input:focus {
  outline: none;
  border-color: rgba(var(--c1-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--c1-rgb), 0.09), inset 0 0 20px rgba(var(--c1-rgb), 0.05);
  background: rgba(3, 10, 18, 0.85);
}
.input--area {
  resize: vertical;
  min-height: 84px;
  line-height: 1.6;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
}
.field__err {
  display: block;
  min-height: 14px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--c2);
}
.field.has-error .input { border-color: rgba(var(--c2-rgb), 0.7); }

/* reveal */
.js-ready .reveal {
  opacity: 0;
  transform: translateA(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js-ready .reveal.in { opacity: 1; transform: none; }

/* glitch */
.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 42px rgba(var(--c1-rgb), 0.28);
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.glitch::before {
  color: var(--c2);
  clip-path: inset(0 0 54% 0);
  animation: glitchA 6.5s steps(1) infinite;
}
.glitch::after {
  color: var(--c1);
  clip-path: inset(52% 0 0 0);
  animation: glitchB 6.5s steps(1) infinite;
}
@keyframes glitchA {
  0%, 91%, 100% { opacity: 0; transform: none; }
  92% { opacity: 0.85; transform: translate(-4px, -2px); }
  94% { opacity: 0.5; transform: translate(3px, 1px); }
  96% { opacity: 0; }
}
@keyframes glitchB {
  0%, 91%, 100% { opacity: 0; transform: none; }
  93% { opacity: 0.8; transform: translate(4px, 2px); }
  95% { opacity: 0.4; transform: translate(-3px, -1px); }
  97% { opacity: 0; }
}

/* ---------- 08 hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--hud-h) + 56px) 0 90px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 72% 45%, rgba(var(--c1-rgb), 0.09), transparent 65%),
    radial-gradient(500px 380px at 85% 75%, rgba(var(--c2-rgb), 0.08), transparent 65%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--c1);
  margin-bottom: 18px;
}
.kicker i { color: var(--dim-2); font-style: normal; }
.kicker__text { white-space: nowrap; }
.kicker__line {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c1));
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  margin-left: -0.03em;
}
.hero__title .glitch { color: var(--ink); }
.hero__title .accent { color: var(--c2); text-shadow: 0 0 40px rgba(var(--c2-rgb), 0.5); }
.hero__jp {
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.hero__role {
  margin-top: 6px;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--ink);
}
.type-wrap { display: inline-flex; align-items: center; }
#typewriter { color: var(--c1); }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--c2);
  box-shadow: 0 0 10px var(--c2);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__desc {
  margin-top: 18px;
  max-width: 54ch;
  color: var(--dim);
  font-size: 15.5px;
  line-height: 1.85;
}
.hero__desc strong { color: var(--ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 540px;
}
.hero__stats dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 27px);
  color: var(--ink);
  line-height: 1;
}
.hero__stats dd {
  margin: 7px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.hero__visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(var(--c1-rgb), 0.14);
  pointer-events: none;
}
.orbit--a {
  inset: 4%;
  border-style: dashed;
  border-color: rgba(var(--c1-rgb), 0.16);
  animation: spin 46s linear infinite;
}
.orbit--b {
  inset: 14%;
  border-color: rgba(var(--c2-rgb), 0.13);
  animation: spin 32s linear infinite reverse;
}
.orbit--c {
  inset: 26%;
  border-style: dotted;
  border-color: rgba(var(--c3-rgb), 0.2);
  animation: spin 70s linear infinite;
}
.orbit::after {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 12px var(--c1);
}
@keyframes spin { to { transform: rotate(360deg); } }

.holo {
  position: relative;
  width: 82%;
  max-width: 440px;
  animation: float 7s ease-in-out infinite;
  z-index: 2;
}
.drone {
  width: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 30px rgba(var(--c1-rgb), 0.22));
}
.drone__ring { transform-origin: 170px 172px; animation: spin 60s linear infinite; }
.drone__scan { animation: scanA 4.5s ease-in-out infinite alternate; }
.drone__antenna { animation: antenna 3.4s ease-in-out infinite; transform-origin: 170px 86px; }
.drone__leds circle:first-child { animation: ledPulse 1.8s infinite; }
.drone__leds circle:last-child { animation: ledPulse 2.6s infinite 0.4s; }
.drone__iris {
  transition: transform 0.14s ease-out;
}
@keyframes float {
  0%, 100% { transform: translateA(-6px); }
  50% { transform: translateA(10px); }
}
@keyframes scanA {
  0% { transform: translateA(-26px); }
  100% { transform: translateA(26px); }
}
@keyframes antenna {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.holo__glow {
  position: absolute;
  inset: 18%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--c1-rgb), 0.2), transparent 65%);
  filter: blur(26px);
}
.holo__base {
  position: absolute;
  left: 50%; bottom: -4%;
  width: 62%;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(var(--c1-rgb), 0.22);
  background: radial-gradient(ellipse at center, rgba(var(--c1-rgb), 0.16), transparent 70%);
  display: grid;
  place-items: center;
}
.holo__base span {
  position: absolute;
  left: 50%; top: 50%;
  width: 80%; height: 80%;
  border-radius: 50%;
  border: 1px solid rgba(var(--c1-rgb), 0.22);
  transform: translate(-50%, -50%);
  animation: ripple 3.4s ease-out infinite;
}
.holo__base span:nth-child(2) { animation-delay: 1.1s; }
.holo__base span:nth-child(3) { animation-delay: 2.2s; }
@keyframes ripple {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.bubble {
  position: absolute;
  top: 1%;
  left: -6%;
  z-index: 4;
  width: min(250px, 62%);
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(5, 11, 20, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 22px 50px -30px #000;
}
.bubble::after {
  content: "";
  position: absolute;
  right: 18px; bottom: -7px;
  width: 12px; height: 12px;
  background: inherit;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  transform: rotate(45deg);
}
.bubble__tag {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--c2);
}
.bubble p {
  min-height: 3.4em;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
}

.visual__meta {
  position: absolute;
  left: 0; right: 0; bottom: -6%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim-2);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}
.visual__ping { color: var(--ok); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: var(--dim-2);
}
.hero__scroll i {
  display: block;
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--c1), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleA(0); transform-origin: top; }
  45% { transform: scaleA(1); transform-origin: top; }
  55% { transform: scaleA(1); transform-origin: bottom; }
  100% { transform: scaleA(0); transform-origin: bottom; }
}

/* ---------- 09 ticker ---------- */
.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(5, 10, 18, 0.55);
  padding: 13px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--dim);
  white-space: nowrap;
}
.ticker__track i { color: var(--c2); font-style: normal; font-size: 8px; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- 10 sections ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(74px, 9vw, 118px) 0;
}
.section + .section { padding-top: clamp(20px, 3vw, 40px); }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.sec-head__left {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.sec-index {
  font-size: 12px;
  color: var(--c1);
  padding-bottom: 10px;
  letter-spacing: 0.1em;
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.sec-title .accent {
  background: linear-gradient(100deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--c1);
  padding-bottom: 8px;
  white-space: nowrap;
}
.sec-sub .dim { color: var(--dim-2); font-family: var(--font-ui); letter-spacing: 0.08em; }

/* ---------- 11 about ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.idcard {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background:
    linear-gradient(155deg, rgba(var(--c1-rgb), 0.06), transparent 55%),
    var(--panel-2);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  overflow: hidden;
}
.idcard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px);
}
.idcard__top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.16em;
}
.idcard__code { color: var(--c2); }

.idcard__portrait {
  position: relative;
  margin: 16px 0;
  height: 210px;
  border: 1px solid rgba(var(--c1-rgb), 0.22);
  background:
    radial-gradient(circle at 50% 55%, rgba(var(--c1-rgb), 0.18), transparent 62%),
    #050b14;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.portrait__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--c1-rgb), 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--c1-rgb), 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 78%);
}
.portrait__ring {
  position: absolute;
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--c2-rgb), 0.45);
  animation: spin 18s linear infinite;
}
.portrait__ring::before,
.portrait__ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(var(--c1-rgb), 0.3);
}
.portrait__ring::before { inset: 14px; border-style: dotted; }
.portrait__ring::after { inset: 30px; border-color: rgba(var(--c3-rgb), 0.45); }
.portrait__mono {
  position: relative;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 74px;
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(var(--c1-rgb), 0.9);
  text-shadow: 0 0 34px rgba(var(--c1-rgb), 0.4);
  margin-right: -0.06em;
}
.portrait__scan {
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(var(--c1-rgb), 0.16), transparent);
  animation: scanDown 4s ease-in-out infinite;
}
@keyframes scanDown {
  0% { transform: translateA(-120%); }
  100% { transform: translateA(360%); }
}
.portrait__corner {
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--c1);
}
.portrait__corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.portrait__corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.portrait__corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.portrait__corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.idcard__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.idcard__name h3 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.04em;
}
.idcard__role {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--c1);
}
.idcard__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 16px 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.idcard__meta > div {
  padding: 8px 10px;
  background: #060c16;
}
.idcard__meta dt {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--dim-2);
}
.idcard__meta dd {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--ink);
}
.barcode {
  height: 30px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 1px, transparent 1px 3px,
    var(--ink) 3px 5px, transparent 5px 9px,
    var(--ink) 9px 10px, transparent 10px 13px
  );
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.idcard__foot {
  margin-top: 8px;
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--dim-2);
  text-align: center;
}

.about__main { display: flex; flex-direction: column; gap: 24px; }
.about__bio {
  padding: 4px 4px 0;
}
.about__lead {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.about__bio p + p {
  margin-top: 12px;
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 62ch;
}
.now-list {
  display: grid;
  gap: 1px;
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--line);
}
.now-list li {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(6, 12, 22, 0.85);
  font-size: 13.5px;
  color: var(--ink);
}
.now-list__k {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--c2);
  padding-top: 4px;
  min-width: 48px;
}

.skills__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 26px;
  align-items: center;
}
.bars { display: grid; gap: 15px; }
.bar__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink);
}
.bar__num { color: var(--c1); font-size: 10px; }
.bar__track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}
.bar__track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c3) 70%, var(--c2));
  box-shadow: 0 0 14px rgba(var(--c1-rgb), 0.5);
  transition: width 1.4s var(--ease);
}
.bar__track i::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 10px #fff;
}
.radar { position: relative; }
.radar canvas { width: 100%; height: auto; }
.radar__hint {
  display: block;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--dim-2);
  margin-top: 4px;
}

/* ---------- 12 projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.filter span { color: var(--dim-2); font-size: 9px; }
.filter:hover { color: var(--ink); border-color: var(--line-2); }
.filter.is-active {
  color: #041018;
  background: var(--c1);
  border-color: var(--c1);
  box-shadow: 0 0 22px -6px rgba(var(--c1-rgb), 0.8);
}
.filter.is-active span { color: rgba(4, 16, 24, 0.6); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.project-card {
  --a: var(--c1);
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), transparent 40%), var(--panel);
  overflow: hidden;
  cursor: pointer;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateA(var(--ry, 0deg)) translateA(0);
  transition: transform 0.25s var(--ease), border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
  animation: cardIn 0.55s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateA(18px) scale(0.98); }
  to { opacity: 1; }
}
.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(var(--c1-rgb), 0.42);
  box-shadow: 0 24px 60px -34px rgba(var(--c1-rgb), 0.85), inset 0 0 40px rgba(var(--c1-rgb), 0.04);
}
.project-card__media {
  position: relative;
  height: 152px;
  overflow: hidden;
  background-color: #08101d;
  background:
    radial-gradient(120% 100% at 20% 10%, color-mix(in srgb, var(--a) 22%, transparent), transparent 60%),
    linear-gradient(160deg, #08101d, #050a12);
  border-bottom: 1px solid var(--line);
}
.project-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--a) 12%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--a) 12%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 70% 50%, #000 10%, transparent 80%);
  mask-image: radial-gradient(circle at 70% 50%, #000 10%, transparent 80%);
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-card__media::before { transform: scale(1.12); }
.project-card__icon {
  position: absolute;
  top: 50%; left: 18%;
  transform: translateA(-50%);
  color: var(--a);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--a) 60%, transparent));
  opacity: 0.9;
}
.project-card__icon svg { width: 58px; height: 58px; }
.project-card__num {
  position: absolute;
  right: 14px; top: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--a);
  opacity: 0.65;
}
.project-card__scan {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--a);
  opacity: 0.4;
  box-shadow: 0 0 12px var(--a);
}
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}
.project-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--dim-2);
}
.project-card__status b {
  font-weight: 500;
  color: var(--a);
}
.project-card__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.project-card__title svg {
  flex-shrink: 0;
  color: var(--dim-2);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.project-card:hover .project-card__title svg { transform: translate(3px, -3px); color: var(--a); }
.project-card__desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 6px;
}
.project-card__tags span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.projects__foot {
  margin-top: 22px;
  color: var(--dim-2);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ---------- 12b videos ---------- */
.channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(120deg, rgba(var(--c1-rgb), 0.06), transparent 55%),
    var(--panel);
  overflow: hidden;
}
.channel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 34%; height: 1px;
  background: linear-gradient(90deg, var(--c1), transparent);
}
.channel__avatar {
  width: 54px; height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-2);
  box-shadow: 0 0 22px -6px rgba(var(--c1-rgb), 0.65);
  filter: saturate(1.05);
}
.channel__info { min-width: 0; }
.channel__info h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 1.2;
}
.channel__info p {
  margin-top: 5px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.channel .btn { margin-left: auto; flex-shrink: 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.video-card:hover,
.video-card:focus-visible {
  transform: translateA(-4px);
  border-color: color-mix(in srgb, var(--a) 45%, transparent);
  box-shadow: 0 24px 56px -34px rgba(var(--c1-rgb), 0.75);
}
.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--line);
}
.video-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
  transition: transform 0.55s var(--ease), filter 0.3s;
}
.video-card:hover .video-card__thumb img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.05);
}
.video-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 7, 13, 0.78), transparent 52%);
  pointer-events: none;
}
.video-card__play {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  padding-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(3, 7, 13, 0.4);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(5px);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s var(--ease), background 0.25s;
}
.video-card:hover .video-card__play,
.video-card:focus-visible .video-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(var(--c2-rgb), 0.55);
}
.video-card__views,
.video-card__dur {
  position: absolute;
  bottom: 8px;
  z-index: 2;
  padding: 2px 5px;
  background: rgba(2, 6, 12, 0.72);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
}
.video-card__views { left: 8px; }
.video-card__dur { right: 8px; }
.video-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  padding: 12px 13px 13px;
}
.video-card__tag {
  color: var(--a);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.video-card__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--dim-2);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.videos__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  color: var(--dim-2);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.videos__foot a {
  color: var(--c1);
  border-bottom: 1px solid rgba(var(--c1-rgb), 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.videos__foot a:hover { color: var(--c2); border-color: var(--c2); }

/* ---------- 13 lab ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.bento__cell--notes { grid-column: span 3; }
.bento__cell--tele { grid-column: span 3; }
.bento__cell--guest { grid-column: span 3; }
.bento__stack {
  grid-column: span 3;
  display: grid;
  gap: 18px;
  align-content: start;
}

.note-form { display: flex; gap: 8px; }
.note-form .input { flex: 1; }
.notes {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  flex: 1;
  min-height: 186px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}
.notes:empty::after {
  content: "暂无任务 · 输入上面的框，按回车添加";
  display: block;
  padding: 22px 14px;
  border: 1px dashed var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--dim-2);
}
.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(4, 9, 16, 0.6);
  transition: border-color 0.2s, opacity 0.2s;
  animation: noteIn 0.35s var(--ease) both;
}
@keyframes noteIn {
  from { opacity: 0; transform: translateX(-8px); }
}
.note:hover { border-color: var(--line-2); }
.note__check {
  position: relative;
  flex-shrink: 0;
  width: 17px; height: 17px;
  margin-top: 2px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  display: grid;
  place-items: center;
  color: var(--c1);
  transition: background 0.2s, border-color 0.2s;
}
.note__check::after {
  content: "";
  width: 7px; height: 4px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s var(--ease);
  margin-top: -2px;
}
.note.is-done .note__check {
  background: rgba(var(--c1-rgb), 0.18);
  border-color: var(--c1);
}
.note.is-done .note__check::after { transform: rotate(-45deg) scale(1); }
.note__text {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  transition: color 0.2s;
}
.note.is-done .note__text { color: var(--dim-2); text-decoration: line-through; }
.note__del {
  flex-shrink: 0;
  color: var(--dim-2);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.note:hover .note__del, .note__del:focus-visible { opacity: 1; }
.note__del:hover { color: var(--c2); }

.tele { display: grid; gap: 14px; }
.tele__gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gauge {
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 9, 16, 0.5);
}
.gauge__label {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--dim-2);
}
.gauge__val {
  display: block;
  margin: 3px 0 7px;
  font-size: 11px;
  color: var(--dim);
}
.gauge__val b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.gauge__track {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.gauge__track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  transition: width 0.9s var(--ease);
  box-shadow: 0 0 10px var(--c1);
}
.spark canvas { width: 100%; height: auto; border: 1px solid var(--line); background: rgba(3, 8, 15, 0.6); }
.spark__legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 8px;
  color: var(--dim-2);
}
.lg {
  display: inline-block;
  width: 12px; height: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.lg--a { background: var(--c1); }
.lg--b { background: var(--c2); }
.spark__legend .spark__ping { margin-left: auto; }
.spark__ping b { color: var(--c1); font-size: 11px; }

.guest-form { display: grid; gap: 8px; }
.guest-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.guest-form .btn { flex-shrink: 0; }
.guest-list {
  margin-top: 14px;
  flex: 1;
  min-height: 190px;
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
  align-content: start;
}
.guest-list:empty::after {
  content: "还没有信号… 成为第一个留言的人吧";
  display: block;
  padding: 18px 12px;
  border: 1px dashed var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--dim-2);
}
.guest {
  display: flex;
  gap: 10px;
  animation: noteIn 0.35s var(--ease) both;
}
.guest__avatar {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--c1-rgb), 0.3);
  background: linear-gradient(145deg, rgba(var(--c1-rgb), 0.2), rgba(var(--c2-rgb), 0.14));
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}
.guest__main { min-width: 0; flex: 1; }
.guest__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.guest__name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--c1);
}
.guest__time { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim-2); }
.guest__msg {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dim);
  word-break: break-word;
}
.guest__del {
  margin-left: auto;
  align-self: flex-start;
  color: var(--dim-2);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.guest:hover .guest__del { opacity: 1; }
.guest__del:hover { color: var(--c2); }

.player {
  display: flex;
  align-items: center;
  gap: 12px;
}
.player__btn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--c1);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.player__btn:hover {
  background: rgba(var(--c1-rgb), 0.1);
  box-shadow: 0 0 22px -6px var(--c1);
  transform: scale(1.05);
}
.player__btn .ic-pause { display: none; }
[data-sound="on"] .player__btn .ic-play { display: none; }
[data-sound="on"] .player__btn .ic-pause { display: block; }
.player__info { display: grid; gap: 1px; min-width: 0; }
.player__track {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__info .mono { color: var(--dim-2); font-size: 8px; }
.viz { margin-left: auto; width: 86px; height: 38px; flex-shrink: 0; opacity: 0.9; }

.quote p {
  font-size: 14.5px;
  line-height: 1.75;
  min-height: 4.6em;
  color: var(--ink);
}
.quote p::before { content: "「"; color: var(--c2); }
.quote p::after { content: "」"; color: var(--c2); }
.quote footer {
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--dim-2);
}

.keys {
  display: grid;
  gap: 4px;
}
.keys__row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(120, 190, 255, 0.07);
  font-size: 12px;
  color: var(--dim);
}
.keys__row:last-child { border-bottom: 0; }
.keys__row span {
  margin-left: auto;
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}
.keys__row kbd { flex-shrink: 0; }

/* ---------- 14 terminal ---------- */
.term {
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(2, 6, 12, 0.92);
  box-shadow: 0 40px 100px -50px #000, inset 0 0 80px rgba(var(--c1-rgb), 0.03);
  overflow: hidden;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
}
.term__dots { display: flex; gap: 6px; }
.term__dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-2);
}
.term__dots i:nth-child(1) { background: var(--c2); }
.term__dots i:nth-child(2) { background: #ffc65c; }
.term__dots i:nth-child(3) { background: var(--ok); }
.term__title { color: var(--dim); font-size: 10px; letter-spacing: 0.08em; }
.term__state {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--ok);
}
.term__body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 8px;
  height: 380px;
  overflow: hidden;
  cursor: text;
}
.term__out {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--dim);
  white-space: pre-wrap;
  word-break: break-word;
}
.term__out .t-cmd { color: var(--ink); }
.term__out .t-prompt { color: var(--c1); }
.term__out .t-ok { color: var(--ok); }
.term__out .t-warn { color: var(--c2); }
.term__out .t-key { color: var(--c1); }
.term__out .t-line { display: block; }
.term__out .t-gap { display: block; height: 6px; }
.term__out pre {
  margin: 6px 0;
  font-family: var(--font-mono);
  color: var(--c1);
  font-size: 11px;
  line-height: 1.38;
  overflow-x: auto;
}
.term__out a { color: var(--c2); border-bottom: 1px dotted var(--c2); }
.term__logo {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 50px);
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 38px rgba(var(--c1-rgb), 0.45);
}
.term__logo span { color: var(--c2); text-shadow: 0 0 38px rgba(var(--c2-rgb), 0.6); }
.term__tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--c1);
}
.t-cell { display: inline-block; width: 132px; }
.t-bar {
  position: relative;
  display: inline-block;
  width: 118px;
  height: 5px;
  margin: 0 8px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.08);
}
.t-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  box-shadow: 0 0 10px rgba(var(--c1-rgb), 0.55);
}
.term__line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 6px;
  border-top: 1px dashed rgba(120, 190, 255, 0.1);
  padding-top: 10px;
}
.term__prompt {
  flex-shrink: 0;
  color: var(--c1);
  font-size: 12.5px;
}
.term__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  caret-color: var(--c2);
}
.term__input::placeholder { color: var(--dim-2); }
.term__hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.term__hints .mono { font-size: 8.5px; }
.term__hints button {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.term__hints button:hover {
  color: var(--c1);
  border-color: var(--c1);
  background: rgba(var(--c1-rgb), 0.07);
}

/* ---------- 15 contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}
.contact__lead {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 14px;
}
.contact__side > p.dim {
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.85;
}
.socials {
  display: grid;
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}
.social {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: #060c16;
  transition: background 0.2s, padding-left 0.2s;
}
.social:hover { background: rgba(var(--c1-rgb), 0.07); padding-left: 20px; }
.social__name { font-size: 13.5px; font-weight: 600; }
.social__id { color: var(--dim-2); font-size: 9px; }
.social svg { color: var(--dim-2); transition: color 0.2s; }
.social:hover svg { color: var(--c1); }

.status-card {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  padding: 14px;
  border: 1px dashed var(--line-2);
  font-size: 9.5px;
  color: var(--dim);
  line-height: 1.9;
}
.status-card .led { display: inline-block; margin-right: 7px; vertical-align: middle; }

.contact__form .panel__head { margin-bottom: 20px; }
.contact__hint {
  margin: -4px 0 18px;
  padding: 10px 12px;
  border-left: 2px solid rgba(var(--c1-rgb), 0.45);
  background: rgba(var(--c1-rgb), 0.045);
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.75;
}
.contact__channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.contact__channels .btn { flex: 1 1 auto; }
#draft-state {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--dim-2);
}
.contact__form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}
.contact__form-foot .mono { font-size: 9px; }

/* ---------- 16 footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 52px 0 34px;
  background: linear-gradient(to bottom, transparent, rgba(3, 7, 13, 0.9));
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 30px 24px;
  align-items: start;
}
.footer__brand .brand__text { font-size: 20px; }
.footer__brand p { margin-top: 6px; font-size: 8.5px; letter-spacing: 0.12em; color: var(--dim-2); }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer__links a {
  font-size: 13px;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer__links a:hover { color: var(--c1); border-color: var(--c1); }
.footer__keys { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 11px; color: var(--dim); }
.footer__keys .mono { font-size: 8.5px; color: var(--dim-2); }
.footer__keys kbd { font-size: 8.5px; }
.footer__copy {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--dim-2);
}

/* ---------- 17 overlays ---------- */
.palette { position: fixed; inset: 0; z-index: 150; }
.palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}
.palette__box {
  position: relative;
  width: min(640px, 92vw);
  margin: 12vh auto 0;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(6, 12, 22, 0.97);
  box-shadow: 0 40px 120px -30px #000, 0 0 60px -30px var(--c1);
  overflow: hidden;
  animation: paletteIn 0.28s var(--ease) both;
}
@keyframes paletteIn {
  from { opacity: 0; transform: translateA(-12px) scale(0.98); }
}
@keyframes fadeIn { from { opacity: 0; } }
.palette__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}
.palette__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--ink);
}
.palette__search input::placeholder { color: var(--dim-2); }
.palette__list {
  max-height: 52vh;
  overflow-y: auto;
  padding: 6px;
}
.palette__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.palette__item[aria-selected="true"] {
  background: rgba(var(--c1-rgb), 0.08);
  border-color: rgba(var(--c1-rgb), 0.22);
}
.palette__item[aria-selected="true"] .palette__arrow { opacity: 1; transform: none; }
.palette__icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  color: var(--c1);
  flex-shrink: 0;
}
.palette__icon svg { width: 14px; height: 14px; }
.palette__label { font-size: 14px; }
.palette__label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--dim-2);
  margin-top: 1px;
}
.palette__arrow {
  margin-left: auto;
  color: var(--c1);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.palette__empty { padding: 30px; text-align: center; color: var(--dim-2); font-size: 13px; }
.palette__foot {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: #060c16;
  box-shadow: 0 -16px 20px 2px #060c16;
  font-size: 8.5px;
  color: var(--dim-2);
}
.palette__foot .dim { margin-left: auto; }

.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.78);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease both;
}
.modal__box {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #060c16;
  box-shadow: 0 50px 140px -40px #000, 0 0 80px -50px var(--c1);
  animation: modalIn 0.35s var(--ease) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateA(20px) scale(0.985); }
}
.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  background: rgba(4, 9, 16, 0.7);
  color: var(--dim);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.modal__close:hover { color: var(--c2); border-color: var(--c2); transform: rotate(90deg); }

.pm__hero {
  position: relative;
  padding: 34px 30px 26px;
  border-bottom: 1px solid var(--line);
  background-color: #08111e;
  background:
    radial-gradient(90% 120% at 15% 0%, color-mix(in srgb, var(--a) 20%, transparent), transparent 65%),
    linear-gradient(160deg, #08111e, #050a12);
  overflow: hidden;
}
.pm__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--a) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--a) 9%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%);
  pointer-events: none;
}
.pm__kicker {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--a);
}
.pm__title {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
  font-size: clamp(24px, 4vw, 33px);
  font-weight: 700;
  line-height: 1.2;
}
.pm__sub {
  position: relative;
  z-index: 1;
  color: var(--dim);
  font-size: 13.5px;
}
.pm__icon {
  position: absolute;
  right: 20px;
  top: 50%;
  z-index: 0;
  width: 168px;
  height: 168px;
  transform: translateA(-50%);
  color: var(--a);
  opacity: 0.16;
  pointer-events: none;
}
.pm__icon svg { width: 100%; height: 100%; }
.pm__body { padding: 24px 30px 30px; }
.pm__desc { font-size: 14px; line-height: 1.85; color: var(--dim); }
.pm__desc strong { color: var(--ink); font-weight: 600; }
.pm__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}
.pm__block h4 {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--c1);
  margin-bottom: 8px;
}
.pm__block ul { display: grid; gap: 6px; }
.pm__block li {
  position: relative;
  padding-left: 15px;
  font-size: 13px;
  color: var(--dim);
}
.pm__block li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  background: var(--a);
  transform: rotate(45deg);
}
.pm__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.pm__stack span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim);
}
.pm__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pm__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim-2);
}
.pm__meta b { color: var(--ink); font-weight: 500; }

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 180;
  display: grid;
  gap: 9px;
  width: min(330px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--c1);
  background: rgba(6, 12, 22, 0.96);
  box-shadow: 0 16px 40px -20px #000;
  font-size: 12.5px;
  line-height: 1.5;
  animation: toastIn 0.35s var(--ease) both;
}
.toast.is-out { animation: toastOut 0.3s ease forwards; }
.toast--warn { border-left-color: var(--c2); }
.toast--ok { border-left-color: var(--ok); }
.toast__icon { color: var(--c1); font-family: var(--font-mono); font-size: 11px; padding-top: 1px; }
.toast--warn .toast__icon { color: var(--c2); }
.toast--ok .toast__icon { color: var(--ok); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px); }
}

/* ---------- 18 responsive ---------- */
@media (max-width: 1120px) {
  .hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .about__grid { grid-template-columns: 310px minmax(0, 1fr); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__link { padding-inline: 9px; }
  .nav__idx { display: none; }
}

@media (max-width: 1040px) {
  :root { --hud-h: 60px; }
  .hud__tools { margin-left: auto; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel { flex-wrap: wrap; }
  .channel .btn { margin-left: 0; }
  .nav {
    position: fixed;
    top: var(--hud-h);
    left: 0; right: 0;
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 18px;
    background: rgba(4, 8, 15, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    transform: translateA(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav__link {
    padding: 12px 4px;
    font-size: 16px;
    border-bottom: 1px solid rgba(120, 190, 255, 0.08);
  }
  .nav__link::after { display: none; }
  .nav__idx { display: inline; }
  .menu-btn { display: grid; }
  .hud__clock { display: none; }
  .cmd-trigger span, .cmd-trigger kbd { display: none; }
  .cmd-trigger { width: 34px; padding: 0; justify-content: center; }
  .brand__tag { display: none; }

  .hero { padding-top: calc(var(--hud-h) + 40px); }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; max-width: 380px; margin: 0 auto; width: 86%; }
  .bubble { left: auto; right: -2%; top: -4%; width: 200px; }
  .hero__stats { margin-top: 32px; }
  .about__grid { grid-template-columns: 1fr; }
  .idcard { max-width: 420px; }
  .bento__cell--notes, .bento__cell--tele, .bento__cell--guest, .bento__stack { grid-column: span 6; }
  .bento__stack { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .skills__body { grid-template-columns: 1fr; }
  .radar { max-width: 360px; margin-inline: auto; width: 100%; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card__media { height: 140px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sec-sub { padding-bottom: 0; }
  .sec-head__left { gap: 12px; }
  .hero__visual { max-width: 330px; width: 84%; }
  .hero__title { font-size: clamp(3rem, 16vw, 4.6rem); }
  .kicker { font-size: 9px; letter-spacing: 0.14em; }
  .hero__jp { font-size: 11.5px; letter-spacing: 0.08em; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__actions .btn--plain { flex-basis: auto; justify-content: flex-start; padding-left: 0; }
  .bento__stack { grid-template-columns: 1fr; }
  .term__body { height: 330px; padding-inline: 13px; }
  .term__out { font-size: 11.5px; }
  .term__prompt { font-size: 10px; }
  .term__input { font-size: 12px; }
  .term__hints { padding-inline: 13px; }
  .footer__inner { grid-template-columns: 1fr; gap: 22px; }
  .footer__copy { margin-top: 6px; }
  .visual__meta { display: none; }
  .palette__box { margin-top: 8vh; }
  .pm__body { padding: 20px 20px 24px; }
  .pm__hero { padding: 28px 20px 22px; }
  .pm__grid { grid-template-columns: 1fr; }
  .toasts { right: 12px; bottom: 12px; }
  .note__del { opacity: 1; }
  .guest__del { opacity: 1; }
}

@media (max-width: 480px) {
  .hud__inner { gap: 10px; }
  .brand__text { font-size: 15px; }
  .hud__tools { gap: 5px; }
  .icon-btn, .cmd-trigger, .menu-btn { width: 32px; height: 32px; }
  .hero__visual { width: 100%; max-width: 300px; }
  .kicker { font-size: 8px; letter-spacing: 0.1em; gap: 7px; }
  .kicker__line { width: 22px; }
  .bubble { width: 170px; padding: 9px 11px; }
  .bubble p { font-size: 11.5px; }
  .tele__gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gauge { padding: 8px; }
  .gauge__val b { font-size: 17px; }
  .gauge__val { font-size: 9px; }
  .video-grid { grid-template-columns: 1fr; }
  .channel { padding: 12px; gap: 10px; }
  .channel__avatar { width: 46px; height: 46px; }
  .channel__info h3 { font-size: 16px; }
  .channel .btn { width: 100%; justify-content: center; }
  .videos__foot { flex-direction: column; }
  .contact__form-foot { flex-direction: column; align-items: flex-start; }
  .guest-form__foot { flex-wrap: wrap; }
}

/* ---------- 19 a11y / motion ---------- */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-ready .reveal { opacity: 1; transform: none; }
  .fx-grid, .fx-scan::after, .holo, .orbit { animation: none !important; }
}

/* ============================================================
   20 light surface pass — soft porcelain / pastel neon
   ============================================================ */
::selection { background: rgba(var(--c2-rgb), 0.18); color: var(--ink); }
::-webkit-scrollbar-track { background: #eef3fa; }
::-webkit-scrollbar-thumb { border-color: #eef3fa; }

body::before {
  background:
    radial-gradient(900px 620px at 84% -8%, rgba(var(--c2-rgb), 0.13), transparent 60%),
    radial-gradient(1000px 700px at 6% 6%, rgba(var(--c1-rgb), 0.15), transparent 62%),
    radial-gradient(760px 540px at 50% 108%, rgba(var(--c3-rgb), 0.11), transparent 65%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg-2) 55%, #f8fbff 100%);
}

.fx-grid {
  background-image:
    linear-gradient(rgba(16, 40, 70, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 40, 70, 0.05) 1px, transparent 1px);
}
.fx-scan {
  background: repeating-linear-gradient(to bottom, rgba(16, 40, 70, 0.028) 0 1px, transparent 1px 4px);
  opacity: 0.45;
  mix-blend-mode: multiply;
}
.fx-scan::after {
  background: linear-gradient(to bottom, transparent, rgba(var(--c1-rgb), 0.03), transparent);
}
.fx-noise { opacity: 0.02; }

.cursor { mix-blend-mode: normal; }
.cursor__dot { background: var(--c2); box-shadow: 0 0 10px rgba(var(--c2-rgb), 0.5); }
.cursor__ring { border-color: rgba(var(--c1-rgb), 0.55); }
.cursor.is-hover .cursor__ring { border-color: var(--c2); background: rgba(var(--c2-rgb), 0.08); }

.hud.is-scrolled {
  background: rgba(250, 252, 255, 0.82);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 34px -30px rgba(16, 40, 70, 0.55);
}
.hud__clock, .icon-btn, .cmd-trigger { background: rgba(255, 255, 255, 0.62); }
.menu-btn span { background: var(--ink); }
.brand__tag { color: var(--dim-2); }

@media (max-width: 1040px) {
  .nav { background: rgba(251, 253, 255, 0.98); border-bottom-color: var(--line); }
  .nav__link { border-bottom-color: var(--line); }
}

.boot {
  background:
    radial-gradient(700px 500px at 50% 45%, rgba(var(--c1-rgb), 0.1), transparent 70%),
    #f8fbff;
}
.boot__scan {
  background: repeating-linear-gradient(to bottom, rgba(16, 40, 70, 0.03) 0 1px, transparent 1px 4px);
}
.boot__logo { text-shadow: 0 10px 30px rgba(var(--c1-rgb), 0.22); }
.boot__log { color: var(--dim); }
.boot__log .ok { color: var(--c1); }
.boot__log .warn { color: var(--c2); }
.boot__log .done { color: var(--ok); }
.boot__bar { background: rgba(16, 40, 70, 0.08); }
.boot__meta { color: var(--dim-2); }
.boot__skip { color: var(--dim); }
.boot__skip:hover { color: var(--c1); border-color: var(--c1); }

.hero__bg {
  background:
    radial-gradient(600px 400px at 72% 45%, rgba(var(--c1-rgb), 0.1), transparent 65%),
    radial-gradient(500px 380px at 85% 75%, rgba(var(--c2-rgb), 0.09), transparent 65%);
}
.hero__bg::after { background: linear-gradient(to top, var(--bg), transparent); }
.orbit { border-color: rgba(var(--c1-rgb), 0.2); }
.orbit--a { border-color: rgba(var(--c1-rgb), 0.22); }
.orbit--b { border-color: rgba(var(--c2-rgb), 0.18); }
.orbit--c { border-color: rgba(var(--c3-rgb), 0.24); }
.drone {
  filter: drop-shadow(0 24px 34px rgba(16, 40, 70, 0.2))
          drop-shadow(0 0 26px rgba(var(--c1-rgb), 0.18));
}
.holo__glow {
  background: radial-gradient(circle, rgba(var(--c1-rgb), 0.18), transparent 65%);
  filter: blur(30px);
}
.holo__base {
  border-color: rgba(var(--c1-rgb), 0.3);
  background: radial-gradient(ellipse at center, rgba(var(--c1-rgb), 0.12), transparent 70%);
}
.holo__base span { border-color: rgba(var(--c1-rgb), 0.24); }
.bubble {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line-2);
  box-shadow: 0 22px 50px -34px rgba(16, 40, 70, 0.45);
}
.bubble p { color: var(--ink); }
.bubble__tag { color: var(--c2); }
.visual__meta, .hero__scroll { color: var(--dim-2); }
.hero__scroll i { background: linear-gradient(to bottom, var(--c1), transparent); }

.ticker {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
}
.ticker__track { color: var(--dim); }

.sec-head { border-bottom-color: var(--line); }
.sec-index, .sec-sub { color: var(--c1); }

.panel {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.28)),
    var(--panel);
  border-color: var(--line);
  box-shadow: 0 20px 50px -44px rgba(16, 40, 70, 0.5);
}
.panel::before { opacity: 0.6; }

.btn--primary { color: #fff; box-shadow: 0 12px 26px -16px rgba(var(--c1-rgb), 0.8); }
.btn--primary:hover { box-shadow: 0 16px 34px -16px rgba(var(--c1-rgb), 0.85); }
.btn--ghost { background: rgba(255, 255, 255, 0.65); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.92); color: var(--c1); }
.btn--plain { color: var(--dim); }
.btn--plain:hover { color: var(--ink); }

.input {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  color: var(--ink);
}
.input::placeholder { color: var(--dim-2); }
.input:focus {
  background: #fff;
  border-color: rgba(var(--c1-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--c1-rgb), 0.1), inset 0 0 20px rgba(var(--c1-rgb), 0.03);
}
kbd {
  background: rgba(16, 40, 70, 0.04);
  border-color: var(--line-2);
  color: var(--dim);
}

.glitch { text-shadow: 0 8px 30px rgba(var(--c1-rgb), 0.16); }
.hero__title .glitch { color: var(--ink); }
.hero__title .accent { color: var(--c2); }

.idcard {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)),
    var(--panel-2);
  border-color: var(--line-2);
}
.idcard::after {
  background: repeating-linear-gradient(to bottom, rgba(16, 40, 70, 0.025) 0 1px, transparent 1px 4px);
}
.idcard__top { border-bottom-color: var(--line); }
.idcard__portrait {
  background:
    radial-gradient(circle at 50% 55%, rgba(var(--c1-rgb), 0.16), transparent 62%),
    #f7fbff;
  border-color: rgba(var(--c1-rgb), 0.25);
}
.portrait__grid {
  background-image:
    linear-gradient(rgba(var(--c1-rgb), 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--c1-rgb), 0.12) 1px, transparent 1px);
}
.portrait__ring { border-color: rgba(var(--c2-rgb), 0.35); }
.portrait__ring::before { border-color: rgba(var(--c1-rgb), 0.25); }
.portrait__ring::after { border-color: rgba(var(--c3-rgb), 0.35); }
.portrait__mono { text-shadow: 0 0 30px rgba(var(--c1-rgb), 0.25); }
.portrait__scan { background: linear-gradient(to bottom, transparent, rgba(var(--c1-rgb), 0.12), transparent); }
.idcard__meta { background: var(--line); border-color: var(--line); }
.idcard__meta > div { background: #fff; }
.idcard__meta dd { color: var(--ink); }
.barcode { opacity: 0.32; }
.now-list { background: var(--line); border-color: var(--line); }
.now-list li { background: rgba(255, 255, 255, 0.82); }
.about__bio p + p { color: var(--dim); }
.bar__track { background: rgba(16, 40, 70, 0.08); }
.bar__track i::after { background: var(--ink); box-shadow: 0 0 8px rgba(16, 40, 70, 0.4); }

.project-card {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4)),
    var(--panel);
  border-color: var(--line);
  box-shadow: 0 12px 32px -28px rgba(16, 40, 70, 0.45);
}
.project-card:hover, .project-card:focus-visible {
  box-shadow: 0 28px 60px -42px rgba(16, 40, 70, 0.55), inset 0 0 40px rgba(var(--c1-rgb), 0.03);
}
.project-card__media {
  background-color: #f6fbff;
  background:
    radial-gradient(120% 100% at 20% 10%, color-mix(in srgb, var(--a) 17%, transparent), transparent 60%),
    linear-gradient(160deg, #fbfdff, #eaf3fb);
  border-bottom-color: var(--line);
}
.project-card__media::before {
  background-image:
    linear-gradient(color-mix(in srgb, var(--a) 11%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--a) 11%, transparent) 1px, transparent 1px);
}
.project-card__icon { filter: drop-shadow(0 8px 12px rgba(16, 40, 70, 0.16)); }
.project-card__num { opacity: 0.85; }
.project-card__title { color: var(--ink); }
.project-card__desc { color: var(--dim); }
.project-card__tags span { border-color: var(--line); color: var(--dim); }
.project-card__status { color: var(--dim-2); }
.filter { color: var(--dim); }
.filter.is-active { color: #fff; }
.filter.is-active span { color: rgba(255, 255, 255, 0.75); }
.projects__foot { color: var(--dim-2); }

.channel {
  background:
    linear-gradient(120deg, rgba(var(--c1-rgb), 0.07), transparent 55%),
    rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  box-shadow: 0 18px 40px -38px rgba(16, 40, 70, 0.45);
}
.channel__info p { color: var(--dim); }
.video-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 12px 30px -30px rgba(16, 40, 70, 0.45);
}
.video-card__title { color: var(--ink); }
.video-card__meta { color: var(--dim-2); }
.videos__foot { color: var(--dim-2); }

.notes:empty::after, .guest-list:empty::after { color: var(--dim-2); border-color: var(--line); }
.note {
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
}
.note:hover { border-color: var(--line-2); }
.note__text { color: var(--ink); }
.note__check { color: var(--c1); border-color: var(--line-2); }
.gauge { background: rgba(255, 255, 255, 0.72); border-color: var(--line); }
.gauge__track { background: rgba(16, 40, 70, 0.08); }
.gauge__label { color: var(--dim-2); }
.gauge__val { color: var(--dim); }
.spark canvas { background: rgba(255, 255, 255, 0.72); }
.guest__msg { color: var(--dim); }
.guest__time { color: var(--dim-2); }
.guest__name { color: var(--c1); }
.player__btn { background: rgba(255, 255, 255, 0.6); border-color: var(--line-2); }
.quote p { color: var(--ink); }
.quote footer { color: var(--dim-2); }
.keys__row { border-bottom-color: var(--line); color: var(--dim); }
.keys__row span { color: var(--ink); }

.term {
  background: #fbfdff;
  border-color: var(--line-2);
  box-shadow: 0 34px 70px -50px rgba(16, 40, 70, 0.45), inset 0 0 70px rgba(var(--c1-rgb), 0.03);
}
.term__bar {
  background: linear-gradient(180deg, #fff, #f0f6fd);
  border-bottom-color: var(--line);
}
.term__dots i { background: rgba(16, 40, 70, 0.18); }
.term__title { color: var(--dim); }
.term__state { color: var(--ok); }
.term__out { color: #3f5369; }
.term__out .t-cmd { color: var(--ink); }
.term__out .t-prompt { color: var(--c1); }
.term__out .t-ok { color: var(--ok); }
.term__out .t-warn { color: var(--c2); }
.term__out .t-key { color: var(--c1); }
.term__out pre { color: var(--c1); }
.term__logo { color: var(--ink); text-shadow: 0 8px 24px rgba(var(--c1-rgb), 0.18); }
.term__tag { color: var(--c1); }
.t-bar { background: rgba(16, 40, 70, 0.08); }
.term__line { border-top-color: var(--line); }
.term__prompt { color: var(--c1); }
.term__input { color: var(--ink); caret-color: var(--c2); }
.term__input::placeholder { color: var(--dim-2); }
.term__hints { background: rgba(255, 255, 255, 0.6); border-top-color: var(--line); }
.term__hints button { color: var(--dim); border-color: var(--line); }
.term__hints button:hover {
  color: var(--c1); border-color: var(--c1); background: rgba(var(--c1-rgb), 0.06);
}

.socials { background: var(--line); border-color: var(--line); }
.social { background: #fff; }
.social:hover { background: rgba(var(--c1-rgb), 0.06); }
.social__id { color: var(--dim-2); }
.social svg { color: var(--dim-2); }
.status-card { color: var(--dim); }
.contact__channels { border-top-color: var(--line); }

.footer {
  border-top-color: var(--line);
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.72));
}
.footer__brand p, .footer__copy { color: var(--dim-2); }
.footer__links a { color: var(--dim); }
.footer__copy { border-top-color: var(--line); }

.palette__backdrop { background: rgba(16, 28, 45, 0.3); }
.palette__box {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line-2);
  box-shadow: 0 40px 100px -50px rgba(16, 40, 70, 0.5);
}
.palette__search { border-bottom-color: var(--line); color: var(--dim); }
.palette__search input { color: var(--ink); }
.palette__item[aria-selected="true"] {
  background: rgba(var(--c1-rgb), 0.07);
  border-color: rgba(var(--c1-rgb), 0.22);
}
.palette__label small { color: var(--dim-2); }
.palette__empty { color: var(--dim-2); }
.palette__foot {
  background: #fff;
  border-top-color: var(--line);
  box-shadow: 0 -16px 20px 2px #fff;
  color: var(--dim-2);
}

.modal__backdrop { background: rgba(16, 28, 45, 0.35); }
.modal__box {
  background: #fbfdff;
  border-color: var(--line-2);
  box-shadow: 0 50px 120px -50px rgba(16, 40, 70, 0.5);
}
.modal__close { background: #fff; border-color: var(--line); color: var(--dim); }
.pm__hero {
  background-color: #f3f9ff;
  background:
    radial-gradient(90% 120% at 15% 0%, color-mix(in srgb, var(--a) 16%, transparent), transparent 65%),
    linear-gradient(160deg, #f7fbff, #edf5fd);
}
.pm__hero::after {
  background-image:
    linear-gradient(color-mix(in srgb, var(--a) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--a) 8%, transparent) 1px, transparent 1px);
}
.pm__desc { color: var(--dim); }
.pm__block li { color: var(--dim); }
.pm__stack span { border-color: var(--line); color: var(--dim); }
.pm__links { border-top-color: var(--line); }
.pm__meta { color: var(--dim-2); }
.pm__meta b { color: var(--ink); }
.pm__icon { opacity: 0.12; }

.toast {
  background: #fff;
  border-color: var(--line-2);
  box-shadow: 0 20px 45px -25px rgba(16, 40, 70, 0.35);
}
.toast__msg { color: var(--ink); }
.skip-link { color: #fff; }
.noscript { color: #fff; }

/* ---------- 21 layout fit for the long brand ---------- */
.brand, .nav, .hud__tools { flex-shrink: 0; }
.nav__link { white-space: nowrap; flex-shrink: 0; }
.cmd-trigger span, .cmd-trigger kbd { white-space: nowrap; }
.brand__text { white-space: nowrap; }
.hero__title { font-size: clamp(2.6rem, 5.8vw, 5.2rem); }

@media (max-width: 720px) {
  .hero__title { font-size: clamp(2.2rem, 9.8vw, 3.2rem); }
}

/* ---------- 22 small-phone header fit ---------- */
@media (max-width: 380px) {
  .container { padding-inline: 14px; }
  .hud__inner { gap: 8px; }
  .hud__tools { gap: 4px; }
  .brand__mark svg { width: 24px; height: 24px; }
  .brand__text { font-size: 13px; letter-spacing: 0.06em; }
  .icon-btn, .cmd-trigger, .menu-btn { width: 30px; height: 30px; }
}

#matrix-canvas { background: rgba(248, 251, 255, 0.34); }

:root { color-scheme: light; }

/* ---------- 23 mini games ---------- */
.games { margin-top: 18px; }
.games__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.game {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.game:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--c1-rgb), 0.5);
  background: #fff;
  box-shadow: 0 12px 28px -24px rgba(16, 40, 70, 0.5);
}
.game__idx {
  color: var(--c1);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.game__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.game__name em {
  font-style: normal;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.game__tag {
  padding: 3px 5px;
  border: 1px solid var(--line);
  color: var(--dim-2);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.game:first-child .game__tag {
  color: var(--c2);
  border-color: rgba(var(--c2-rgb), 0.35);
  background: rgba(var(--c2-rgb), 0.06);
}
.game__arrow {
  color: var(--dim-2);
  font-size: 14px;
  transition: transform 0.2s, color 0.2s;
}
.game:hover .game__arrow {
  color: var(--c1);
  transform: translate(2px, -2px);
}
.games__foot {
  margin-top: 12px;
  color: var(--dim-2);
  font-size: 10px;
}

@media (max-width: 760px) {
  .games__grid { grid-template-columns: 1fr; }
  .game {
    grid-template-columns: 26px minmax(0, 1fr) auto 14px;
    gap: 8px;
    padding: 11px 12px;
  }
  .game__name { font-size: 14px; }
}

/* ---------- 24 write access modal ---------- */
.modal__box--auth { width: min(430px, 100%); }
.auth { padding: 30px 28px 24px; }
.auth__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  color: var(--ink);
}
.auth__desc {
  margin: 10px 0 18px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.65;
}
.auth__label {
  display: block;
  color: var(--dim-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth .input { width: 100%; margin-top: 7px; }
.auth__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- 25 NetEase playlist panel ---------- */
.netmusic {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
}
.netmusic__cover {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
}
.netmusic__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.netmusic__title {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.netmusic__meta .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.netmusic .player__btn { width: 34px; height: 34px; }
.netmusic .link-btn { font-size: 10px; }
@media (max-width: 560px) {
  .netmusic { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .netmusic__cover { width: 44px; height: 44px; }
  .netmusic .link-btn { display: none; }
}
