body {
    padding: 3rem 1.5rem;
}

.tags-page {
    max-width: 1100px;
    margin: 0 auto;
}

.tags-page__header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    background: var(--header-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.tags-page__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.tags-page__subtitle {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--muted);
}

.tags-page__author-link {
    margin-top: 1.25rem;
    display: inline-flex;
    justify-content: center;
}

.tags-page__author-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tags-page__author-link a:hover {
    background: var(--surface-strong);
    color: var(--accent);
    border-color: var(--accent);
}

.dev-icon {
    width: 1rem;
    height: 1rem;
}

/* Documentation Layout Grid */
.docs-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Sticky Sidebar */
.docs-sidebar {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.docs-sidebar__title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.docs-nav__link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.docs-nav__link:hover {
    color: var(--accent);
    background: var(--surface-soft);
}

.docs-nav__link.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-left-color: var(--accent);
    font-weight: 600;
}

.docs-nav__link code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

/* Scrollable Content */
.docs-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.docs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 2rem;
}

.docs-card:hover {
    border-color: var(--accent);
}

.docs-card__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.docs-card__details {
    margin: 0 0 1.75rem 0;
    padding-left: 1.25rem;
    color: var(--muted);
    line-height: 1.75;
}

.docs-card__details li {
    margin-bottom: 0.85rem;
}

.docs-card__details code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    background: var(--surface-soft);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent);
    border: 1px solid var(--border);
}

.docs-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.docs-card__link,
.docs-card__meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.docs-card__link {
    background: var(--accent);
    color: #ffffff;
}

.docs-card__link:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.docs-card__meta {
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--border);
}

.docs-card__meta:hover {
    background: var(--surface-strong);
    transform: translateY(-1px);
}

/* Footer styling */
.tags-page__footer {
    grid-column: span 2;
    margin-top: 3rem;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.85;
}

/* Mobile-only elements (hidden by default on desktop) */
.mobile-header {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.docs-sidebar__header {
    display: none;
}

/* Responsiveness */
@media (max-width: 900px) {
    body {
        padding: 0;
    }

    .tags-page {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
        background: var(--header-bg);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 90;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .menu-toggle {
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        transition: color 0.2s ease;
    }

    .menu-toggle:hover {
        color: var(--accent);
    }

    .menu-toggle svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .mobile-header__title {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 1.15rem;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 105;
    }
    
    html.dark-theme .sidebar-backdrop {
        background: rgba(0, 0, 0, 0.6);
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .docs-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 1rem;
    }

    /* Off-canvas slideable sidebar */
    .docs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        background: var(--surface);
        border-right: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 110;
        padding: 1.5rem;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        overflow-y: auto;
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-sidebar__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
        margin-bottom: 0.5rem;
    }

    .docs-sidebar__brand {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 1.15rem;
        color: var(--accent);
    }

    .close-sidebar {
        background: none;
        border: none;
        color: var(--muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem;
        transition: color 0.2s ease;
    }

    .close-sidebar:hover {
        color: var(--text);
    }

    .close-sidebar svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .docs-sidebar__title {
        padding-left: 0;
    }

    .docs-nav {
        flex-direction: column;
        gap: 0.25rem;
        overflow-y: visible;
        padding-bottom: 0;
    }

    .docs-nav__link {
        display: flex;
        padding: 0.6rem 0.75rem;
        border-left: 2px solid transparent;
        border-bottom: none;
        font-size: 0.95rem;
    }

    .docs-nav__link.active {
        border-left-color: var(--accent);
        border-bottom-color: transparent;
    }
    
    .docs-card {
        padding: 1.75rem;
        scroll-margin-top: 5.5rem;
    }
    
    .docs-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .docs-card__link,
    .docs-card__meta {
        width: 100%;
        text-align: center;
    }
    
    .floating-controls {
        right: 1rem;
        bottom: 1rem;
    }
    
    .tags-page__footer {
        grid-column: span 1;
        margin-top: 2rem;
    }
}
