/* Long-form typography for /blog/. Hand-authored — assets/code.css is the
   generated one. Every value here resolves through the custom properties in
   site.css, so both themes are handled by defining nothing twice. */

/* ── Blog index hero ─────────────────────────────────────────────────── */
.blog-hero { margin-bottom: 48px; }
.blog-hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02; letter-spacing: -0.022em; font-weight: 400;
  margin: 0 0 20px; color: var(--ink);
}
.blog-hero .dot { color: var(--accent); }
.blog-hero p.lede {
  font-size: 19px; line-height: 1.5; color: var(--muted);
  max-width: 720px; margin: 0;
}

.notfound-actions { margin-top: 30px; }

/* ── Tag filter ──────────────────────────────────────────────────────── */
.tag-filters { margin-bottom: 26px; }
.tag-filters .chip {
  background: none; cursor: pointer; font-family: var(--mono);
  font-size: 13px; line-height: 1;
}
.tag-filters .chip:hover { color: var(--ink); border-color: var(--accent); }
.no-matches {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  padding: 20px 0; border-top: 1px solid var(--rule);
}
.no-matches-tag { color: var(--accent); }

/* The filter hides rows with the `hidden` attribute, but `.writing-row` sets
   `display: grid` in site.css — an author rule, which beats the user-agent
   `[hidden] { display: none }`. Without this the filter appears to do
   nothing. Scoped rather than a blanket [hidden] !important. */
.writing-row[hidden], .no-matches[hidden] { display: none; }

/* ── Post header ─────────────────────────────────────────────────────── */
.post-head { margin-bottom: 40px; }
.post-head h1 {
  font-family: var(--serif); font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08; letter-spacing: -0.02em; font-weight: 400;
  margin: 0 0 18px; color: var(--ink); max-width: 900px;
}
.post-meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.post-meta .sep { color: var(--dim); }
.post-tags { margin-top: 18px; }
.post-tags .chip { font-size: 12px; padding: 6px 12px; }
.post-tags .chip:hover { color: var(--ink); border-color: var(--accent); }
.post-head .contact-link { margin-top: 22px; }

/* ── Prose ───────────────────────────────────────────────────────────── */
/* Measured in ch rather than px: the bound that matters for reading is
   characters per line, so it should track the font size at every breakpoint
   instead of being re-tuned by hand. */
.prose { max-width: 68ch; font-size: 18px; line-height: 1.7; color: var(--ink); }
.prose > *:first-child { margin-top: 0; }

/* Headings take the serif; only h4 stays mono, because at that level it is
   acting as a small label rather than as a heading. */
.prose h2 {
  font-family: var(--serif); font-size: 27px; font-weight: 500;
  letter-spacing: -0.015em; color: var(--ink);
  margin: 2.2em 0 0.6em; padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.prose h3 {
  font-family: var(--serif); font-size: 21px; font-weight: 500;
  letter-spacing: -0.01em; color: var(--ink); margin: 1.9em 0 0.5em;
}
.prose h4 {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim);
  margin: 1.8em 0 0.5em;
}
.prose p { margin: 0 0 1.2em; }

/* site.css sets `a { color: inherit; text-decoration: none }` globally, which
   would make prose links completely invisible. This is not optional. */
.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 120ms ease;
}
.prose a:hover { border-bottom-color: var(--accent); }

.prose ul, .prose ol { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 8px; }
.prose li { padding-left: 20px; position: relative; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.75em;
  width: 7px; height: 1px; background: var(--accent);
}
.prose ol { counter-reset: item; }
.prose ol > li { counter-increment: item; }
.prose ol > li::before {
  content: counter(item) "."; position: absolute; left: 0;
  color: var(--accent); font-family: var(--mono); font-size: 13px;
}
.prose li > ul, .prose li > ol { margin: 8px 0 0; }

.prose code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 4px; padding: 1px 5px;
}
/* The generated code.css styles .codehilite; inside it the inline rules above
   would double up the border and background. */
.prose .codehilite code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose blockquote {
  margin: 1.6em 0; padding: 2px 0 2px 20px;
  border-left: 2px solid var(--rule); color: var(--muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0;
  font-size: 15px; display: block; overflow-x: auto;
}
.prose th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--dim); text-align: left;
  padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.prose td {
  padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule);
  color: var(--muted); vertical-align: top;
}

.prose img {
  max-width: 100%; height: auto; display: block;
  border: 1px solid var(--rule); border-radius: 8px; margin: 1.6em 0;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose kbd {
  font-family: var(--mono); font-size: 0.85em; padding: 2px 6px;
  border: 1px solid var(--rule); border-bottom-width: 2px;
  border-radius: 4px; background: var(--bg-soft);
}
.prose .footnote {
  font-size: 14px; color: var(--muted);
  border-top: 1px solid var(--rule); margin-top: 3em; padding-top: 12px;
}

/* ── Post footer ─────────────────────────────────────────────────────── */
.post-foot { margin-top: 56px; padding-top: 8px; }
.post-foot .contact-link { margin-bottom: 26px; }

/* ── Responsive — reuses site.css's existing 720px breakpoint ────────── */
@media (max-width: 720px) {
  .prose { font-size: 17px; }
  .prose h2 { font-size: 23px; }
  .prose h3 { font-size: 19px; }
  .post-head h1 { letter-spacing: -0.015em; }
}
