/* ============================================================
   ryu7ero · portfolio
   RED  = black / red,  KURO  (the rude robot)
   BLUE = white / blue, SHIRO (the polite robot)
   ============================================================ */

:root {
  --f-d: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --f-b: 'Geologica', 'Segoe UI', system-ui, sans-serif;
  --f-m: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --amber: #ffb020;
}

html[data-mode="red"] {
  --bg: #060606;
  --bg2: #0b0b0c;
  --card: #0e0e10;
  --line: #25121a;
  --line2: #3b1620;
  --text: #f2f2f3;
  --mut: #8f8f96;
  --acc: #ff1a3c;
  --acc2: #ff5d76;
  --on-acc: #060606;
  --glow: 0 0 28px rgba(255, 26, 60, .32);
  --sel: rgba(255, 26, 60, .35);
  color-scheme: dark;
}

html[data-mode="blue"] {
  --bg: #f3f7ff;
  --bg2: #ffffff;
  --card: #ffffff;
  --line: #d7e3fa;
  --line2: #adc6f3;
  --text: #0a1a36;
  --mut: #55688b;
  --acc: #1d64ff;
  --acc2: #5b93ff;
  --on-acc: #ffffff;
  --glow: 0 10px 34px rgba(29, 100, 255, .16);
  --sel: rgba(29, 100, 255, .2);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-b);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sel); }
