:root {
  color-scheme: light;
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --border: #e2e8f0;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

.wrapper {
  max-width: 42rem;
  margin-inline: auto;
  padding: 2.5rem 1.5rem 4rem;
}

.stack > * + * {
  margin-block-start: 1.25rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.site-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.site-title {
  color: var(--muted);
  text-decoration: none;
}

.site-title:hover {
  color: var(--accent);
}

.site-title[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

.site-hero h1,
.post-body h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.post-list {
  margin-top: 2rem;
}

.post-card {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.post-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
}

.excerpt {
  color: var(--muted);
}

.read-more {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.post-body h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.post-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: #e2e8f0;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.post-body ul {
  padding-left: 1.25rem;
}

.htmx-request #site-main {
  opacity: 0.65;
  transition: opacity 0.15s ease;
}
