:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #666666;
  --accent: #0055cc;
  --border: #eaeaea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e4e4e4;
    --muted: #999999;
    --accent: #66a3ff;
    --border: #2a2a2a;
  }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 65ch;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

nav a:hover, a:hover {
  color: var(--accent);
  text-decoration: underline;
}

article {
  margin-bottom: 3.5rem;
}

article h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.25rem 0;
}

article h2 a {
  color: var(--text);
  text-decoration: none;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

pre {
  background: var(--border);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  background: var(--bg);
  color: var(--accent);
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

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

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

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

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

article h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 0.5rem 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

figure {
  margin: 1.75rem 0;
}

figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