a { color: inherit; }
ul, ol { list-style: none; }
strong { font-weight: 600; color: var(--text); }
em { font-style: normal; color: var(--acc); }
h1, h2, h3 { font-family: var(--f-d); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { position: relative; z-index: 5; max-width: 640px; margin: 120px auto; padding: 0 24px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; position: relative; }
main { position: relative; z-index: 2; overflow-x: clip; }
section { padding: 130px 0; position: relative; }
.prompt { color: var(--acc); font-family: var(--f-m); }

/* ---------- background layers ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .3; }
html[data-mode="blue"] #bg { opacity: .8; }
.fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
html[data-mode="red"] .fx {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 0%, rgba(255,26,60,.10), transparent 60%);
}
html[data-mode="blue"] .fx {
  background:
    linear-gradient(rgba(29,100,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(29,100,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(ellipse at 70% 0%, rgba(29,100,255,.10), transparent 55%);
}
#sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 68; pointer-events: none; }
#shock {
  position: fixed; left: 0; top: 0; width: 70px; height: 70px; margin: -35px 0 0 -35px;
  border-radius: 50%; border: 2px solid var(--acc);
  box-shadow: 0 0 22px var(--acc), inset 0 0 18px var(--acc);
  z-index: 67; pointer-events: none; opacity: 0;
}
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 80;
  background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); box-shadow: var(--glow);
}

/* ---------- boot screen ---------- */
#boot { display: none; }
html.js:not(.booted) #boot {
  display: flex; flex-direction: column; justify-content: center;
  position: fixed; inset: 0; z-index: 200; padding: 8vw;
  background: #030303; color: #ff1a3c; font-family: var(--f-m); font-size: clamp(12px, 1.5vw, 16px);
  cursor: pointer; transition: opacity .5s, visibility .5s;
}
html[data-mode="blue"].js:not(.booted) #boot { background: #f3f7ff; color: #1d64ff; }
#boot.done { opacity: 0; visibility: hidden; }
#boot-log { white-space: pre-wrap; line-height: 1.9; min-height: 14em; font-family: inherit; }
.boot-skip { position: absolute; bottom: 28px; right: 32px; font-size: 11px; opacity: .5; letter-spacing: .1em; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform .4s var(--ease);
}
.nav.hide { transform: translateY(-110%); }
.logo { font-family: var(--f-m); font-weight: 700; text-decoration: none; white-space: nowrap; }
.logo-p { color: var(--acc); }
.nav-links { display: flex; gap: 24px; font-family: var(--f-m); font-size: 13px; }
.nav-links a { text-decoration: none; color: var(--mut); position: relative; padding: 4px 0; white-space: nowrap; transition: color .2s; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--acc);
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-ctl { display: flex; align-items: center; gap: 8px; }
.pill {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font: 700 11px var(--f-m); letter-spacing: .12em; color: var(--mut);
  background: var(--card); border: 1px solid var(--line2); border-radius: 99px; padding: 7px 12px;
  transition: border-color .2s;
}
.pill:hover { border-color: var(--acc); }
.mb-knob { width: 30px; height: 14px; border-radius: 99px; background: var(--line2); position: relative; }
.mb-knob::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 8px var(--acc); transition: transform .4s var(--ease);
}
html[data-mode="blue"] .mb-knob::after { transform: translateX(16px); }
html[data-mode="red"] .mb-red, html[data-mode="blue"] .mb-blue { color: var(--acc); }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; overflow: hidden; }
.hero-in { width: min(1240px, 100% - 48px); z-index: 1; }
.hero-floor {
  position: absolute; left: -30%; right: -30%; bottom: 0; height: 50%;
  perspective: 420px; pointer-events: none; z-index: 0; opacity: .2;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%);
  mask-image: linear-gradient(to top, #000, transparent 85%);
}
.hero-floor::before {
  content: ''; position: absolute; left: 0; right: 0; top: -100%; bottom: 0;
  background-image: linear-gradient(var(--acc) 1px, transparent 1px), linear-gradient(90deg, var(--acc) 1px, transparent 1px);
  background-size: 64px 64px;
  transform-origin: 50% 100%;
  animation: floor 2.4s linear infinite;
}
@keyframes floor {
  from { transform: rotateX(68deg) translateY(0); }
  to { transform: rotateX(68deg) translateY(64px); }
}
.kicker { font-family: var(--f-m); font-size: 13px; color: var(--mut); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--acc); }
  70%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.glitch {
  font-size: clamp(56px, 11vw, 166px); line-height: .92; font-weight: 800; letter-spacing: -.01em;
  position: relative; width: fit-content;
}
html[data-mode="red"] .glitch { text-shadow: 0 0 40px rgba(255,26,60,.35); }
html[data-mode="red"] .glitch::before,
html[data-mode="red"] .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
html[data-mode="red"] .glitch::before { color: var(--acc); transform: translate(-3px, 0); clip-path: inset(0 0 100% 0); animation: gl1 3.2s infinite steps(1); mix-blend-mode: screen; }
html[data-mode="red"] .glitch::after { color: #fff; transform: translate(3px, 0); clip-path: inset(100% 0 0 0); animation: gl2 2.6s infinite steps(1); opacity: .8; }
@keyframes gl1 {
  0%, 100% { clip-path: inset(0 0 100% 0); }
  8% { clip-path: inset(12% 0 62% 0); transform: translate(-5px, 0); }
  10% { clip-path: inset(48% 0 30% 0); transform: translate(4px, 0); }
  12% { clip-path: inset(0 0 100% 0); }
  52% { clip-path: inset(70% 0 8% 0); transform: translate(-6px, 0); }
  55% { clip-path: inset(0 0 100% 0); }
}
@keyframes gl2 {
  0%, 100% { clip-path: inset(100% 0 0 0); }
  30% { clip-path: inset(22% 0 55% 0); transform: translate(5px, 0); }
  33% { clip-path: inset(100% 0 0 0); }
  74% { clip-path: inset(60% 0 22% 0); transform: translate(-4px, 0); }
  77% { clip-path: inset(84% 0 4% 0); transform: translate(6px, 0); }
  79% { clip-path: inset(100% 0 0 0); }
}
html[data-mode="blue"] .glitch {
  background: linear-gradient(100deg, #0a1a36 20%, #1d64ff 60%, #5fa6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.realname { margin-top: 20px; font-size: clamp(17px, 2vw, 24px); font-weight: 500; }
.sep { color: var(--acc); margin: 0 10px; }
.typed {
  font-family: var(--f-m); font-size: clamp(14px, 1.5vw, 18px); margin-top: 12px; min-height: 1.7em; color: var(--mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.caret { display: inline-block; width: .6em; height: 1.1em; background: var(--acc); vertical-align: -.2em; margin-left: 3px; animation: caretblink 1s steps(1) infinite; }
@keyframes caretblink { 50% { opacity: 0; } }

.stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 44px; max-width: 900px; }
.stat b { display: block; font: 800 clamp(30px, 3.6vw, 48px)/1.1 var(--f-d); color: var(--acc); font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--f-m); font-size: 12px; color: var(--mut); letter-spacing: .03em; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.btn {
  font: 700 13px var(--f-m); letter-spacing: .05em; text-decoration: none;
  padding: 14px 24px; border: 1px solid var(--acc); color: var(--acc);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: color .3s, background .3s;
}
.btn:hover { background: var(--acc); color: var(--on-acc); }
.btn-solid { background: var(--acc); color: var(--on-acc); }
.btn-solid:hover { background: transparent; color: var(--acc); }
html[data-mode="blue"] .btn { clip-path: none; border-radius: 10px; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font: 11px var(--f-m); letter-spacing: .2em; color: var(--mut); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; }
.scroll-cue i { font-style: normal; }
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--acc), transparent); animation: cue 1.6s infinite; transform-origin: 50% 0; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- marquee ---------- */
.marquee {
  position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line);
  background: var(--bg2); padding: 18px 0; transform: rotate(-1.2deg);
}
.marquee-track { display: flex; align-items: center; gap: 34px; white-space: nowrap; width: max-content; will-change: transform; }
.marquee span { font: 800 clamp(28px, 4.5vw, 62px) var(--f-d); letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1px var(--acc); }
.marquee span:nth-of-type(odd) { color: var(--text); -webkit-text-stroke: 0; }
.marquee i { color: var(--acc); font-style: normal; font-size: 22px; }

/* ---------- section heads ---------- */
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 56px; }
.sec-no { flex: none; font: 700 13px var(--f-m); color: var(--acc); }
.sec-no::before { content: '// '; opacity: .6; }
.sec-head h2 { font-size: clamp(34px, 5.4vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.01em; }
.sec-line { flex: 1; height: 1px; min-width: 24px; background: var(--line2); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease) .3s; align-self: center; }
.sec-head.in .sec-line { transform: scaleX(1); }
.sec-sub { margin: -28px 0 36px; color: var(--mut); max-width: 74ch; }

