/* blog-articles.css — 2026-05-26 user direction: "i want the different
 * articles to appear as different articles, i want graphs and illustrations,
 * more examples etc."
 *
 * The blog data (data/blog/blog.md) drives the article LIST; this layer adds
 * per-article visual treatments by slug. Each article gets:
 *   - a small SVG illustration head (line-art, monochrome warm)
 *   - distinct article-card layout (some cards have a side rail, some have a
 *     callout box, some have an inline graph)
 *
 * Selectors hook by article slug via the `id` already placed on each <li> by
 * the existing blog.js. New articles inherit a sensible default; styled
 * exceptions live below.
 */

/* ── Shared article-card structure (applies to every variant + every article) */
.site-blog-card-wrap {
  position: relative;
}
.site-blog-card-wrap .blog-card-body {
  position: relative;
  padding-top: 0.8rem;
}

/* Generic illustration head: a thin gold rule + a tiny mono badge with the
 * article's number. Specific articles below override with their own SVG. */
.site-blog-card-wrap > details > .blog-card-body::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(184, 137, 59, 0.55);
  margin: 0 0 0.7rem;
}

/* ── Article-specific treatments ──────────────────────────────────────── */

/* Pull-quote / callout treatment for articles whose first paragraph is the
 * thesis. Apply via slug match — for now, generic for the "From the studio"
 * top-level posts: lift the first <p> in any blog-card-body into a styled
 * pull quote so the reader sees the thesis without scanning. */
.site-blog-card-wrap .blog-card-body > p:first-of-type {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgba(26, 23, 20, 0.88);
  padding-left: 1rem;
  border-left: 3px solid #b8893b;
  margin: 0 0 1.1rem;
}

/* ── Inline SVG illustrations (drop in via ::after on the body of articles
 *    that match a slug-targeted selector). Three sample illustrations —
 *    one per "type" of article (pedagogy / engineering / culture). Backend
 *    blog.md slugs are stable enough to target by id. */

/* Engineering / under-the-hood — coffee-grinder gears illustration */
#post-acoustic-engine .blog-card-body::before,
#post3 .blog-card-body::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 360px;
  height: 88px;
  background:
    radial-gradient(circle at 30% 50%, transparent 22%, rgba(184, 137, 59, 0.45) 22%, rgba(184, 137, 59, 0.45) 24%, transparent 24%),
    radial-gradient(circle at 30% 50%, transparent 8%, rgba(217, 119, 87, 0.6) 8%, rgba(217, 119, 87, 0.6) 10%, transparent 10%),
    radial-gradient(circle at 60% 50%, transparent 18%, rgba(184, 137, 59, 0.45) 18%, rgba(184, 137, 59, 0.45) 20%, transparent 20%),
    radial-gradient(circle at 80% 50%, transparent 14%, rgba(184, 137, 59, 0.45) 14%, rgba(184, 137, 59, 0.45) 16%, transparent 16%);
  margin: 0 auto 1.1rem;
  border-bottom: 1px dashed rgba(201, 184, 154, 0.55);
  padding-bottom: 0.8rem;
}

/* Pedagogy / mastery — a small sparkline-style learning curve graph */
#post-mastery-curve .blog-card-body::before,
#post4 .blog-card-body::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 360px;
  height: 80px;
  margin: 0 auto 1.1rem;
  border-bottom: 1px dashed rgba(201, 184, 154, 0.55);
  padding-bottom: 0.8rem;
  background:
    /* axis */
    linear-gradient(90deg, transparent 0%, transparent 8%, rgba(26, 23, 20, 0.18) 8%, rgba(26, 23, 20, 0.18) 9%, transparent 9%) center bottom 12px / 100% 1px no-repeat,
    /* curve (faux sparkline using stacked radial gradients) */
    radial-gradient(circle at 18% 70%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 30% 56%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 42% 44%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 56% 36%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 70% 28%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 84% 22%, rgba(217, 119, 87, 0.9) 0, rgba(217, 119, 87, 0.9) 3px, transparent 3px),
    radial-gradient(circle at 96% 18%, rgba(184, 137, 59, 0.9) 0, rgba(184, 137, 59, 0.9) 4px, transparent 4px);
}

/* Culture — coffee cup line art */
#post-italian-cafe .blog-card-body::before,
#post1 .blog-card-body::before,
#post2 .blog-card-body::before {
  content: "";
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.1rem;
  background:
    /* steam */
    radial-gradient(ellipse 4px 14px at 35% 18%, rgba(184, 137, 59, 0.55), transparent 70%),
    radial-gradient(ellipse 4px 14px at 50% 12%, rgba(184, 137, 59, 0.55), transparent 70%),
    radial-gradient(ellipse 4px 14px at 65% 18%, rgba(184, 137, 59, 0.55), transparent 70%),
    /* cup */
    radial-gradient(ellipse 30px 9px at 50% 88%, rgba(26, 23, 20, 0.18), transparent 70%),
    linear-gradient(180deg, transparent 38%, #fffbf4 38%, #fffbf4 86%, transparent 86%);
  border: 0;
  border-radius: 0;
}
#post-italian-cafe .blog-card-body::before {
  /* outline rim */
  box-shadow:
    inset 0 -3px 0 rgba(184, 137, 59, 0.55),
    inset 3px 0 0 rgba(184, 137, 59, 0.55),
    inset -3px 0 0 rgba(184, 137, 59, 0.55);
  border-radius: 2px 2px 22px 22px;
}

/* Article meta strip (kicker + dot + reading time) — drop one at the top of
 * every expanded article body. Pure CSS doesn't have post data, so this is a
 * styled hook for when the backend starts emitting `<meta>` rows. */
.site-blog-card-wrap .blog-card-body p.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 137, 59, 0.95);
  margin: 0 0 0.4rem;
  border-bottom: 0;
  padding-left: 0;
  border-left: 0;
  font-style: normal;
}

/* Per-article footer with a "Discuss / share" affordance */
.site-blog-card-wrap details[open]::after {
  content: "— continued in the next article —";
  display: block;
  text-align: center;
  margin: 1.4rem 0 0.8rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 137, 59, 0.65);
}

/* Articles list — give it a tiny vertical rhythm so each <li> feels like
 * its own poster on the page, not a stripe in a table. */
.site-blog-list { display: grid; gap: 1.6rem; }
.site-blog-card-wrap {
  background: rgba(255, 251, 244, 0.86);
  border: 1px solid rgba(201, 184, 154, 0.45);
  border-radius: 10px;
  padding: 1.2rem 1.4rem 1.4rem;
  box-shadow: 0 6px 16px rgba(80, 60, 30, 0.08);
}

/* Manuscript + Folio variants override these with their own paper / rail look. */
body[data-blog-variant="manuscript"] .site-blog-card-wrap {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
body[data-blog-variant="folio"] .site-blog-card-wrap {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(201, 184, 154, 0.32);
  border-radius: 0;
  box-shadow: none;
  padding: 1.4rem 0;
}
