/* Blog post page styles (separate from css/blog.css which is for the index grid) */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

.blog-post-page .nav-links a.is-active,
.blog-post-page .nav-menu a.active {
    color: var(--primary-color);
}

.post-shell {
    padding-top: 80px; /* fixed header offset */
}

.post-hero {
    padding: 70px 0 28px;
    text-align: left;
}

.post-back {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
}

.post-back:hover {
    color: var(--primary-color);
}

.post-h1 {
    font-size: 2.4rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.post-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.post-hero-media {
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.post-hero-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.post-pill {
    font-size: 0.85rem;
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.22);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.post-muted {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.post-download {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body {
    padding: 0 0 var(--spacing-xl);
}

.post-body .container {
    max-width: 780px;
}

.post-body {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

.post-body p {
    color: var(--text-secondary);
    margin: 0 0 1rem;
    font-size: 1.1rem;
    line-height: 1.9;
}

.post-body p.post-lead {
    font-size: 1.25rem;
    line-height: 1.85;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
}

.post-body p.post-lead strong {
    font-weight: 700;
}

.post-body h1,
.post-body h2,
.post-body h3 {
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
    line-height: 1.25;
    font-family: var(--font-heading);
    letter-spacing: 0.2px;
}

.post-body h2 {
    font-size: 1.7rem;
    margin-top: 2.75rem;
    padding-top: 1rem;
    position: relative;
}

.post-body h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 72px;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 999px;
}

.post-body h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    padding: 0.5rem 0.75rem;
    border-left: 4px solid rgba(185, 28, 28, 0.75);
    background: rgba(185, 28, 28, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-body h2 + p,
.post-body h3 + p {
    margin-top: 0.75rem;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.25rem 1.25rem;
    color: var(--text-secondary);
}

.post-body li {
    margin: 0.35rem 0;
}

.post-body ul li::marker,
.post-body ol li::marker {
    color: var(--gradient-start);
    font-weight: 700;
}

.post-body a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body a:hover {
    color: var(--gradient-start);
}

.post-body strong {
    color: var(--text-primary);
}

.post-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid rgba(227, 27, 72, 0.8);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-body blockquote p {
    margin: 0;
}

@media (max-width: 768px) {
    .post-body .container {
        max-width: 100%;
    }

    .post-body p {
        font-size: 1.05rem;
        line-height: 1.85;
    }

    .post-body p.post-lead {
        font-size: 1.15rem;
    }

    .post-body h2 {
        font-size: 1.5rem;
    }
}