/* ---------- reveal ---------- */
html.js .rv { opacity: 0; translate: 0 46px; transition: opacity .8s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s); }
html.js .rv.in { opacity: 1; translate: 0 0; }
html.js .tl-item.rv { translate: -40px 0; }
html.js .tl-item.rv.in { translate: 0 0; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden;
  padding: 28px; text-decoration: none; display: block;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color .3s, box-shadow .3s, transform .25s ease-out;
}
html[data-mode="blue"] .card { border-radius: 16px; box-shadow: 0 2px 10px rgba(9, 26, 54, .04); }
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--acc) 16%, transparent), transparent 70%);
}
.card:hover { border-color: var(--acc); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }
html[data-mode="red"] .card::after {
  content: ''; position: absolute; top: 0; right: 0; width: 18px; height: 18px;
  background: linear-gradient(225deg, var(--acc) 50%, transparent 50%); opacity: .8;
}

/* ---------- about: bento ---------- */
.lead { font: 600 clamp(22px, 2.6vw, 32px)/1.3 var(--f-d); margin-bottom: 24px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.t-label { font: 700 11px var(--f-m); letter-spacing: .12em; color: var(--acc); }
.t-quote { grid-column: 1 / 8; justify-content: space-between; min-height: 250px; }
.t-dn { grid-column: 8 / 13; grid-row: span 2; }
.t-loc { grid-column: 1 / 4; }
.t-squad { grid-column: 4 / 8; }
.t-focus { grid-column: 1 / 7; }
.t-vitals { grid-column: 7 / 13; }

.quote { position: relative; z-index: 1; max-width: 22ch; font: 700 clamp(24px, 2.7vw, 36px)/1.22 var(--f-d); }
.quote em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--acc) 30%, transparent) 62%); }
.t-sign { position: relative; z-index: 1; font: 13px var(--f-m); color: var(--mut); }
.t-glyph {
  position: absolute; right: 24px; bottom: -10px; pointer-events: none; user-select: none;
  font: 800 180px/1 var(--f-m); color: var(--acc); opacity: .07;
}

.dn { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line2); transition: border-color .4s, box-shadow .4s, background .4s; }
html[data-mode="blue"] .dn { border-radius: 12px; }
.dn.on { border-color: var(--acc); box-shadow: var(--glow); background: color-mix(in srgb, var(--acc) 7%, transparent); }
.dn-ico { flex: none; width: 28px; height: 28px; margin-top: 2px; color: var(--acc); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dn-ico.sun { animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.dn-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dn-time { font: 11.5px var(--f-m); color: var(--mut); }
.dn-txt b { font: 700 19px/1.25 var(--f-d); }
.dn-txt span:last-child { font-size: 14px; color: var(--mut); }
.day-bar { position: relative; display: flex; height: 12px; margin-top: auto; }
.seg { height: 100%; }
.s1 { width: 12.5%; } .s2 { width: 25%; } .s3 { width: 37.5%; } .s4 { width: 25%; }
.s-work { background: var(--acc); }
.s-night { background: repeating-linear-gradient(-45deg, var(--acc) 0 3px, color-mix(in srgb, var(--acc) 25%, transparent) 3px 7px); }
.s-sleep { background: var(--line2); }
html[data-mode="blue"] .s1 { border-radius: 6px 0 0 6px; }
html[data-mode="blue"] .s4 { border-radius: 0 6px 6px 0; }
.now-mark { position: absolute; top: -7px; bottom: -7px; left: 0; width: 2px; margin-left: -1px; background: var(--text); transition: left .6s var(--ease); }
.now-mark::before { content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--text); box-shadow: 0 0 10px var(--acc); }
.day-ticks { display: flex; justify-content: space-between; font: 10.5px var(--f-m); color: var(--mut); }
.day-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 11.5px var(--f-m); color: var(--mut); }
.day-legend li { display: flex; align-items: center; gap: 7px; }
.day-legend .sw { width: 14px; height: 9px; }
html[data-mode="blue"] .day-legend .sw { border-radius: 3px; }
.dn-now { padding-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 12.5px var(--f-m); color: var(--mut); }
.dn-now b { color: var(--text); font-size: 15px; }
#ub-status { flex-basis: 100%; color: var(--acc); }

.loc-map {
  position: relative; height: 96px; overflow: hidden; border: 1px solid var(--line2);
  background-image: radial-gradient(circle, var(--line2) 1px, transparent 1.6px); background-size: 12px 12px;
}
html[data-mode="blue"] .loc-map { border-radius: 10px; }
.loc-map::before, .loc-map::after { content: ''; position: absolute; background: color-mix(in srgb, var(--acc) 45%, transparent); }
.loc-map::before { left: 64%; top: 0; bottom: 0; width: 1px; }
.loc-map::after { top: 46%; left: 0; right: 0; height: 1px; }
.ping { position: absolute; z-index: 1; left: 64%; top: 46%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 12px var(--acc); }
.ping::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--acc); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }
.t-big { font: 800 24px/1.1 var(--f-d); margin-top: 4px; }
.t-mono { font: 12px var(--f-m); color: var(--mut); }

