/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2.5rem;
    }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
    background-color: rgba(var(--surface-light-rgb), 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

/* Transparent header — overlays the cinematic hero on homepage */
.site-header.header-transparent {
    position: fixed;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
    transition: background-color 0.4s ease,
        border-bottom-color 0.4s ease,
        box-shadow 0.4s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Transition on all child elements for smooth color change */
.site-header.header-transparent .header-name,
.site-header.header-transparent .header-title,
.site-header.header-transparent .header-logo-icon,
.site-header.header-transparent .nav-link,
.site-header.header-transparent .header-actions .theme-toggle,
.site-header.header-transparent .header-actions .lang-toggle,
.site-header.header-transparent .header-actions .mobile-menu-btn {
    transition: color 0.4s ease, background 0.4s ease;
}

/* Scrolled state — opaque sticky */
.site-header.header-transparent.header-scrolled {
    background-color: rgba(var(--surface-light-rgb), 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* --- Transparent (top) colors --- */
.site-header.header-transparent:not(.header-scrolled) .header-name {
    color: var(--white);
}

.site-header.header-transparent:not(.header-scrolled) .header-title {
    color: rgba(var(--white-rgb), 0.7);
}

.site-header.header-transparent:not(.header-scrolled) .header-logo-icon {
    background: rgba(var(--white-rgb), 0.15);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.site-header.header-transparent:not(.header-scrolled) .nav-link {
    color: rgba(var(--white-rgb), 0.85);
}

.site-header.header-transparent:not(.header-scrolled) .nav-link:hover {
    color: var(--white);
}

.site-header.header-transparent:not(.header-scrolled) .header-actions .theme-toggle,
.site-header.header-transparent:not(.header-scrolled) .header-actions .lang-toggle,
.site-header.header-transparent:not(.header-scrolled) .header-actions .mobile-menu-btn {
    color: rgba(var(--white-rgb), 0.85);
}

.site-header.header-transparent:not(.header-scrolled) .header-actions .theme-toggle:hover,
.site-header.header-transparent:not(.header-scrolled) .header-actions .lang-toggle:hover,
.site-header.header-transparent:not(.header-scrolled) .header-actions .mobile-menu-btn:hover {
    color: var(--white);
}


.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .header-inner {
        padding: 0.75rem 2.5rem;
    }
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.header-logo:hover .header-logo-icon {
    transform: scale(1.05);
}

.header-logo-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Monogram Stacked Style - 80×80 ratio (square) */
.monogram-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--white);
}

/* Header: 2.5rem × 2.5rem (40px) */
.header-logo-icon.monogram-stacked {
    width: 2.5rem;
    height: 2.5rem;
}

.header-logo-icon .monogram-r {
    font-size: 1.15rem;
    line-height: 1;
}

.header-logo-icon .monogram-de {
    display: flex;
    justify-content: center;
    gap: 0;
    font-size: 0.58rem;
    line-height: 1;
    margin-top: -0.05rem;
}

.header-logo-icon .monogram-de span {
    width: 50%;
    text-align: center;
}

/* Footer: 3rem × 3rem (48px) */
.footer-logo-icon.monogram-stacked {
    width: 3rem;
    height: 3rem;
}

.footer-logo-icon .monogram-r {
    font-size: 1.4rem;
    line-height: 1;
}

.footer-logo-icon .monogram-de {
    display: flex;
    justify-content: center;
    gap: 0;
    font-size: 0.7rem;
    line-height: 1;
    margin-top: -0.05rem;
}

.footer-logo-icon .monogram-de span {
    width: 50%;
    text-align: center;
}

/* Mobile: show name, hide icon */
.header-logo-icon {
    display: none;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

/* Desktop (480px+): show both icon and name */
@media (min-width: 480px) {
    .header-logo-icon {
        display: flex;
    }
}

.header-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.header-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 0.01em;
}

/* Main Navigation */
.main-nav {
    display: none;
}

@media (min-width: 900px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.nav-link.active {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-social {
    display: none;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

@media (min-width: 640px) {
    .header-social {
        display: flex;
    }
}

.header-social:hover {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.btn-contact {
    display: none;
    height: 2.25rem;
    padding: 0 1rem;
    background-color: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px -2px rgba(var(--primary-rgb), 0.3);
}

.btn-contact .material-symbols-outlined {
    font-size: 1rem;
}

.btn-contact:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Search Toggle */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background-color: var(--surface-accent);
    color: var(--primary);
    border-color: var(--primary);
}

.search-toggle .material-symbols-outlined {
    font-size: 1.125rem;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.lang-toggle:hover {
    background-color: var(--surface-accent);
    color: var(--primary);
    border-color: var(--primary);
}

.mobile-lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.mobile-lang-toggle:hover {
    background-color: var(--surface-accent);
    color: var(--primary);
    border-color: var(--primary);
}

@media (min-width: 640px) {
    .btn-contact {
        display: flex;
    }
}

/* Footer */
.site-footer {
    background-color: var(--slate-900);
    color: var(--slate-300);
    padding-top: 5rem;
    padding-bottom: 2.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-top: none;
}

@media (min-width: 768px) {
    .site-footer {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.cta-box {
    background: linear-gradient(to bottom right, #333333, var(--gray-900));
    /* gray-900 */
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 5rem;
    box-shadow: 0 25px 50px -12px rgba(var(--black-rgb), 0.25);
}

@media (min-width: 768px) {
    .cta-box {
        padding: 4rem;
    }
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 42rem;
    margin: 0 auto;
    color: var(--white);
}

.cta-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(var(--white-rgb), 0.1);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    border: 1px solid rgba(var(--white-rgb), 0.2);
}

.cta-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .cta-content h2 {
        font-size: 3rem;
    }
}

.cta-content p {
    color: var(--slate-300);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
    }
}

.btn-cta-primary {
    height: 3.5rem;
    padding: 0 2rem;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-cta-primary .material-symbols-outlined {
    font-size: 1.25rem;
}

.btn-cta-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-cta-outline {
    height: 3.5rem;
    padding: 0 2rem;
    background-color: transparent;
    border: 1px solid rgba(var(--white-rgb), 0.3);
    color: var(--white);
    font-weight: 700;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-cta-outline:hover {
    background-color: rgba(var(--white-rgb), 0.1);
}

/* Footer Main Content */
.footer-main {
    padding: 4rem 0;
    border-top: 1px solid rgba(var(--white-rgb), 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

/* Footer Brand */
.footer-brand {
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.footer-logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.footer-logo-icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.footer-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-400);
    letter-spacing: 0.01em;
}

.footer-bio {
    font-size: 0.9rem;
    color: var(--slate-400);
    line-height: 1.7;
}

/* Footer Navigation */
.footer-nav-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-list a {
    font-size: 0.875rem;
    color: var(--slate-400);
    font-weight: 400;
    transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
    color: var(--white);
}

/* Footer Contact */
.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--slate-400);
    font-weight: 400;
    transition: color var(--transition-fast);
}

.footer-contact-link:hover {
    color: var(--white);
}

.footer-contact-link .material-symbols-outlined {
    font-size: 1.125rem;
    color: var(--primary-light);
}

.footer-location {
    cursor: default;
}

.footer-location:hover {
    color: var(--slate-400);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(var(--white-rgb), 0.1);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.copyright {
    color: var(--slate-400);
    font-size: 0.8125rem;
    text-align: center;
}

.hosting-info {
    color: var(--slate-500);
    font-size: 0.75rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.footer-hosting-icon {
    font-size: 1rem;
    vertical-align: middle;
}

/* Footer Social */
.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social-link {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--white-rgb), 0.08);
    color: var(--slate-400);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Breadcrumb Navigation */
.breadcrumb-container {
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    padding: 1rem 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-link .material-symbols-outlined {
    font-size: 1.125rem;
}

.breadcrumb-separator {
    color: var(--slate-300);
}

.breadcrumb-current {
    color: var(--secondary);
    font-weight: 600;
}

/* Project Nav Footer */
.project-nav {
    border-top: 1px solid var(--slate-200);
}

.project-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

.project-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.project-nav-name {
    color: var(--secondary);
}

.project-nav-back {
    background: var(--slate-100);
    color: var(--secondary);
}

.project-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.project-role {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.project-tagline {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Project Navigation */
.project-navigation {
    padding: 4rem 0;
    background: var(--slate-50);
}

.project-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-nav-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--white);
    border-radius: 1rem;
    border: 2px solid var(--slate-200);
    transition: border-color 0.3s, transform 0.3s;
}

.project-nav-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.nav-label .material-symbols-outlined {
    font-size: 1.125rem;
}

.project-nav-card.next .nav-label {
    justify-content: flex-end;
}

.nav-project-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.nav-project-role {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Header */
.ai-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.ai-status {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
}

.ai-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ai-close:hover {
    opacity: 1;
}

/* Messages */
.ai-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--background);
    /* Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) transparent;
}

.ai-message {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 85%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 2rem;
    height: 2rem;
    background: var(--surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.ai-avatar span {
    font-size: 1.25rem;
    color: var(--primary);
}

.ai-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message-ai .ai-bubble {
    background: var(--slate-100);
    color: var(--text-main);
    border-bottom-left-radius: 0.25rem;
}

[data-theme='dark'] .ai-message-ai .ai-bubble {
    background: var(--surface-accent);
    color: var(--text-main);
}

.ai-message-user .ai-bubble {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 0.25rem;
}

/* Typing Dots */
.typing-bubble {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Chips */
.ai-chips {
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar */
    margin-bottom: 0.5rem;
}

.ai-chip {
    background: var(--surface-light);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chip:hover {
    background: var(--primary);
    color: white;
}

/* Article layout — 2 columns desktop */
.article-layout {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .article-layout {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 3rem;
        max-width: none;
    }
}

/* Sidebar */
.article-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .article-sidebar {
        display: block;
    }
}

.sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    max-height: calc(100vh - var(--header-height) - 4rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

/* TOC */
.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin: 0;
}

.toc-nav a {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid var(--border-light);
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.toc-nav a:hover {
    color: var(--primary);
}

.toc-nav a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* TOC h3 indentation */
.toc-nav .toc-h3 a {
    padding-left: 1.5rem;
    font-size: 0.75rem;
}

/* TOC mobile */
.toc-mobile {
    padding-bottom: 0;
    background-color: var(--surface-light);
}

@media (min-width: 1024px) {
    .toc-mobile {
        display: none;
    }
}

.toc-mobile-details {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    max-width: 900px;
    margin: 0 auto;
}

.toc-mobile-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.toc-mobile-summary::-webkit-details-marker {
    display: none;
}

.toc-mobile-details[open] .toc-mobile-summary {
    border-bottom: 1px solid var(--border-light);
}

.toc-mobile .toc-nav {
    padding: 0.75rem 1.25rem;
}

/* Author box modifiers */
.author-box--mobile {
    display: flex;
}

.author-box--sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .author-box--mobile {
        display: none;
    }
    .author-box--sidebar {
        display: flex;
    }
}

/* Sidebar author box — compact */
.author-box--sidebar {
    padding: 1rem;
    margin-top: 0;
}

.author-box--sidebar .author-avatar {
    width: 48px;
    height: 48px;
}

/* Share links */
.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid var(--border-light);
    background: var(--surface-accent);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-btn--copy.copied {
    border-color: #16a34a;
    color: #16a34a;
}

/* Alphabet navigation */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
}

.letter-link {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    transition: all var(--transition-fast);
}

.letter-link--active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.letter-link--active:hover {
    background: var(--primary);
    color: var(--white);
}

.letter-link--inactive {
    background: var(--slate-100);
    color: var(--slate-400);
    cursor: default;
}

