:root {
  --bg: #090b10;
  --surface: #10141c;
  --surface-2: #151b25;
  --surface-3: #1b2431;
  --text: #f4f6fb;
  --muted: #8d96a6;
  --faint: #596274;
  --line: rgba(236, 242, 255, .12);
  --line-strong: rgba(236, 242, 255, .22);
  --blue: #78a9ff;
  --blue-strong: #2563eb;
  --lime: #d8ff5a;
  --purple: #a98bff;
  --danger: #ff7f91;
  --display: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.55; }
body::selection { background: var(--lime); color: #07100b; }
a { color: inherit; text-decoration: none; }
button, a { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 30; top: -60px; left: 18px; padding: 10px 14px; border-radius: 10px; background: var(--lime); color: #090b10; font-weight: 700; }
.skip-link:focus { top: 18px; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 128px 0; scroll-margin-top: 86px; }
.ambient { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; opacity: .14; filter: blur(80px); }
.ambient-one { top: -190px; left: -120px; background: var(--blue-strong); }.ambient-two { right: -190px; top: 42%; background: var(--purple); opacity: .1; }
.topbar { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(9, 11, 16, .96); }
.topbar-inner { width: min(1160px, calc(100% - 48px)); min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 12px; }.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--blue); font-family: var(--display); font-size: 13px; font-weight: 700; }.brand-copy { display: grid; line-height: 1.1; }.brand-copy strong { font-family: var(--display); font-size: 14px; letter-spacing: -.02em; }.brand-copy small { margin-top: 4px; color: var(--muted); font-family: monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 13px; font-weight: 600; }.site-nav a { transition: color .2s ease; }.site-nav a:hover { color: var(--text); }.nav-contact { padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); }.nav-contact span { color: var(--blue); }.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; }.menu-toggle span { display: block; width: 18px; height: 1px; margin: 5px auto; background: var(--text); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }.live-dot, .status-pip { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(216,255,90,.08); }.status-pip { width: 6px; height: 6px; box-shadow: none; }
.hero { position: relative; min-height: 790px; padding-top: 132px; padding-bottom: 80px; }.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); align-items: center; gap: 68px; }.hero h1 { max-width: 700px; margin: 0; font-family: var(--display); font-size: clamp(58px, 8vw, 112px); line-height: .92; letter-spacing: -.085em; font-weight: 600; }.hero h1 span, h2 span { color: var(--blue); }.hero-lede { max-width: 530px; margin: 32px 0 28px; color: #c1c8d4; font-size: 19px; line-height: 1.5; }.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 12px 17px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease; }.button:hover { transform: translateY(-2px); }.button-primary { border-color: var(--blue); background: var(--blue); color: #07101f; }.button-primary:hover { background: #a4c4ff; border-color: #a4c4ff; }.button-quiet { background: transparent; color: var(--text); }.button-quiet:hover { border-color: var(--blue); color: var(--blue); }.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 62px; color: var(--faint); font-family: monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }.hero-meta span + span::before { margin-right: 18px; color: var(--blue); content: "•"; }
.bot-stage { position: relative; min-height: 530px; display: grid; place-items: center; }.node-field { position: absolute; inset: 0; }.node { position: absolute; width: 13px; height: 13px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 8px rgba(120,169,255,.02); }.node-a { top: 12%; left: 14%; }.node-b { top: 33%; right: 9%; }.node-c { bottom: 14%; right: 18%; }.node-d { bottom: 28%; left: 6%; }.node-e { top: 20%; right: 24%; }.bot-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; transform: rotate(-22deg); }.orbit-a { width: 420px; height: 230px; }.orbit-b { width: 310px; height: 390px; border-color: rgba(120,169,255,.18); transform: rotate(28deg); }.bot-card { position: relative; z-index: 2; width: min(100%, 470px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(16,20,28,.92); box-shadow: 0 26px 80px rgba(0,0,0,.3); }.bot-card-top, .bot-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: monospace; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }.bot-card-bottom { border-top: 1px solid var(--line); border-bottom: 0; font-size: 10px; text-transform: none; letter-spacing: 0; }.bot-label { display: flex; align-items: center; gap: 8px; color: var(--text); }.bot-mode { color: var(--faint); }.bot-visual { position: relative; min-height: 350px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(37,99,235,.19), transparent 42%), linear-gradient(145deg, #111923, #0d1016); }.bot-glow { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: rgba(120,169,255,.1); filter: blur(22px); }.mascot { position: relative; z-index: 1; width: min(260px, 70%); overflow: visible; }.mascot-float { transform-origin: 130px 120px; animation: mascot-float 4.4s ease-in-out infinite; }.antenna-line, .bot-ear, .bot-mouth, .bot-arm { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }.antenna-dot, .bot-eye, .panel-light { fill: var(--lime); }.bot-head { fill: #172334; stroke: var(--blue); stroke-width: 3; }.bot-face { fill: #0a0d13; stroke: rgba(120,169,255,.32); stroke-width: 2; }.bot-body { fill: #1b2c44; stroke: var(--blue); stroke-width: 3; }.bot-panel { fill: #090b10; stroke: rgba(216,255,90,.4); stroke-width: 2; }.panel-light-two { fill: var(--blue); }.bot-hand { fill: var(--blue); }.speech-bubble { position: absolute; top: 22px; right: 11%; max-width: 230px; padding: 11px 13px; border: 1px solid rgba(120,169,255,.35); border-radius: 13px; background: rgba(9,11,16,.9); color: #dce7ff; font-size: 12px; line-height: 1.4; }.speech-tail { position: absolute; left: 22px; bottom: -7px; width: 12px; height: 12px; border-right: 1px solid rgba(120,169,255,.35); border-bottom: 1px solid rgba(120,169,255,.35); background: #0b0e14; transform: rotate(45deg); }.mini-button { min-height: 36px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 11px; font-weight: 700; transition: background .2s ease, border-color .2s ease; }.mini-button:hover { border-color: var(--blue); background: var(--blue); color: #07101f; }.scroll-note { display: flex; align-items: center; gap: 12px; margin-top: 58px; color: var(--faint); font-family: monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.scroll-note span { width: 33px; height: 1px; background: var(--blue); }
.signal-bar { border-block: 1px solid var(--line); background: rgba(16,20,28,.55); }.signal-inner { min-height: 74px; display: grid; grid-template-columns: repeat(4, 1fr); }.signal-inner span { display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--line); color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }.signal-inner span:first-child { border-left: 1px solid var(--line); }.signal-inner b { padding-left: 18px; color: var(--blue); font-weight: 500; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 80px; }.section-intro h2, .chat-callout h2 { margin: 0; font-family: var(--display); font-size: clamp(48px, 6vw, 76px); line-height: .95; letter-spacing: -.08em; font-weight: 600; }.section-intro > p { max-width: 470px; margin: 0; color: var(--muted); font-size: 16px; }.work-section { background: #0b0e14; }.work-board { display: grid; grid-template-columns: .7fr 1.2fr .9fr; min-height: 480px; margin-top: 70px; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--surface); }.work-sidebar { display: flex; flex-direction: column; padding: 28px; border-right: 1px solid var(--line); }.side-kicker, .project-view-head, .project-view-foot { color: var(--faint); font-family: monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }.work-sidebar h3 { margin: 48px 0 12px; font-family: var(--display); font-size: 34px; font-weight: 500; letter-spacing: -.06em; }.work-sidebar p { margin: 0; color: var(--muted); font-size: 14px; }.side-list { display: grid; gap: 12px; margin-top: 40px; color: #bfc8d8; font-family: monospace; font-size: 11px; }.side-list span::before { margin-right: 9px; color: var(--blue); content: "/"; }.side-link { width: fit-content; margin-top: auto; padding-bottom: 5px; border-bottom: 1px solid var(--blue); color: var(--text); font-size: 12px; }.side-link span { color: var(--blue); }.project-view { display: flex; flex-direction: column; min-width: 0; background: linear-gradient(145deg, rgba(37,99,235,.09), transparent 52%), var(--surface-2); }.project-view-head, .project-view-foot { display: flex; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }.project-view-head span:last-child { color: var(--lime); }.project-view-body { display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 45px 44px; }.project-number { color: var(--blue); font-family: var(--display); font-size: 82px; line-height: .8; letter-spacing: -.09em; opacity: .55; }.project-view-body h3 { max-width: 440px; margin: 32px 0 14px; font-family: var(--display); font-size: clamp(31px, 3vw, 48px); line-height: .98; letter-spacing: -.07em; font-weight: 500; }.project-view-body p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; }.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }.project-tags span { padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: #bcc9df; font-family: monospace; font-size: 9px; }.project-view-foot { border-top: 1px solid var(--line); border-bottom: 0; }.project-arrow { color: var(--blue); font-size: 20px; }.project-list { display: flex; flex-direction: column; background: #0d1118; }.project-row { display: grid; grid-template-columns: 32px 1fr 22px; align-items: center; gap: 10px; min-height: 102px; padding: 17px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; transition: background .2s ease, color .2s ease; }.project-row:hover, .project-row.active { background: var(--surface-3); color: var(--text); }.row-index { align-self: start; padding-top: 3px; color: var(--blue); font-family: monospace; font-size: 10px; }.project-row strong, .project-row small { display: block; }.project-row strong { font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: -.03em; }.project-row small { margin-top: 5px; color: var(--faint); font-size: 11px; }.row-arrow { color: var(--faint); font-size: 18px; }.project-row.active .row-arrow { color: var(--lime); }
.about-section { background: var(--surface); }.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; }.about-copy { max-width: 540px; }.about-lede { margin: 0 0 24px; color: var(--text); font-family: var(--display); font-size: 27px; line-height: 1.15; letter-spacing: -.05em; }.about-copy > p:not(.about-lede) { margin: 0; color: var(--muted); }.about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 48px; }.about-facts div { padding-top: 13px; border-top: 1px solid var(--line-strong); }.about-facts span { display: block; color: var(--faint); font-family: monospace; font-size: 9px; text-transform: uppercase; }.about-facts strong { display: block; margin-top: 8px; color: #cbd3e0; font-size: 12px; line-height: 1.3; }
.chat-section { padding-top: 112px; background: #0b0e14; }.chat-callout { display: grid; grid-template-columns: 1fr .8fr; align-items: end; gap: 80px; padding: 56px; border: 1px solid var(--line-strong); border-radius: 18px; background: radial-gradient(circle at 85% 10%, rgba(37,99,235,.18), transparent 38%), var(--surface); }.chat-callout p { max-width: 460px; margin: 25px 0 0; color: var(--muted); }.chat-callout-action { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }.chat-callout-action small { color: var(--faint); font-size: 11px; }
.footer { border-top: 1px solid var(--line); background: #080a0e; color: var(--faint); font-family: monospace; font-size: 10px; }.footer-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.footer a { color: var(--blue); }
.chat-backdrop { position: fixed; z-index: 24; inset: 0; display: none; background: rgba(3,4,7,.65); }.chat-backdrop.open { display: block; }.chat-panel { position: fixed; z-index: 25; top: 18px; right: 18px; bottom: 18px; width: min(410px, calc(100% - 36px)); display: flex; flex-direction: column; visibility: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: #0c1017; box-shadow: 0 28px 90px rgba(0,0,0,.5); opacity: 0; transform: translateX(30px); transition: opacity .25s ease, transform .25s ease, visibility .25s ease; }.chat-panel.open { visibility: visible; opacity: 1; transform: none; }.chat-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 24px 22px 18px; border-bottom: 1px solid var(--line); }.chat-panel-head .eyebrow { margin: 0 0 7px; font-size: 9px; }.chat-panel-head h2 { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -.06em; font-weight: 500; }.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }.icon-button:hover { border-color: var(--blue); color: var(--text); }.chat-notice { display: flex; gap: 10px; margin: 14px 16px; padding: 11px 12px; border: 1px solid rgba(120,169,255,.18); border-radius: 10px; background: rgba(120,169,255,.06); color: #b7c6df; font-size: 11px; line-height: 1.4; }.chat-messages { flex: 1; min-height: 150px; overflow-y: auto; padding: 10px 16px 18px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }.chat-empty { display: grid; min-height: 180px; place-items: center; padding: 20px; color: var(--faint); font-size: 12px; text-align: center; }.chat-message { position: relative; width: fit-content; max-width: 82%; margin: 11px 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }.chat-message.own { margin-left: auto; border-color: rgba(120,169,255,.55); background: rgba(37,99,235,.12); }.chat-message-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }.chat-message-name { color: var(--blue); font-size: 12px; font-weight: 700; }.chat-message.own .chat-message-name { color: var(--lime); }.chat-message-time { color: var(--faint); font-family: monospace; font-size: 9px; }.chat-message-text { margin: 0; color: #d4dbe8; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }.chat-form { padding: 18px 16px 16px; border-top: 1px solid var(--line); background: #0a0d12; }.chat-form label { display: block; margin-bottom: 6px; color: var(--muted); font-family: monospace; font-size: 10px; }.chat-form input, .chat-form textarea { width: 100%; margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: var(--surface-2); color: var(--text); font-size: 14px; }.chat-form textarea { min-height: 76px; resize: vertical; }.chat-form input:focus, .chat-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(120,169,255,.1); }.chat-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.chat-form-foot small { color: var(--faint); font-family: monospace; font-size: 9px; }.chat-status { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }.chat-status.error { color: var(--danger); }.chat-status.success { color: var(--lime); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }.reveal.is-visible { opacity: 1; transform: none; }.reveal-delay { transition-delay: .12s; }
@keyframes mascot-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; }.hero-copy { max-width: 720px; }.bot-stage { min-height: 500px; }.work-board { grid-template-columns: .7fr 1.3fr; }.project-list { grid-column: span 2; flex-direction: row; }.project-row { flex: 1; min-height: 85px; }.chat-callout { grid-template-columns: 1fr; gap: 34px; } }
@media (max-width: 680px) { .shell, .topbar-inner { width: min(100% - 32px, 1160px); }.section { padding: 90px 0; }.topbar-inner { min-height: 66px; }.menu-toggle { display: block; }.site-nav { position: absolute; top: 66px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 16px; border-bottom: 1px solid var(--line-strong); background: #090b10; }.site-nav.open { display: flex; }.site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }.site-nav .nav-contact { margin-top: 10px; text-align: center; }.hero { min-height: auto; padding-top: 92px; }.hero h1 { font-size: clamp(56px, 15vw, 84px); }.hero-lede { font-size: 17px; }.hero-meta { margin-top: 42px; line-height: 1.45; }.hero-meta span + span::before { margin-right: 8px; }.bot-stage { min-height: 450px; margin-top: 24px; }.bot-card { width: 100%; }.bot-visual { min-height: 330px; }.speech-bubble { right: 5%; max-width: 190px; }.signal-inner { grid-template-columns: 1fr 1fr; }.signal-inner span { min-height: 60px; border-bottom: 1px solid var(--line); }.signal-inner span:nth-child(2) { border-right: 0; }.signal-inner span:nth-child(3) { border-left: 1px solid var(--line); border-bottom: 0; }.signal-inner span:nth-child(4) { border-bottom: 0; border-right: 0; }.signal-inner b { padding-left: 12px; }.section-intro, .about-grid { grid-template-columns: 1fr; gap: 28px; }.section-intro h2, .chat-callout h2 { font-size: 56px; }.section-intro > p { font-size: 15px; }.work-board { grid-template-columns: 1fr; margin-top: 48px; }.work-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }.work-sidebar h3 { margin-top: 34px; }.side-list { grid-template-columns: 1fr 1fr; margin-top: 27px; }.side-link { margin-top: 30px; }.project-view-body { padding: 36px 24px; }.project-list { grid-column: auto; flex-direction: column; }.project-row { min-height: 88px; }.about-facts { grid-template-columns: 1fr; gap: 14px; margin-top: 34px; }.chat-callout { padding: 30px 24px; }.footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; padding: 18px 0; }.chat-panel { top: 10px; right: 10px; bottom: 10px; width: calc(100% - 20px); }.chat-panel-head { padding: 20px 18px 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.mascot-float, .reveal { animation: none; transition: none; }.reveal { opacity: 1; transform: none; }.chat-panel { transition: none; } }

/* Motion layer: short, compositor-friendly transitions for section navigation and theme changes. */
body, .topbar, .hero, .work-section, .projects-section, .games-section, .stack-section, .experience-section, .about-section, .chat-section, .footer, .signal-bar, .theme-switcher, .theme-switcher button {
  transition: background-color .34s ease, border-color .34s ease, color .34s ease;
}
.page-transition { position: fixed; z-index: 60; inset: 0; display: grid; place-items: end center; pointer-events: none; background: var(--blue); transform: translateY(-101%); }
.page-transition span { width: 100%; height: 7px; background: var(--lime); }
.page-transition.is-cover { animation: page-cover .26s cubic-bezier(.22, 1, .36, 1) forwards; }
.page-transition.is-reveal { animation: page-reveal .42s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes page-cover { from { transform: translateY(-101%); } to { transform: translateY(0); } }
@keyframes page-reveal { from { transform: translateY(0); } to { transform: translateY(101%); } }
@keyframes route-old { to { opacity: 0; transform: translateY(-8px); } }
@keyframes route-new { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes theme-old { to { opacity: .88; } }
@keyframes theme-new { from { clip-path: circle(0 at var(--theme-x, 50vw) var(--theme-y, 50vh)); } to { clip-path: circle(150vmax at var(--theme-x, 50vw) var(--theme-y, 50vh)); } }
@supports (view-transition-name: root) {
  html:not(.theme-transition)::view-transition-old(root) { animation: route-old .22s cubic-bezier(.4, 0, 1, 1) both; }
  html:not(.theme-transition)::view-transition-new(root) { animation: route-new .42s cubic-bezier(.22, 1, .36, 1) both; }
  html.theme-transition::view-transition-old(root) { animation: theme-old .42s ease both; }
  html.theme-transition::view-transition-new(root) { animation: theme-new .48s cubic-bezier(.22, 1, .36, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  body, .topbar, .hero, .work-section, .projects-section, .games-section, .stack-section, .experience-section, .about-section, .chat-section, .footer, .signal-bar, .theme-switcher, .theme-switcher button { transition: none; }
  .page-transition { display: none; }
  @supports (view-transition-name: root) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  }
}

/* Lively editorial portfolio skin: warm paper, ink, electric blue, and lime. */
:root {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #dfe5ef;
  --text: #111111;
  --muted: #60646c;
  --faint: #7b8088;
  --line: #d7d9d7;
  --line-strong: #111111;
  --blue: #2563eb;
  --blue-strong: #1745ad;
  --lime: #d7ff4f;
  --purple: #7c3aed;
  --danger: #c3314f;
}

body { background: var(--bg); color: var(--text); }
body::selection { background: var(--lime); color: var(--text); }
.ambient { opacity: .06; filter: blur(70px); }
.ambient-one { background: var(--blue); }
.ambient-two { background: var(--lime); opacity: .08; }
.topbar { border-bottom: 1px solid rgba(17,17,17,.16); background: rgba(247,247,242,.92); backdrop-filter: blur(14px); }
.brand-mark { border: 2px solid var(--text); border-radius: 0; background: var(--text); color: var(--lime); }
.brand-copy strong { color: var(--text); }
.brand-copy small { color: var(--muted); }
.site-nav { color: var(--text); }
.site-nav a:hover { color: var(--blue); }
.nav-contact { border: 2px solid var(--text); border-radius: 0; background: var(--lime); color: var(--text); }
.nav-contact span { color: var(--text); }
.menu-toggle { border-radius: 0; border-color: var(--text); }
.menu-toggle span { background: var(--text); }
.eyebrow { color: var(--muted); }
.live-dot, .status-pip { background: var(--blue); box-shadow: 0 0 0 5px rgba(37,99,235,.08); }
.status-pip { box-shadow: none; }
.hero { min-height: 760px; padding-top: 132px; background: var(--bg); }
.hero::before { position: absolute; top: 0; right: 8%; bottom: 0; width: 1px; background: var(--line); content: ""; opacity: .8; }
.hero::after { position: absolute; top: 33%; left: -150px; width: 430px; height: 430px; border: 1px solid var(--line); border-radius: 50%; content: ""; opacity: .6; }
.hero h1 { color: var(--text); }
.hero h1 span, h2 span { color: var(--blue); }
.hero-lede { color: #3f4247; }
.button { border: 2px solid var(--text); border-radius: 0; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--text); }
.button-primary { border-color: var(--text); background: var(--text); color: #ffffff; }
.button-primary:hover { border-color: var(--text); background: var(--lime); color: var(--text); }
.button-quiet { border-color: transparent; color: var(--text); }
.button-quiet:hover { border-color: var(--text); color: var(--text); }
.hero-meta { color: var(--muted); }
.hero-meta span + span::before { color: var(--blue); }
.bot-stage { min-height: 500px; }
.node { border-color: var(--text); background: var(--lime); box-shadow: 0 0 0 8px rgba(37,99,235,.05); }
.bot-orbit { border-color: var(--line-strong); opacity: .34; }
.orbit-b { border-color: var(--blue); opacity: .38; }
.bot-card { border: 2px solid var(--text); border-radius: 0; background: var(--surface); box-shadow: 13px 13px 0 var(--blue); }
.bot-card-top, .bot-card-bottom { border-color: var(--text); color: var(--muted); }
.bot-label { color: var(--text); }
.bot-mode { color: var(--muted); }
.bot-visual { background: radial-gradient(circle at 50% 45%, rgba(37,99,235,.14), transparent 44%), #dbe4ff; }
.bot-glow { background: rgba(37,99,235,.18); }
.antenna-line, .bot-ear, .bot-mouth, .bot-arm { stroke: var(--blue); }
.antenna-dot, .bot-eye, .panel-light { fill: var(--lime); }
.bot-head { fill: #ffffff; stroke: var(--text); }
.bot-face { fill: var(--text); stroke: var(--blue); }
.bot-body { fill: var(--blue); stroke: var(--text); }
.bot-panel { fill: var(--text); stroke: var(--lime); }
.panel-light-two, .bot-hand { fill: var(--lime); }
.speech-bubble { border: 2px solid var(--text); border-radius: 0; background: #ffffff; color: var(--text); box-shadow: 5px 5px 0 var(--lime); }
.speech-tail { border-color: var(--text); background: #ffffff; }
.mini-button { border: 2px solid var(--text); border-radius: 0; background: var(--lime); color: var(--text); }
.mini-button:hover { border-color: var(--text); background: var(--blue); color: #ffffff; }
.scroll-note { color: var(--muted); }
.scroll-note span { background: var(--blue); }
.signal-bar { border-block: 2px solid var(--text); background: var(--lime); }
.signal-inner span { border-color: rgba(17,17,17,.24); color: var(--text); }
.signal-inner span:first-child { border-left-color: rgba(17,17,17,.24); }
.signal-inner b { color: var(--text); }
.work-section { background: #ffffff; }
.section-intro > p { color: var(--muted); }
.work-board { border: 2px solid var(--text); border-radius: 0; background: var(--surface); }
.work-sidebar { border-right: 2px solid var(--text); }
.side-list { color: var(--text); }
.side-list span::before { color: var(--blue); }
.side-link { border-bottom: 2px solid var(--blue); color: var(--text); }
.side-link span { color: var(--blue); }
.project-view { background: linear-gradient(145deg, rgba(37,99,235,.10), transparent 52%), #eef1f6; }
.project-view-head, .project-view-foot { border-color: var(--text); }
.project-view-head span:last-child { color: var(--blue-strong); }
.project-number { color: var(--blue); }
.project-view-body h3 { color: var(--text); }
.project-view-body p { color: var(--muted); }
.project-tags span { border-color: var(--text); border-radius: 0; color: var(--text); background: #ffffff; }
.project-view-foot { border-top-color: var(--text); }
.project-arrow { color: var(--blue); }
.project-list { background: var(--text); }
.project-row { border-bottom-color: rgba(255,255,255,.18); color: rgba(255,255,255,.72); }
.project-row:hover, .project-row.active { background: var(--blue); color: #ffffff; }
.row-index { color: var(--lime); }
.project-row small { color: rgba(255,255,255,.55); }
.row-arrow { color: rgba(255,255,255,.55); }
.project-row.active .row-arrow { color: var(--lime); }
.about-section { background: var(--bg); }
.about-copy > p:not(.about-lede) { color: var(--muted); }
.about-facts div { border-top-color: var(--text); }
.about-facts span { color: var(--muted); }
.about-facts strong { color: var(--text); }
.chat-section { background: #ffffff; }
.chat-callout { border: 2px solid var(--text); border-radius: 0; background: radial-gradient(circle at 85% 10%, rgba(37,99,235,.15), transparent 38%), var(--surface); }
.chat-callout p { color: var(--muted); }
.chat-callout-action small { color: var(--muted); }
.footer { border-top: 2px solid var(--text); background: var(--text); color: rgba(255,255,255,.68); }
.footer a { color: var(--lime); }
.chat-backdrop { background: rgba(17,17,17,.5); }
.chat-panel { border: 2px solid var(--text); border-radius: 0; background: #ffffff; box-shadow: 10px 10px 0 var(--blue); }
.chat-panel-head { border-bottom-color: var(--text); }
.chat-panel-head h2 { color: var(--text); }
.icon-button { border: 2px solid var(--text); border-radius: 0; color: var(--text); }
.icon-button:hover { border-color: var(--blue); color: var(--blue); }
.chat-notice { border-color: var(--text); border-radius: 0; background: var(--lime); color: var(--text); }
.chat-messages { scrollbar-color: var(--blue) transparent; }
.chat-empty { color: var(--muted); }
.chat-message { border-color: var(--text); border-radius: 0; background: #f4f5f1; }
.chat-message.own { border-color: var(--blue); background: #dbe4ff; }
.chat-message-name { color: var(--blue-strong); }
.chat-message.own .chat-message-name { color: var(--blue-strong); }
.chat-message-time { color: var(--muted); }
.chat-message-text { color: var(--text); }
.chat-form { border-top-color: var(--text); background: #f7f7f2; }
.chat-form label { color: var(--muted); }
.chat-form input, .chat-form textarea { border: 2px solid var(--text); border-radius: 0; background: #ffffff; color: var(--text); }
.chat-form input:focus, .chat-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.chat-form-foot small { color: var(--muted); }
.chat-status { color: var(--muted); }
.chat-status.success { color: var(--blue-strong); }

@media (max-width: 680px) {
  .site-nav { background: var(--bg); border-bottom-color: var(--text); }
  .site-nav a { border-bottom-color: var(--line); }
  .site-nav .nav-contact { border-color: var(--text); }
  .work-sidebar { border-right: 0; border-bottom: 2px solid var(--text); }
  .chat-callout { background: var(--surface); }
}

/* Audit fixes: keep the first viewport purposeful and make blocked game embeds recoverable. */
@media (min-width: 961px) {
  .hero { min-height: 690px; padding-top: 104px; padding-bottom: 56px; }
  .bot-stage { min-height: 450px; }
}

.game-preview { position: relative; }
.game-preview-fallback {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(245,247,251,.24);
  border-radius: 10px;
  background: rgba(13,17,26,.92);
  color: #f5f7fb;
  font-size: 12px;
  line-height: 1.35;
}
.game-preview-fallback[hidden] { display: none; }
.game-preview-fallback a { color: var(--lime); font-family: monospace; font-size: 10px; text-transform: uppercase; }
.game-preview-fallback a:hover, .game-preview-fallback a:focus-visible { color: #fff; }

@media (max-width: 680px) {
  .game-preview-fallback { right: 10px; bottom: 10px; left: 10px; }
}

/* Theme control and semantic surfaces. Light is the default; System only follows OS preference when selected. */
:root {
  --ink-surface: #111111;
  --on-ink: #ffffff;
  --hero-panel: #dbe4ff;
}
.brand-mark { background: var(--ink-surface); color: var(--lime); }
.button-primary { background: var(--ink-surface); color: var(--on-ink); }
.bot-visual { background: radial-gradient(circle at 50% 45%, rgba(37,99,235,.14), transparent 44%), var(--hero-panel); }
.bot-head, .speech-bubble, .speech-tail, .project-tags span { background: var(--surface); }
.bot-face { fill: var(--text); }
.project-view { background: linear-gradient(145deg, rgba(37,99,235,.10), transparent 52%), var(--surface-2); }
.project-list, .footer { background: var(--ink-surface); }
.chat-panel { background: var(--surface); }
.chat-message { background: var(--surface-2); }
.chat-form { background: var(--bg); }
.chat-form input, .chat-form textarea { background: var(--surface); }
.theme-switcher { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--text); background: var(--surface); }
.theme-switcher button { width: 44px; min-height: 40px; display: grid; place-items: center; padding: 8px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.control-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.theme-switcher button:last-child { border-right: 0; }
.theme-switcher button:hover, .theme-switcher button:focus-visible { background: var(--surface-2); }
.theme-switcher button[aria-pressed="true"] { background: var(--lime); color: var(--text); }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #121722;
  --surface-2: #182131;
  --surface-3: #243149;
  --text: #f5f7fb;
  --muted: #a9b0bd;
  --faint: #7c8799;
  --line: rgba(245,247,251,.15);
  --line-strong: #f5f7fb;
  --blue: #77a6ff;
  --blue-strong: #a8c4ff;
  --lime: #d7ff4f;
  --ink-surface: #07090d;
  --on-ink: #ffffff;
  --hero-panel: #111a28;
}
[data-theme="dark"] .topbar { background: rgba(11,13,18,.94); border-bottom-color: var(--line); }
[data-theme="dark"] .hero, [data-theme="dark"] .about-section { background: var(--bg); }
[data-theme="dark"] .work-section, [data-theme="dark"] .chat-section { background: var(--surface); }
[data-theme="dark"] .hero-lede, [data-theme="dark"] .section-intro > p { color: var(--muted); }
[data-theme="dark"] .bot-card { background: var(--surface); }
[data-theme="dark"] .bot-visual { background: radial-gradient(circle at 50% 45%, rgba(119,166,255,.18), transparent 44%), var(--hero-panel); }
[data-theme="dark"] .bot-head { fill: var(--surface); stroke: var(--blue); }
[data-theme="dark"] .bot-face { fill: #07090d; }
[data-theme="dark"] .bot-body { fill: #1b2c44; stroke: var(--blue); }
[data-theme="dark"] .speech-bubble { background: var(--surface); color: var(--text); box-shadow: 5px 5px 0 var(--lime); }
[data-theme="dark"] .speech-tail { background: var(--surface); }
[data-theme="dark"] .work-board { background: var(--surface); }
[data-theme="dark"] .project-view { background: linear-gradient(145deg, rgba(37,99,235,.16), transparent 52%), var(--surface-2); }
[data-theme="dark"] .project-tags span { background: var(--surface); color: var(--text); }
[data-theme="dark"] .chat-callout { background: radial-gradient(circle at 85% 10%, rgba(37,99,235,.20), transparent 38%), var(--surface); }
[data-theme="dark"] .chat-panel { background: var(--surface); }
[data-theme="dark"] .chat-form { background: var(--bg); }
[data-theme="dark"] .chat-message { background: var(--surface-2); }
[data-theme="dark"] .chat-message.own { background: rgba(37,99,235,.22); }
[data-theme="dark"] .chat-form input, [data-theme="dark"] .chat-form textarea { background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b0d12;
    --surface: #121722;
    --surface-2: #182131;
    --surface-3: #243149;
    --text: #f5f7fb;
    --muted: #a9b0bd;
    --faint: #7c8799;
    --line: rgba(245,247,251,.15);
    --line-strong: #f5f7fb;
    --blue: #77a6ff;
    --blue-strong: #a8c4ff;
    --lime: #d7ff4f;
    --ink-surface: #07090d;
    --on-ink: #ffffff;
    --hero-panel: #111a28;
  }
  :root:not([data-theme]) .topbar { background: rgba(11,13,18,.94); border-bottom-color: var(--line); }
  :root:not([data-theme]) .hero, :root:not([data-theme]) .about-section { background: var(--bg); }
  :root:not([data-theme]) .work-section, :root:not([data-theme]) .chat-section { background: var(--surface); }
  :root:not([data-theme]) .hero-lede, :root:not([data-theme]) .section-intro > p { color: var(--muted); }
  :root:not([data-theme]) .bot-card { background: var(--surface); }
  :root:not([data-theme]) .bot-visual { background: radial-gradient(circle at 50% 45%, rgba(119,166,255,.18), transparent 44%), var(--hero-panel); }
  :root:not([data-theme]) .bot-head { fill: var(--surface); stroke: var(--blue); }
  :root:not([data-theme]) .bot-face { fill: #07090d; }
  :root:not([data-theme]) .bot-body { fill: #1b2c44; stroke: var(--blue); }
  :root:not([data-theme]) .speech-bubble { background: var(--surface); color: var(--text); }
  :root:not([data-theme]) .speech-tail { background: var(--surface); }
  :root:not([data-theme]) .work-board { background: var(--surface); }
  :root:not([data-theme]) .project-view { background: linear-gradient(145deg, rgba(37,99,235,.16), transparent 52%), var(--surface-2); }
  :root:not([data-theme]) .project-tags span { background: var(--surface); color: var(--text); }
  :root:not([data-theme]) .chat-callout { background: radial-gradient(circle at 85% 10%, rgba(37,99,235,.20), transparent 38%), var(--surface); }
  :root:not([data-theme]) .chat-panel { background: var(--surface); }
  :root:not([data-theme]) .chat-form { background: var(--bg); }
  :root:not([data-theme]) .chat-message { background: var(--surface-2); }
  :root:not([data-theme]) .chat-message.own { background: rgba(37,99,235,.22); }
  :root:not([data-theme]) .chat-form input, :root:not([data-theme]) .chat-form textarea { background: var(--surface-2); }
}

@media (max-width: 680px) {
  .theme-switcher { width: 100%; }
  .theme-switcher button { flex: 1; }
}

/* Final theme pass: keep light mode crisp and let dark mode carry the atmosphere. */
[data-theme="light"] {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e4e9f2;
  --text: #111111;
  --muted: #556274;
  --faint: #778297;
  --line: rgba(17,17,17,.16);
  --line-strong: #111111;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --lime: #d7ff4f;
  --ink-surface: #111111;
  --hero-panel: #dbe4ff;
}
[data-theme="light"] .about-section, [data-theme="light"] .experience-section { background: var(--bg); }
[data-theme="light"] .capabilities-section { background: #f0f3f8; }
[data-theme="light"] .work-section { background: #ffffff; }
[data-theme="light"] .games-section { background: #f4f5f1; }
[data-theme="light"] .stack-section { background: #eef2f8; color: var(--text); }
[data-theme="light"] .chat-section { background: #ffffff; }
[data-theme="light"] .contact-section { background: #f7f7f2; }
[data-theme="light"] .stack-section .eyebrow, [data-theme="light"] .stack-section .section-action { color: var(--muted); }
[data-theme="light"] .stack-section h2 { color: var(--text); }
[data-theme="light"] .section-intro > p, [data-theme="light"] .about-copy > p:not(.about-lede) { color: var(--muted); }
[data-theme="light"] .project-board { background: #111111; color: #f5f7fb; }
[data-theme="light"] .project-board-head { color: rgba(245,247,251,.74); }

/* Both persistent actions sit together in the least obstructive corner. */
.utility-dock { left: auto; right: clamp(14px, 2.4vw, 30px); justify-items: end; }
@media (max-width: 680px) {
  .utility-dock { left: auto; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .utility-button { min-height: 42px; }
  .utility-piyu { max-width: calc(100vw - 36px); }
}

/* Keep dark-mode text readable on the custom chapter surfaces. */
[data-theme="dark"] .project-card-kicker, [data-theme="dark"] .project-card p,
[data-theme="dark"] .project-tech span { color: rgba(245,247,251,.78); }
[data-theme="dark"] .project-card h3, [data-theme="dark"] .project-card strong { color: #f5f7fb; }
[data-theme="dark"] .stack-section { color: #f5f7fb; }

.piyu-backdrop { position: fixed; z-index: 24; inset: 0; display: none; background: rgba(17,17,17,.5); }
.piyu-backdrop.open { display: block; }
.piyu-panel { position: fixed; z-index: 25; top: 18px; right: 18px; bottom: 18px; width: min(410px, calc(100% - 36px)); display: flex; flex-direction: column; visibility: hidden; border: 2px solid var(--text); border-radius: 0; background: var(--surface); box-shadow: 10px 10px 0 var(--blue); opacity: 0; transform: translateX(30px); transition: opacity .25s ease, transform .25s ease, visibility .25s ease; }
.piyu-panel.open { visibility: visible; opacity: 1; transform: none; }
.piyu-panel .chat-panel-head { border-bottom-color: var(--text); }
.piyu-panel .chat-notice { background: var(--lime); color: var(--text); }
.piyu-panel .chat-messages { flex: 1; }
.piyu-panel .chat-form { background: var(--bg); }
.piyu-panel .chat-form input, .piyu-panel .chat-form textarea { background: var(--surface); }

@media (max-width: 680px) {
  .piyu-panel { top: 10px; right: 10px; bottom: 10px; width: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .piyu-panel { transition: none; }
}

/* Portfolio index sections: compact stack chips, experience rows, and playable builds. */
.projects-section { background: var(--bg); }
.all-projects { margin-top: 64px; border-top: 2px solid var(--text); }
.project-line { display: grid; grid-template-columns: 58px 1fr 30px; align-items: center; gap: 18px; min-height: 88px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: background .2s ease, padding .2s ease; }
.project-line:hover { padding-inline: 16px; background: var(--lime); color: var(--text); }
.project-line-index { color: var(--blue); font-family: monospace; font-size: 11px; }
.project-line strong, .project-line small { display: block; }
.project-line strong { font-family: var(--display); font-size: 18px; letter-spacing: -.03em; }
.project-line small { margin-top: 5px; color: var(--muted); font-family: monospace; font-size: 10px; }
.project-line-arrow { color: var(--blue); font-size: 21px; text-align: right; }
.games-section { background: var(--surface); }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
.game-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 2px solid var(--text); background: var(--bg); transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-5px); box-shadow: 7px 7px 0 var(--blue); }
.game-art { position: relative; min-height: 230px; display: grid; place-items: center; overflow: hidden; border-bottom: 2px solid var(--text); }
.game-art-label { position: absolute; z-index: 2; top: 15px; left: 16px; color: var(--text); font-family: monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.game-art-mark { position: absolute; right: 17px; bottom: 6px; color: var(--text); font-family: var(--display); font-size: 74px; line-height: 1; letter-spacing: -.12em; }
.game-card-tetwist .game-art { background: #dbe4ff; }
.game-card-party .game-art { background: var(--lime); }
.game-card-twist .game-art { background: #e8ebf1; }
.tetwist-board { width: 112px; height: 150px; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(7, 1fr); gap: 3px; padding: 7px; border: 2px solid var(--text); background: var(--surface); box-shadow: 8px 8px 0 var(--blue); transform: rotate(-4deg); }
.tetwist-board i { display: block; background: var(--blue); }
.tetwist-board i:nth-child(1), .tetwist-board i:nth-child(2), .tetwist-board i:nth-child(3) { grid-row: 2; }.tetwist-board i:nth-child(4), .tetwist-board i:nth-child(5) { grid-row: 3; }.tetwist-board i:nth-child(6) { grid-row: 4; grid-column: 2; }
.party-orbit { width: 160px; height: 98px; border: 2px solid var(--text); border-radius: 50%; transform: rotate(-23deg); box-shadow: 0 0 0 14px rgba(17,17,17,.08); }
.plunger { position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--text); border-radius: 50%; background: var(--blue); color: var(--lime); font-size: 30px; box-shadow: 6px 6px 0 var(--text); transform: rotate(14deg); }
.twist-cube { width: 118px; height: 118px; border: 2px solid var(--text); background: linear-gradient(135deg, transparent 47%, var(--blue) 48% 54%, transparent 55%), linear-gradient(45deg, transparent 47%, var(--lime) 48% 54%, transparent 55%), #ffffff; box-shadow: 10px 10px 0 var(--blue); transform: rotate(18deg) skewY(-8deg); }
.game-card-copy { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 20px 18px 22px; }
.game-card-copy h3 { margin: 0 0 8px; font-family: var(--display); font-size: 23px; letter-spacing: -.05em; }
.game-card-copy p { max-width: 280px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.game-card-arrow { color: var(--blue); font-size: 22px; }
.stack-section { background: var(--ink-surface); color: var(--on-ink); }
.stack-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stack-head .eyebrow { margin: 0; color: rgba(255,255,255,.64); }
.section-action { color: rgba(255,255,255,.72); font-family: monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.section-action span { color: var(--lime); }
.stack-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.stack-chips span { padding: 9px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; color: rgba(255,255,255,.82); font-family: monospace; font-size: 14px; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.stack-chips span:hover { border-color: var(--lime); background: rgba(215,255,79,.09); color: var(--lime); }
.experience-section { background: var(--bg); }
.experience-section .stack-head .eyebrow { color: var(--muted); }
.experience-section .section-action { color: var(--muted); }
.experience-section .section-action span { color: var(--blue); }
.experience-list { margin-top: 48px; border-top: 1px solid var(--line); }
.experience-row { display: grid; grid-template-columns: 140px 1fr minmax(250px, .8fr); align-items: center; gap: 24px; min-height: 62px; border-bottom: 1px solid var(--line); }
.experience-year { color: var(--muted); font-family: monospace; font-size: 13px; }
.experience-row strong { font-size: 18px; letter-spacing: -.03em; }
.experience-company { color: var(--muted); font-size: 16px; text-align: right; }
.credentials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 42px; margin-top: 58px; }
.credentials-grid > div { padding-top: 14px; border-top: 1px solid var(--text); }
.credential-label { display: block; margin-bottom: 10px; color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.credentials-grid strong { display: block; font-family: var(--display); font-size: 20px; letter-spacing: -.04em; }
.credentials-grid small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

[data-theme="dark"] .signal-bar { border-block-color: var(--line); background: #151d2a; }
[data-theme="dark"] .signal-inner span { border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .signal-inner b { color: var(--blue); }
[data-theme="dark"] .game-card { background: var(--surface); }
[data-theme="dark"] .game-card-tetwist .game-art { background: #172743; }
[data-theme="dark"] .game-card-party .game-art { background: #263420; }
[data-theme="dark"] .game-card-twist .game-art { background: #222a38; }
[data-theme="dark"] .twist-cube { background: var(--surface); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .signal-bar { border-block-color: var(--line); background: #151d2a; }
  :root:not([data-theme]) .signal-inner span { border-color: var(--line); color: var(--muted); }
  :root:not([data-theme]) .signal-inner b { color: var(--blue); }
  :root:not([data-theme]) .game-card { background: var(--surface); }
  :root:not([data-theme]) .game-card-tetwist .game-art { background: #172743; }
  :root:not([data-theme]) .game-card-party .game-art { background: #263420; }
  :root:not([data-theme]) .game-card-twist .game-art { background: #222a38; }
  :root:not([data-theme]) .twist-cube { background: var(--surface); }
}

@media (max-width: 960px) {
  .game-grid { grid-template-columns: 1fr 1fr; }
  .game-card:last-child { grid-column: span 2; }
  .experience-row { grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; }
  .experience-company { grid-column: 2; text-align: left; }
}
@media (max-width: 680px) {
  .all-projects { margin-top: 46px; }
  .project-line { grid-template-columns: 34px 1fr 22px; gap: 10px; min-height: 82px; }
  .project-line strong { font-size: 16px; }
  .project-line small { font-size: 9px; line-height: 1.45; }
  .game-grid { grid-template-columns: 1fr; margin-top: 46px; }
  .game-card:last-child { grid-column: auto; }
  .experience-list { margin-top: 36px; }
  .experience-row { grid-template-columns: 1fr; gap: 5px; padding: 15px 0; }
  .experience-company { grid-column: auto; font-size: 13px; }
  .credentials-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 42px; }
  .stack-chips span { padding: 8px 11px; font-size: 12px; }
}

/* Refined motion + color pass. */
html { overflow-x: clip; }

.experience-row { position: relative; transition: background-color .24s ease, color .24s ease, transform .24s ease; }
.experience-row::before { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--blue); content: ""; transition: width .24s ease; }
.experience-row:hover { background: rgba(37,99,235,.07); transform: translateX(4px); }
.experience-row:hover::before { width: 4px; }
.experience-row strong { transition: color .24s ease; }
.experience-row:hover strong { color: var(--blue); }
.credentials-grid > div { transition: transform .24s ease, background-color .24s ease, border-color .24s ease; }
.credentials-grid > div:hover { transform: translateY(-5px); border-top-color: var(--blue); background: rgba(37,99,235,.06); }

.contact-section { padding-top: 96px; background: var(--bg); }
.contact-card { position: relative; overflow: hidden; padding: 48px 54px; border-radius: 28px; background: radial-gradient(circle at 12% 18%, rgba(37,99,235,.2), transparent 32%), radial-gradient(circle at 86% 86%, rgba(215,255,79,.1), transparent 28%), #102a4a; color: #f7f9ff; box-shadow: 12px 12px 0 var(--blue); }
.contact-card::before { position: absolute; inset: 26px; border: 1px solid rgba(194,217,255,.2); border-radius: 20px; background-image: radial-gradient(rgba(194,217,255,.15) 1px, transparent 1px); background-size: 24px 24px; content: ""; pointer-events: none; }
.contact-kicker, .contact-grid { position: relative; z-index: 1; }
.contact-kicker { color: rgba(236,242,255,.72); font-family: monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; margin-top: 58px; }
.contact-copy h2 { max-width: 630px; margin: 0; font-family: var(--display); font-size: clamp(56px, 8vw, 108px); line-height: .88; letter-spacing: -.09em; }
.contact-copy h2 span { color: var(--lime); }
.contact-copy p { max-width: 620px; margin: 38px 0 0; color: rgba(236,242,255,.72); font-size: 17px; line-height: 1.55; }
.contact-panel { padding-left: 42px; border-left: 1px solid rgba(194,217,255,.25); }
.contact-email { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 20px 23px; border-radius: 999px; background: #f7f9ff; color: #122844; font-size: 16px; font-weight: 700; transition: transform .24s ease, background-color .24s ease, box-shadow .24s ease; }
.contact-email span { color: var(--blue); font-size: 22px; }
.contact-email:hover, .contact-email:focus-visible { transform: translateY(-4px); background: var(--lime); box-shadow: 6px 6px 0 rgba(0,0,0,.18); }
.contact-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 25px; }
.contact-links a, .contact-links button { padding: 0; border: 0; background: transparent; color: rgba(236,242,255,.8); font-size: 14px; cursor: pointer; transition: color .2s ease, transform .2s ease; }
.contact-links a:hover, .contact-links button:hover, .contact-links a:focus-visible, .contact-links button:focus-visible { color: var(--lime); transform: translateY(-2px); }
.contact-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.contact-tags span { padding: 9px 13px; border: 1px solid rgba(194,217,255,.32); border-radius: 999px; color: rgba(236,242,255,.78); font-family: monospace; font-size: 11px; }
.contact-copy-status { min-height: 18px; margin: 12px 0 0; color: var(--lime); font-family: monospace; font-size: 11px; }

@media (max-width: 680px) {
  .contact-section { padding-top: 70px; }
  .contact-card { padding: 32px 24px; border-radius: 20px; box-shadow: 7px 7px 0 var(--blue); }
  .contact-card::before { inset: 14px; border-radius: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 38px; margin-top: 48px; }
  .contact-copy h2 { font-size: clamp(54px, 15vw, 82px); }
  .contact-copy p { margin-top: 28px; font-size: 15px; }
  .contact-panel { padding: 30px 0 0; border-top: 1px solid rgba(194,217,255,.25); border-left: 0; }
  .contact-email { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .experience-row, .credentials-grid > div, .contact-email, .contact-links a, .contact-links button { transition: none; }
}

/* Contact remix: a bright dispatch desk that belongs to the blue, lime, and ink system. */
.contact-card {
  border: 2px solid var(--blue);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 18%, rgba(120,169,255,.24), transparent 24%),
    radial-gradient(circle at 88% 84%, rgba(216,255,90,.16), transparent 22%),
    #102a4a;
  box-shadow: 0 22px 60px rgba(37,99,235,.18);
}
.contact-card::before {
  inset: 20px;
  border-color: rgba(194,217,255,.22);
  border-radius: 16px;
  background-image: radial-gradient(rgba(194,217,255,.18) 1px, transparent 1px);
  background-size: 28px 28px;
}
.contact-copy h2 { max-width: 680px; font-size: clamp(58px, 8.4vw, 112px); line-height: .86; letter-spacing: -.1em; }
.contact-copy h2 span { color: var(--lime); }
.contact-copy p { max-width: 570px; margin-top: 32px; color: rgba(236,242,255,.78); }
.contact-panel { padding-left: 48px; border-left-color: rgba(194,217,255,.3); }
.contact-email { border: 1px solid rgba(194,217,255,.22); border-radius: 16px; background: #e8efff; color: #102a4a; box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.contact-email:hover, .contact-email:focus-visible { transform: translateY(-4px) rotate(-1deg); background: var(--lime); box-shadow: 0 16px 32px rgba(0,0,0,.18); }
.contact-tags { gap: 8px; margin-top: 34px; }
.contact-tags span { border-radius: 8px; border-color: rgba(194,217,255,.38); color: rgba(236,242,255,.84); transition: transform .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease; }
.contact-tags span:hover { transform: translateY(-3px) rotate(1deg); border-color: var(--lime); background: rgba(216,255,90,.1); color: var(--lime); }

@media (max-width: 680px) {
  .contact-card { border-radius: 18px; box-shadow: 0 14px 32px rgba(37,99,235,.18); }
  .contact-card::before { inset: 14px; border-radius: 12px; }
  .contact-panel { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-email, .contact-tags span { transition: none; }
}

/* Live game previews stay inside the existing card frame and load on demand. */
.game-preview { display: block; min-height: 270px; background: #10141c; }
.game-preview iframe { display: block; width: 100%; height: 270px; border: 0; background: #10141c; }
.game-preview .game-art-label { color: #f4f6fb; text-shadow: 0 1px 10px rgba(0,0,0,.65); pointer-events: none; }

@media (max-width: 680px) {
  .game-preview, .game-preview iframe { min-height: 240px; height: 240px; }
}

/* Inline public room: visible on the page, with the same moderation and API behavior. */
.chat-inline { display: grid; grid-template-columns: minmax(0, .86fr) minmax(380px, 1.14fr); align-items: stretch; gap: clamp(42px, 8vw, 110px); }
.chat-inline-intro { align-self: center; }
.chat-inline-intro p { max-width: 430px; margin: 28px 0 26px; color: var(--muted); font-size: 17px; }
.chat-inline-room.chat-panel { position: relative; inset: auto; z-index: 1; width: auto; min-height: 640px; visibility: visible; opacity: 1; transform: none; border: 2px solid var(--text); border-radius: 0; background: var(--surface); box-shadow: 10px 10px 0 var(--blue); }
.chat-inline-room .chat-panel-head { padding: 26px 24px 20px; border-bottom-color: var(--text); }
.chat-inline-room .chat-messages { min-height: 300px; }
.chat-inline-room .chat-form { background: var(--bg); }
.chat-inline-room .chat-form input, .chat-inline-room .chat-form textarea { border-color: var(--text); border-radius: 0; background: var(--surface); }
.chat-inline-room .chat-message { border-radius: 0; }
.chat-inline-room .chat-empty { min-height: 260px; }
.chat-inline-room .chat-status { min-height: 20px; }
.chat-message { animation: chat-message-in .42s cubic-bezier(.22, 1, .36, 1) both; }

/* Subtle motion layer: feedback, atmosphere, and state change only. */
.ambient-one { animation: ambient-drift-one 18s ease-in-out infinite alternate; }
.ambient-two { animation: ambient-drift-two 23s ease-in-out infinite alternate; }
.brand-mark { transition: transform .28s cubic-bezier(.22, 1, .36, 1), background-color .28s ease, color .28s ease; }
.brand:hover .brand-mark, .brand:focus-visible .brand-mark { transform: rotate(-6deg) scale(1.06); background: var(--blue); color: var(--text); }
.site-nav a:not(.nav-contact) { position: relative; }
.site-nav a:not(.nav-contact)::after { position: absolute; right: 0; bottom: -6px; left: 0; height: 2px; background: var(--lime); content: ""; transform: scaleX(0); transform-origin: right; transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.site-nav a:not(.nav-contact):hover::after, .site-nav a:not(.nav-contact):focus-visible::after { transform: scaleX(1); transform-origin: left; }
.hero h1 span, .section-intro h2 span, .about-section h2 span { display: inline-block; transition: transform .45s cubic-bezier(.22, 1, .36, 1), color .3s ease; }
.hero h1:hover span, .section-intro h2:hover span, .about-section h2:hover span { transform: translateX(7px); }
.signal-inner span { transition: color .25s ease, background-color .25s ease, transform .25s ease; }
.signal-inner span:hover { background: rgba(37,99,235,.08); color: var(--text); transform: translateX(4px); }
.scroll-note span { animation: scroll-pulse 2.8s ease-in-out infinite; }

@keyframes ambient-drift-one { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(36px, 22px, 0) scale(1.08); } }
@keyframes ambient-drift-two { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-28px, 24px, 0) scale(1.06); } }
@keyframes scroll-pulse { 0%, 100% { opacity: .45; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.18); } }
@keyframes chat-message-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .chat-inline { grid-template-columns: 1fr; gap: 42px; }
  .chat-inline-intro { max-width: 680px; }
  .chat-inline-room.chat-panel { min-height: 600px; }
}

@media (max-width: 680px) {
  .chat-inline { gap: 30px; }
  .chat-inline-intro p { font-size: 15px; }
  .chat-inline-room.chat-panel { min-height: 560px; box-shadow: 7px 7px 0 var(--blue); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-one, .ambient-two, .scroll-note span, .chat-message { animation: none; }
  .brand-mark, .site-nav a:not(.nav-contact)::after, .hero h1 span, .section-intro h2 span, .about-section h2 span, .signal-inner span { transition: none; }
}

/* Piyu is a lightweight, event-driven pixel companion with a bounded pointer follow. */
.piyu-companion { position: fixed; z-index: 19; right: clamp(16px, 3vw, 42px); bottom: clamp(16px, 3vw, 30px); display: grid; justify-items: end; gap: 8px; pointer-events: none; }
.piyu-companion-button { position: relative; width: 78px; height: 78px; display: grid; place-items: center; padding: 0; border: 2px solid var(--text); border-radius: 18px 18px 8px 18px; background: var(--lime); box-shadow: 6px 6px 0 var(--blue); pointer-events: auto; transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, background-color .28s ease; }
.piyu-companion-button:hover, .piyu-companion-button:focus-visible { transform: translate(-3px, -4px) rotate(-2deg); box-shadow: 9px 10px 0 var(--blue); }
.piyu-companion-button:active { transform: translate(1px, 1px); box-shadow: 4px 4px 0 var(--blue); }
.companion-mascot { width: 68px; height: 68px; overflow: visible; image-rendering: pixelated; }
.companion-body { transform-box: fill-box; transform-origin: center bottom; animation: companion-idle 3.8s steps(4, end) infinite; }
.piyu-companion.is-speaking .companion-body { animation: companion-talk .58s steps(3, end) 2; }
.piyu-companion:hover .companion-body, .piyu-companion-button:focus-visible .companion-body { animation: companion-bop .7s steps(3, end) 1; }
.pixel-outline { fill: #10141c; }
.pixel-blue { fill: var(--blue); }
.pixel-blue-dark { fill: #101b32; }
.pixel-lime { fill: var(--lime); }
.pixel-face { fill: var(--surface); }
.pixel-shadow { fill: rgba(16,20,28,.55); }
.companion-ping { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border: 2px solid var(--lime); border-radius: 50%; background: #4bd58a; box-shadow: 0 0 0 3px var(--text); }
.companion-bubble { width: min(260px, calc(100vw - 34px)); padding: 11px 12px; border: 1px solid var(--text); border-radius: 13px 13px 3px 13px; background: var(--surface); color: var(--text); box-shadow: 4px 4px 0 var(--blue); font-size: 12px; line-height: 1.35; opacity: .96; transform-origin: bottom right; transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s ease, background-color .3s ease, color .3s ease; }
.piyu-companion.is-speaking .companion-bubble { animation: companion-bubble-pop .48s cubic-bezier(.22,1,.36,1) both; }
.companion-cta { display: block; margin-top: 8px; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--blue); font-family: monospace; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; pointer-events: auto; }
.companion-cta:hover, .companion-cta:focus-visible { color: var(--text); }
@keyframes companion-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes companion-talk { 0%, 100% { transform: translateY(0) rotate(0); } 33% { transform: translateY(-2px) rotate(-2deg); } 66% { transform: translateY(1px) rotate(2deg); } }
@keyframes companion-bop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes companion-bubble-pop { 0% { opacity: .55; transform: translateY(5px) scale(.97); } 100% { opacity: .96; transform: translateY(0) scale(1); } }
@media (max-width: 680px) {
  .piyu-companion { right: 12px; bottom: 14px; }
  .piyu-companion-button { width: 66px; height: 66px; border-radius: 15px 15px 7px 15px; box-shadow: 5px 5px 0 var(--blue); }
  .companion-mascot { width: 58px; height: 58px; }
  .companion-bubble { width: min(220px, calc(100vw - 30px)); font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .companion-body, .piyu-companion.is-speaking .companion-body, .piyu-companion:hover .companion-body { animation: none; }
  .piyu-companion.is-speaking .companion-bubble { animation: none; }
  .piyu-companion-button, .companion-bubble { transition: none; }
}

/* Calm project grid: same click-to-inspect idea, without an auto-playing reel. */
.project-board { margin-top: 64px; padding: 28px; border: 1px solid var(--line-strong); background: var(--surface); }
.project-board-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.project-board-head span:last-child { color: var(--blue); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.project-card { position: relative; min-height: 330px; overflow: hidden; perspective: 1000px; border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; transition: transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s ease, border-color .32s ease; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-5px); border-color: var(--blue); box-shadow: 8px 8px 0 rgba(37,99,235,.18); }
.project-card-front, .project-card-back { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; backface-visibility: hidden; transition: transform .55s cubic-bezier(.22,1,.36,1), background-color .3s ease; }
.project-card-front { transform: rotateY(0); }
.project-card-back { justify-content: flex-start; background: var(--surface-2); transform: rotateY(180deg); }
.project-card.is-flipped .project-card-front { transform: rotateY(-180deg); }
.project-card.is-flipped .project-card-back { transform: rotateY(0); }
.project-card-index, .project-back-number { color: var(--blue); font-family: var(--display); font-size: 56px; line-height: .8; letter-spacing: -.08em; }
.project-card-kicker, .project-back-kicker { margin-top: 34px; color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.project-card h3, .project-card-back strong { max-width: 440px; margin: auto 0 14px; color: var(--text); font-family: var(--display); font-size: clamp(26px, 3vw, 42px); line-height: .96; letter-spacing: -.07em; font-weight: 600; }
.project-card p, .project-back-copy { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.project-card-foot, .project-back-foot { margin-top: auto; color: var(--blue); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.project-back-number { position: absolute; top: 26px; right: 28px; color: var(--blue); opacity: .35; }
.project-back-kicker { margin-top: 0; }
.project-card-back strong { margin-top: 32px; }
.project-back-tags { margin-top: 24px; color: var(--text); font-family: monospace; font-size: 11px; }
.project-back-link { margin-top: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--blue); color: var(--blue); font-family: monospace; font-size: 11px; text-transform: uppercase; }
.project-back-link:hover, .project-back-link:focus-visible { color: var(--text); border-color: var(--text); }

/* Show the complete toolkit in responsive rows; no duplicated marquee track. */
.stack-note { color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.stack-marquee { overflow: visible; margin-top: 30px; }
.stack-track { display: block; width: auto; animation: none; will-change: auto; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; white-space: normal; }
.stack-chips span { flex: 0 0 auto; }

/* Live previews use the real game surfaces, with a small readable overlay. */
.game-card { border: 1px solid var(--line-strong); background: var(--surface); box-shadow: none; transition: transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s ease, border-color .32s ease; }
.game-card:hover, .game-card:focus-within { transform: translateY(-5px); border-color: var(--blue); box-shadow: 8px 8px 0 rgba(37,99,235,.18); }
.game-art.game-preview { min-height: 270px; background: #0d111a; border-bottom: 1px solid var(--line-strong); }
.game-preview iframe { position: relative; z-index: 1; display: block; width: 100%; height: 270px; border: 0; background: #0d111a; }
.game-preview .game-art-label, .game-live-badge { position: absolute; z-index: 2; top: 14px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(13,17,26,.82); color: #fff; font-family: monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; text-shadow: none; pointer-events: none; }
.game-preview .game-art-label { left: 14px; }
.game-live-badge { right: 14px; color: var(--lime); }
.game-card-copy { padding: 22px 20px 24px; }
.game-card-copy h3 { margin-bottom: 10px; }
.game-card-copy p { max-width: 320px; }
.game-card-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--blue); color: var(--blue); font-family: monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.game-card-link:hover, .game-card-link:focus-visible { color: var(--text); border-color: var(--text); }

/* Desktop Piyu follows the pointer with a bounded, smooth offset; touch stays anchored. */
@media (pointer: fine) {
  .piyu-companion { right: auto; bottom: auto; left: 0; top: 0; --piyu-x: calc(100vw - 108px); --piyu-y: calc(100vh - 128px); transform: translate3d(var(--piyu-x), var(--piyu-y), 0); transition: transform .34s cubic-bezier(.22,1,.36,1); }
}
@media (max-width: 960px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 300px; }
}
@media (max-width: 680px) {
  .project-board { margin-top: 46px; padding: 18px; }
  .project-board-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .project-card-front, .project-card-back { padding: 22px; }
  .project-card h3, .project-card-back strong { font-size: 31px; }
  .stack-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stack-note { font-size: 9px; }
  .game-art.game-preview, .game-preview iframe { min-height: 240px; height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card, .project-card-front, .project-card-back, .game-card, .piyu-companion { transition: none; }
  .project-card:hover, .project-card:focus-visible, .game-card:hover, .game-card:focus-within { transform: none; box-shadow: none; }
}

/* Persistent utilities stay reachable without competing with the assistant drawer. */
.utility-dock { position: fixed; z-index: 23; left: clamp(14px, 2.4vw, 30px); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; gap: 9px; justify-items: start; }
.utility-dock { left: auto; right: clamp(14px, 2.4vw, 30px); justify-items: end; }
.utility-button { min-height: 44px; border: 1px solid var(--text); background: var(--surface); color: var(--text); box-shadow: 4px 4px 0 var(--blue); font-size: 12px; font-weight: 700; transition: transform .2s ease, background-color .2s ease, opacity .2s ease, visibility .2s ease; }
.utility-button:hover, .utility-button:focus-visible { transform: translate(-2px, -2px); background: var(--blue); color: #07101f; }
.utility-piyu { padding: 10px 14px; }
.utility-top { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; opacity: 0; visibility: hidden; transform: translateY(8px); }
.utility-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.utility-top svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Chapter colors: each section shifts the atmosphere while sharing the same blue/lime signal. */
.about-section { background: #111a2a; }
.capabilities-section { background: #19213a; }
.work-section { background: #0d1727; }
.games-section { background: #152633; }
.stack-section { background: #101a2f; }
.experience-section { background: #17223b; }
.chat-section { background: #10252c; }
.contact-section { background: #17253a; }
.section-intro > p, .about-copy > p:not(.about-lede) { color: #c4cfdf; }
[data-theme="light"] .about-section { background: #e7eefb; }
[data-theme="light"] .capabilities-section { background: #eef3ff; }
[data-theme="light"] .work-section { background: #e7effb; }
[data-theme="light"] .games-section { background: #edf5f4; }
[data-theme="light"] .stack-section { background: #e8effd; }
[data-theme="light"] .stack-flow { border-color: rgba(16,32,55,.18); }
[data-theme="light"] .stack-flow-row span, [data-theme="light"] .stack-chips span { border-color: rgba(16,32,55,.3); color: #1d3557; background: rgba(255,255,255,.36); }
[data-theme="light"] .stack-flow-row span:hover, [data-theme="light"] .stack-flow-row span:focus-visible, [data-theme="light"] .stack-chips span:hover { color: #174ea6; border-color: #2563eb; background: rgba(37,99,235,.1); }
[data-theme="light"] .experience-section { background: #f1f1ed; }
[data-theme="light"] .chat-section { background: #eaf5f2; }
[data-theme="light"] .contact-section { background: #e9effb; }
[data-theme="light"] .section-intro > p, [data-theme="light"] .about-copy > p:not(.about-lede) { color: #40516b; }

/* The panel uses the viewport as its layout boundary at every aspect ratio. */
.piyu-panel { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.piyu-panel .chat-messages { min-height: 0; }
.piyu-panel .chat-form { flex: 0 0 auto; }
.piyu-panel .chat-messages, .piyu-panel .chat-form { min-width: 0; }
.piyu-panel .chat-messages { flex: 1 1 auto; min-height: 220px; }
.piyu-panel .chat-form { padding: 12px 16px 14px; }
.piyu-panel .chat-form textarea { min-height: 58px; }
.piyu-panel .chat-message { max-width: 100%; }
.piyu-panel-status { box-sizing: border-box; width: 100%; flex: 0 0 auto; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.piyu-limit-note { margin: 8px 0 0; color: var(--muted); font-family: monospace; font-size: 9px; line-height: 1.4; }
.piyu-companion { right: auto; left: clamp(14px, 2.4vw, 30px); bottom: calc(92px + env(safe-area-inset-bottom)); transform: none !important; transition: none; }
@media (max-width: 680px) {
  .utility-dock { left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .piyu-panel { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .piyu-panel .chat-panel-head { padding: 20px 16px 16px; }
  .piyu-panel .chat-notice { margin: 10px 12px; }
  .piyu-panel .chat-messages { padding-inline: 12px; }
  .piyu-panel .chat-message { max-width: 92%; }
  .piyu-panel .chat-messages { min-height: 180px; }
  .piyu-panel .chat-form { padding: 14px 12px max(12px, env(safe-area-inset-bottom)); }
  .piyu-companion { left: 12px; bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .utility-button, .utility-top { transition: none; }
}

/* Dark mode: quiet surfaces and ink-like controls keep the lime accent readable. */
[data-theme="dark"] .mini-button { color: #0b0d12; }
[data-theme="dark"] .project-card { background: #121722; }
[data-theme="dark"] .project-card-back { background: #182131; }
[data-theme="dark"] .project-board { background: #0f141d; }
[data-theme="dark"] .stack-section { background: #080b11; }
[data-theme="dark"] .stack-chips span { border-color: rgba(245,247,251,.18); color: #dbe2ee; }
[data-theme="dark"] .stack-chips span:hover { border-color: var(--blue); background: rgba(119,166,255,.12); color: var(--text); }
[data-theme="dark"] .game-card { background: #121722; }
[data-theme="dark"] .game-art.game-preview { border-bottom-color: rgba(245,247,251,.22); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .mini-button { color: #0b0d12; }
  :root:not([data-theme]) .project-card { background: #121722; }
  :root:not([data-theme]) .project-card-back { background: #182131; }
  :root:not([data-theme]) .project-board { background: #0f141d; }
  :root:not([data-theme]) .stack-section { background: #080b11; }
  :root:not([data-theme]) .stack-chips span { border-color: rgba(245,247,251,.18); color: #dbe2ee; }
  :root:not([data-theme]) .stack-chips span:hover { border-color: var(--blue); background: rgba(119,166,255,.12); color: var(--text); }
  :root:not([data-theme]) .game-card { background: #121722; }
  :root:not([data-theme]) .game-art.game-preview { border-bottom-color: rgba(245,247,251,.22); }
}

/* Current pass: a fixed wayfinding rail, capabilities, gallery filters, grouped stack, and a real signal form. */
body { padding-top: 76px; }
.topbar { position: fixed; inset: 0 0 auto; width: 100%; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: clamp(42px, 8vw, 112px); }
.about-copy h2 { max-width: 660px; margin: 0 0 34px; font-family: var(--display); font-size: clamp(52px, 7vw, 92px); line-height: .9; letter-spacing: -.075em; font-weight: 600; }
.about-copy h2 span { color: var(--blue); }
.about-copy .eyebrow { margin-bottom: 24px; }
.profile-frame { width: min(100%, 500px); margin: 0 auto; }
.profile-hologram { position: relative; aspect-ratio: 4 / 5; min-height: 0; max-height: 560px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line-strong); background: #111; isolation: isolate; }
.profile-hologram::before { position: absolute; inset: 16px; border: 1px solid rgba(215,255,79,.55); content: ""; opacity: .7; }
.profile-portrait { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 0; display: block; object-fit: cover; object-position: center 24%; filter: grayscale(1) contrast(1.08); transition: transform .45s cubic-bezier(.22,1,.36,1), filter .45s ease; }
.profile-hologram:hover .profile-portrait, .profile-hologram:focus-within .profile-portrait { transform: scale(1.035); filter: grayscale(1) contrast(1.16) brightness(1.08); }
.profile-grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); opacity: .42; }
.profile-grid-lines::after { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.2), transparent 38%), linear-gradient(110deg, transparent 0 42%, rgba(215,255,79,.24) 49%, transparent 56%); content: ""; }
.profile-silhouette { position: relative; z-index: 1; width: min(52%, 210px); aspect-ratio: .74; border: 1px solid rgba(255,255,255,.78); border-radius: 48% 48% 24% 24%; background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(130,137,148,.2) 43%, rgba(255,255,255,.7)); filter: grayscale(1); opacity: .8; box-shadow: 0 0 0 14px rgba(255,255,255,.04), 0 0 40px rgba(215,255,79,.22); }
.profile-silhouette::before { position: absolute; top: 12%; left: 26%; width: 48%; aspect-ratio: 1; border: 1px solid #111; border-radius: 50%; background: rgba(17,17,17,.7); content: ""; }
.profile-silhouette::after { position: absolute; right: 15%; bottom: 0; left: 15%; height: 48%; border-radius: 50% 50% 0 0; background: rgba(17,17,17,.75); content: ""; }
.profile-silhouette span, .profile-silhouette i { position: absolute; z-index: 2; display: block; width: 1px; background: #111; content: ""; }
.profile-silhouette span { top: 34%; left: 31%; height: 8px; box-shadow: 62px 0 #111; }
.profile-silhouette i { top: 47%; left: 45%; height: 14px; transform: rotate(12deg); }
.profile-placeholder { position: absolute; z-index: 3; right: 24px; bottom: 23px; display: grid; gap: 4px; color: #fff; font-family: monospace; text-align: right; text-transform: uppercase; }
.profile-placeholder strong { color: var(--lime); font-family: var(--display); font-size: 22px; letter-spacing: -.04em; }
.profile-placeholder span, .profile-frame figcaption { color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.profile-frame figcaption { margin-top: 14px; }

.capabilities-section { background: var(--surface-2); }
.capabilities-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 58px; }
.capability-card { position: relative; min-height: 350px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line-strong); background: var(--surface); transition: transform .3s cubic-bezier(.22,1,.36,1), background-color .3s ease, box-shadow .3s ease; }
.capability-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: var(--blue); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.22,1,.36,1); }
.capability-card.capability-lime::after { background: var(--lime); }
.capability-card:hover, .capability-card:focus-within { transform: translateY(-7px); background: var(--surface-2); box-shadow: 0 18px 40px rgba(17,17,17,.12); }
.capability-card:hover::after, .capability-card:focus-within::after { transform: scaleX(1); }
.capability-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.capability-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--blue); }
.capability-lime .capability-icon { color: var(--blue-strong); }
.capability-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.capability-card h3 { margin: 42px 0 13px; font-family: var(--display); font-size: clamp(24px, 2.1vw, 32px); line-height: .98; letter-spacing: -.06em; }
.capability-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.capability-card ul { display: grid; gap: 8px; margin: auto 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--text); font-size: 13px; }
.capability-card li::before { margin-right: 8px; color: var(--blue); content: "↳"; }
.capability-lime li::before { color: var(--blue-strong); }

.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.project-filter { min-height: 42px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted); font-family: monospace; font-size: 11px; transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease; }
.project-filter:hover, .project-filter:focus-visible { transform: translateY(-2px); border-color: var(--blue); color: var(--text); }
.project-filter[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #07101f; }
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.project-card:nth-child(n) { grid-column: auto; }
.project-card:nth-child(n) { min-height: 570px; }
.project-card[hidden] { display: none; }

.stack-section { background: var(--ink-surface); }
.stack-head { align-items: end; }
.stack-head h2 { margin: 16px 0 0; color: var(--on-ink); font-family: var(--display); font-size: clamp(46px, 6vw, 74px); line-height: .9; letter-spacing: -.08em; }
.stack-head h2 span { color: var(--blue); }
.stack-view-switcher { display: inline-flex; border: 1px solid rgba(255,255,255,.22); }
.stack-view-switcher button { width: 46px; min-height: 42px; display: grid; place-items: center; padding: 8px; border: 0; border-right: 1px solid rgba(255,255,255,.22); background: transparent; color: rgba(255,255,255,.7); }
.stack-view-switcher button:last-child { border-right: 0; }
.stack-view-switcher button:hover, .stack-view-switcher button:focus-visible { color: var(--on-ink); background: rgba(119,166,255,.12); }
.stack-view-switcher button[aria-pressed="true"] { background: var(--lime); color: #07101f; }
.stack-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 48px; margin-top: 58px; }
.stack-panels[hidden], .stack-flow[hidden] { display: none; }
.stack-group { padding-top: 17px; border-top: 1px solid rgba(255,255,255,.2); }
.stack-group-heading { display: flex; align-items: center; gap: 13px; color: var(--on-ink); font-family: monospace; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.stack-group-heading span { color: var(--lime); }
.stack-group-heading strong { font-weight: 500; }
.stack-group .stack-chips { margin-top: 18px; }
.stack-group .stack-chips span { border-radius: 999px; }
.stack-flow { overflow: hidden; margin-top: 58px; border-block: 1px solid rgba(255,255,255,.2); mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%); }
.stack-flow-track { display: flex; width: max-content; animation: stack-flow 62s linear infinite; will-change: transform; }
.stack-flow-track.is-paused { animation-play-state: paused; }
.stack-flow-row { display: flex; flex-shrink: 0; gap: 10px; padding: 16px 10px 16px 0; }
.stack-flow-row span { flex: 0 0 auto; padding: 9px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: rgba(255,255,255,.84); font-family: monospace; font-size: 13px; outline: 0; transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease; }
.stack-flow-row span:hover, .stack-flow-row span:focus-visible { border-color: var(--lime); background: rgba(215,255,79,.1); color: var(--lime); transform: translateY(-2px); }
@keyframes stack-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Keep the stack view controls legible on the light surface too. */
[data-theme="light"] .stack-view-switcher { border-color: rgba(16,32,55,.28); background: rgba(255,255,255,.5); }
[data-theme="light"] .stack-view-switcher button { border-right-color: rgba(16,32,55,.22); color: #27415f; }
[data-theme="light"] .stack-view-switcher button:hover, [data-theme="light"] .stack-view-switcher button:focus-visible { color: #174ea6; background: rgba(37,99,235,.1); }
[data-theme="light"] .stack-view-switcher button[aria-pressed="true"] { background: var(--lime); color: #07101f; }

/* Keep the primary hero CTA visibly interactive in every theme. */
.hero-actions .button-primary { cursor: pointer; }
.hero-actions .button-primary:hover, .hero-actions .button-primary:focus-visible { border-color: var(--text); background: var(--lime); color: var(--text); transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--text); }

.contact-card { padding: 42px; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(125deg, #0e1c30 0%, #121b2a 54%, #1a1017 100%); box-shadow: 0 24px 60px rgba(15,24,42,.2); }
.contact-card::before { inset: 18px; border-color: rgba(194,217,255,.18); border-radius: 15px; background-image: linear-gradient(rgba(194,217,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(194,217,255,.08) 1px, transparent 1px); background-size: 28px 28px; }
.contact-section { scroll-margin-top: 96px; }
.contact-grid-form { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 82px); align-items: start; margin-top: 40px; }
.contact-copy, .contact-form { min-width: 0; }
.contact-copy h2 { max-width: 640px; font-size: clamp(58px, 7vw, 100px); text-wrap: balance; }
.contact-copy h2 span { color: var(--blue); }
.contact-copy p { max-width: 470px; margin-top: 28px; }
.contact-copy .contact-email { margin-top: 36px; border-radius: 12px; }
.social-links { display: flex; gap: 12px; margin-top: 24px; }
.social-link { width: 86px; height: 86px; display: grid; place-items: center; border: 1px solid rgba(194,217,255,.58); border-radius: 18px; color: #fff; background: transparent; transition: transform .24s ease, color .24s ease, border-color .24s ease, background-color .24s ease; }
.social-linkedin { background: transparent; border-color: rgba(255,255,255,.62); border-radius: 18px; }
.social-github { background: transparent; border-color: rgba(255,255,255,.62); }
.linkedin-mark { display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: 35px; font-weight: 700; line-height: 1; letter-spacing: -2px; color: #fff; transform: translate(-1px, -1px); }
.social-link:hover, .social-link:focus-visible { transform: translateY(-4px); border-color: var(--lime); background: rgba(215,255,79,.1); color: var(--lime); }
.social-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.social-github svg { width: 30px; height: 30px; }
.social-link:not(.social-linkedin):not(.social-github) svg { width: 32px; height: 32px; stroke-width: 2.3; }
.social-link:not(.social-linkedin):not(.social-github) { background: rgba(255,255,255,.04); }
.social-instagram { border-color: rgba(255,255,255,.46); background: rgba(255,255,255,.06); }
.social-tiktok { border-color: rgba(255,255,255,.4); background: #161b25; }
.social-tiktok .tiktok-cyan { stroke: #25f4ee; transform: translate(-.8px, .5px); }
.social-tiktok .tiktok-pink { stroke: #fe2c55; transform: translate(.8px, -.5px); }
.social-tiktok svg path:last-child { stroke: #fff; }
.social-link svg.brand-icon { fill: currentColor; stroke: none; }
.social-link .icon-fill { fill: currentColor; stroke: none; }
.contact-form { padding-left: 0; border-left: 0; }
.contact-form-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.contact-form-heading h3 { margin: 8px 0 0; color: #fff; font-family: var(--display); font-size: clamp(26px, 3vw, 42px); letter-spacing: -.06em; text-transform: uppercase; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.field { display: grid; gap: 7px; }
.field span { color: rgba(236,242,255,.65); font-family: monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; padding: 15px 16px; border: 1px solid rgba(194,217,255,.24); border-radius: 12px; outline: 0; background: rgba(8,12,21,.35); color: #fff; font-size: 15px; transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease; }
.field input::placeholder, .field textarea::placeholder { color: rgba(236,242,255,.45); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9db4d7 50%), linear-gradient(135deg, #9db4d7 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; }
.field select option { background: #121b2a; color: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: rgba(37,99,235,.12); box-shadow: 0 0 0 3px rgba(120,169,255,.13); }
.field-message { grid-column: 1 / -1; }
.field textarea { min-height: 142px; resize: vertical; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.contact-submit { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 14px 20px 14px 24px; border: 0; border-radius: 12px; background: linear-gradient(100deg, #77a6ff, #9bc1ff); color: #07101f; font-family: monospace; font-size: 15px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; transition: transform .24s ease, filter .24s ease, box-shadow .24s ease; }
.contact-submit:hover, .contact-submit:focus-visible { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 12px 26px rgba(37,99,235,.25); }
.contact-submit:disabled { cursor: wait; opacity: .62; transform: none; }
.contact-form-note { margin: 14px 0 0; color: rgba(236,242,255,.5); font-family: monospace; font-size: 10px; }
.contact-form .contact-copy-status { margin-top: 9px; }

@media (max-width: 960px) {
  .capabilities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-layout { grid-template-columns: 1fr; }
  .profile-frame { width: min(100%, 500px); }
  .project-card:nth-child(n) { grid-column: span 6; }
  .contact-grid-form { grid-template-columns: 1fr; gap: 52px; }
  .contact-form { max-width: none; }
}
@media (max-width: 680px) {
  body { padding-top: 66px; }
  .capabilities-grid, .stack-panels, .project-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 320px; }
  .project-card:nth-child(n) { grid-column: auto; }
  .project-card:nth-child(1), .project-card:nth-child(2) { min-height: 340px; }
  .profile-frame { width: min(100%, 360px); }
  .profile-hologram { aspect-ratio: 4 / 5; }
  .stack-head { align-items: flex-start; }
  .stack-view-switcher { margin-top: 14px; }
  .contact-section { scroll-margin-top: 76px; }
  .contact-card { padding: 30px 20px; }
  .contact-grid-form { gap: 44px; }
  .contact-form-grid { grid-template-columns: 1fr; }
  .field-message { grid-column: auto; }
  .contact-copy h2 { font-size: clamp(54px, 15vw, 80px); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-scanline, .stack-flow-track { animation: none; }
  .capability-card, .project-filter, .social-link, .contact-submit, .stack-flow-row span { transition: none; }
}

[data-theme="dark"] .capabilities-section { background: #101722; }
[data-theme="dark"] .capability-card { background: #151d2a; }
[data-theme="dark"] .capability-card:hover, [data-theme="dark"] .capability-card:focus-within { background: #1b2637; }
[data-theme="dark"] .about-section, [data-theme="dark"] .experience-section { background: #0b0d12; }
[data-theme="dark"] .profile-hologram { background: #07090d; }
[data-theme="dark"] .project-board { background: #101722; }
[data-theme="dark"] .contact-card { background: linear-gradient(125deg, #0e1c30 0%, #121b2a 54%, #1a1017 100%); }
[data-theme="dark"] .theme-switcher button[aria-pressed="true"], [data-theme="dark"] .stack-view-switcher button[aria-pressed="true"] { color: #07101f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .capabilities-section { background: #101722; }
  :root:not([data-theme]) .capability-card { background: #151d2a; }
  :root:not([data-theme]) .capability-card:hover, :root:not([data-theme]) .capability-card:focus-within { background: #1b2637; }
  :root:not([data-theme]) .about-section, :root:not([data-theme]) .experience-section { background: #0b0d12; }
  :root:not([data-theme]) .profile-hologram { background: #07090d; }
  :root:not([data-theme]) .project-board { background: #101722; }
  :root:not([data-theme]) .theme-switcher button[aria-pressed="true"], :root:not([data-theme]) .stack-view-switcher button[aria-pressed="true"] { color: #07101f; }
}

/* Project gallery: preview-led cards with a clear role, stack, and next action. */
.project-board { padding: 28px; border: 1px solid rgba(245,247,251,.22); border-radius: 22px; background: #101114; color: #f5f7fb; }
.project-board-head { color: rgba(245,247,251,.68); }
.project-board-head span:last-child { color: var(--lime); }
.project-grid { gap: 28px; margin-top: 30px; }
.project-card { min-height: 570px; border: 1px dashed rgba(245,247,251,.3); border-radius: 18px; background: #101114; color: #f5f7fb; box-shadow: none; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-5px); border-color: var(--blue); background: #141820; box-shadow: 0 16px 34px rgba(0,0,0,.2); }
.project-card-front { padding: 12px; }
.project-card-back { padding: 28px; border-radius: 17px; background: #182131; color: #f5f7fb; }
.project-card:not(.is-flipped) { display: flex; flex-direction: column; padding: 12px; }
.project-card:not(.is-flipped) .project-card-copy { display: contents; }
.project-card:not(.is-flipped) .project-card-top { order: 1; flex: none; padding: 8px 0 14px; }
.project-card:not(.is-flipped) .project-preview { order: 2; width: 100%; }
.project-card:not(.is-flipped) h3 { order: 3; flex: none; margin: 20px 0 9px; }
.project-card:not(.is-flipped) p { order: 4; flex: none; }
.project-card:not(.is-flipped) .project-tech { order: 5; flex: none; }
.project-card:not(.is-flipped) .project-card-foot,
.project-card:not(.is-flipped) .project-card-actions { order: 6; margin-top: auto; }
.project-preview { position: relative; min-height: 194px; flex: 0 0 194px; overflow: hidden; padding: 14px; border: 1px solid rgba(8,12,21,.3); border-radius: 12px; color: #0c111b; background: #e6ebf5; }
.project-preview-recruitment { background: #d9e5ff; }
.project-preview-openclaw { background: #d7ff4f; }
.project-preview-meta { background: #dce6ff; }
.project-preview-marketing { background: #ffe0c8; }
.project-preview-sales { background: #d8f1e4; }
.project-preview-branch { background: #e1e6ef; }
.project-preview-media { background: #e6e0ff; }
.project-preview-roar { background: #eadbce; }
.project-preview-branch { padding: 0; background: #111; }
.project-preview-branch img { display: block; width: 100%; height: 100%; min-height: 194px; object-fit: contain; object-position: center; }
.project-preview-roar { padding: 0; background: #111; }
.project-preview-roar img { display: block; width: 100%; height: 100%; min-height: 194px; object-fit: contain; object-position: center; }
.project-preview-media { padding: 0; background: #111; }
.project-preview-media img { display: block; width: 100%; height: 100%; min-height: 194px; object-fit: contain; object-position: center; }
.project-preview-recruitment, .project-preview-openclaw { padding: 0; background: #111; }
.project-preview-recruitment img, .project-preview-openclaw img { display: block; width: 100%; height: 100%; min-height: 194px; object-fit: cover; object-position: center; }
.project-preview img { display: block; margin: 0 auto; object-position: 50% 50%; }
.project-preview-image-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.62)); pointer-events: none; }
.project-preview-image-label { position: absolute; right: 14px; bottom: 14px; left: 14px; color: #fff; font-family: monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.preview-browser { display: flex; align-items: center; gap: 5px; height: 22px; padding-bottom: 8px; border-bottom: 1px solid rgba(8,12,21,.2); font-family: monospace; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.preview-browser > span { width: 6px; height: 6px; border-radius: 50%; background: #111820; opacity: .55; }
.preview-browser b { margin-left: auto; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.preview-screen { position: relative; height: calc(100% - 22px); padding-top: 16px; }
.preview-rail { width: 15%; height: 100%; border-radius: 4px; background: rgba(13,22,38,.22); }
.preview-panel { position: absolute; inset: 16px 8% 10px 25%; display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid rgba(13,22,38,.22); border-radius: 7px; background: rgba(255,255,255,.56); }
.preview-panel i { width: 42%; height: 8px; border-radius: 99px; background: #2563eb; }
.preview-panel strong, .preview-post strong, .preview-quote strong, .preview-library strong, .preview-roar-title strong { font-family: var(--display); font-size: 16px; letter-spacing: -.05em; }
.preview-panel small, .preview-post small, .preview-quote small, .preview-library small, .preview-roar-title small { color: rgba(13,22,38,.66); font-size: 9px; }
.preview-panel em { width: 82%; height: 5px; border-radius: 99px; background: rgba(13,22,38,.16); }
.preview-panel em:last-child { width: 58%; }
.preview-orbit { position: absolute; top: 22%; left: 28%; width: 105px; height: 60px; border: 1px solid rgba(13,22,38,.5); border-radius: 50%; transform: rotate(-18deg); }
.preview-orbit.orbit-two { top: 7%; left: 42%; width: 72px; height: 100px; border-color: rgba(37,99,235,.7); transform: rotate(28deg); }
.preview-core { position: absolute; top: 35%; left: 45%; display: grid; width: 52px; height: 52px; place-items: center; border: 2px solid #111820; border-radius: 50%; background: #2563eb; color: #d7ff4f; font-family: monospace; font-size: 9px; font-weight: 700; }
.preview-screen > small { position: absolute; right: 4%; bottom: 10%; font-family: monospace; font-size: 8px; text-transform: uppercase; }
.preview-bars { position: absolute; right: 12%; bottom: 16%; left: 9%; display: flex; align-items: end; gap: 10px; height: 92px; border-bottom: 1px solid rgba(13,22,38,.3); }
.preview-bars i { flex: 1; height: 40%; border-radius: 5px 5px 0 0; background: #2563eb; }
.preview-bars i:nth-child(2) { height: 64%; }.preview-bars i:nth-child(3) { height: 48%; }.preview-bars i:nth-child(4) { height: 82%; }.preview-bars i:nth-child(5) { height: 70%; background: #111820; }
.preview-metric { position: absolute; top: 15%; right: 8%; display: grid; gap: 2px; padding: 10px; border: 1px solid rgba(13,22,38,.25); background: rgba(255,255,255,.55); }
.preview-metric strong { color: #2563eb; font-family: var(--display); font-size: 23px; letter-spacing: -.06em; }.preview-metric small { font: 8px monospace; text-transform: uppercase; }
.preview-post, .preview-quote, .preview-library { position: absolute; top: 18%; left: 12%; display: grid; gap: 7px; width: 62%; padding: 16px; border: 1px solid rgba(13,22,38,.25); background: rgba(255,255,255,.6); }
.preview-post em { width: fit-content; margin-top: 5px; padding: 5px 8px; border-radius: 99px; background: #d7ff4f; font: 8px monospace; text-transform: uppercase; }
.preview-steps { position: absolute; right: 8%; bottom: 18%; left: 12%; display: flex; align-items: center; justify-content: space-between; }.preview-steps::before { position: absolute; right: 0; left: 0; height: 1px; background: rgba(13,22,38,.3); content: ""; }.preview-steps i { z-index: 1; width: 13px; height: 13px; border: 2px solid #111820; border-radius: 50%; background: #d8f1e4; }
.preview-flow { position: absolute; top: 37%; right: 10%; left: 10%; display: flex; align-items: center; justify-content: space-between; }.preview-flow::before { position: absolute; right: 0; left: 0; height: 2px; background: #2563eb; content: ""; }.preview-flow i { z-index: 1; width: 24px; height: 24px; border: 2px solid #111820; border-radius: 6px; background: #d8f1e4; }.preview-flow i:nth-child(2) { background: #2563eb; }.preview-flow i:nth-child(3) { background: #d7ff4f; }.preview-quote { top: 61%; left: 25%; width: 56%; padding: 9px 12px; }
.preview-table { position: absolute; top: 22%; right: 9%; left: 9%; display: grid; gap: 9px; padding: 13px; border: 1px solid rgba(13,22,38,.24); background: rgba(255,255,255,.55); }.preview-table i { height: 7px; border-radius: 99px; background: rgba(13,22,38,.2); }.preview-table i:first-child { width: 62%; background: #2563eb; }.preview-table i:last-child { width: 44%; }
.preview-status { position: absolute; right: 11%; bottom: 17%; display: grid; gap: 2px; }.preview-status strong { color: #2563eb; font-family: var(--display); font-size: 32px; letter-spacing: -.09em; }.preview-status small { font: 8px monospace; text-transform: uppercase; }
.preview-catalog { position: absolute; top: 18%; right: 10%; left: 10%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.preview-catalog i { aspect-ratio: 1.3; border: 1px solid rgba(13,22,38,.25); background: rgba(255,255,255,.56); }.preview-catalog i:nth-child(2) { background: #2563eb; }.preview-catalog i:nth-child(3) { background: #d7ff4f; }
.preview-library { top: 62%; left: 13%; width: 66%; padding: 9px 12px; }
.preview-roar-title { position: absolute; top: 21%; left: 8%; display: grid; gap: 5px; }.preview-roar-title strong { max-width: 170px; font-size: 22px; }.preview-roar-photo { position: absolute; right: 8%; bottom: 8%; width: 36%; height: 72%; border-radius: 46% 46% 8px 8px; background: linear-gradient(145deg, #765840, #c99e74 54%, #3a2a22); transform: rotate(4deg); }
.project-card-copy { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 20px 12px 10px; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-card-index { color: var(--lime); font-family: monospace; font-size: 12px; letter-spacing: .08em; }
.project-card-kicker { margin: 0; color: rgba(245,247,251,.62); font-family: monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.project-card h3 { max-width: 100%; margin: 15px 0 9px; color: #f5f7fb; font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); line-height: .98; letter-spacing: -.06em; }
.project-card-acronym { color: var(--blue); font-size: .68em; letter-spacing: -.03em; }
.project-card p { max-width: 100%; margin: 0; color: rgba(245,247,251,.68); font-size: 14px; line-height: 1.45; }
.project-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.project-tech span { padding: 5px 8px; border: 1px solid rgba(245,247,251,.22); border-radius: 999px; color: rgba(245,247,251,.78); font-family: monospace; font-size: 9px; }
.project-tech-icons { align-items: center; gap: 8px; }
.project-tech-icons .tech-icon { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid currentColor; border-radius: 7px; color: var(--blue); font-family: var(--body); font-size: 8px; font-weight: 800; letter-spacing: -.04em; }
.project-tech-icons .tech-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.project-tech-icons .tech-icon img { width: 18px; height: 18px; display: block; object-fit: contain; }
.project-tech-icons .tech-icon b { color: currentColor; font-family: var(--display); font-size: 9px; font-weight: 800; letter-spacing: -.06em; }
.project-tech-icons .tech-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.project-tech-icons .tech-vapi { color: #ff5a5f; }
.project-tech-icons .tech-openclaw { color: #b58cff; }
.project-tech-icons .tech-webhook { color: #f3f6ff; }
.project-tech-icons .tech-php { color: #9b8cff; }
.project-tech-icons .tech-js { color: #f4c84b; }
.project-tech-icons .tech-css { color: #63a9ff; }
.project-tech-icons .tech-icon:hover, .project-tech-icons .tech-icon:focus-visible { border-color: var(--lime); background: rgba(215,255,79,.1); color: var(--lime); transform: translateY(-2px); }
.project-card-foot { margin-top: auto; color: var(--blue); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.project-card-actions { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; }.project-card-actions .project-card-foot { margin-top: 0; }.project-visit { color: var(--lime); font-family: monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }.project-visit:hover, .project-visit:focus-visible { color: #fff; }
.project-card-back .project-back-kicker, .project-card-back .project-back-number { color: var(--lime); }.project-card-back strong { color: #f5f7fb; }.project-card-back .project-back-copy { color: rgba(245,247,251,.72); }.project-card-back .project-back-tags { color: #f5f7fb; }.project-card-back .project-back-foot { color: var(--blue); }
.nav-contact { color: #07101f; }.nav-contact span { color: #07101f; }

/* Gallery filters sit on the ink surface in every theme. Keep their hover text
   tied to that surface instead of the page text token used by light mode. */
.project-board .project-filter:hover,
.project-board .project-filter:focus-visible {
  background: rgba(120,169,255,.14);
  color: #f5f7fb;
}

@media (max-width: 680px) {
  .project-board { padding: 18px; }
  .project-grid { gap: 18px; }
  .project-card { min-height: 540px; }
  .project-preview { min-height: 176px; flex-basis: 176px; }
  .project-card h3 { font-size: 29px; }
}