.squad-big { font: 800 clamp(58px, 6.4vw, 84px)/.9 var(--f-d); letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1.5px var(--acc); }
html[data-mode="red"] .squad-big { filter: drop-shadow(0 0 10px rgba(255, 26, 60, .45)); }
html[data-mode="blue"] .squad-big { -webkit-text-stroke: 0; background: linear-gradient(100deg, #0a1a36, #1d64ff 70%); -webkit-background-clip: text; background-clip: text; }
.t-sub { font-size: 14px; color: var(--mut); }
.t-squad .badge { align-self: flex-start; margin-top: auto; }
.t-focus .tags { margin-top: 6px; }

.meters { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.meters li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; font: 12.5px var(--f-m); }
.m-l { color: var(--mut); }
.m-v { font-weight: 700; color: var(--text); }
.m-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; background: var(--line); }
html[data-mode="blue"] .m-bar { border-radius: 9px; }
.m-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), var(--acc)); transition: width 1.2s var(--ease) .2s; }

.term-card { background: var(--card); border: 1px solid var(--line2); font-family: var(--f-m); font-size: 13.5px; box-shadow: var(--glow); }
html[data-mode="blue"] .term-card { border-radius: 14px; overflow: hidden; background: #0b1d3d; color: #dbe8ff; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line2); color: var(--mut); font-size: 12px; }
html[data-mode="blue"] .term-bar { border-color: #1c3566; color: #8fb0e8; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.term-bar i:first-child { background: var(--acc); }
.term-bar span { margin-left: 8px; }
.term-body { padding: 20px; line-height: 1.75; white-space: pre-wrap; overflow-x: auto; font-family: inherit; }
.c-k { color: var(--acc2); } .c-n { color: var(--acc); font-weight: 700; } .c-m { opacity: .6; }
html[data-mode="blue"] .c-k { color: #7db1ff; }
html[data-mode="blue"] .c-n { color: #5fa6ff; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--acc), var(--line2) 60%, transparent); }
.tl-item { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px dashed var(--line2); }
.tl-item:last-child { border-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -34px; top: 34px; width: 11px; height: 11px; background: var(--bg); border: 2px solid var(--acc); transform: rotate(45deg); transition: background .3s; }
html[data-mode="blue"] .tl-item::before { border-radius: 50%; }
.tl-item:hover::before { background: var(--acc); }
.tl-date { font: 12.5px var(--f-m); color: var(--mut); padding-top: 6px; }
.tl-body h3 { font-size: 26px; font-weight: 700; line-height: 1.2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-role { font: 13px var(--f-m); color: var(--acc); margin: 4px 0 10px; }
.tl-body p:last-child { color: var(--mut); max-width: 62ch; }
.badge { font: 700 10px var(--f-m); letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--acc); color: var(--acc); }
.badge.live { animation: caretblink 1.6s steps(1) infinite; }
html[data-mode="blue"] .badge { border-radius: 99px; animation: none; background: color-mix(in srgb, var(--acc) 10%, transparent); }

/* ---------- research ---------- */
.cve-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cve { display: flex; flex-direction: column; }
.cve-top { display: flex; justify-content: space-between; align-items: center; font: 700 11px var(--f-m); letter-spacing: .14em; }
.sev { padding: 3px 9px; border: 1px solid var(--acc); color: var(--acc); }
.cve.high .sev, .cve.crit .sev { background: var(--acc); color: var(--on-acc); }
.cve.crit { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.cve.crit .sev { animation: critglow 1.8s ease-in-out infinite; }
@keyframes critglow { 50% { box-shadow: 0 0 16px var(--acc); } }
.cve.low .sev { border-color: var(--line2); color: var(--mut); }
html[data-mode="blue"] .sev { border-radius: 99px; }
.cve .yr { color: var(--mut); }
.cve h3 { font: 700 clamp(20px, 2.2vw, 28px) var(--f-m); margin: 24px 0 2px; letter-spacing: -.02em; }
.cve-pkg { font: 12px var(--f-m); color: var(--acc); margin-bottom: 12px; }
.cve-desc { color: var(--mut); font-size: 15px; margin-bottom: 20px; flex: 1; }
.cvss { height: 6px; background: var(--line); overflow: hidden; }
html[data-mode="blue"] .cvss { border-radius: 9px; }
.cvss-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), var(--acc)); transition: width 1.6s var(--ease) .4s; }
.cve.low .cvss-bar { background: var(--mut); }
.cve-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.score { font: 800 34px/1 var(--f-d); }
.score small { font: 12px var(--f-m); color: var(--mut); }
.pay { font: 700 20px var(--f-m); color: var(--acc); }
.pay.dim { color: var(--mut); font-size: 15px; }
.cve-link {
  position: relative; z-index: 1; align-self: flex-start; margin-top: 14px;
  font: 12px var(--f-m); color: var(--acc); text-decoration: none; border-bottom: 1px dashed var(--acc);
}
.cve-link:hover { border-bottom-style: solid; }
.cve-link.static { color: var(--mut); border: 0; }
.note { font: 13px var(--f-m); color: var(--mut); margin-top: 28px; }
.note strong { color: var(--text); }

/* ---------- ctf ---------- */
.final { padding: 34px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px 40px; align-items: center; margin-bottom: 22px; }
.final-tag { font: 700 11px var(--f-m); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.final h3 { font-size: clamp(30px, 4vw, 52px); font-weight: 800; line-height: 1; margin: 10px 0 10px; }
.final-meta { font: 12.5px var(--f-m); color: var(--mut); }
.final-desc { margin-top: 14px; color: var(--mut); }
.final-squads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.squad { border: 1px solid var(--line2); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
html[data-mode="blue"] .squad { border-radius: 12px; }
.squad.mine { border-color: var(--acc); box-shadow: var(--glow); background: color-mix(in srgb, var(--acc) 6%, transparent); }
.sq-place { font: 800 46px/1 var(--f-d); color: var(--mut); }
.squad.mine .sq-place { color: var(--acc); }
.sq-name { font: 700 19px var(--f-d); }
.sq-note { font: 11.5px var(--f-m); color: var(--mut); }

.board { border: 1px solid var(--line2); background: var(--card); font-family: var(--f-m); }
html[data-mode="blue"] .board { border-radius: 16px; overflow: hidden; }
.board-row {
  display: grid; grid-template-columns: 110px 1fr 160px 80px; gap: 16px; align-items: center;
  padding: 18px 26px; border-bottom: 1px solid var(--line); position: relative;
  transition: background .25s, padding-left .3s var(--ease);
}
.board-row:last-child { border-bottom: 0; }
.board-h { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mut); padding-block: 12px; }
.board-row:not(.board-h):hover { background: color-mix(in srgb, var(--acc) 8%, transparent); padding-left: 38px; }
.board-row:not(.board-h)::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); transform: scaleY(0); transition: transform .3s var(--ease); }
.board-row:not(.board-h):hover::before { transform: scaleY(1); }
.pl { font: 800 30px var(--f-d); color: var(--mut); }
.ev { font: 600 20px var(--f-d); }
.sc, .board .yr { font-size: 12.5px; color: var(--mut); }
.team-link {
  display: inline-flex; gap: 8px; align-items: center; margin-top: 24px;
  font: 700 13px var(--f-m); color: var(--acc); text-decoration: none;
  border-bottom: 1px dashed var(--acc); padding-bottom: 2px;
}
.team-link:hover .arrow { transform: translate(3px, -3px); }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.proj { grid-column: span 2; }
.proj.big { grid-column: span 3; padding: 32px; }
.proj.wide { grid-column: 1 / -1; }
.proj-tag { font: 11.5px var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; }
.proj h3 { font-size: 22px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; overflow-wrap: anywhere; }
.proj.big h3 { font-size: clamp(54px, 7vw, 88px); font-weight: 800; line-height: .95; letter-spacing: -.01em; margin-bottom: 16px; }
.proj-desc { color: var(--mut); font-size: 15.5px; }
.arrow { color: var(--acc); display: inline-block; transition: transform .3s var(--ease); }
.proj:hover .arrow { transform: translate(4px, -4px); }
.stamp {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  font: 700 11px var(--f-m); letter-spacing: .2em; color: var(--acc);
  border: 2px solid var(--acc); padding: 4px 10px; transform: rotate(8deg); background: var(--card);
}
html[data-mode="blue"] .stamp { transform: none; border-width: 1px; border-radius: 99px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li { font: 12px var(--f-m); padding: 6px 12px; border: 1px solid var(--line2); color: var(--text); transition: border-color .25s, color .25s, translate .25s; }
html[data-mode="blue"] .tags li { border-radius: 99px; background: color-mix(in srgb, var(--acc) 6%, transparent); }
.tags li:hover { border-color: var(--acc); color: var(--acc); translate: 0 -2px; }

/* project visuals */
.viz {
  position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: center;
  padding: 18px; margin: 18px 0 26px; min-height: 168px;
  border: 1px solid var(--line2); background: color-mix(in srgb, var(--bg) 70%, transparent);
}
html[data-mode="blue"] .viz { border-radius: 12px; background: #f6f9ff; }
.viz-label {
  position: absolute; left: 14px; bottom: -8px; padding: 0 8px; background: var(--card);
  font: 10.5px var(--f-m); letter-spacing: .12em; text-transform: uppercase; color: var(--acc);
}
.radar {
  position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line2);
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 10%, transparent), transparent 70%);
}
.radar::before, .radar::after { content: ''; position: absolute; background: var(--line2); }
.radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.r-ring { position: absolute; border-radius: 50%; border: 1px dashed var(--line2); }
.r-ring.r1 { inset: 14%; } .r-ring.r2 { inset: 30%; } .r-ring.r3 { inset: 44%; }
.r-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 290deg, color-mix(in srgb, var(--acc) 60%, transparent) 360deg);
  animation: sweep 4s linear infinite;
}
@keyframes sweep { to { transform: rotate(1turn); } }
.blip {
  position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 10px var(--acc); opacity: .15; animation: blip 4s linear infinite;
}
.blip.hot { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.b1 { left: 70%; top: 30%; animation-delay: .5s; }
.b2 { left: 30%; top: 38%; animation-delay: 3.34s; }
.b3 { left: 62%; top: 72%; animation-delay: 1.68s; }
.b4 { left: 26%; top: 66%; animation-delay: 2.63s; }
.b5 { left: 82%; top: 56%; animation-delay: 1.12s; }
@keyframes blip { 0% { opacity: 1; transform: scale(1.7); } 12% { transform: scale(1); } 75% { opacity: .2; } 100% { opacity: .15; } }
.viz-log { font: 11.5px/1.95 var(--f-m); color: var(--mut); min-width: 0; }
.viz-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logline 8s infinite backwards; }
.viz-log li:nth-child(2) { animation-delay: .7s; }
.viz-log li:nth-child(3) { animation-delay: 1.4s; }
.viz-log li:nth-child(4) { animation-delay: 2.1s; }
.viz-log li:nth-child(5) { animation-delay: 2.8s; }
.viz-log b { color: var(--acc); margin-right: 4px; }
.viz-log i { font-style: normal; opacity: .75; }
.viz-log .warn b, .viz-log .warn i { color: var(--amber); opacity: 1; }
.viz-log .fix { color: var(--text); }
@keyframes logline { 0% { opacity: 0; transform: translateX(-8px); } 6%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }

