:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2563eb;
  --bg: #ffffff;
  --border: #e5e5e5;
  --code-bg: #f6f8fa;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e8e8;
    --muted: #9a9a9a;
    --accent: #6ea8fe;
    --bg: #121212;
    --border: #2a2a2a;
    --code-bg: #1e1e1e;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  margin: 0;
  font-size: 18px;
}

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

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

.site-header nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--accent); }

.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.intro h1 { font-size: 2rem; margin-bottom: 0.25rem; }
.tagline { color: var(--muted); font-size: 1.1rem; margin-top: 0; }

.post-list h2 { margin-top: 2.5rem; }

.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.post-item h3 { margin: 0 0 0.25rem; }
.post-item a { text-decoration: none; color: var(--ink); }
.post-item a:hover h3 { color: var(--accent); }
.post-item time { color: var(--muted); font-size: 0.85rem; }
.post-item p { color: var(--muted); margin: 0.4rem 0 0; }

.single h1 { font-size: 2.1rem; line-height: 1.2; margin-bottom: 0.4rem; }
.post-date { color: var(--muted); font-size: 0.9rem; }
.post-body { margin-top: 1.75rem; }
.post-body h2 { margin-top: 2.25rem; }
.post-body h3 { margin-top: 1.75rem; }

a { color: var(--accent); }

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

.post-figure { margin: 1.75rem 0; text-align: center; }
.post-figure figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }

/* Responsive video wrappers (Hugo youtube/vimeo shortcodes) */
.post-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  margin: 1.75rem 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--muted);
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}
code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
pre code { background: none; padding: 0; }

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