/* blog.css — blog index + article layout, built on site-chrome.css tokens. */

/* Horizontal gutter tracks the site header exactly, so the blog content's left
   edge lines up with the header logo and the footer columns at every width. */
.blog-main {
  --gutter: max(48px, calc((100vw - 1160px) / 2));
  padding: 0 var(--gutter) 96px;
}

/* ---- index ---- */
.blog-index { padding-top: 120px; }  /* clear the fixed transparent header */
.blog-index-title {
  font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 36px;
}
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 18px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(30,35,64,.45);
  border-color: var(--rule-mid);
}
.blog-card-thumb { aspect-ratio: 16 / 10; background: var(--surface-alt); overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card-title { font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.blog-card-summary {
  font-size: 14.5px; line-height: 1.55; color: var(--ink-subtle); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta { margin: auto 0 0; font-size: 13px; color: var(--ink-muted); }

/* ---- article ---- */
.post-article { max-width: 760px; margin: 0 auto; padding-top: 120px; }  /* clear the fixed header */

/* breadcrumbs */
.breadcrumbs { margin-bottom: 24px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 13.5px; line-height: 1.4; color: var(--ink-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumbs li:not(:first-child)::before { content: "›"; margin: 0 8px; color: var(--ink-muted); }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; transition: color .15s var(--ease); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .bc-current { color: var(--ink-muted); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .breadcrumbs .bc-current { max-width: 180px; } }
.post-hero { border-radius: 22px; overflow: hidden; margin-bottom: 32px; background: var(--surface-alt); }
.post-hero img { width: 100%; height: auto; display: block; }
.post-head { margin-bottom: 32px; }
.post-category {
  display: inline-block; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.post-title { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 14px; }
.post-meta { color: var(--ink-muted); font-size: 14px; margin: 0; }

.post-body { font-size: 17.5px; line-height: 1.72; color: var(--ink-subtle); }
.post-body h2 { font-size: 27px; line-height: 1.25; font-weight: 680; letter-spacing: -0.015em; color: var(--ink); margin: 44px 0 16px; }
.post-body h3 { font-size: 21px; line-height: 1.3; font-weight: 650; color: var(--ink); margin: 36px 0 14px; }
.post-body h4 { font-size: 18px; font-weight: 650; color: var(--ink); margin: 28px 0 12px; }
.post-body p { margin: 0 0 22px; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 24px; }
.post-body li { margin: 0 0 8px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; margin: 24px 0; }
.post-body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent-mid); color: var(--ink-subtle); font-style: italic; }
.post-body strong { color: var(--ink); font-weight: 650; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-alt); padding: 2px 6px; border-radius: 6px; }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 36px 0; }

.post-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.post-back a { color: var(--ink-soft); text-decoration: none; font-weight: 550; }
.post-back a:hover { color: var(--accent); }

/* ---- responsive (gutter values match the site header breakpoints) ---- */
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .blog-main { --gutter: 20px; } }
@media (max-width: 640px) {
  .blog-main { --gutter: 16px; padding-bottom: 64px; }
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-index { padding-top: 96px; }
  .post-article { padding-top: 96px; }
  .post-body { font-size: 16.5px; }
}