.viz-soar { grid-template-columns: 1fr; gap: 16px; }
.pipe { position: relative; display: flex; justify-content: space-between; gap: 6px; }
.pipe::before { content: ''; position: absolute; left: 4%; right: 4%; top: 50%; height: 1px; background: var(--line2); }
.pn {
  position: relative; z-index: 1; font: 700 10.5px var(--f-m); letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 9px; border: 1px solid var(--line2); background: var(--card); color: var(--mut);
  animation: pn 3.2s infinite;
}
html[data-mode="blue"] .pn { border-radius: 8px; }
.pn:nth-child(2) { animation-delay: 1.05s; }
.pn:nth-child(3) { animation-delay: 2.1s; }
.pn:nth-child(4) { animation-delay: 3.1s; }
@keyframes pn {
  0%, 18% { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 14px color-mix(in srgb, var(--acc) 45%, transparent); }
  30%, 100% { border-color: var(--line2); color: var(--mut); box-shadow: none; }
}
.packet {
  position: absolute; z-index: 0; top: 50%; left: 4%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 14px var(--acc); animation: packet 3.2s linear infinite;
}
@keyframes packet { from { left: 4%; } to { left: 96%; } }
.stages { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.stages i { height: 6px; background: var(--line2); animation: stage 4.5s infinite backwards; }
html[data-mode="blue"] .stages i { border-radius: 3px; }
.stages i:nth-child(2) { animation-delay: .3s; }
.stages i:nth-child(3) { animation-delay: .6s; }
.stages i:nth-child(4) { animation-delay: .9s; }
.stages i:nth-child(5) { animation-delay: 1.2s; }
.stages i:nth-child(6) { animation-delay: 1.5s; }
.stages i:nth-child(7) { animation-delay: 1.8s; }
.stages i:nth-child(8) { animation-delay: 2.1s; }
.stages i:nth-child(9) { animation-delay: 2.4s; }
.stages i:nth-child(10) { animation-delay: 2.7s; }
@keyframes stage {
  0% { background: var(--line2); }
  8%, 60% { background: var(--acc); box-shadow: 0 0 8px var(--acc); }
  80%, 100% { background: var(--line2); box-shadow: none; }
}
.pipe-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font: 11px var(--f-m); color: var(--mut); }
.pipe-status span:first-child { color: var(--acc); }

