/* Blog heroes sit just under the fixed header. The site motion sheet otherwise
   stretches the first sub-hero to a full phone screen. */
.blog-index.page > .sub-hero:first-child,
.blog-topic.page > .sub-hero:first-child,
body.blog-post .page > .sub-hero.post-hero{
  min-height:0;
  display:block;
  padding-top:64px;
  padding-bottom:28px;
}
.blog-index .prose-grid,
.blog-topic .prose-grid{padding-top:12px}
.blog-post .prose-grid{padding-top:8px}
.blog-post .post figure.post-hero-photo{margin-top:0}
@media (max-width:820px){
  .blog-index.page > .sub-hero:first-child,
  .blog-topic.page > .sub-hero:first-child,
  body.blog-post .page > .sub-hero.post-hero{
    min-height:0;
    display:block;
    justify-content:flex-start;
    padding-top:32px;
    padding-bottom:16px;
  }
  .blog-index .prose-grid,
  .blog-topic .prose-grid,
  .blog-post .prose-grid{padding-top:4px}
}

/* Blog cards, post photos, and restrained motion. */
.blog-grid{display:grid;gap:18px;grid-template-columns:1fr;align-items:stretch}
@media (min-width:700px){.blog-grid{grid-template-columns:1fr 1fr}}
@media (min-width:1100px){.blog-grid{grid-template-columns:1fr 1fr 1fr}}
.blog-index .prose-grid{display:block}
.blog-index .side{display:flex;flex-wrap:wrap;gap:28px;margin:0 0 8px}
.blog-index .blog-grid .blog-card-feature{grid-column:1 / -1}
@media (min-width:900px){
  .blog-index .blog-grid .blog-card-feature{display:grid;grid-template-columns:1.35fr 1fr}
  .blog-index .blog-grid .blog-card-feature .blog-card-body{justify-content:center}
}

a.blog-card{display:flex;flex-direction:column;height:100%;padding:0;overflow:hidden;text-decoration:none;color:inherit;border-radius:18px;background:rgba(10,20,40,.55);border:1px solid rgba(203,213,225,.28);box-shadow:0 16px 40px -24px rgba(0,0,0,.55)}
a.blog-card:hover,a.blog-card:focus-visible{text-decoration:none;color:inherit}
a.blog-card:focus-visible{outline:3px solid var(--warm);outline-offset:3px}
.blog-card-media{display:block;aspect-ratio:16/10;overflow:hidden;background:#1a2233}
.blog-card-media img{display:block;width:100%;height:100%;object-fit:cover}
.blog-card-body{display:flex;flex-direction:column;gap:8px;padding:16px 18px 18px;min-width:0;flex:1}
.blog-card .kicker{margin:0}
.blog-card-title{display:block;font-weight:700;font-size:20px;line-height:1.25;letter-spacing:-.01em;color:#f8fafc}
.blog-card-feature .blog-card-title{font-size:clamp(24px,2.4vw,34px)}
.blog-card-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;color:#cbd5e1;font-size:15px;line-height:1.45;text-decoration:none}
.blog-card-more{margin-top:auto;font-size:14px;font-weight:600;color:var(--warm)}

html[data-theme="light"] a.blog-card{background:#f4f6f9;border-color:#cbd5e1;box-shadow:0 10px 28px -18px rgba(26,26,26,.4)}
html[data-theme="light"] .blog-card-title{color:#0b1b33}
html[data-theme="light"] .blog-card-excerpt{color:#334155}
html[data-theme="light"] .blog-card-more{color:#0b3d91}
html[data-theme="light"] .blog-card-media{background:#e8eef5}

/* Post reading column, hero, and captions */
.blog-post .post{max-width:68ch}
.blog-post .post h2{margin-top:1.7em}
.blog-post .post h3{margin-top:1.25em}
.post figure.post-hero-photo,.post figure.post-figure{margin:0 0 1.5em;max-width:100%}
.post figure.post-hero-photo img,.post figure.post-figure img{display:block;width:100%;height:auto;border-radius:16px;margin:0}
.post figure figcaption{display:block;margin:10px 0 0;padding:0;font-size:13px;line-height:1.45;font-weight:500;letter-spacing:0;color:#94a3b8}
html[data-theme="light"] .post figure figcaption{color:#475569}

.blog-progress{position:fixed;top:0;left:0;z-index:40;width:100%;height:3px;transform:scaleX(0);transform-origin:0 50%;background:#0b3d91;pointer-events:none}
html[data-theme="light"] .blog-progress{background:#0b3d91}

@media (prefers-reduced-motion:no-preference){
  html.blog-motion .blog-card{opacity:0;transform:translateY(14px);transition:opacity .55s var(--ease),transform .55s var(--ease),box-shadow .25s var(--ease)}
  html.blog-motion .blog-card.is-in{opacity:1;transform:none}
  html.blog-motion .blog-card.is-in:hover,html.blog-motion .blog-card.is-in:focus-visible{transform:translateY(-4px)}
  .blog-card-media img{transition:transform .6s var(--ease)}
  .blog-card:hover .blog-card-media img,.blog-card:focus-visible .blog-card-media img{transform:scale(1.045)}
  .post-hero-photo img{animation:blogHero .7s var(--ease)}
  @keyframes blogHero{from{transform:scale(1.03)}to{transform:none}}
}
@media (prefers-reduced-motion:reduce){
  .blog-card,.blog-card.is-in,.post-hero-photo img{opacity:1;transform:none;animation:none;transition:none}
}
