/* Blog pages: /blog/ list and individual posts. Builds on style.css tokens. */

.nav-list a[aria-current="page"]::after { right: 0; }

/* ---- /blog/ header ---- */
.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--edge) clamp(2rem, 5vw, 3rem);
}
.page-hero .subhead { max-width: 52ch; }
.post-year + .post-year { margin-top: 3.5rem; }
.post-year .section-label { margin-bottom: 1.25rem; }
.post-empty {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---- Single post ---- */
.post {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) var(--edge) clamp(3rem, 6vw, 4.5rem);
}
.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--grid-line);
}
.post-header .eyebrow a { border-bottom: 1px solid currentColor; }
.post-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.post-dek {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Body typography — content comes from Markdown */
.post-body {
  font-size: 1.02rem;
  line-height: 1.75;
}
.post-body > * + * { margin-top: 1.25em; }
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-display);
  line-height: 1.25;
}
.post-body h2 { font-size: 1.6rem; margin-top: 2.2em; }
.post-body h3 { font-size: 1.3rem; margin-top: 1.9em; }
.post-body h4 { font-size: 1.1rem; margin-top: 1.6em; }
.post-body h2 + *, .post-body h3 + *, .post-body h4 + * { margin-top: 0.6em; }

.post-body a {
  color: var(--blue);
  border-bottom: 1px solid currentColor;
}
.post-body a:hover { color: var(--ink); }
.post-body strong { font-weight: 600; }

.post-body ul,
.post-body ol { display: flex; flex-direction: column; gap: 0.45em; }
.post-body li { position: relative; padding-left: 1.6rem; }
.post-body li > ul,
.post-body li > ol { margin-top: 0.45em; }
.post-body ul > li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brass);
}
.post-body ol { counter-reset: post-ol; }
.post-body ol > li { counter-increment: post-ol; }
.post-body ol > li::before {
  content: counter(post-ol) ".";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 2.05;
  color: var(--brass);
}

.post-body blockquote {
  margin: 1.75em 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--brass);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.post-body blockquote > * + * { margin-top: 0.8em; }

.post-body hr {
  border: 0;
  height: 1px;
  background: var(--grid-line);
  margin: 2.75em 0;
}

.post-body img {
  border: 1px solid var(--grid-line);
  background: var(--paper-raised);
}
.post-body figure { margin: 2em 0; }
.post-body figcaption,
.post-body img + em {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--paper-raised);
  border: 1px solid var(--grid-line);
  padding: 0.08em 0.35em;
}
.post-body pre {
  overflow-x: auto;
  padding: 1.1rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
  line-height: 1.6;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
/* Rouge syntax colors on the dark code block */
.post-body .highlight .c, .post-body .highlight .c1, .post-body .highlight .cm { color: #8FA3B0; font-style: italic; }
.post-body .highlight .k, .post-body .highlight .kd, .post-body .highlight .kn, .post-body .highlight .kc { color: #E0B46A; }
.post-body .highlight .s, .post-body .highlight .s1, .post-body .highlight .s2, .post-body .highlight .sd { color: #9CCB9F; }
.post-body .highlight .m, .post-body .highlight .mi, .post-body .highlight .mf { color: #9DC3E6; }
.post-body .highlight .nf, .post-body .highlight .nc { color: #F4F7F7; font-weight: 500; }

.post-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.post-body th,
.post-body td {
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--grid-line);
  text-align: left;
}
.post-body th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
  border-bottom-color: var(--ink);
}

/* ---- Post footer ---- */
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grid-line);
}
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.post-nav-link { display: flex; flex-direction: column; gap: 0.35rem; }
.post-nav-next { grid-column: 2; text-align: right; }
.post-nav-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.post-nav-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
}
.post-nav-link:hover .post-nav-title { color: var(--blue); }
.post-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { grid-column: auto; text-align: left; }
}