.duo { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 16px; padding: 2px 2px 14px; }
.duo-a, .duo-b { font: 800 15px var(--f-d); letter-spacing: .08em; color: var(--acc); }
.duo-line {
  height: 2px; opacity: .8;
  background: repeating-linear-gradient(90deg, var(--acc) 0 12px, transparent 12px 20px);
  background-size: 20px 2px; animation: dash .7s linear infinite;
}
@keyframes dash { to { background-position: 20px 0; } }
.duo p { grid-column: 1 / -1; text-align: center; color: var(--mut); font-size: 15px; }

/* ---------- skills ---------- */
.ars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.ars { border-top: 2px solid var(--acc); padding-top: 22px; }
.ars h3 { font-size: 28px; font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
.ars-i { font: 12px var(--f-m); color: var(--acc); }

/* ---------- certs ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert { padding: 24px; display: flex; flex-direction: column; gap: 10px; min-height: 170px; }
.cert.wide { grid-column: 1 / -1; min-height: 0; }
.cert-org { font: 11.5px var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.cert h3 { font-size: 20px; line-height: 1.25; font-weight: 700; }
.cert.wide h3 { font-size: clamp(24px, 3vw, 36px); }
.cert-yr { font: 12.5px var(--f-m); color: var(--mut); margin-top: auto; }

/* ---------- contact ---------- */
#contact { padding-bottom: 240px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.links li { border-bottom: 1px solid var(--line2); }
.links a {
  display: flex; align-items: baseline; gap: 20px; padding: 18px 0; text-decoration: none;
  font: 600 clamp(18px, 2vw, 24px) var(--f-d); overflow-wrap: anywhere;
  transition: padding-left .3s var(--ease), color .2s;
}
.links a span { font: 12px var(--f-m); color: var(--acc); width: 56px; flex: none; }
.links a:hover { padding-left: 14px; color: var(--acc); }
.shell .term-body { height: 260px; overflow-y: auto; padding-bottom: 6px; }
.shell .term-body div { min-height: 1.75em; }
.shell .term-body .cmd { color: var(--acc2); }
html[data-mode="blue"] .shell .term-body .cmd { color: #7db1ff; }
.shell-in { display: flex; gap: 10px; padding: 0 20px 18px; align-items: center; cursor: text; }
.shell-in .prompt { flex: none; font-size: 13px; }
html[data-mode="blue"] .shell-in .prompt { color: #7db1ff; }
#shell-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: inherit; font: inherit; caret-color: var(--acc); }

.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 28px 28px 34px; border-top: 1px solid var(--line); font: 12px var(--f-m); color: var(--mut); }

/* ============================================================
   ROBOTS
   ============================================================ */
#bot {
  position: fixed; top: 0; left: 0; width: 200px; height: 260px; z-index: 70;
  transform-origin: 0 0; cursor: pointer; will-change: transform;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  view-transition-name: bot;
}
#bot svg { display: block; width: 100%; height: 100%; overflow: visible; transition: scale .3s var(--ease); }
html[data-mode="red"] #bot svg { filter: drop-shadow(0 0 16px rgba(255, 26, 60, .35)); }
html[data-mode="blue"] #bot svg { filter: drop-shadow(0 16px 22px rgba(29, 100, 255, .22)); }
#bot:hover svg { scale: 1.06; }
#bot:active svg { scale: .95; }
#bot.flip svg { animation: flip .88s var(--ease); }
@keyframes flip { 50% { transform: rotateY(90deg) scale(1.25); opacity: .6; } }

html[data-mode="red"] .r-shiro, html[data-mode="blue"] .r-kuro { display: none; }

#bot .seg-head, #bot .seg-body, #bot .neck, #bot .hand, #bot .eyes, #bot .core-in,
#bot .halo, #bot .crest, #bot .pool, #bot .m-bars rect { transform-box: fill-box; transform-origin: 50% 50%; }

/* floating segments */
#bot .seg-head { animation: bobHead 3.2s ease-in-out infinite; }
#bot .seg-body { animation: bobBody 3.2s ease-in-out infinite; }
#bot .neck { animation: bobNeck 3.2s ease-in-out infinite; }
@keyframes bobHead { 50% { transform: translateY(-3px); } }
@keyframes bobBody { 50% { transform: translateY(1.5px); } }
@keyframes bobNeck { 50% { transform: translateY(-.8px); } }
#bot .hand-l { animation: handL 3.6s ease-in-out infinite; }
#bot .hand-r { animation: handR 3.9s ease-in-out infinite; }
@keyframes handL { 50% { transform: translate(-2px, -7px) rotate(-7deg); } }
@keyframes handR { 50% { transform: translate(2px, -6px) rotate(7deg); } }
#bot.talk .hand-r { animation: wave .6s ease-in-out infinite; }
@keyframes wave {
  0%, 100% { transform: translate(4px, -50px) rotate(-12deg); }
  50% { transform: translate(6px, -54px) rotate(16deg); }
}

/* face */
#bot .eyes { animation: eyeblink 5.2s infinite; }
#bot .r-kuro .eyes { animation-duration: 4.3s; }
@keyframes eyeblink { 0%, 45%, 49%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.08); } }
#bot .m-idle, #bot .m-bars { transition: opacity .15s; }
#bot .m-bars { opacity: 0; }
#bot.talk .m-bars { opacity: 1; }
#bot.talk .m-idle { opacity: 0; }
#bot .m-bars rect { transform: scaleY(.3); }
#bot.talk .m-bars rect { animation: eq .3s ease-in-out infinite alternate; }
#bot.talk .m-bars rect:nth-child(2) { animation-delay: -.12s; }
#bot.talk .m-bars rect:nth-child(3) { animation-delay: -.22s; }
#bot.talk .m-bars rect:nth-child(4) { animation-delay: -.07s; }
#bot.talk .m-bars rect:nth-child(5) { animation-delay: -.17s; }
@keyframes eq { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
#bot .scan { opacity: 0; animation: scan 3.4s linear infinite; }
@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  12%, 85% { opacity: .4; }
  100% { transform: translateY(64px); opacity: 0; }
}
#bot .r-kuro .visor-glow { animation: kglitch 6s steps(1) infinite; }
@keyframes kglitch {
  0%, 91%, 100% { opacity: 1; transform: none; }
  92% { opacity: .45; transform: translateX(3px); }
  94% { opacity: 1; transform: translateX(-2px); }
  96% { opacity: .7; transform: none; }
}

