/* ==========================================================================
   0ptim1zed — site styles
   Dark-first, with a light theme via prefers-color-scheme or [data-theme].
   Per-page accent colours are set with --accent / --accent-2 on <body>.
   ========================================================================== */

:root {
  --bg: #07080c;
  --bg-elev: #0e1017;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --text-muted: #9ba1b4;
  --text-faint: #646a7e;
  --grid-line: rgba(255, 255, 255, 0.035);
  --nav-bg: rgba(7, 8, 12, 0.7);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);

  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-ink: #ffffff;
  --glow: color-mix(in srgb, var(--accent) 35%, transparent);

  --ok: #34d399;
  --wip: #fbbf24;
  --planned: #94a3b8;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --surface: rgba(10, 12, 20, 0.03);
    --surface-hover: rgba(10, 12, 20, 0.06);
    --border: rgba(10, 12, 20, 0.09);
    --border-strong: rgba(10, 12, 20, 0.18);
    --text: #0c0e14;
    --text-muted: #4d5366;
    --text-faint: #858b9c;
    --grid-line: rgba(10, 12, 20, 0.05);
    --nav-bg: rgba(246, 247, 251, 0.75);
    --shadow: 0 20px 50px -24px rgba(20, 24, 40, 0.25);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --surface: rgba(10, 12, 20, 0.03);
  --surface-hover: rgba(10, 12, 20, 0.06);
  --border: rgba(10, 12, 20, 0.09);
  --border-strong: rgba(10, 12, 20, 0.18);
  --text: #0c0e14;
  --text-muted: #4d5366;
  --text-faint: #858b9c;
  --grid-line: rgba(10, 12, 20, 0.05);
  --nav-bg: rgba(246, 247, 251, 0.75);
  --shadow: 0 20px 50px -24px rgba(20, 24, 40, 0.25);
  color-scheme: light;
}

/* SHAR: Definitive Edition — Simpsons yellow + sky blue */
.theme-shar {
  --accent: #ffd90f;
  --accent-2: #4fb3ff;
  --accent-ink: #14110a;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p a,
li a:not(nav a),
.prose a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

p a:hover,
li a:not(nav a):hover,
.prose a:hover {
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Background decoration ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 70vmax;
  height: 70vmax;
  top: -40vmax;
  left: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 35% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(circle at 65% 55%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 55%);
  filter: blur(40px);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
  background: var(--nav-bg);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.logo__text .hl {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-hover);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.nav__menu-btn {
  display: none;
}

@media (max-width: 760px) {
  .nav__menu-btn {
    display: inline-grid;
  }

  .nav__links {
    position: absolute;
    top: 72px;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }

  .nav.is-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav.is-open {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav__links a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }
}

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -10px var(--glow);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
  box-shadow: 0 14px 36px -10px var(--glow);
}

.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.chip--status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-dot, var(--planned));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip-dot, var(--planned)) 22%, transparent);
}

.chip--wip {
  --chip-dot: var(--wip);
}

.chip--ok {
  --chip-dot: var(--ok);
}

.chip--planned {
  --chip-dot: var(--planned);
}

.chip--live::before {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section--tight {
  padding: clamp(48px, 7vw, 80px) 0;
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
}

.section-lede {
  color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 18px);
}

.divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(72px, 12vw, 160px) 0 clamp(64px, 9vw, 120px);
}

.hero__inner {
  display: grid;
  justify-items: start;
  gap: 28px;
}

.hero__inner > * {
  max-width: 880px;
}

.hero__title {
  font-size: clamp(44px, 8.5vw, 104px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 620px;
  color: var(--text-muted);
  font-size: clamp(17px, 2vw, 21px);
}

.terminal-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13.5px;
  overflow: hidden;
}

.terminal-line .prompt {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Project cards ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}

a.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-3px);
}

