/* ─── Blog post ───────────────────────────────────────────────────
   Typography for a single rendered Markdown post. Pairs with main.css
   (nav, footer, tokens). Scoped to .post so it never touches the
   landing page. */

/* ─── Layout ──────────────────────────────────────────────────── */
main {
  padding: var(--section-y) var(--pad-x);
}

.post {
  max-width: 720px;          /* narrower than --max-w for readable line length */
  margin: 0 auto;
}

/* ─── Header ──────────────────────────────────────────────────── */
.post-header {
  margin-bottom: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-date {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.post-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f2f2f2;
}

/* ─── Body ────────────────────────────────────────────────────── */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 300;
  color: #e8e8e8;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body p {
  margin: 1.5rem 0;
}

/* Headings */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #f2f2f2;
}

.post-body h1 { font-size: 2rem;    margin: 3.5rem 0 1.25rem; }
.post-body h2 { font-size: 1.6rem;  margin: 3rem 0 1rem; padding-top: 0.5rem; }
.post-body h3 { font-size: 1.3rem;  margin: 2.5rem 0 0.85rem; }
.post-body h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 2.25rem 0 0.75rem;
}

/* Links */
.post-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s;
}

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

/* Lists */
.post-body ul,
.post-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-body li {
  margin: 0.5rem 0;
}

.post-body li::marker {
  color: var(--text-muted);
}

/* Emphasis */
.post-body strong { font-weight: 500; color: #f2f2f2; }
.post-body em     { font-style: italic; }

/* Blockquote */
.post-body blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
  font-style: italic;
}

/* Inline code + code blocks */
.post-body code {
  font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
}

/* Images */
.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Horizontal rule */
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.5rem 0;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .post-body { font-size: 1rem; }
}
