main.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    align-items: start;
}

.table-of-contents {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.toc-nav {
    padding: 0;
    background: transparent;
}

.toc-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color, #333);
}

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

.toc-list li {
    margin-bottom: 1rem;
}

.toc-list a {
    text-decoration: none;
    color: var(--text-color, #333);
    font-weight: 600;
    line-height: 1.5;
    display: block;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.toc-list a:hover {
    color: var(--link-hover-color, #0066cc);
}

.toc-list a.active {
    color: var(--link-hover-color, #0066cc);
    font-weight: 600;
}

.toc-sublist {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.75rem;
}

.toc-sublist li {
    margin-bottom: 0.5rem;
}

.toc-sublist a {
    font-weight: 400;
    font-size: 0.9rem;
}

article.post-content {
    min-width: 0;
    
    post-body {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        h2 {
            margin-top: 2rem;
            scroll-margin-top: 150px;
        }

        h3 {
            scroll-margin-top: 150px;
        }
    }

    post-header {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        h1 {
            margin-top: 0;
        }
    }
}

/* Responsive design for smaller screens */
@media (max-width: 1024px) {
    main.blog-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    main.blog-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .table-of-contents {
        position: static;
        max-height: none;
    }

    .toc-nav {
        margin-bottom: 2rem;
    }
}