@font-face { font-family: "IBM Plex Serif"; src: url("assets/IBMPlexSerif-Regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
/* Regular project grid with terminal-inspired side margins. */
:root {
  --bg: #101310;
  --fg: #e9ede4;
  --muted: #a1aa9b;
  --dim: #818d7a;
  --line: #323d2c;
  --accent: #b5eb7c;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --body: Arial, Helvetica, sans-serif;
  --copy: "IBM Plex Serif", Georgia, serif;
  --page-gutter: clamp(20px, 4vw, 72px);
}
* { box-sizing: border-box; }
html { background: var(--bg); min-height: 100%; scroll-behavior: smooth; scroll-padding-top: 30px; scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
p { font-family: var(--copy); }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.page-wrap { width: min(1240px, calc(100% - var(--page-gutter) * 2)); margin-inline: auto; }
.page-wrap, .project-page { position: relative; z-index: 1; }
.page-wrap > main { min-width: 0; }

/* Procedural grey wire routes fade away before the project content. */
.wire-background { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wire-side {
  position: absolute;
  top: 0;
  height: 100%;
  overflow: hidden;
  fill: none;
  mask-image: linear-gradient(to right, #000 12%, transparent 100%);
}
.wire-side.left { left: 0; }
.wire-side.right { right: 0; transform: scaleX(-1); }
.wire-side path { stroke: #8a8a8a; stroke-width: .6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (max-width: 1000px), print { .wire-background { display: none; } }
.site-header { display: flex; align-items: center; min-height: 70px; border-bottom: 1px solid var(--line); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; width: 100%; font: .875rem/1.5 var(--mono); }
.site-header nav a { position: relative; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); transition: color 160ms; }
.site-header nav a::after { content: ""; position: absolute; right: 0; bottom: 3px; left: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 180ms; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--fg); }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { transform: scaleX(1); }
.intro { padding: 72px 0 0; }
h1 { margin: 0; line-height: 1; }
#nameplate { position: relative; }
.nameplate-svg { width: min(100%, 960px); height: auto; display: block; fill: var(--fg); }
.nameplate-svg .underscore { fill: var(--accent); animation: cursor-blink 1.5s steps(1, end) infinite; }
.nameplate-text { display: block; font: 600 clamp(1.6rem, 5.2vw, 4.5rem)/1.1 var(--mono); letter-spacing: -.065em; overflow-wrap: anywhere; }
.intro-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; }
.role { margin: 0; color: var(--accent); font: 1rem/1.5 var(--mono); }
.intro-status { margin: 6px 0 0; color: var(--muted); font: .875rem/1.5 var(--mono); }
.intro-status:empty { display: none; }
.contact { margin: 0 0 0 auto; color: #ccc; font: 400 1rem/1.5 var(--mono); text-align: right; overflow-wrap: anywhere; }
.contact a { text-decoration: underline; text-decoration-color: #666; text-underline-offset: 4px; }
.contact a:hover { color: #fff; text-decoration-color: currentColor; }
.intro-foot { display: flex; align-items: flex-end; align-items: last baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-top: 22px; }
.intro-tags { display: flex; flex-wrap: wrap; max-width: 30rem; gap: 10px; margin: 0; padding: 0; list-style: none; }
.intro-tags li { padding: 5px 12px; border: 1px solid #b5eb7c66; color: var(--accent); font: .8125rem/1.4 var(--mono); }
.intro-tags:empty { display: none; }
.work-section { margin-top: 32px; scroll-margin-top: 32px; }
.intro + .work-section { margin-top: 24px; }
.section-heading { border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font: 400 clamp(1.4rem, 2.2vw, 1.85rem)/1.25 var(--mono); letter-spacing: -.055em; }
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px 32px; align-items: start; }
.project { min-width: 0; }
.project-preview { display: block; position: relative; min-width: 0; box-shadow: 0 10px 22px #00000024; transition: transform 220ms ease, box-shadow 220ms ease; }
.project-media { position: relative; background: #181c18; min-width: 0; overflow: hidden; }
.project-media img, .project-media video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.game-project .project-media { aspect-ratio: 16 / 9; }
.project-media.cropped img { height: var(--image-height); object-position: center top; max-height: none; }
.project-media.media-contain img, .project-media.media-contain video { object-fit: contain; }
.project-body { padding-top: 20px; }
.project-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.project-date { color: var(--dim); font: .875rem/1.4 var(--mono); white-space: nowrap; }
.project-heading h3 { margin: 0; font: 600 clamp(1.45rem, 2.1vw, 1.9rem)/1.15 var(--mono); letter-spacing: -.04em; transition: color 180ms; overflow-wrap: anywhere; }
.corner-ribbon { position: absolute; top: 0; right: 0; z-index: 2; width: 132px; height: 132px; overflow: hidden; pointer-events: none; }
.corner-ribbon span { position: absolute; top: 30px; right: -46px; width: 190px; padding: 7px 0; background: var(--accent); color: var(--bg); font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-align: center; text-transform: uppercase; transform: rotate(45deg); box-shadow: 0 2px 8px #00000059; }
.project-detail-hero { position: relative; }
.project-summary { white-space: pre-line; color: var(--muted); max-width: 48ch; font-size: 1rem; line-height: 1.65; margin: 10px 0 0; overflow-wrap: anywhere; }
.project:focus-within .project-heading h3 { color: var(--accent); }
#games { margin-top: 82px; }
.engine-project { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr); gap: 36px; align-items: center; padding: 28px; background: #171c17; }
.engine-project .project-media { aspect-ratio: 2 / 1; }
.engine-project .project-body { padding: 0; }
.engine-project .project-heading h3 { font-size: clamp(1.7rem, 2.7vw, 2.5rem); }
#other { margin-top: 82px; }
#other-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
#other-list > .project { grid-column: auto; }
#other-list .project-media { aspect-ratio: 16 / 9; }
#other-list .project-heading h3 { font-size: 1.4rem; }
#other-list .project-body { padding-top: 18px; }
.text-project .project-body { padding-top: 0; }
.project-text-link { text-decoration: underline; text-underline-offset: 5px; }
.project-text-link:hover { color: var(--accent); }
#about { margin-top: 82px; }
.about-copy { max-width: 68ch; color: var(--muted); font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.about-copy p { margin: 0; white-space: pre-line; }
.about-copy p + p { margin-top: 1.5rem; }
.about-copy a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 4px; }
.about-copy a:hover { color: var(--accent); text-decoration-color: currentColor; }
.site-footer { display: flex; justify-content: flex-end; margin-top: 64px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font: .875rem/1.6 var(--mono); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--accent); }
.project-page .site-footer { margin-top: 40px; border-top: 0; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 10; color: var(--bg); background: var(--accent); padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.noscript { border: 1px solid var(--line); padding: 20px; }

/* The same image and type treatment continues into project pages. */
.project-page { width: min(1120px, calc(100% - var(--page-gutter) * 2)); margin-inline: auto; padding: 32px 0 0; }
.project-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font: .875rem/1.5 var(--mono); }
.project-back:hover { color: var(--accent); }
.project-detail-heading { padding: 36px 0 30px; }
.project-detail-date { margin: 12px 0 0; color: var(--dim); font: 1rem/1.5 var(--mono); }
.project-detail-heading h1 { font: 600 clamp(2rem, 4.5vw, 4rem)/1.1 var(--mono); letter-spacing: -.045em; overflow-wrap: anywhere; }
.project-detail-summary { white-space: pre-line; max-width: 65ch; margin: 16px 0 0; color: var(--muted); line-height: 1.75; }
.project-detail-hero .project-media { aspect-ratio: var(--media-ratio); }
.project-detail-copy { max-width: none; margin: 30px 0 0; padding: 22px max(28px, calc(100% - 76ch)) 22px 28px; background: #171c17; border-left: 2px solid var(--accent); color: #c3cbbd; line-height: 1.8; white-space: pre-line; }
.project-detail-copy a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 4px; }
.project-detail-copy a:hover { color: var(--accent); text-decoration-color: currentColor; }
.project-detail-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; font: .875rem/1.5 var(--mono); }
.project-detail-links a { text-decoration: underline; text-underline-offset: 4px; }
.project-detail-links a:hover { color: var(--accent); }
.project-detail-item { margin: 0; }
.project-detail-item + .project-detail-item { margin-top: 28px; }
.project-video { display: block; }
.media-caption { display: block; margin-top: 12px; color: var(--muted); font: .875rem/1.5 var(--mono); text-decoration: underline; text-underline-offset: 4px; }
.project-video:hover .media-caption { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .project-preview:hover { transform: translateY(-4px); box-shadow: 0 18px 32px #0000004d; }
  .project-preview:hover .project-media img, .project-preview:hover .project-media video { transform: scale(1.04); }
  .project:has(.project-preview:hover) .project-heading h3 { color: var(--accent); }
}
@media (max-width: 1000px) {
  .games-grid { gap: 44px 24px; }
  .engine-project { grid-template-columns: minmax(0, 1.6fr) minmax(200px, 1fr); gap: 24px; padding: 24px; }
  #other-list { gap: 24px; }
}
@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .site-header nav { gap: 20px; padding-block: 8px; }
  .intro { padding: 32px 0 0; }
  .intro-meta { margin-top: 16px; }
  .section-heading { padding-top: 20px; margin-bottom: 24px; }
  .games-grid { grid-template-columns: 1fr; gap: 38px; }
  #games { margin-top: 56px; }
  .engine-project { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .engine-project .project-heading h3 { font-size: 1.6rem; }
  #other, #about { margin-top: 56px; }
  #other-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .project-body { padding-top: 16px; }
  .site-footer { margin-top: 44px; }
  .project-page { padding-top: 20px; }
  .project-detail-heading { padding-top: 26px; }
  .project-detail-copy { padding: 18px 20px; }
}
@media (max-width: 480px) {
  .contact { width: 100%; text-align: left; }
  .contact-extra { display: block; margin-top: 4px; }
  .contact-sep { display: none; }
  .site-header nav { gap: 8px 18px; font-size: .875rem; }
  .section-heading h2 { font-size: 1.35rem; }
  #other-list { grid-template-columns: 1fr; }
  #other-list .project-heading h3 { font-size: 1.45rem; }
}
@keyframes cursor-blink { 0%, 65%, 100% { opacity: 1; } 66%, 99% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-preview, .project-heading h3, .site-header nav a, .site-header nav a::after { transition: none; }
  .project-preview:hover, .project-preview:hover .project-media img, .project-preview:hover .project-media video { transform: none; }
}

/* A single short decoding pass on top-navigation hover or keyboard focus.
   Like the name cursor, it also runs under reduced motion: Windows 11 sets that when
   Animation effects is off, and Adam (2026-11-12) wants both text effects visible there. */
.nav-label { position: relative; display: inline-block; white-space: nowrap; }
.nav-decode-overlay { position: absolute; inset: 0; visibility: hidden; color: var(--accent); white-space: pre; pointer-events: none; }
.nav-label.is-decoding .nav-label-text { opacity: 0; }
.nav-label.is-decoding .nav-decode-overlay { visibility: visible; }