/* emissives */
#bot .core-in { animation: core 1.6s ease-in-out infinite; }
@keyframes core { 50% { transform: scale(.72); opacity: .65; } }
#bot .neck-ring { animation: ring 2.2s ease-in-out infinite; }
@keyframes ring { 50% { opacity: .35; } }
#bot .halo { animation: halo 3s ease-in-out infinite; }
@keyframes halo { 50% { transform: translateY(-4px); } }
#bot .crest { animation: crest 1.4s ease-in-out infinite; }
@keyframes crest { 50% { opacity: .45; transform: scale(.85); } }
#bot .tip { animation: tip 1.6s steps(1) infinite; }
@keyframes tip { 50% { opacity: .25; } }
#bot .pool { animation: pool 3.2s ease-in-out infinite; }
@keyframes pool { 50% { transform: scale(.85); opacity: .7; } }

/* thruster: --flame is set from JS by flight speed */
#bot .flame { transform-box: view-box; transform-origin: 100px 216px; transform: scaleY(var(--flame, 1)); }
#bot .flame path { transform-box: view-box; transform-origin: 100px 216px; animation: flick .14s steps(2) infinite; }
@keyframes flick { 50% { transform: scale(.86, .8); } }

.bot-hint {
  position: absolute; left: 50%; top: 100%; translate: -50% 6px; white-space: nowrap;
  font: 700 12px var(--f-m); letter-spacing: .04em; color: var(--acc);
  padding: 5px 10px; border: 1px dashed var(--acc); background: var(--bg);
  opacity: 0; transition: opacity .4s; pointer-events: none; animation: hintbob 1.6s ease-in-out infinite;
}
#bot.hint .bot-hint { opacity: 1; }
@keyframes hintbob { 50% { translate: -50% 12px; } }

