/* ─────────────────────────────────────────────────────────────────
   Post — single-article page (used by /posts/<id>.html)

   These pages opt OUT of the snap-scroll layout used elsewhere on
   the site, since long-form articles need normal vertical scrolling.
   ─────────────────────────────────────────────────────────── */

/* Override base.css's hidden-overflow body so the article scrolls. */
html, body {
  height: auto;
  overflow: auto;
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 56px) 24px 96px;
}

/* ─── Header ────────────────────────────────────────────────── */
.post-header { margin-bottom: 36px; }

.post-header .tag {
  display: inline-block;
  margin-bottom: 18px;
}

.post-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.post-meta {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Body content ──────────────────────────────────────────── */
.post-content {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
}

.post-content > p,
.post-content > figure,
.post-content > h2,
.post-content > h3,
.post-content > ul,
.post-content > ol,
.post-content > .wp-block-columns {
  margin-bottom: 22px;
}

.post-content p { margin-bottom: 18px; }

.post-content h2,
.post-content h3 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 14px;
}
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }

.post-content strong { font-weight: 600; color: var(--text-primary); }
.post-content em     { font-style: italic; }

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover { color: var(--primary-dark); }

.post-content ul,
.post-content ol { padding-left: 22px; }
.post-content li { margin-bottom: 8px; }

/* ─── Figures & images ──────────────────────────────────────── */
.post-content figure {
  margin: 28px 0;
  background: var(--bg-paper);
  border: 1px solid rgba(76, 78, 100, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}
.post-content figure img {
  display: block;
  width: 100%;
  height: auto;
}
.post-content figure figcaption {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 14px;
  text-align: center;
  border-top: 1px solid rgba(76, 78, 100, 0.06);
}

/* ─── Alignment helpers (kept from WP source) ───────────────── */
.has-text-align-left   { text-align: left; }
.has-text-align-center { text-align: center; }
.has-text-align-right  { text-align: right; }

/* ─── WP columns: 2-up on desktop, stacked on mobile ────────── */
.post-content .wp-block-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.post-content .wp-block-columns figure { margin: 0; }
@media (max-width: 720px) {
  .post-content .wp-block-columns { grid-template-columns: 1fr; gap: 20px; }
}

/* ─── Back link ─────────────────────────────────────────────── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  background: var(--primary-a8);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.post-back:hover {
  background: var(--primary-a16);
  color: var(--primary-dark);
}

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .post-article {
    padding: calc(var(--nav-height-mobile) + 32px) 18px 64px;
  }
  .post-content { font-size: 16px; }
}
