/* ==========================================================
   Blog: index + post pages. Builds on site.css tokens.
   ========================================================== */
.blog { --serif: "Source Serif 4", Georgia, "Times New Roman", serif; --measure: 680px; }
.blog main { padding-top: var(--nav-h); }

/* ---------- Index ---------- */
.b-hero { padding: clamp(64px, 10vw, 120px) 0 clamp(28px, 4vw, 48px); background: #fff; }
.b-list { background: #fff; padding-bottom: clamp(80px, 10vw, 140px); }
.b-lead { margin-bottom: clamp(40px, 6vw, 72px); }

.b-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; }
.b-chips .chip {
  font-size: 14px; padding: 7px 15px; border-radius: 999px; background: var(--silver); color: var(--ink-2);
  transition: background .2s, color .2s;
}
.b-chips .chip:hover { background: #e8e8ed; }
.b-chips .chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.b-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
@media (max-width: 960px) { .b-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .b-grid { grid-template-columns: 1fr; } }

.b-card { display: flex; flex-direction: column; gap: 16px; }
.b-card[hidden] { display: none; }
.b-card__img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-md); background: var(--silver); }
.b-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.b-card:hover .b-card__img img { transform: scale(1.035); }
.b-card__title { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0; transition: color .2s; }
.b-card:hover .b-card__title { color: var(--accent); }
.b-card__desc { margin: 8px 0 0; color: var(--grey); font-size: 16px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.b-card--big { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.b-card--big .b-card__img { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
.b-card--big .b-card__title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.03em; }
.b-card--big .b-card__desc { font-size: 19px; -webkit-line-clamp: 4; }
@media (max-width: 760px) { .b-card--big { grid-template-columns: 1fr; gap: 18px; } }

.b-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; font-size: 14px; color: var(--grey); }
.b-pill { color: var(--accent); font-weight: 600; }
a.b-pill:hover { text-decoration: underline; }
.b-badge { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #8a5a00; text-transform: capitalize; }

/* ---------- Post ---------- */
.b-draftbar { position: sticky; top: var(--nav-h); z-index: 50; background: #fff4d6; color: #6b4b00; font-size: 14px; text-align: center; padding: 8px 16px; }
.b-post { background: #fff; padding-bottom: clamp(64px, 8vw, 110px); }
.b-post__head { max-width: calc(var(--measure) + 2 * var(--gutter)); padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(28px, 4vw, 44px); }
.b-post__title { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; margin: 6px 0 0; }
.b-post__dek { font-size: clamp(19px, 2vw, 23px); line-height: 1.4; color: var(--grey); margin: 18px 0 0; font-weight: 500; letter-spacing: -.012em; }

.b-cover { margin: 0 auto; max-width: 1280px; padding: 0 var(--gutter); }
.b-cover img { width: 100%; max-height: 82vh; object-fit: cover; border-radius: var(--radius-lg); }

.b-body { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(36px, 5vw, 60px) var(--gutter) 0;
  font-family: var(--serif); font-size: clamp(19px, 1.5vw, 21px); line-height: 1.68; letter-spacing: 0; color: #232325; }
.b-body > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; font-weight: 600; color: var(--ink); }
.b-body p { margin: 0 0 1.15em; }
.b-body h2, .b-body h3, .b-body h4 { font-family: var(--font); color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.b-body h2 { font-size: clamp(26px, 2.6vw, 32px); margin: 1.8em 0 .55em; }
.b-body h3 { font-size: 22px; margin: 1.6em 0 .5em; }
.b-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.b-body strong { color: var(--ink); }
.b-body ul, .b-body ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.b-body li { margin: .35em 0; }
.b-body blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--accent);
  font-size: 1.18em; line-height: 1.5; font-style: italic; color: var(--ink); }
.b-body blockquote p { margin: 0; }
.b-body hr { border: 0; text-align: center; margin: 2.2em 0; }
.b-body hr::after { content: "· · ·"; color: var(--grey-2); letter-spacing: .5em; }
.b-body code { font-size: .85em; background: var(--silver); padding: 2px 6px; border-radius: 6px; }

.b-fig { margin: 2em calc(-1 * min(120px, (100vw - var(--measure)) / 2 - var(--gutter))); }
.b-fig img { width: 100%; border-radius: var(--radius-md); }
.b-fig figcaption { font-family: var(--font); font-size: 14px; color: var(--grey); margin-top: 10px; text-align: center; letter-spacing: -.005em; }
@media (max-width: 760px) { .b-fig { margin-left: 0; margin-right: 0; } }

.b-post__foot { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.b-share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font-size: 14px; }
.b-share span { color: var(--grey); margin-right: 4px; }
.b-share a { padding: 7px 14px; border-radius: 999px; background: var(--silver); transition: background .2s; }
.b-share a:hover { background: #e8e8ed; }

.b-author { display: flex; gap: 18px; align-items: center; margin: 36px 0 0; padding: 22px; background: var(--silver); border-radius: var(--radius-md); }
.b-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.b-author p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.b-author a { color: var(--accent); }

.b-comments { margin-top: 56px; }
.b-comments .h-m { margin-bottom: 16px; }

.b-more { background: var(--silver); padding: clamp(64px, 8vw, 110px) 0; }
.b-more .h-m { margin-bottom: 32px; }

/* A lone italic line at the very top of a post is a note about the cover (e.g. "Cover: an illustration…"):
   show it as a small caption, and give the drop cap to the next paragraph instead. */
.b-body > p:first-child:has(> em:only-child) { font-family: var(--font); font-size: 14px; color: var(--grey); text-align: center; margin: -1.2em 0 1.8em; }
.b-body > p:first-child:has(> em:only-child)::first-letter { float: none; font-size: inherit; line-height: inherit; padding: 0; font-weight: inherit; color: inherit; }
.b-body > p:first-child:has(> em:only-child) + p::first-letter { float: left; font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; font-weight: 600; color: var(--ink); }