/* speech bubble */
#bubble {
  position: fixed; top: 0; left: 0; z-index: 69; width: min(340px, calc(100vw - 24px));
  padding: 13px 34px 15px 16px; background: var(--card); color: var(--text);
  border: 1px solid var(--acc); box-shadow: var(--glow); font: 15px/1.5 var(--f-b);
  will-change: transform; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
#bubble.show { opacity: 1; visibility: visible; }
html[data-mode="red"] #bubble {
  font: 13.5px/1.55 var(--f-m); background: rgba(9, 9, 10, .94);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
html[data-mode="red"] #bubble::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
}
html[data-mode="blue"] #bubble {
  border-radius: 16px; border-color: var(--line2); background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bubble-name { display: flex; align-items: center; gap: 8px; font: 700 10.5px var(--f-m); letter-spacing: .18em; color: var(--acc); margin-bottom: 6px; }
.bubble-name::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: caretblink 1s steps(1) infinite; }
#bubble-text { min-height: 1.5em; }
.bubble-x { position: absolute; top: 6px; right: 8px; z-index: 1; background: none; border: 0; color: var(--mut); font: 18px var(--f-m); cursor: pointer; padding: 4px 6px; line-height: 1; }
.bubble-x:hover { color: var(--acc); }

/* ---------- mode switch: circular wipe out of the robot ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
::view-transition-group(bot) { z-index: 10; }
::view-transition-old(bot) { animation: botOut .42s cubic-bezier(.6, 0, .9, .4) both; }
::view-transition-new(bot) { animation: botIn .55s .4s cubic-bezier(.1, .7, .2, 1.3) both; }
@keyframes botOut { to { transform: rotateY(90deg) scale(1.3); filter: brightness(2.4); opacity: .6; } }
@keyframes botIn { from { transform: rotateY(-90deg) scale(1.3); filter: brightness(2.4); } to { transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 16px; font-size: 12px; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  section { padding: 90px 0; }
  .nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .wrap, .hero-in { width: calc(100% - 36px); }
  .hero { align-items: flex-start; padding-top: 104px; }
  .glitch { font-size: 18vw; }
  .stats { gap: 16px 30px; }
  .contact-grid, .cve-grid, .ars-grid, .final { grid-template-columns: 1fr; gap: 26px; }
  .bento { grid-template-columns: 1fr 1fr; gap: 14px; }
  .t-quote, .t-dn, .t-focus, .t-vitals { grid-column: 1 / -1; grid-row: auto; }
  .t-loc, .t-squad { grid-column: span 1; }
  .t-quote { min-height: 0; gap: 18px; }
  .tile { padding: 20px; }
  .t-glyph { font-size: 120px; bottom: -6px; }
  .final { padding: 24px; }
  .proj, .proj.big { grid-column: 1 / -1; }
  .proj.big { padding: 24px; }
  .viz { grid-template-columns: 104px 1fr; gap: 14px; padding: 14px; }
  .radar { width: 104px; height: 104px; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; }
  .board-row { grid-template-columns: 62px 1fr 48px; padding: 16px; gap: 10px; }
  .board-row .sc, .board-h span:nth-child(3) { display: none; }
  .pl { font-size: 24px; }
  .ev { font-size: 17px; }
  .sec-head { margin-bottom: 36px; }
  .sec-sub { margin-top: -14px; }
  .scroll-cue { display: none; }
  .shell-in .prompt { font-size: 11px; }
  #contact { padding-bottom: 200px; }
  #bubble { padding: 10px 28px 12px 12px; font-size: 14px; }
  html[data-mode="red"] #bubble { font-size: 12.5px; }
}
@media (max-width: 520px) {
  .cert-grid { grid-template-columns: 1fr; }
  .cert { min-height: 0; }
  .t-loc, .t-squad { grid-column: 1 / -1; }
  .final-squads { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sq-place { font-size: 36px; }
  .pn { padding: 5px 6px; font-size: 9.5px; }
}
@media (max-width: 380px) {
  .mb-red, .mb-blue { display: none; }
}

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