/* ════════════════════════════════════════════════════════════════
   BLOG — listing page + article typography.
   Loaded alongside main.css on /blog/ pages, and on subpages that reuse
   the listing chrome (e.g. /talks/) for the nav-logo link, the page header
   and the aria-current state. Reuses the global tokens, nav, buttons and
   footer; adds only blog/subpage-specific layout.
   ════════════════════════════════════════════════════════════════ */

/* ─── NAV LOGO AS LINK (subpages) ────────────────────────────────── */
a.nav-logo:hover { text-decoration: none; opacity: 0.85; }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }

/* ─── LISTING / SUBPAGE HEADER ───────────────────────────────────── */
.blog-head { padding: 4rem 0 2rem; }
.blog-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.blog-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

/* ─── LISTING: FILTERS ───────────────────────────────────────────── */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.blog-filter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.blog-filter:hover { color: var(--text); border-color: var(--accent); }
.blog-filter.is-active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ─── LISTING: POST LIST ─────────────────────────────────────────── */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 4rem;
}
.post-entry {
  border-bottom: 1px solid var(--border);
}
.post-entry[hidden] { display: none; }
.post-entry-link {
  display: block;
  padding: 1.6rem 0.5rem;
  border-radius: var(--radius);
  color: inherit;
  transition: background var(--transition), padding-left var(--transition);
}
.post-entry-link:hover {
  text-decoration: none;
  background: var(--surface);
  padding-left: 1rem;
}
.post-entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.post-entry-title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.post-entry-link:hover .post-entry-title { color: var(--accent); }
.post-entry-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 65ch;
}
.post-read { color: var(--muted); }

/* ─── ARTICLE ────────────────────────────────────────────────────── */
.post { padding: 3rem 0 1rem; }
.post-header { max-width: 720px; margin: 0 auto 2.5rem; }
.post-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.post-back:hover { color: var(--accent); text-decoration: none; }
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.post-title-full {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/* ─── ARTICLE BODY (prose) ───────────────────────────────────────── */
.post-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.8;
}
.post-body > * { margin-bottom: 1.4rem; }
.post-body p { color: var(--text); }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: 0.8; }
.post-body strong { font-weight: 700; }
.post-body em { font-style: italic; }
.post-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 2.6rem;
  margin-bottom: 1rem;
}
.post-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin-left: 0;
  color: var(--muted);
  font-style: italic;
}
.post-body blockquote p { margin-bottom: 0.6rem; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body figure { margin: 2rem 0; }
.post-body img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.post-body figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.6rem;
}

/* ─── PREV / NEXT PAGER ──────────────────────────────────────────── */
.post-pager {
  max-width: 720px;
  margin: 3rem auto 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  max-width: 48%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}
.pager-link:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.pager-prev { text-align: right; align-items: flex-end; }
.pager-dir { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.pager-ttl { font-size: 0.92rem; font-weight: 600; line-height: 1.3; }

@media (max-width: 600px) {
  .post-pager { flex-direction: column; }
  .pager-link { max-width: 100%; }
  .pager-prev { text-align: left; align-items: flex-start; }
}
