:root {
  --bg: #0e1116;
  --surface: #171b22;
  --surface-2: #1f2530;
  --border: #2a313c;
  --text: #e6edf3;
  --muted: #9aa6b2;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.15);
  --radius: 12px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #d6dbe1;
  --text: #1b2129;
  --muted: #5b6672;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  color-scheme: light;
}

/* Custom properties inherit across the Shadow DOM, so the components below
   restyle automatically when --* values change. */
body {
  transition: background 0.2s ease, color 0.2s ease;
}

* {
  box-sizing: border-box;
}

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

.site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1rem;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle .icon {
  font-size: 1rem;
  line-height: 1;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
}
