:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #1f1f1f;
  --muted: #666666;
  --accent: #2563eb;
  --border: #dddddd;

  --max-width: 900px;
  --radius: 1rem;
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #f5f5f5;
  --muted: #bbbbbb;
  --accent: #60a5fa;
  --border: #333333;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;

  padding: 1rem 2rem;

  border-bottom: 1px solid var(--border);
  background: var(--bg);

  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);

  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 0;
  line-height: 1.2;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

.equation {
  font-size: 1.25rem;
}

.hero-card {
  margin: 2rem 0;
  padding: 1rem;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--surface);
}

.hero-card img {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 0.5rem);
}

.hero-card figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-section {
  margin-top: 4rem;
}

.content-section h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem;

  border-top: 1px solid var(--border);

  color: var(--muted);
  text-align: center;
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: center;
  }

  .theme-toggle {
    align-self: center;
  }
}
