/* Blog styles. Its own file rather than more rules in styles.css, which the rest of the
   site loads on every page and does not need any of this. */

.post {
  padding: var(--space-14, 3.5rem) 0 var(--space-20);
}

.post h1 {
  font-family: var(--serif);
  /* Headlines run long, so this shrinks rather than wrapping into a four-line stack. */
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 var(--space-5);
  max-width: 34rem;
}

.post .legal-back { margin-bottom: var(--space-6); }

/* ---- Byline ---- */

.byline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: var(--font-size-small);
  color: var(--text-muted);
}

.byline-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  /* The source is a portrait, so a plain square crop cuts the face off centre. */
  object-position: 50% 22%;
  flex: none;
}

.byline a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.byline time::before {
  content: "\00b7";
  margin: 0 var(--space-2);
  color: var(--text-faint);
}

/* ---- Article body ---- */

.post-body {
  max-width: 42rem;
  margin-top: var(--space-8);
}

.post-body p,
.post-body li {
  color: var(--text-muted);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
}

.post-body p { margin: 0 0 var(--space-5); }

.post-body h2 {
  font-family: var(--serif);
  font-size: var(--font-size-h3, 1.4rem);
  color: var(--text);
  margin: var(--space-10) 0 var(--space-4);
}

.post-body ul,
.post-body ol {
  margin: 0 0 var(--space-5);
  padding-left: var(--space-6);
  display: grid;
  gap: var(--space-3);
}

.post-body strong { color: var(--text); }

.post-body a { color: var(--accent-strong); }

/* ---- Index ---- */

.post-intro a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-intro {
  max-width: 38rem;
  color: var(--text-muted);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
  margin: 0 0 var(--space-10);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
  max-width: 42rem;
}

/* --bg-elevated, not --surface. Surface is #fffdf9 against a #fbf9f4 page, four points
   apart per channel, so the cards were invisible against the panel behind them. Elevated
   is pure white in the light theme and a lighter charcoal in the dark one, which is the
   token meant for exactly this. */
.post-card {
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md, var(--shadow-sm));
}

.post-card h2 {
  font-family: var(--serif);
  font-size: var(--font-size-body-lg);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}

.post-card h2 a {
  color: var(--text);
}

.post-card h2 a:hover { color: var(--accent-strong); }

.post-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.post-meta {
  margin-top: var(--space-3) !important;
  font-size: var(--font-size-caption) !important;
  color: var(--text-faint) !important;
}

/* ---- Related reading ----
   Every article previously linked only to the homepage, so a reader who finished one had
   nowhere to go and the articles formed no cluster for a crawler to follow. */

.related-reading {
  max-width: 42rem;
  margin: var(--space-12) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.related-reading h2 {
  font-family: var(--sans);
  font-size: var(--font-size-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 var(--space-4);
}

.related-reading ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.related-reading a {
  font-family: var(--serif);
  font-size: var(--font-size-body-lg);
  color: var(--text);
}

.related-reading a:hover { color: var(--accent-strong); }
