/*
 * SPDX-FileCopyrightText: 2026 Priya Vijai Kalyan <priyavijai.kalyan2007@proton.me>
 * SPDX-FileCopyrightText: 2026 Outcrop Inc
 * SPDX-License-Identifier: MIT
 * Repository: blog
 * File GUID: 8a320066-ed9f-416e-ad36-1a4ae3fa0588
 * Created: 2026
 */

/* AGENT: Glue styles only — three-column shell wiring the theme to Eleventy output. All colors via theme tokens. */

.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--theme-border-color, #dee2e6);
    background-color: var(--theme-surface-bg, #fff);
    position: sticky;
    top: 0;
    z-index: 10;
}

.blog-header-title {
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    color: var(--theme-text-primary, #212529);
}

.blog-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 240px;
    gap: 2.5rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem;
}

.blog-sidebar {
    grid-column: 1;
}

.blog-main {
    grid-column: 2;
    min-width: 0;
    max-width: 48rem;
}

.blog-main-wide {
    grid-column: 2 / 4;
}

.blog-toc {
    grid-column: 3;
}

.blog-sidebar,
.blog-toc {
    position: sticky;
    top: 4.5rem;
    align-self: start;
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
    font-size: 0.9rem;
}

.blog-sidebar-title,
.blog-toc-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-text-secondary, #6c757d);
    margin: 1rem 0 0.5rem;
}

.blog-sidebar-list,
.blog-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-sidebar-list li,
.blog-toc-list li {
    margin: 0.15rem 0;
}

.blog-sidebar-list a,
.blog-toc-list a {
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: var(--theme-text-primary, #212529);
}

.blog-sidebar-list a:hover,
.blog-toc-list a:hover {
    background-color: var(--theme-surface-hover-bg, rgba(0, 0, 0, 0.05));
}

.blog-sidebar-list a[aria-current="page"] {
    font-weight: 600;
    background-color: var(--theme-surface-hover-bg, rgba(0, 0, 0, 0.05));
}

.blog-toc-level-3 {
    padding-left: 0.75rem;
}

.blog-article-meta {
    color: var(--theme-text-secondary, #6c757d);
    font-size: 0.9rem;
}

.blog-article-tags {
    margin-left: 0.5rem;
}

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

.blog-article-list li {
    margin-bottom: 2rem;
}

.blog-article-list h2 {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.blog-lede {
    color: var(--theme-text-secondary, #6c757d);
}

/* Tablet: drop the right-hand outline. */
@media (max-width: 1199px) {
    .blog-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .blog-toc {
        display: none;
    }

    .blog-main,
    .blog-main-wide {
        grid-column: 2;
    }
}

/* Mobile: single column; the article index stacks above the content. */
@media (max-width: 767px) {
    .blog-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-sidebar,
    .blog-main,
    .blog-main-wide {
        grid-column: 1;
    }

    .blog-sidebar {
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--theme-border-color, #dee2e6);
        padding-bottom: 1rem;
    }
}
