/* Blog pages.
 *
 * The landing page keeps its marketing chrome in an inline <style> block, so
 * the header and footer rules it needs are repeated here rather than shared.
 * Only the handful the blog shell actually uses — copying the whole marketing
 * stylesheet would guarantee the two drift apart.
 *
 * Colour and spacing come from styles.css, which already aliases --ink-* onto
 * --text-*, so both files stay on the one palette. */

/* --- chrome, mirroring the landing page ------------------------------- */

.nav { position: sticky; top: 0; z-index: 50; background: var(--surface); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; font-weight: 550; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current] { color: var(--brand-text); font-weight: 620; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; color: var(--text); }
.logo-mark { width: 26px; height: 26px; display: inline-block; }
.mark-svg { width: 100%; height: 100%; display: block; }

footer.site { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0; background: var(--surface-2); }
.foot-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.foot-bot a { color: var(--text-3); }

/* --- index ------------------------------------------------------------ */

.blog-head { max-width: 640px; margin: 68px auto 44px; text-align: center; }
.blog-head h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 14px; }
.blog-head p { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-bottom: 30px; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.blog-card:hover {
  text-decoration: none; border-color: var(--brand-line);
  box-shadow: 0 14px 32px -20px rgb(0 0 0 / .3); transform: translateY(-2px);
}
.bc-img { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-img.empty { background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); }
.bc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bc-body h2 { font-size: 17px; line-height: 1.32; letter-spacing: -.015em; margin: 0; color: var(--text); }
.bc-body p { font-size: 13.5px; line-height: 1.55; color: var(--text-2); margin: 0; flex: 1; }
.bc-body time { font-size: 12px; color: var(--text-4); }

.blog-empty { text-align: center; color: var(--text-3); padding: 60px 0 90px; }

/* --- article ---------------------------------------------------------- */

.post { max-width: 700px; margin: 0 auto; padding-bottom: 40px; }
.post-head { padding: 56px 0 24px; }
.post-back { font-size: 13.5px; color: var(--text-3); }
.post-head h1 { font-size: 38px; line-height: 1.14; letter-spacing: -.03em; margin: 18px 0 12px; }
.post-head time { font-size: 13.5px; color: var(--text-4); }
.post-hero { width: 100%; border-radius: 14px; margin-bottom: 34px; display: block; }

/* Body styling is deliberately element-based: the HTML comes from
   BabyLoveGrowth and carries no classes of ours to hook onto. */
.post-body { font-size: 17px; line-height: 1.72; color: var(--text); }
.post-body > *:first-child { margin-top: 0; }
.post-body h1 { font-size: 30px; }
.post-body h2 { font-size: 25px; letter-spacing: -.02em; margin: 42px 0 14px; line-height: 1.25; }
.post-body h3 { font-size: 19.5px; letter-spacing: -.01em; margin: 32px 0 10px; line-height: 1.3; }
.post-body p { margin: 0 0 20px; }
.post-body a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 9px; }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 26px 0; display: block; }
.post-body blockquote {
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--brand-line); color: var(--text-2); font-style: italic;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  padding: 1.5px 5px; border-radius: 5px;
}
.post-body pre {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 0 0 22px;
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.post-body th { font-weight: 620; background: var(--surface-2); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

.post-cta {
  margin-top: 56px; padding: 30px 32px; border-radius: 16px;
  background: linear-gradient(170deg, var(--brand-soft), var(--surface) 70%);
  border: 1px solid var(--brand-line); text-align: center;
}
.post-cta h2 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 8px; }
.post-cta p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin: 0 auto 20px; max-width: 44ch; }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  /* Same collapse behaviour as the landing page, burger and all — the blog
     hiding its nav with no way to reopen it was worse than the landing page's
     handling of the identical problem. */
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-links.open {
    display: flex; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 24px 18px;
  }
  .nav-links.open a { padding: 11px 0; width: 100%; }
}
@media (max-width: 620px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-head { margin: 44px auto 32px; }
  .blog-head h1 { font-size: 31px; }
  .post-head h1 { font-size: 29px; }
  .post-body { font-size: 16.5px; }
}