.card--feature {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.card--half {
  grid-column: span 6;
}

@media (max-width: 860px) {
  .card--feature {
    grid-template-columns: 1fr;
  }

  .card--half {
    grid-column: span 12;
  }
}

.card__media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

@media (max-width: 860px) {
  .card__media {
    order: -1;
    min-height: 200px;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3.5vw, 40px);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card__title {
  font-size: clamp(24px, 3vw, 34px);
}

.card--half .card__title {
  font-size: 24px;
}

.card__text {
  color: var(--text-muted);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

a.card:hover .card__cta svg {
  transform: translateX(4px);
}

.card--placeholder {
  border-style: dashed;
  background: transparent;
}

.card--placeholder .card__title {
  color: var(--text-muted);
}

/* Generated "art" used until real graphics exist */
.art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--art-a, var(--accent)) 45%, transparent), transparent 60%),
    radial-gradient(circle at 75% 70%, color-mix(in srgb, var(--art-b, var(--accent-2)) 40%, transparent), transparent 60%),
    var(--bg-elev);
}

.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.art__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 112px);
  letter-spacing: -0.06em;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.art__label small {
  display: block;
  margin-top: 6px;
  font-size: 0.16em;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-muted);
}

.art--shar {
  --art-a: #ffd90f;
  --art-b: #4fb3ff;
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
}

.prose {
  display: grid;
  gap: 18px;
  color: var(--text-muted);
  font-size: 17.5px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.stack {
  display: grid;
  gap: 12px;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat__label {
  color: var(--text-muted);
  font-size: 15px;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: right;
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(ellipse at 100% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

.contact__title {
  font-size: clamp(30px, 4.5vw, 52px);
  margin-bottom: 12px;
}

.contact__lede {
  max-width: 520px;
  color: var(--text-muted);
}

.contact__email {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.socials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 20px;
}

.social {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.social:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.social svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

.social__name {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.social__handle {
  display: block;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---------- Footer ---------- */

.footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__links a:hover {
  color: var(--text);
}

.footer__note {
  margin-top: 20px;
  max-width: 760px;
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================================
   Project page
   ========================================================================== */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: var(--text);
}

.project-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 80px);
}

.project-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 920px) {
  .project-hero__grid {
    grid-template-columns: 1fr;
  }
}

.project-hero__copy {
  display: grid;
  gap: 24px;
}

.project-hero__title {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.project-hero__title .sub {
  display: block;
  margin-top: 10px;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.project-hero__art {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 80px -20px var(--glow);
}

/* Sub-navigation for the project page */
.subnav {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: var(--nav-bg);
  border-block: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.subnav__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav__list::-webkit-scrollbar {
  display: none;
}

.subnav__list a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.subnav__list a:hover,
.subnav__list a.is-active {
  color: var(--text);
  background: var(--surface-hover);
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.feature {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s;
}

.feature:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 19px;
}

.feature p {
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.shot {
  position: relative;
  grid-column: span 2;
  aspect-ratio: 16 / 9;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.shot--wide {
  grid-column: span 3;
}

@media (max-width: 760px) {
  .shot,
  .shot--wide {
    grid-column: span 6;
  }
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot .art__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-shadow: none;
}

/* Downloads */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.download {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.download__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.download__title {
  font-size: 20px;
}

.download__desc {
  color: var(--text-muted);
  font-size: 15.5px;
}

.download .btn {
  width: 100%;
}

.callout {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--text-muted);
  font-size: 15.5px;
}

.callout svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

.callout strong {
  color: var(--text);
}

/* Install steps */
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
}

.steps h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.steps p {
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Changelog timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: linear-gradient(var(--accent), var(--border) 60%);
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -28px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline__version {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.timeline__date {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}

.timeline ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* FAQ */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}

.faq details[open] {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.25s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > p {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

/* Two-column layout used on the project page */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.credits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.credits li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.credits li span:last-child {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: right;
}

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 200px);
  text-align: center;
}

.notfound__code {
  font-family: var(--font-mono);
  font-size: clamp(96px, 20vw, 200px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.notfound p {
  margin: 16px 0 32px;
  color: var(--text-muted);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Real artwork inside the media frames */
.card__media > img,
.project-hero__art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media > img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

a.card:hover .card__media > img {
  transform: scale(1.04);
}

/* Fact grid (e.g. "The original game") */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.fact {
  display: grid;
  gap: 4px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.fact__label {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact__value {
  font-size: 17px;
  font-weight: 600;
}
