:root {
  color-scheme: light;
  --canvas: #efede8;
  --paper: #faf9f6;
  --ink: #252629;
  --muted: #65645f;
  --red: #bd302d;
  --button-red: #d63c38;
  --line: #d4d1ca;
  --surface: #f6f4ef;
  --focus: #27728c;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1160px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #17191f;
  --paper: #262930;
  --ink: #f1f0eb;
  --muted: #afb2ba;
  --red: #ff8175;
  --button-red: #ff8175;
  --line: #3a3d47;
  --surface: #22252d;
  --focus: #8fcbe0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #898780 var(--canvas); }
body {
  margin: 0; min-width: 0; background: var(--canvas); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: #f0bbb0; color: #252629; }
a { color: inherit; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
h1, h2, h3, p, blockquote { margin: 0; }
.page { width: min(calc(100% - 96px), var(--max)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 10px 16px; background: var(--ink); color: var(--canvas); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* A quiet header with one console-red brand accent. */
.site-header { display: flex; min-height: 112px; justify-content: space-between; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--red); border-radius: 7px; padding: 4px 12px; color: var(--red); text-decoration: none; font: 800 18px/1.5 var(--mono); letter-spacing: -.05em; }
.power-light { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
.command-nav { display: flex; gap: 32px; }
.command-nav a { display: inline-flex; gap: 7px; align-items: baseline; font-size: 14px; font-weight: 600; text-decoration: none; padding-block: 10px; }
.command-nav a span { color: var(--muted); font: 10px/1 var(--mono); }
.command-nav a:hover, .site-footer a:hover { color: var(--red); }
.eyebrow { color: var(--muted); font: 600 11px/1.5 var(--mono); letter-spacing: .14em; }

.hero { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 52px; padding: 70px 0 64px; min-height: 520px; }
.hero-copy .eyebrow { color: var(--red); margin-bottom: 20px; }
.hero h1 { font-size: clamp(74px, 8.9vw, 124px); line-height: .95; letter-spacing: -.07em; font-weight: 750; }
.name-dot { color: var(--button-red); }
.role { margin-top: 20px; font-size: 25px; letter-spacing: -.03em; font-weight: 500; }
.hero-lede { margin-top: 24px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.start-link { display: inline-flex; gap: 12px; align-items: center; margin-top: 30px; font-size: 14px; font-weight: 650; text-decoration: none; padding-block: 5px; }
.start-link span { color: var(--red); font-size: 11px; }
.start-link:hover { color: var(--red); }

/* Original three-grip artwork; every colored control has a useful destination. */
.controller-area { min-width: 0; }
.controller { position: relative; width: 100%; aspect-ratio: 600 / 420; container-type: inline-size; transform: rotate(-3deg); }
.controller-shell { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 18px 12px #10142120); pointer-events: none; }
.controller-cable { stroke: #656971; }
[data-theme="dark"] .controller-cable { stroke: #878b94; }
[data-theme="dark"] .controller-shell { filter: drop-shadow(0 18px 14px #0006); }
.fx-off .controller-grain { display: none; }
.controller-wordmark { position: absolute; left: 50%; top: 20%; transform: translate(-50%, -50%); color: #5b6168; font: 700 clamp(8px, 2cqw, 12px)/1 var(--mono); letter-spacing: -.05em; }
.controller-wordmark b { margin-left: 5px; color: #41484f; }
.direction-pad { position: absolute; left: 25%; top: 40%; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 3px 1px #0006); }
.direction-pad::before, .direction-pad::after { position: absolute; content: ""; background: #50555c; border: 1px solid #747b84; border-radius: 3px; box-shadow: inset 0 2px 0 #ffffff24; }
.direction-pad::before { width: 34%; height: 100%; left: 33%; }
.direction-pad::after { width: 100%; height: 34%; top: 33%; }
.direction-pad i { position: absolute; z-index: 1; width: 34%; height: 34%; top: 33%; left: 33%; background: #50555c; }
.direction-pad i::after { content: ""; position: absolute; inset: 21%; border-radius: 50%; background: #474c53; box-shadow: inset 0 1px 2px #0004; }
.theme-toggle, .fx-toggle, .game-button, .c-buttons { position: absolute; display: grid; justify-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 0; background: transparent; color: #3e454d; text-decoration: none; cursor: pointer; transform: translate(-50%, -50%); }
.controller :is(a, button):focus-visible { outline-color: #145979; outline-offset: 5px; }
.controller small { font: 600 clamp(7px, 1.65cqw, 9px)/1.4 var(--mono); letter-spacing: .02em; white-space: nowrap; }
.theme-toggle { left: 50%; top: 34%; min-width: 44px; min-height: 44px; align-content: center; gap: 5px; }
.start-button { display: block; width: clamp(25px, 6cqw, 35px); aspect-ratio: 1.35; border: 1px solid #bd3832; border-radius: 50%; background: #e94a40; box-shadow: inset 0 2px 1px #ffaea066, 0 3px 0 #99372f, 0 4px 2px #4446; transition: transform 150ms ease; }
.theme-toggle:hover .start-button { background: #f45b4f; transform: translateY(1px); }
.theme-toggle:active .start-button { transform: translateY(3px); }
.fx-toggle { left: 50%; top: 63%; width: 18%; min-width: 44px; }
.stick-well { display: grid; place-items: center; width: 100%; aspect-ratio: 1; background: #878e96; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.analog-stick { display: block; width: 65%; aspect-ratio: 1; border: 1px solid #8b9299; border-radius: 50%; background: repeating-radial-gradient(circle, #d6dadd 0 3px, #b3bbc2 4px 5px); box-shadow: 0 6px 0 #606a74, 0 9px 8px #343c4380, inset 0 2px 2px #fff9; transform: translateY(-5px); transition: transform 150ms ease; }
.fx-toggle:hover .analog-stick { transform: translateY(-3px); }
.fx-toggle[aria-pressed="true"] .analog-stick { transform: translateY(-2px); }
.c-buttons { left: 76%; top: 34%; width: 14%; min-width: 44px; border-radius: 50%; gap: 0; }
.c-buttons svg { width: 100%; overflow: visible; transition: transform 150ms ease; }
.c-buttons:hover svg { transform: translateY(2px); }
.game-button { width: max(40px, 9%); aspect-ratio: 1; border-radius: 50%; gap: 0; place-items: center; }
.game-button > span { display: grid; place-items: center; width: clamp(36px, 9cqw, 52px); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--rim); background: var(--plastic); color: #fff; box-shadow: inset 0 2px 1px #ffffff50, 0 4px 0 var(--edge), 0 6px 3px #343c4366; font: 700 clamp(16px, 3.6cqw, 22px)/1 var(--mono); transition: transform 150ms ease, box-shadow 150ms ease; }
.button-b { left: 65.5%; top: 50.5%; --plastic: #218451; --rim: #1f784b; --edge: #1a583c; }
.button-a { left: 79.5%; top: 63%; --plastic: #2376c4; --rim: #1a68b2; --edge: #194b7c; }
.game-button:hover > span { transform: translateY(2px); box-shadow: inset 0 2px 1px #ffffff50, 0 2px 0 var(--edge), 0 4px 2px #343c4366; }
.game-button:active > span { transform: translateY(4px); box-shadow: none; }
.controller-legend { display: flex; justify-content: center; gap: 20px; margin-top: 8px; }
.controller-legend a { display: inline-flex; align-items: center; gap: 6px; padding-block: 5px; color: var(--muted); font-size: 12px; text-decoration: none; }
.controller-legend a:hover { color: var(--ink); }
.controller-legend span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: white; font: 700 10px/1 var(--mono); }
.legend-a { background: #2376c4; }
.legend-b { background: #218451; }
.controller-legend .legend-c { background: #f6d343; color: #5c4605; }
.controller-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 13px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.controller-caption [data-theme-label] { font: 10px/1.9 var(--mono); }
.keyboard-hint { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; color: var(--muted); font: 10px/1.5 var(--mono); }
kbd { border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; background: var(--surface); font: inherit; }
.keyboard-hint kbd:first-of-type { margin-left: 6px; }

/* The same physical layout scales down without labels spilling onto the grips. */
@container (max-width: 360px) {
  .controller-wordmark { top: 19%; }
  .theme-toggle { top: 35%; }
  .fx-toggle { width: 16%; }
}

.about-strip { display: grid; grid-template-columns: 1fr 2fr; align-items: center; gap: 28px; border-block: 1px solid var(--line); padding: 30px 0; }
.about-strip > p:last-child { color: var(--muted); font-size: 15px; line-height: 1.7; }
.about-strip strong { color: var(--ink); font-weight: 600; }
.section-block { padding: 72px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 32px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
h2 { font-size: clamp(30px, 3.1vw, 40px); font-weight: 650; line-height: 1.2; letter-spacing: -.045em; }
.section-title-row .eyebrow, .contact-main .eyebrow { margin-bottom: 10px; }
.section-title-row > p { color: var(--muted); font-size: 13px; padding-bottom: 3px; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.project-card { --label: #edc75b; position: relative; display: flex; flex-direction: column; min-width: 0; padding: 15px 28px 9px; border: 1px solid #9fa5ab; border-radius: 42% 42% 12px 12px / 24px 24px 12px 12px; background: linear-gradient(115deg, #dfe1e1, #bfc4c8); box-shadow: inset 0 2px 0 #f9faf6, 0 4px 0 #a2a8af; text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease; }
.project-card::after { position: absolute; content: ""; bottom: -1px; left: 30%; right: 30%; height: 7px; border: 1px solid #929aa2; border-bottom: 0; border-radius: 3px 3px 0 0; background: #b0b7bd; }
.project-card:hover { transform: translateY(-5px); box-shadow: inset 0 2px 0 #f9faf6, 0 4px 0 #a2a8af, 0 16px 22px -14px #10142180; }
.cartridge-spine { display: block; margin-bottom: 12px; text-align: center; color: #59636c; text-shadow: 0 1px 0 #fff8; font: 700 9px/1.7 var(--mono); letter-spacing: .16em; }
.cartridge-label { display: flex; flex: 1; flex-direction: column; overflow: hidden; min-height: 210px; border: 1px solid #353b43; border-radius: 7px; background: #25282e; color: #f5f2ea; box-shadow: 0 1px 0 #fff9; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--label); color: #202522; padding: 9px 20px; font: 700 10px/1.5 var(--mono); letter-spacing: .04em; }
.cartridge-label h3 { padding: 21px 20px 0; font-size: 32px; letter-spacing: -.045em; line-height: 1.1; font-weight: 650; }
.cartridge-label p { flex: 1; max-width: 390px; margin: 13px 20px 18px; color: #cccfd3; font-size: 15px; line-height: 1.6; }
.project-card ul { display: flex; flex-wrap: wrap; gap: 5px 9px; margin: 0 20px 18px; padding: 0; list-style: none; color: #f0ece1; font: 10px/1.6 var(--mono); }
.project-card li:not(:last-child)::after { content: "/"; padding-left: 9px; color: #9c998f; }
.card-action { display: flex; align-items: center; justify-content: space-between; padding: 13px 2px; color: #414b55; font: 600 9px/1.5 var(--mono); letter-spacing: .06em; }
.card-action > span { font-size: 16px; line-height: 1; }
.cyan-card { --label: #9cc8de; }
.magenta-card { --label: #f0a497; }
.green-card { --label: #a8caa4; }

.tool-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tool-grid li { display: grid; justify-items: center; align-content: center; min-height: 96px; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font: 11px/1.4 var(--mono); }
.tool-icon { display: grid; place-items: center; width: 36px; height: 36px; }
.tool-logo { display: block; width: 27px; height: 27px; object-fit: contain; filter: grayscale(1) brightness(.26); }
[data-theme="dark"] .tool-logo { filter: grayscale(1) brightness(0) invert(.83); }
.tool-logo--java, .tool-logo--wide { width: 32px; height: 32px; }
.tool-logo--dense { width: 27px; height: 27px; }
.contact { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 80px; }
.quote-panel { border-left: 3px solid var(--button-red); padding-left: 25px; }
.quote-panel blockquote { max-width: 340px; font-size: 23px; font-weight: 500; letter-spacing: -.03em; line-height: 1.45; }
.quote-panel cite { display: block; margin-top: 18px; color: var(--muted); font: 10px/1.6 var(--mono); }
.quote-panel a { text-decoration: none; }
.quote-panel a:hover { text-decoration: underline; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.contact-links a { display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 17px 14px; background: var(--surface); text-decoration: none; transition: border-color 150ms ease; }
.contact-links a:hover { border-color: var(--red); }
.contact-links a > span { display: grid; place-items: center; grid-row: 1 / 3; height: 27px; width: 27px; border: 1px solid #85827a; border-radius: 4px; font: 700 11px/1 var(--mono); }
.contact-links strong { font-size: 14px; font-weight: 600; }
.contact-links small { color: var(--muted); font-size: 10px; }
.contact-links i { grid-column: 3; grid-row: 1 / 3; font-style: normal; color: var(--red); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 27px 0 33px; color: var(--muted); font: 10px/1.5 var(--mono); letter-spacing: .05em; }
.site-footer a { text-decoration: none; }
.site-footer a span { padding-left: 5px; }

@media (max-width: 1100px) {
  .page { width: calc(100% - 64px); }
  .hero { gap: 32px; }
  .project-grid { gap: 24px; }
  .project-card { padding-inline: 23px; }
  .contact { gap: 48px; }
  .contact-links { grid-template-columns: 1fr; }
}
@media (max-width: 950px) {
  .cartridge-label { min-height: 232px; }
  .cartridge-label h3 { font-size: 29px; }
  .tool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { gap: 20px; padding-block: 60px; }
  .hero h1 { font-size: 84px; }
  .controller-area { width: 100%; max-width: 440px; justify-self: center; }
  .contact { gap: 40px; }
}
@media (max-width: 650px) {
  .page { width: calc(100% - 40px); }
  .site-header { min-height: 88px; gap: 20px; }
  .brand { font-size: 16px; padding-inline: 9px; gap: 7px; }
  .command-nav { gap: 17px; }
  .command-nav a { font-size: 12px; }
  .command-nav a span { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 58px 0 47px; }
  .hero h1 { font-size: clamp(78px, 18vw, 112px); }
  .hero-copy .eyebrow { margin-bottom: 16px; }
  .role { font-size: 23px; margin-top: 16px; }
  .hero-lede { margin-top: 19px; }
  .start-link { margin-top: 22px; }
  .controller-area { max-width: 440px; width: 100%; }
  .controller-caption { margin-top: 10px; }
  .about-strip { grid-template-columns: 1fr; gap: 12px; padding-block: 25px; }
  .about-strip p br { display: none; }
  .section-block { padding-block: 52px; }
  .section-title-row { flex-direction: column; align-items: start; gap: 12px; margin-bottom: 27px; }
  .section-title-row > p { font-size: 13px; }
  .project-grid { grid-template-columns: 1fr; gap: 22px; }
  .project-card { padding-inline: 22px; }
  .cartridge-label { min-height: 220px; }
  .cartridge-label h3 { font-size: 30px; padding-inline: 18px; }
  .cartridge-label p { margin-inline: 18px; }
  .card-meta { padding-inline: 18px; }
  .project-card ul { margin-inline: 18px; }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tool-grid li { font-size: 11px; min-height: 86px; gap: 7px; }
  .tool-logo { width: 25px; height: 25px; }
  .tool-logo--java, .tool-logo--wide { width: 29px; height: 29px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .contact-main { grid-row: 1; }
  .contact-links { grid-template-columns: 1fr 1fr; gap: 10px; }
  .contact-links a { padding: 15px 10px; grid-template-columns: 26px 1fr auto; column-gap: 6px; }
  .contact-links small { display: none; }
  .quote-panel { padding-left: 20px; }
  .quote-panel blockquote { max-width: 380px; font-size: 21px; }
}
@media (max-width: 380px) {
  .page { width: calc(100% - 32px); }
  .command-nav { gap: 11px; }
  .command-nav a { font-size: 11px; }
  .brand { font-size: 14px; padding-inline: 7px; }
  .project-card { padding-inline: 18px; }
  .cartridge-label h3 { font-size: 27px; }
  .cartridge-label p { font-size: 14px; }
  .controller-caption { flex-direction: column; align-items: center; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  :root[data-theme] { color-scheme: light; --ink: #252629; --muted: #65645f; --canvas: #fff; --line: #d4d1ca; --surface: #f6f4ef; --red: #bd302d; }
  body { background: white; }
  .page { width: 100%; }
  .controller-area, .command-nav, .start-link, .site-footer a { display: none; }
  .hero { display: block; padding-block: 35px; min-height: auto; }
  .section-block { padding-block: 30px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card { break-inside: avoid; box-shadow: none; }
  .cartridge-label { background: white; color: black; }
  .cartridge-label p, .project-card ul { color: black; }
  [data-theme="dark"] .tool-logo { filter: grayscale(1) brightness(.26); }
}
