header {
    position: relative;
}
.theme-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
}
.theme-selector label {
    opacity: 0.7;
}
.theme-selector select {
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    max-width: 140px;
}
/* Hide selector on small screens to avoid overlap with hamburger */
@media (max-width: 600px) {
    .theme-selector {
        position: static;
        justify-content: flex-end;
        margin-bottom: 0.5rem;
    }
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc {
    border: 1px solid var(--border-color, #30363d);
    border-radius: var(--radius, 8px);
    background-color: var(--card-bg, #222222);
    padding: 1rem 1.5rem;
    margin: 0 0 2rem 0;
    font-size: 0.9rem;
}
.toc-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--date-color, #8b949e);
    margin: 0 0 0.75rem 0;
}
.toc ol,
.toc ul {
    margin: 0;
    padding-left: 1.2rem;
}
.toc li {
    margin-bottom: 0.3rem;
    line-height: 1.5;
}
.toc a {
    color: var(--text-color, #CCCCCC);
    border-bottom: none;
    transition: color var(--transition, 0.3s ease);
}
.toc a:hover {
    color: var(--link-color, #87FF87);
}
/* Nested levels */
.toc ol ol,
.toc ul ul {
    margin-top: 0.3rem;
    font-size: 0.95em;
}
.toc ol ol a,
.toc ul ul a {
    color: var(--date-color, #8b949e);
}
@media (max-width: 600px) {
    .toc {
        padding: 0.75rem 1rem;
    }
}