/* Blog: index (home.php), archive.php, single.php, generic page.php, 404.php.
   Reuses tokens and shared classes from styles.css and components.css:
   --ink, --navy, --line, --line-soft, --paper-2, --gray-600, --font-sans,
   --font-mono, --ease-out, --space-section/--space-head/--space-block,
   .wrap, .page-hero, .page-title, .page-lede, .hero-eyebrow, .btn-primary,
   .case-grid, .case-card, .cc-thumb, .cc-name, .cc-lbl, .cc-more, .ph.
   Logical properties throughout; the only [dir="rtl"] rules here mirror an
   arrow icon, the same convention every other page already uses. */

/* ── Post card: the few bits a .case-card doesn't already have ── */
.pc-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.pc-excerpt { margin: 0; }
.pc-meta {
  font-size: 14px;
  color: var(--gray-600);
}

/* ── Blog list / empty state ── */
.blog-empty {
  padding: var(--space-block) 0;
  text-align: center;
  font-size: 17px;
  color: var(--gray-600);
}

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-head);
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.blog-pagination a:hover,
.blog-pagination a:focus-visible {
  border-color: var(--navy);
  color: var(--navy);
}
.blog-pagination a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.blog-pagination .current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ── Single post header meta row ── */
.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--gray-600);
  margin-top: var(--space-block);
}

/* ── Back-to-blog link ── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: var(--space-block);
  transition: gap 180ms var(--ease-out), color 180ms var(--ease-out);
}
.post-back:hover,
.post-back:focus-visible { color: var(--ink); gap: 12px; }
.post-back:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
[dir="rtl"] .post-back svg { transform: scaleX(-1); }

/* ── Featured image: full width, between the header and the text column ── */
.post-featured {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
}
.post-featured img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .post-featured { aspect-ratio: 4 / 3; }
}

/* ── Article column: single post content and generic page content share
   this (both pass through .post-content-wrap > .post-content). Measure
   capped at 68ch, body 17px/1.6, one heading scale, no side-stripe
   blockquote, images fill the column with an optional caption. ── */
.post-content-wrap { max-inline-size: 68ch; margin-inline: auto; }

.post-content {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.post-content > :first-child { margin-top: 0; }
.post-content h2 {
  font-size: 28px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2;
  color: var(--ink); margin: var(--space-block) 0 16px;
}
.post-content h3 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
  color: var(--ink); margin: var(--space-block) 0 12px;
}
.post-content p { margin: 0 0 20px; }
.post-content ul,
.post-content ol { margin: 0 0 20px; padding-inline-start: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border: 0; border-block: 1px solid var(--line);
  padding-block: 20px; margin-block: var(--space-block);
  font-size: 19px; line-height: 1.55; font-style: normal; color: var(--ink);
}
.post-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--paper-2); color: var(--navy);
  padding: 2px 6px; border-radius: 4px;
}
.post-content pre {
  background: var(--ink); color: var(--paper-2);
  padding: 20px; border-radius: 10px; overflow-x: auto; margin: var(--space-block) 0;
}
.post-content pre code { background: none; color: inherit; padding: 0; font-size: 13px; }
.post-content figure { margin: var(--space-block) 0; }
.post-content img {
  width: 100%; max-width: 100%; height: auto; display: block;
  border-radius: 10px; border: 1px solid var(--line-soft);
}
.post-content figcaption {
  margin-top: 10px; font-size: 13px; color: var(--gray-600); text-align: center;
}
.post-content a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ── Tags ── */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: var(--space-block) 0 0; padding-top: var(--space-block);
  border-top: 1px solid var(--line);
}
.post-tag {
  font-size: 13px; font-weight: 500; color: var(--gray-600);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px;
}
.post-tag:hover, .post-tag:focus-visible { color: var(--ink); border-color: var(--ink); }
.post-tag:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ── Author bio: hairline box, no shadow ── */
.post-author {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: var(--space-block); padding: 24px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2);
}
.post-author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-author-name { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.post-author-role {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 8px;
}
.post-author-desc { font-size: 14px; line-height: 1.6; color: var(--gray-600); margin-bottom: 12px; }
.post-author-links { display: flex; flex-wrap: wrap; gap: 16px; }
.post-author-links a {
  font-size: 13px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
  transition: border-color 200ms var(--ease-out);
}
.post-author-links a:hover, .post-author-links a:focus-visible { border-color: var(--ink); }
.post-author-links a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ── Related posts ── */
.related-posts { margin-top: var(--space-section); padding-top: var(--space-block); border-top: 1px solid var(--line); }
.related-posts-title { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); margin-bottom: var(--space-head); }

/* ── 404 ── */
.error-404-inner {
  max-width: 440px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.error-404-code {
  font-family: var(--font-mono); font-size: clamp(72px, 11vw, 112px); font-weight: 600;
  color: rgba(30, 58, 95, 0.1); line-height: 1; letter-spacing: -0.03em;
}
.error-404-inner .page-title { margin: 0; max-width: none; }
.error-404-inner .page-lede { margin: 0; }
.error-404-inner .btn-primary { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .post-back, .blog-pagination a, .post-tag, .post-author-links a { transition: none; }
}
