/* Shared styles for the home and 404 pages.
   Each experiment keeps its own styles so it stays self-contained. */
:root {
  --bg: #e8ecf1;
  --surface: #f6f8fb;
  --ink: #1a2331;
  --muted: #5a6577;
  --line: #cdd5df;
  --accent: #9a4f12;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141d; --surface: #161d29; --ink: #e3e8ef; --muted: #8c97a9; --line: #263041;
    --accent: #f0a45c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 40px 56px;
}
.wrap { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.wrap.narrow { max-width: 680px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 6vw, 48px); font-weight: 700; }
h2 { font-size: 22px; font-weight: 600; margin-top: 8px; }
p, ul { margin: 0; }
.lede { color: var(--muted); font-size: 18px; max-width: 52ch; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Experiment list */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { font-size: 22px; font-weight: 600; }
.card p { color: var(--muted); font-size: 15px; }
.card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
