/* ── Layout ──────────────────────────────────────────── */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────── */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  max-width: 980px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700; font-size: 17px; letter-spacing: .3px;
}
.logo a { color: var(--fg); text-decoration: none; }
nav { display: flex; gap: 6px; }
nav a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
  transition: color .15s, background .15s;
}
nav a:hover { color: var(--fg); background: rgba(255,255,255,.05); text-decoration: none; }
nav a.active { color: var(--fg); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  padding: var(--space-l) 24px var(--space-m);
  color: var(--muted); font-size: 13px;
  max-width: 980px;
  margin: 0 auto;
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--link); }

/* ── Blog index ──────────────────────────────────────── */
.blog-index { padding: var(--space-xl) 0 var(--space-l); }
.blog-index h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.blog-index .lead {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: var(--space-l);
}

/* ── Post cards ──────────────────────────────────────── */
.post-list {
  display: flex; flex-direction: column;
  gap: 14px;
}
.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(44, 192, 185, .25);
  box-shadow: 0 6px 20px rgba(44, 192, 185, .06);
  text-decoration: none;
}
.post-card .post-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.post-card .post-date {
  color: var(--muted); font-size: 13px;
}
.post-card .post-tag {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--link);
  background: rgba(44, 192, 185, .1);
  padding: 2px 8px; border-radius: 4px;
}
.post-card h2 {
  font-size: 20px; font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}
.post-card .post-excerpt {
  color: var(--muted); font-size: 14px; line-height: 1.55;
  margin: 0;
}

/* ── Single post ─────────────────────────────────────── */
.post-header {
  padding: var(--space-xl) 0 var(--space-m);
}
.post-header .post-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--space-s);
}
.post-header .post-date {
  color: var(--muted); font-size: 14px;
}
.post-header .post-tag {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--link);
  background: rgba(44, 192, 185, .1);
  padding: 2px 8px; border-radius: 4px;
}
.post-header h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
}

/* ── Post body (Source Serif 4 for long-form) ────────── */
.post-body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg);
  padding-bottom: var(--space-xl);
}
.post-body p {
  color: var(--fg);
  margin-bottom: 1.4em;
}
.post-body h2 {
  font-size: 24px; font-weight: 600;
  margin-top: 2.2em; margin-bottom: .6em;
}
.post-body h3 {
  font-size: 19px; font-weight: 600;
  margin-top: 1.8em; margin-bottom: .5em;
}
.post-body a { text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: #3dd6cf; }

.post-body ul, .post-body ol {
  margin-bottom: 1.4em;
  padding-left: 1.5em;
  color: var(--fg);
}
.post-body li { margin-bottom: .4em; }
.post-body li::marker { color: var(--muted); }

.post-body blockquote {
  border-left: 3px solid var(--link);
  padding: var(--space-s) var(--space-m);
  margin: 1.6em 0;
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p {
  color: var(--muted);
  margin-bottom: 0;
  font-style: italic;
}

.post-body code {
  font-family: 'Source Code Pro', 'Fira Code', monospace;
  font-size: .88em;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}
.post-body pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-s) var(--space-m);
  overflow-x: auto;
  margin-bottom: 1.6em;
}
.post-body pre code {
  background: none; border: none; padding: 0;
  font-size: 14px; line-height: 1.6;
}

.post-body img {
  max-width: 100%; height: auto;
  border-radius: var(--radius);
  margin: 1.2em 0;
}

.post-body hr {
  border: 0; height: 1px; margin: 2em 0;
  background: linear-gradient(90deg, transparent, var(--border) 25%, rgba(44,192,185,.15) 50%, var(--border) 75%, transparent);
}

/* ── Post footer / back link ─────────────────────────── */
.post-nav {
  border-top: 1px solid var(--border);
  padding: var(--space-m) 0;
}
.post-nav a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.post-nav a:hover { color: var(--link); text-decoration: none; }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 600px) {
  :root { --space-xl: 48px; --space-l: 32px; }
  .site-header { padding-left: 16px; padding-right: 16px; }
  nav { gap: 2px; }
  nav a { padding: 6px 6px; font-size: 13px; }
  .wrap, .wrap--narrow { padding: 0 16px; }
  .post-body { font-size: 16px; }
  .post-card { padding: 18px; }
}
