/* Enhanced Blog Post Styles */

/* Article header — the signature navy surface, full-bleed. The post's
   own OG card uses the same 56px grid, so the page opens on-brand
   without per-post photography. Children hold the article measure. */
.blog-header {
    margin: 0 calc(50% - 50vw) 3rem;
    padding: 4rem calc(50vw - 50%) 3.5rem;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    background-size: 56px 56px, 56px 56px, auto;
}

.blog-header > * {
    max-width: 760px;
}

.blog-kicker {
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 1.5rem;
}

.blog-kicker .mark {
    color: var(--gold);
    display: inline-block;
    margin-right: 0.5rem;
    transform: translateY(-1px);
}

.blog-header h1 {
    color: white;
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: var(--ls-tight);
    margin: 0 auto 1.5rem;
}

.blog-excerpt {
    font-family: var(--font-wordmark);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto 2rem;
}

.blog-meta {
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 auto;
}

/* Table of Contents */
.table-of-contents {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 0;
    margin: 2rem auto;
    max-width: 760px;
}

.table-of-contents h3 {
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

#toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc-list li {
    margin: 0.5rem 0;
}

.toc-h3 {
    padding-left: 1.5rem;
}

.toc-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
    display: inline-block;
    padding: 0.25rem 0;
}

.toc-link:hover {
    color: var(--blue);
}

.toc-link.active {
    color: var(--blue);
    font-weight: 600;
}

/* Enhanced Blog Content */
.blog-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
}

.blog-content h2 {
    margin: 3rem 0 1rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--navy);
    position: relative;
}

.blog-content h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
}

.blog-content p {
    margin: 1.5rem 0;
}

.blog-content blockquote {
    border-left: 2px solid var(--navy);
    padding: 0.25rem 0 0.25rem 1.75rem;
    margin: 2rem 0;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--navy);
}

.blog-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-content code {
    background: var(--bg-subtle);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: var(--blue);
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-content li {
    margin: 0.75rem 0;
    line-height: 1.8;
}

/* Post Footer */
.blog-post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Post Tags */
.post-tags {
    margin-bottom: 3rem;
}

.post-tags h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tags-list a {
    padding: 0.5rem 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.tags-list a:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-subtle);
    border-radius: 12px;
    margin: 3rem 0;
}

.author-bio-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio-content {
    flex: 1;
}

.author-bio-content h3 {
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.author-bio-content p {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 1rem;
}

.author-social a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.author-social a:hover {
    text-decoration: underline;
}

/* Related Posts */
.related-posts {
    margin: 4rem 0;
}

.related-posts h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 2rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Text-only editorial entries on hairlines — matches the blog hub cards. */
.related-post-card {
    border-top: 1px solid var(--line);
}

.related-post-content {
    padding: 1.25rem 0 0;
}

.related-post-content time {
    font-family: var(--font-mono);
    font-size: var(--fs-tiny);
    letter-spacing: 0.12em;
    color: var(--text-light);
    text-transform: uppercase;
}

.related-post-content h3 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.related-post-content h3 a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-content h3 a:hover {
    color: var(--blue);
}

.related-post-content .read-time {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Comments Section */
.comments-section {
    margin: 4rem 0;
    padding: 2rem;
    background: var(--bg-subtle);
    border-radius: 12px;
}

.comments-section h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding-top: 3rem;
        padding-bottom: 2.5rem;
        margin-bottom: 2rem;
    }

    .blog-content {
        font-size: 1.0625rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-bio-image {
        margin: 0 auto;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}