/* WebCAD build log. Loaded after styles.css, which owns the tokens, the header
   and the footer — this file only adds what the log needs. */

.blog-body { background: var(--bg); }

.blog-main { padding-bottom: 96px; }

/* ── Hero ────────────────────────────────────────────────── */
.blog-hero {
  position: relative;
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 12% -20%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(700px 380px at 100% 120%, rgba(125, 211, 252, 0.08), transparent 60%);
}
.blog-hero-inner { max-width: 860px; }
.blog-hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.blog-hero .kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px rgba(94, 234, 212, 0.8); }
.blog-hero h1 { margin: 20px 0 0; font-size: clamp(34px, 5.4vw, 56px); letter-spacing: -0.03em; }
.blog-hero .lede { margin-top: 20px; font-size: 18px; line-height: 1.65; color: var(--muted); }
.blog-hero-meta { margin-top: 22px; font: 400 14px/1.6 var(--font-mono); color: var(--faint); }
.blog-hero-meta a { color: var(--accent-2); }

/* ── Filters and status ──────────────────────────────────── */
.blog-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.blog-filters .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-status { margin-top: 24px; font-size: 15px; color: var(--muted); }
.blog-status.is-hidden { display: none; }

/* ── Post list ───────────────────────────────────────────── */
.blog-grid { display: grid; gap: 28px; margin-top: 28px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.post-card-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1; }
.post-card-meta { font: 400 13px/1 var(--font-mono); color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; }
.post-card-title { font-size: 22px; line-height: 1.22; letter-spacing: -0.02em; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { text-decoration: none; color: var(--accent); }
.post-card-summary { font-size: 15px; line-height: 1.6; color: var(--muted); }
.post-card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag {
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(125, 211, 252, 0.10); border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px; padding: 5px 10px;
}
.post-tag.is-link:hover { text-decoration: none; background: rgba(125, 211, 252, 0.18); }
.post-pr {
  font: 400 13px/1 var(--font-mono); color: var(--faint);
  border-bottom: 1px dotted var(--line-strong); padding-bottom: 2px;
}
.post-pr:hover { color: var(--accent-2); text-decoration: none; }
.post-count { font: 400 13px/1 var(--font-mono); color: var(--faint); }

/* What kind of entry this is — the log mixes both, so the badge is a fact about
   the entry rather than decoration. A changelog entry stays quiet; a feature
   entry is the one that gets a colour, because it is the one a reader might not
   expect to find in a build log. */
.post-kind {
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 8px;
}
.post-kind.is-feature {
  color: var(--accent); background: rgba(94, 234, 212, 0.10); border-color: rgba(94, 234, 212, 0.32);
}

/* ── Article ─────────────────────────────────────────────── */
/* On a post the hero is not the page's subject, and two `h1`s read as one page
   with two titles. The article takes the top of the document instead. */
body.is-post .blog-hero,
body.is-post .blog-filters { display: none; }
body.is-post .blog-main { padding-top: 8px; }

.post { max-width: 760px; margin: 48px auto 0; }
.post-head { display: flex; flex-direction: column; gap: 16px; }
.post-back { font: 500 14px/1 var(--font-mono); color: var(--muted); width: fit-content; }
.post-head h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -0.03em; }
.post-head .post-lede { font-size: 19px; line-height: 1.6; color: var(--muted); }
.post-head-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font: 400 13px/1 var(--font-mono); color: var(--faint); }
.post-hero { margin: 34px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
/* `height` is set even though the rule sizes the other axis: the reader renders
   this image as `<img … width="1600" height="900">`, and a rule that leaves the
   height to the attribute stretches a 16/9 cover into whatever the column is
   (measured 758x900 on the deployed page). `height: auto` hands the box back to
   the image's own ratio — the same reason the reset in styles.css sets it. */
.post-hero img { width: 100%; height: auto; display: block; }

.post-body { margin-top: 40px; font-size: 18px; line-height: 1.75; color: #dfe6ef; }
.post-body > * + * { margin-top: 22px; }
.post-body h2 {
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 27px; letter-spacing: -0.02em;
}
.post-body h3 { margin-top: 34px; font-size: 21px; }
.post-body ul, .post-body ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.post-body li::marker { color: var(--accent); }
.post-body strong { color: var(--text); }
.post-body a { color: var(--accent-2); }
.post-body code {
  font: 400 0.92em var(--font-mono); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; color: var(--accent);
}
.post-body pre.post-code {
  background: #0b0e14; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 20px; overflow-x: auto; font: 400 14px/1.6 var(--font-mono); color: #cfe3e0;
}
.post-body pre.post-code code { background: none; border: 0; padding: 0; color: inherit; }
.post-body blockquote {
  border-left: 3px solid var(--line-strong); padding: 4px 0 4px 20px; color: var(--muted); font-style: italic;
}
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.post-figure { margin: 32px 0; display: flex; flex-direction: column; gap: 10px; }
.post-figure img, .post-figure video { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #000; }
.post-figure figcaption { font: 400 14px/1.5 var(--font-mono); color: var(--faint); }

.callout {
  border: 1px solid rgba(125, 211, 252, 0.28); border-left-width: 3px;
  background: rgba(125, 211, 252, 0.07); border-radius: var(--radius-sm); padding: 16px 18px; color: #d9e6f2;
}
.callout > * + * { margin-top: 8px; }
.callout-title { font: 500 13px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.callout-tip { border-color: rgba(94, 234, 212, 0.32); background: rgba(94, 234, 212, 0.07); }
.callout-tip .callout-title { color: var(--accent); }
.callout-warning, .callout-important { border-color: rgba(251, 191, 36, 0.32); background: rgba(251, 191, 36, 0.07); }
.callout-warning .callout-title, .callout-important .callout-title { color: var(--target); }

.post-table-wrap { overflow-x: auto; }
.post-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-table th, .post-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-table th { font: 600 13px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.post-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* ── Article foot ────────────────────────────────────────── */
.post-foot { margin-top: 56px; display: flex; flex-direction: column; gap: 26px; }
.author-card {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px;
}
.author-card img, .author-card .author-mark { width: 56px; height: 56px; flex: none; }
.author-card h2 { font-size: 18px; }
.author-card p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.post-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 6px; max-width: 46%; }
.post-nav a.next { text-align: right; margin-left: auto; }
.post-nav .dir { font: 500 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.post-nav .title { font-size: 16px; color: var(--text); }

.blog-empty { margin-top: 40px; color: var(--muted); }
.blog-noscript { margin-top: 32px; color: var(--muted); }

@media (max-width: 720px) {
  .blog-hero { padding: 48px 0 32px; }
  .post { margin-top: 32px; }
  .post-body { font-size: 17px; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .post-nav a.next { text-align: left; }
}
