:root {
  --color-bg: #0b0d10;
  --color-bg-alt: #14171c;
  --color-fg: #f2f1ec;
  --color-fg-muted: #a3a8b0;
  --color-border: rgba(255, 255, 255, 0.12);
  --color-accent-music: #e8a33d;
  --color-accent-dev: #3ddbd9;
  --color-accent: var(--color-accent-dev);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* /dev respects the OS light/dark preference; the landing page (no
   `.dev` class) stays fixed-dark on purpose — it's a video-backed hero,
   not site chrome, see docs/design/initial.md §9. */
@media (prefers-color-scheme: light) {
  body.dev {
    --color-bg: #f7f6f2;
    --color-bg-alt: #ece9e2;
    --color-fg: #14171c;
    --color-fg-muted: #5b6169;
    --color-border: rgba(0, 0, 0, 0.12);
    --color-accent-music: #a3670a;
    --color-accent-dev: #0f8f8d;
    --color-accent: var(--color-accent-dev);
  }
}

/* "95 mode" (docs/dev/win95-mode.md) — a manual toggle, so it overrides
   the OS light/dark preference above regardless of which one matched
   (same specificity, later in source order wins). Recolors every
   existing component via the same token mechanism as light/dark,
   rather than needing per-component retro overrides. */
body.dev.win95 {
  --color-bg: #c0c0c0;
  --color-bg-alt: #dfdfdf;
  --color-fg: #000000;
  --color-fg-muted: #444444;
  --color-border: #808080;
  --color-accent-music: #800000;
  --color-accent-dev: #000080;
  --color-accent: var(--color-accent-dev);
  /* Deliberately NOT swapping --font-sans to the pixel font here — that
     would pixelate prose too (98.css itself only pixelates UI chrome:
     .title-bar/button/input/table/..., keeping body text in a normal
     antialiased font). Headings get the pixel-font treatment instead,
     see dev.css. Also overrides 98.css's own `body{font-size:12px}` —
     fine for UI chrome, too small for reading paragraphs. */
  font-size: 16px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: filter 0.15s ease;
}

a:hover,
a:focus-visible {
  filter: brightness(1.3);
}

code,
pre {
  font-family: var(--font-mono);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

:not(pre) > code {
  background: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.social-links__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-fg);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-links__badge svg {
  width: 1.1rem;
  height: 1.1rem;
}

.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;
}

.social-links__badge:hover,
.social-links__badge:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}
