/* Blog post rendered HTML content styles */
.blog-content {
    color: #c8c4bc;
    line-height: 1.7;
    font-size: 1rem;
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
    font-family: 'Playfair Display', serif;
    color: #e8e4dc;
    margin: 1.5rem 0 0.5rem;
    line-height: 1.3;
}

.blog-content h1 { font-size: 2rem; }
.blog-content h2 { font-size: 1.5rem; border-left: 4px solid #C21F25; padding-left: 0.75rem; }
.blog-content h3 { font-size: 1.2rem; color: #C21F25; }

.blog-content p { margin: 0; line-height: 1.7; min-height: 1.7em; }
.blog-content p:empty { min-height: 1.7em; }
.blog-content p:has(> br:only-child) { min-height: 1.7em; }

.blog-content a {
    color: #C21F25;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.blog-content a:hover { opacity: 0.8; }

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

.blog-content li { margin-bottom: 0.4rem; }

.blog-content blockquote {
    border-left: 4px solid #C21F25;
    background: rgba(194,31,37,0.06);
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    color: #e8e4dc;
    font-style: italic;
}

.blog-content code {
    background: rgba(255,255,255,0.08);
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    color: #e8e4dc;
}

.blog-content pre {
    background: #111;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.blog-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
}

.blog-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

.blog-content strong { color: #e8e4dc; }

.blog-content hr {
    border: none;
    border-top: 1px solid #2e2e2e;
    margin: 2rem 0;
}

/* ===== Table of Contents ===== */
.blog-toc {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #2e2e2e;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.blog-toc__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #e8e4dc;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-toc__title::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: #C21F25;
    border-radius: 1px;
}

.blog-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-toc__item {
    margin-bottom: 0.15rem;
}

.blog-toc__link {
    display: block;
    padding: 0.35rem 0.75rem;
    color: #888880;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.blog-toc__link:hover {
    color: #e8e4dc;
    border-left-color: #C21F25;
    background: rgba(194, 31, 37, 0.06);
}

.blog-toc__link--active {
    color: #e8e4dc;
    border-left-color: #C21F25;
    background: rgba(194, 31, 37, 0.1);
    font-weight: 600;
}

/* Heading anchor — smooth scroll offset */
.blog-content h1[id],
.blog-content h2[id],
.blog-content h3[id] {
    scroll-margin-top: 80px;
}

@media (max-width: 640px) {
    .blog-toc {
        padding: 1rem 1.1rem;
    }
    .blog-toc__link {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

