/* ============================================================
   blog.css — blog index + article layout.
   Loaded only on blog pages. .prose reading rules live in base.css.
   ============================================================ */

/* ----- Article header ----- */
.post {
    padding-top: 8rem;
    padding-bottom: var(--section-padding);
}

.breadcrumb {
    max-width: var(--container-narrow);
    margin: 0 auto 1.5rem;
    font-size: var(--fs-small);
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent-secondary);
}

.breadcrumb span {
    margin: 0 0.4rem;
    color: var(--text-muted);
}

.post-header {
    max-width: var(--container-narrow);
    margin: 0 auto 2.5rem;
    text-align: left;
}

.post-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 1rem 0 1.25rem;
}

.post-dek {
    font-size: var(--fs-lead);
    color: var(--text-secondary);
    line-height: 1.6;
}

.byline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.byline-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-strong) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.byline-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.byline-meta .byline-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--fs-small);
}

.byline-meta .byline-sub {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ----- Hero figure ----- */
.post-hero {
    max-width: 980px;
    margin: 0 auto 3rem;
}

.post-hero img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* ----- Inline CTA band inside an article ----- */
.cta-band--inline {
    max-width: var(--container-narrow);
    margin: 3rem auto;
}

/* ----- Article footer / related ----- */
.post-footer {
    max-width: var(--container-narrow);
    margin: 3.5rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

/* .related-grid / .related-card moved to components.css (shared with the homepage) */

/* ----- Blog index ----- */
.blog-index {
    padding-top: 8rem;
    padding-bottom: var(--section-padding);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.post-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
}

.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.post-card h3 {
    font-size: 1.15rem;
    margin: 0;
}

.post-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.post-card .post-card-meta {
    margin-top: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ----- Responsive ----- */
@media (max-width: 900px) {

    .related-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }
}
