:root {
  --bg: #0b0d12;
  --bg-soft: #0f1219;
  --panel: #141821;
  --panel-2: #191e29;
  --text: #f3f5f7;
  --muted: #b4bcc8;
  --line: #282e3a;
  --accent: #f05a93;
  --accent-soft: #321726;
  --max: 1160px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:where(section, article)[id] { scroll-margin-top: 100px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font: 1rem/1.65 var(--sans);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px;
  color: var(--bg); background: var(--text); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 20; min-height: 72px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: rgba(11,13,18,.9); border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid #444b58; border-radius: 9px; color: var(--accent);
  background: var(--panel); font-size: .875rem; letter-spacing: -.04em;
}
#site-nav { display: flex; align-items: center; gap: 26px; }
#site-nav a { color: #c7ccd3; font-size: .875rem; font-weight: 650; text-decoration: none; }
#site-nav a:hover, #site-nav a:focus-visible { color: #fff; }
#site-nav a.active { color: #fff; }
.nav-contact { padding: 9px 14px; border: 1px solid #414856; border-radius: 7px; }
.menu-toggle { display: none; }

.hero {
  min-height: 720px; padding: 90px 0 80px;
  display: grid; grid-template-columns: 1.03fr .97fr; gap: 64px; align-items: center;
}
.eyebrow {
  margin: 0 0 16px; color: var(--accent); font-size: .875rem;
  font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; line-height: 1.16; text-wrap: balance; }
h1 { max-width: 700px; margin-bottom: 24px; font-size: clamp(2.8rem, 5.2vw, 4.9rem); letter-spacing: -.055em; }
.hero-intro { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin: 30px 0 28px; }
.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; border: 1px solid transparent; border-radius: 8px;
  font-weight: 750; text-decoration: none;
}
.button.primary { color: #160912; background: var(--accent); }
.button.primary:hover, .button.primary:focus-visible { background: #ff76a9; }
.button.secondary { border-color: #3a414e; background: var(--panel); }
.button.secondary:hover, .button.secondary:focus-visible { border-color: #626b79; }
.skill-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skill-line li, .tag-row span {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px;
  color: #bfc5ce; background: rgba(20,24,33,.62); font-size: .875rem; font-weight: 700;
}
.featured-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.featured-image { position: relative; }
.featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.featured-image span {
  position: absolute; top: 14px; left: 14px; padding: 6px 9px;
  border: 1px solid rgba(240,90,147,.45); border-radius: 5px;
  color: #ff87b4; background: rgba(14,9,14,.86); font-size: .875rem; font-weight: 800; text-transform: uppercase;
}
.featured-body { padding: 22px; }
.featured-body > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.card-label { margin: 0 0 5px; color: #8e96a3; font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.featured-body h2 { margin-bottom: 0; font-size: 1.7rem; }
.featured-body > p { margin: 12px 0; color: var(--muted); font-size: 1rem; }
.featured-body > a, .featured-body .inline-links a, .case-link, .card-link { color: #ff81b0; font-size: .875rem; font-weight: 750; text-underline-offset: 4px; }
.inline-links { display: flex !important; justify-content: flex-start !important; gap: 18px !important; flex-wrap: wrap; }

.section { padding: clamp(72px, 8vw, 96px) 0; }
.section-heading {
  display: grid; grid-template-columns: 1.1fr .75fr; gap: 70px;
  align-items: end; margin-bottom: 42px;
}
.section-heading h2, .about-section h2, .contact-section h2 {
  margin-bottom: 0; font-size: clamp(2.2rem, 4vw, 3.5rem); letter-spacing: -.04em;
}
.section-heading > p { margin: 0 0 4px; color: var(--muted); }
.case-study {
  display: grid; grid-template-columns: 1.15fr .85fr; min-height: 530px;
  overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
}
.case-image img { width: 100%; height: 100%; object-fit: cover; }
.case-content { padding: 38px; align-self: center; }
.case-content h3 { margin-bottom: 15px; font-size: 2.4rem; letter-spacing: -.035em; }
.case-summary { color: #c8cdd4; }
.case-content ul { margin: 22px 0; padding-left: 20px; color: var(--muted); }
.case-content li + li { margin-top: 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.case-link { display: inline-block; margin-top: 24px; }
.project-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 18px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.project-card > img, .research-visual { width: 100%; aspect-ratio: 16/8.1; object-fit: cover; }
.project-body { padding: 23px; }
.project-body h3 { margin-bottom: 10px; font-size: 1.35rem; }
.project-body > p:not(.card-label) { min-height: 80px; margin-bottom: 20px; color: var(--muted); font-size: 1rem; }
.card-link { display: inline-block; margin-top: 20px; }
.section-end-link { margin-top: 30px; text-align: right; }
.section-end-link a { color: #d7dbe1; font-size: .9rem; font-weight: 750; text-underline-offset: 5px; }
.research-visual {
  position: relative; display: flex; align-items: flex-end; padding: 18px;
  color: #cdd2da; background:
    linear-gradient(rgba(240,90,147,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,90,147,.12) 1px, transparent 1px),
    #171c26;
  background-size: 28px 28px;
}
.research-visual span { position: absolute; top: 14px; right: 16px; color: #535b69; font-size: 2.8rem; font-weight: 800; }
.research-visual strong { font-size: 1rem; }
.research-visual i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.research-visual i:nth-of-type(1) { left: 22%; top: 31%; }
.research-visual i:nth-of-type(2) { left: 48%; top: 57%; }
.research-visual i:nth-of-type(3) { left: 75%; top: 28%; }

.experience-section { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,.05); }
.timeline { border-top: 1px solid var(--line); }
.timeline article {
  display: grid; grid-template-columns: 290px 1fr; gap: 50px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.timeline-meta span { display: block; color: #d4d8de; font-size: .88rem; font-weight: 750; }
.timeline-meta small { color: #878f9b; }
.timeline h3 { margin-bottom: 8px; font-size: 1.35rem; }
.timeline article > div:last-child p { max-width: 750px; margin: 0; color: var(--muted); }

.about-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.about-copy > p { margin-top: 0; color: var(--muted); font-size: 1.03rem; }
.skills { display: grid; gap: 0; margin-top: 30px; border-top: 1px solid var(--line); }
.skills div { display: grid; grid-template-columns: 160px 1fr; gap: 25px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.skills h3 { margin: 0; font-size: .9rem; }
.skills p { margin: 0; color: var(--muted); font-size: 1rem; }

.contact-section { padding: 80px 0; background: var(--panel); border-block: 1px solid var(--line); }
.contact-section .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: end; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 20px; }
.contact-links > a:not(.button) { color: #c8cdd4; font-size: .88rem; font-weight: 700; }
footer {
  min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  color: var(--muted); font-size: .875rem;
}
footer a { color: #aeb5bf; text-underline-offset: 4px; }

/* Projects index */
.subpage main { overflow: hidden; }
.page-intro { padding: clamp(64px, 8vw, 88px) 0 48px; border-bottom: 1px solid var(--line); }
.page-intro h1 { max-width: 820px; margin-bottom: 22px; font-size: clamp(2.5rem, 5vw, 4rem); }
.page-intro > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.compact-section { padding-top: 82px; }
.portfolio-list { border-top: 1px solid var(--line); }
.portfolio-row {
  display: grid; grid-template-columns: minmax(280px, .82fr) 1.18fr; gap: 44px;
  align-items: center; padding: 34px 0; border-bottom: 1px solid var(--line);
}
.portfolio-row-large { grid-template-columns: 1.12fr .88fr; padding: 36px 0; }
.portfolio-media { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.portfolio-media img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #090b0f; transition: transform .28s ease; }
.portfolio-media:hover img { transform: scale(1.018); }
.portfolio-copy { padding-right: 6%; }
.portfolio-copy h3 { margin: 7px 0 13px; font-size: clamp(1.8rem, 3vw, 2.65rem); letter-spacing: -.035em; }
.portfolio-copy h3 a { text-decoration: none; }
.portfolio-copy > p { color: var(--muted); }
.project-kicker { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.game-jam-section { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,.05); }
.archive-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.game-jam-grid { grid-template-columns: repeat(2,1fr); gap: 22px; }
.archive-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.archive-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; image-rendering: auto; }
.archive-media { display: block; overflow: hidden; }
.archive-media img { transition: transform .28s ease; }
.archive-media:hover img, .archive-media:focus-visible img { transform: scale(1.025); }
.archive-card h3 a { text-decoration: none; }
.archive-card h3 a:hover, .archive-card h3 a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.archive-card-featured { border-color: #3b3340; }
.archive-card-featured .archive-media img { object-fit: contain; background: #090b0f; }
.game-jam-card { border-color: #493746; }
.game-jam-card .archive-media img { aspect-ratio: 16/8.25; object-fit: contain; background: #090b0f; }
.game-jam-grid .game-jam-card > div { padding: 24px; }
.game-jam-card h3 { font-size: 1.4rem; }
.prototype-section { padding-top: 82px; }
.prototype-heading { margin-bottom: 32px; }
.prototype-grid { gap: 20px; }
.prototype-grid .archive-card img { aspect-ratio: 16/8; object-fit: contain; background: #090b0f; }
.prototype-grid .archive-card > div { padding: 22px; }
.prototype-grid .archive-card h3 { font-size: 1.2rem; }
.prototype-grid .archive-card p:not(.card-label) { margin-bottom: 18px; font-size: 1rem; }
.archive-card > div { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.archive-card h3 { margin-bottom: 8px; font-size: 1.13rem; }
.archive-card p:not(.card-label) { margin: 0 0 18px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.archive-card > div > span { margin-top: auto; color: var(--muted); font-size: .875rem; font-weight: 600; }
.archive-card .card-link { align-self: flex-start; margin-top: 18px; }

/* Project detail pages */
.detail-hero { padding: 58px 0 0; }
.back-link { display: inline-block; margin-bottom: 44px; color: #aeb5bf; font-size: .875rem; font-weight: 700; text-underline-offset: 4px; }
.detail-heading { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: end; margin-bottom: 48px; }
.detail-heading h1 { margin-bottom: 17px; }
.detail-lede { max-width: 760px; margin: 0; color: #bdc3cc; font-size: 1.18rem; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-bottom: 8px; }
.hero-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.hero-frame img { width: 100%; max-height: 680px; object-fit: cover; }
.upturn-hero-frame img { width: 100%; aspect-ratio: 16/9; max-height: none; object-fit: cover; }
.light-dark-hero-frame img { width: 100%; aspect-ratio: 1109/473; max-height: none; object-fit: cover; }
.punch-back-hero-frame img { width: min(520px,100%); }
.swingy-hero-frame img { width: 100%; aspect-ratio: 16/9; max-height: none; object-fit: cover; }
.vr-chess-hero-frame img { width: 100%; aspect-ratio: 1133/466; max-height: none; object-fit: cover; }
.platformer-hero-frame img { width: 100%; aspect-ratio: 16/9; max-height: none; object-fit: cover; }
.descending-darts-hero-frame img { width: 100%; aspect-ratio: 1010/561; max-height: none; object-fit: cover; }
.vr-rhythm-hero-frame img { width: 100%; aspect-ratio: 1420/667; max-height: none; object-fit: cover; }
.car-race-hero-frame { background: radial-gradient(circle at 50% 40%, #272c34 0, #0a0c10 72%); }
.car-race-hero-frame img { width: 100%; max-height: 560px; object-fit: contain; }
.hero-frame-contained { min-height: 400px; display: grid; place-items: center; padding: 44px; background: linear-gradient(145deg,#171b25,#0d1016); }
.hero-frame-contained img { width: min(860px,100%); max-height: 500px; border-radius: 7px; object-fit: contain; }
.fact-bar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; background: var(--bg-soft); }
.fact-bar div { padding: 22px; border-right: 1px solid var(--line); }
.fact-bar div:last-child { border-right: 0; }
.fact-bar dt { margin-bottom: 5px; color: var(--muted); font-size: .875rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fact-bar dd { margin: 0; color: #dce0e5; font-size: .9rem; font-weight: 700; }
.case-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.case-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; font-weight: 650; text-decoration: none; }
.case-nav a:hover, .case-nav a:focus-visible { color: #fff; }
.loop-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.loop-grid article { min-height: 220px; padding: 27px 24px; background: var(--panel); }
.loop-grid.four-step { grid-template-columns: repeat(4,1fr); }
.loop-grid.swingy-loop { grid-template-columns: repeat(4,1fr); }
.loop-grid article > span { color: var(--accent); font-size: .875rem; font-weight: 850; }
.loop-grid h3 { margin: 38px 0 11px; font-size: 1.08rem; }
.loop-grid p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.detail-section { padding: clamp(64px, 7.5vw, 88px) 0; }
.two-column { display: grid; grid-template-columns: .8fr 1.2fr; gap: 110px; }
.detail-section h2 { margin-bottom: 0; font-size: clamp(2.15rem, 4vw, 3.4rem); letter-spacing: -.045em; }
.prose p, .challenge-copy p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.75; }
.prose p + p, .challenge-copy p + p { margin-top: 20px; }
.tinted-section { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,.05); }
.system-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.system-grid.three-up { grid-template-columns: repeat(3,1fr); }
.system-grid article { min-height: 245px; padding: 30px; background: var(--panel); }
.system-grid article > span { color: var(--accent); font-size: .875rem; font-weight: 850; }
.system-grid h3 { margin: 38px 0 11px; font-size: 1.28rem; }
.system-grid p { margin: 0; color: var(--muted); font-size: 1rem; }
.arsenal-showcase {
  display: grid; grid-template-columns: .55fr 1.45fr; gap: 46px; margin-top: 28px; padding: 34px;
  border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,#171b24,#11151d);
}
.arsenal-intro h3 { margin-bottom: 13px; font-size: 1.55rem; letter-spacing: -.025em; }
.arsenal-intro > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; }
.arsenal-groups { display: grid; gap: 24px; }
.arsenal-group h4 { margin: 0 0 10px; color: #8f97a3; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; }
.arsenal-grid { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.weapon-grid { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
.ability-grid { grid-template-columns: repeat(4,1fr); }
.arsenal-grid li {
  min-width: 0; min-height: 104px; display: grid; grid-template-rows: 64px auto; place-items: center; gap: 5px; padding: 10px 7px;
  border: 1px solid #2c3340; border-radius: 8px; background: #0d1016;
}
.arsenal-grid img { width: 100%; height: 58px; object-fit: contain; }
.arsenal-grid span { color: #c4cad2; font-size: .875rem; font-weight: 700; line-height: 1.25; text-align: center; }
.engineering-section { background: #0d1016; }
.engineering-heading { margin-bottom: 58px; }
.deep-dive-list { border-top: 1px solid var(--line); }
.deep-dive { display: grid; grid-template-columns: .92fr 1.08fr; gap: 70px; align-items: center; padding: 70px 0; border-bottom: 1px solid var(--line); }
.deep-dive.reverse .deep-copy { order: 2; }
.deep-dive.reverse .tech-visual { order: 1; }
.deep-index { margin: 0 0 18px; color: var(--accent); font-size: .875rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.deep-copy h3 { margin-bottom: 17px; font-size: clamp(1.8rem,3vw,2.55rem); letter-spacing: -.035em; }
.deep-copy > p:not(.deep-index), .deep-copy li { color: var(--muted); }
.deep-copy ul { margin: 20px 0 0; padding-left: 20px; }
.deep-copy li + li { margin-top: 7px; }
.development-figure { margin: 0; }
.development-figure figcaption { margin-top: 12px; color: var(--muted); font-size: .875rem; }
.development-figure-narrow { width: min(480px,100%); justify-self: center; }
.dev-image-pair, .development-mosaic { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.dev-shot { position: relative; overflow: hidden; border: 1px solid #303745; border-radius: 10px; background: #090b0f; box-shadow: 0 20px 55px rgba(0,0,0,.2); }
.dev-shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.dev-shot span {
  position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 4px;
  color: #e8ebef; background: rgba(8,10,14,.86); font-size: .875rem; font-weight: 750; letter-spacing: .02em;
}
.dev-shot-wide { grid-column: 1/-1; }
.planning-image { width: 100%; border: 1px solid #303745; border-radius: 10px; box-shadow: 0 20px 55px rgba(0,0,0,.2); }
.tech-visual { min-height: 390px; padding: 28px; overflow: hidden; border: 1px solid #303745; border-radius: 13px; background: #141821; box-shadow: 0 24px 70px rgba(0,0,0,.2); }
.visual-label { margin: 0 0 26px; color: #7f8793; font-size: .875rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pipeline-flow, .pool-cycle { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 8px; align-items: center; }
.pipeline-flow span, .pool-cycle span, .decree-flow span { padding: 13px 10px; border: 1px solid #353c49; border-radius: 7px; color: #d7dce2; background: #0e1117; font-size: .875rem; font-weight: 750; text-align: center; }
.pipeline-flow i, .pool-cycle i, .decree-flow i { color: var(--accent); font-style: normal; text-align: center; }
.visual-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.visual-stat-row div { padding: 17px 12px; background: #10141b; }
.visual-stat-row strong { display: block; color: #fff; font-size: 1.5rem; }
.visual-stat-row span { color: #848c98; font-size: .875rem; }
.tech-visual > small { display: block; margin-top: 10px; color: #626b77; font-size: .875rem; }
.benchmark-visual { background: #10141b; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.benchmark-top { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #313846; color: #9ba3af; font-size: .875rem; }
.benchmark-top span:last-child { color: #ff7bad; }
.benchmark-config { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin: 22px 0; background: #2a303b; }
.benchmark-config div { padding: 14px; background: #151a23; }
.benchmark-config span { display: block; color: #747d8a; font-size: .875rem; }
.benchmark-config strong { color: #e4e8ed; font-size: .875rem; }
.metric-stream { display: flex; flex-wrap: wrap; gap: 7px; }
.metric-stream span, .consumer-chips span { padding: 6px 8px; border: 1px solid #303744; border-radius: 4px; color: #9ba3ae; background: #0d1016; font-size: .875rem; }
.benchmark-visual > p { margin: 26px 0 0; color: #8c95a1; font-size: .875rem; }
.benchmark-visual > p strong { margin-right: 8px; color: var(--accent); font-size: 2.25rem; }
.decree-flow { display: grid; gap: 8px; width: min(310px,100%); margin: 0 auto 25px; }
.consumer-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.pool-cycle { margin: 42px 0 52px; }
.pool-monitor { display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 28px; }
.pool-monitor span { margin-inline: 5px; color: #6f7885; font-size: .875rem; font-weight: 800; letter-spacing: .08em; }
.pool-monitor b { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); opacity: .35; }
.pool-monitor b:nth-of-type(-n+3) { opacity: 1; }
.supporting-section { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,.05); }
.support-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.support-grid article { padding: 26px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.support-grid h3 { margin-bottom: 12px; font-size: 1.15rem; }
.support-grid article > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; }
.challenge-layout { display: grid; grid-template-columns: .88fr 1.12fr; gap: 80px; align-items: center; }
.challenge-copy h2 { margin-bottom: 25px; }
.detail-figure { margin: 0; }
.detail-figure img { width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.detail-figure figcaption { margin-top: 12px; color: var(--muted); font-size: .875rem; }
.feature-list { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--line); }
.feature-list.three-up { grid-template-columns: repeat(3,1fr); }
.feature-list article { padding: 26px 28px; border-bottom: 1px solid var(--line); }
.feature-list article:nth-child(odd) { border-right: 1px solid var(--line); }
.feature-list.three-up article { border-right: 1px solid var(--line); }
.feature-list.three-up article:last-child { border-right: 0; }
.feature-list h3 { margin-bottom: 9px; font-size: 1.08rem; }
.feature-list p { max-width: 440px; margin: 0; color: var(--muted); font-size: 1rem; }
.process-panel { padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.process-panel ol { margin: 28px 0 0; padding: 0; list-style: none; }
.process-panel li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); color: #d3d8df; font-weight: 700; }
.process-panel li span { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #4b5260; border-radius: 50%; color: var(--accent); font-size: .875rem; }
.video-case-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 64px; align-items: center; }
.video-case-layout h2 { margin-bottom: 18px; }
.video-case-layout > div:first-child > p:not(.eyebrow) { color: var(--muted); }
.video-frame { overflow: hidden; aspect-ratio: 16/9; border: 1px solid #303745; border-radius: 12px; background: #050608; box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.video-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.enemy-behavior-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.enemy-behavior-grid article { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.enemy-behavior-grid img { width: 100%; height: 190px; padding: 20px; object-fit: contain; background: #090b0f; }
.enemy-behavior-grid article > div { padding: 22px; border-top: 1px solid var(--line); }
.enemy-behavior-grid h3 { margin-bottom: 9px; font-size: 1.12rem; }
.enemy-behavior-grid p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.upgrade-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.upgrade-row div { min-width: 0; display: grid; place-items: center; gap: 8px; padding: 10px 6px; border: 1px solid #2e3541; border-radius: 8px; background: #0d1016; }
.upgrade-row img { width: 54px; height: 54px; object-fit: contain; }
.upgrade-row span { color: #bfc5ce; font-size: .875rem; font-weight: 700; text-align: center; }
.development-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.development-summary article { padding: 24px; background: var(--panel); }
.development-summary article > span { color: var(--accent); font-size: .875rem; font-weight: 850; }
.development-summary h3 { margin: 27px 0 9px; font-size: 1rem; }
.development-summary p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.light-dark-gallery { margin-top: 18px; }
.punch-level-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.punch-level-grid figure, .jam-evidence figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.punch-level-grid img { width: 100%; aspect-ratio: 466/258; object-fit: cover; background: #090b0f; }
.punch-level-grid figcaption { display: grid; gap: 6px; padding: 19px; border-top: 1px solid var(--line); }
.punch-level-grid figcaption strong { font-size: .92rem; }
.punch-level-grid figcaption span { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.jam-result-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.jam-process-copy h2 { margin-bottom: 21px; }
.jam-process-copy > p:not(.eyebrow) { color: var(--muted); }
.jam-process-copy > p + p { margin-top: 17px; }
.jam-callout { display: grid; gap: 2px; margin-top: 27px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--panel); }
.jam-callout strong { font-size: 1.3rem; }
.jam-callout span { color: #9da5b0; font-size: .875rem; }
.jam-evidence { display: grid; gap: 13px; }
.jam-evidence img { width: 100%; max-height: 290px; object-fit: contain; background: #090b0f; }
.jam-evidence figcaption { padding: 13px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.prototype-showcase { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.prototype-copy h2 { margin-bottom: 24px; }
.prototype-summary { margin: -7px 0 24px; color: var(--muted); }
.build-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.build-list li { display: grid; gap: 4px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.build-list strong { font-size: .93rem; }
.build-list span { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.visual-section { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,.05); }
.visual-gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.visual-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.visual-gallery .gallery-wide { grid-column: 1/-1; }
.gallery-image { min-height: 250px; display: grid; place-items: center; padding: 22px; background: #090b0f; }
.gallery-wide .gallery-image { min-height: 310px; }
.gallery-image img { width: 100%; max-height: 310px; object-fit: contain; }
.gallery-image-menu img { max-height: 360px; }
.visual-gallery figcaption { display: grid; gap: 4px; padding: 18px 20px; border-top: 1px solid var(--line); }
.platformer-gallery .gallery-image { min-height: 0; padding: 0; }
.platformer-gallery .gallery-image img { max-height: none; aspect-ratio: 16/9; object-fit: cover; }
.visual-gallery figcaption strong { font-size: .92rem; }
.visual-gallery figcaption span { color: var(--muted); font-size: 1rem; }
.project-next { display: block; padding: 0 0 100px; }
.project-next a { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; }
.project-next span { color: #858d99; font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-next strong { font-size: 1.35rem; }

@media (max-width: 930px) {
  .menu-toggle {
    width: 44px; height: 44px; display: grid; place-content: center; gap: 5px;
    color: #fff; background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  }
  .menu-toggle span:not(.sr-only) { width: 20px; height: 2px; background: currentColor; }
  #site-nav {
    position: absolute; top: 100%; left: 0; right: 0; padding: 22px 24px;
    display: none; flex-direction: column; align-items: flex-start; gap: 18px;
    background: rgba(11,13,18,.98); border-bottom: 1px solid var(--line);
  }
  #site-nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 50px; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  .featured-card { max-width: 720px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .case-study { grid-template-columns: 1fr; }
  .case-image img { aspect-ratio: 16/9; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-card:first-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; }
  .project-card:first-child .research-visual { aspect-ratio: auto; height: 100%; }
  .about-section { grid-template-columns: 1fr; gap: 36px; }
  .archive-grid { grid-template-columns: repeat(2,1fr); }
  .detail-heading { grid-template-columns: 1fr; gap: 24px; }
  .detail-actions { justify-content: flex-start; }
  .two-column, .challenge-layout { grid-template-columns: 1fr; gap: 42px; }
  .video-case-layout { grid-template-columns: 1fr; gap: 34px; }
  .loop-grid { grid-template-columns: repeat(2,1fr); }
  .loop-grid.four-step { grid-template-columns: repeat(2,1fr); }
  .loop-grid.swingy-loop { grid-template-columns: repeat(2,1fr); }
  .loop-grid.swingy-loop article:last-child { grid-column: auto; }
  .loop-grid article:last-child { grid-column: 1/-1; }
  .system-grid.three-up { grid-template-columns: 1fr; }
  .arsenal-showcase { grid-template-columns: 1fr; gap: 30px; }
  .enemy-behavior-grid, .development-summary { grid-template-columns: repeat(2,1fr); }
  .jam-result-layout { grid-template-columns: 1fr; gap: 38px; }
  .prototype-showcase { grid-template-columns: 1fr; gap: 38px; }
  .deep-dive { grid-template-columns: 1fr; gap: 36px; }
  .deep-dive.reverse .deep-copy, .deep-dive.reverse .tech-visual { order: initial; }
  .support-grid { grid-template-columns: 1fr; }
  .feature-list.three-up { grid-template-columns: 1fr; }
  .feature-list.three-up article { border-right: 0; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 66px; padding-inline: 16px; }
  .brand > span:last-child { display: none; }
  .hero { min-height: 0; padding: 64px 0 60px; }
  h1 { font-size: 2.75rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .section { padding: 76px 0; }
  .case-content { padding: 25px; }
  .case-content h3 { font-size: 2rem; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card:first-child { grid-column: auto; display: block; }
  .project-card:first-child .research-visual { aspect-ratio: 16/8.1; }
  .project-body > p:not(.card-label) { min-height: 0; }
  .timeline article { grid-template-columns: 1fr; gap: 12px; }
  .skills div { grid-template-columns: 1fr; gap: 3px; }
  .contact-section .wrap { grid-template-columns: 1fr; gap: 30px; }
  .contact-links { align-items: stretch; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .page-intro { padding-top: 72px; }
  .portfolio-row, .portfolio-row-large { grid-template-columns: 1fr; gap: 24px; }
  .portfolio-copy { padding-right: 0; }
  .archive-grid { grid-template-columns: 1fr; }
  .detail-hero { padding-top: 36px; }
  .back-link { margin-bottom: 28px; }
  .detail-lede { font-size: 1.02rem; }
  .hero-frame-contained { min-height: 240px; padding: 20px; }
  .fact-bar { grid-template-columns: 1fr 1fr; }
  .fact-bar div:nth-child(2) { border-right: 0; }
  .fact-bar div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-section { padding: 72px 0; }
  .loop-grid { grid-template-columns: 1fr; }
  .loop-grid.four-step { grid-template-columns: 1fr; }
  .loop-grid.swingy-loop { grid-template-columns: 1fr; }
  .loop-grid article, .loop-grid article:last-child { min-height: 0; grid-column: auto; }
  .loop-grid h3 { margin-top: 22px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-grid article { min-height: 0; }
  .arsenal-showcase { padding: 22px; }
  .weapon-grid, .ability-grid { grid-template-columns: repeat(2,1fr); }
  .enemy-behavior-grid, .development-summary { grid-template-columns: 1fr; }
  .punch-level-grid { grid-template-columns: 1fr; }
  .enemy-behavior-grid img { height: 170px; }
  .case-nav { gap: 10px 18px; }
  .deep-dive { padding: 54px 0; }
  .tech-visual { min-height: 0; padding: 20px; }
  .pipeline-flow, .pool-cycle { grid-template-columns: 1fr; }
  .pipeline-flow i, .pool-cycle i { transform: rotate(90deg); }
  .pool-cycle { margin: 25px 0; }
  .visual-stat-row { grid-template-columns: 1fr; margin-top: 28px; }
  .visual-gallery { grid-template-columns: 1fr; }
  .visual-gallery .gallery-wide { grid-column: auto; }
  .gallery-image, .gallery-wide .gallery-image { min-height: 200px; padding: 14px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list article, .feature-list article:nth-child(odd) { border-right: 0; }
  .project-next a { align-items: flex-start; flex-direction: column; }
}

/* Quiet interaction cues shared by the home page and project archive. */
a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.button, .nav-contact, .archive-card, .home-project-card, .home-feature-grid {
  transition: border-color .18s ease, background-color .18s ease;
}
#site-nav a.active { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 8px; }
.archive-card:focus-within, .home-project-card:focus-within, .home-feature-grid:focus-within { border-color: var(--accent); }
.portfolio-row > *, .two-column > *, .detail-heading > *, .fact-bar > * { min-width: 0; }
.fact-bar dd, .contact-links .button { overflow-wrap: anywhere; }
@media (hover: hover) {
  .archive-card:hover, .home-project-card:hover, .home-feature-grid:hover { border-color: #66515f; }
  .nav-contact:hover { border-color: var(--accent); }
}
@media (max-width: 930px) {
  #site-nav { gap: 4px; padding-block: 14px; }
  #site-nav a { display: flex; align-items: center; min-height: 44px; width: 100%; }
  #site-nav .nav-contact { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .nav-contact, .archive-card, .home-project-card, .home-feature-grid,
  .portfolio-media img, .archive-media img { transition: none; }
  .portfolio-media:hover img, .archive-media:hover img, .archive-media:focus-visible img { transform: none; }
}

/* Utility pages and readable, optional source excerpts. */
.utility-page { min-height: calc(100svh - 168px); padding-block: clamp(64px, 10vw, 128px); }
.utility-page h1 { max-width: 850px; font-size: clamp(2.25rem, 5vw, 4rem); }
.utility-page > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.code-excerpt { margin-top: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.code-excerpt summary { padding: 18px 22px; color: var(--text); font-size: 1rem; font-weight: 700; cursor: pointer; }
.code-excerpt pre { margin: 0; padding: 22px; border-top: 1px solid var(--line); overflow-x: auto; font-size: .875rem; line-height: 1.65; tab-size: 4; }
.prose code { overflow-wrap: anywhere; }
.code-excerpt pre code { font-size: inherit; color: #dce0e5; white-space: pre; }
.code-excerpt pre:focus-visible, .code-excerpt summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
