/* muinghinhphong.com - Modern Travel Design */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --secondary: #f59e0b;
    --secondary-light: #fbbf24;
    --accent: #06b6d4;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f0f9ff;
    --bg-warm: #fffbeb;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --max-width: 1100px;
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ========== HEADER (Dynamic Sticky) ========== */
header nav {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

header nav .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

header nav.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Header top bar */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

header nav.scrolled .header-top {
    padding: 0.5rem 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header nav .logo {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

header nav .logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Dynamic section title in header */
.header-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 2px solid var(--primary);
    padding-left: 0.75rem;
    margin-left: 0.5rem;
}

header nav.scrolled .header-section-title {
    opacity: 1;
    transform: translateY(0);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header action buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-alt);
}

.header-btn-primary {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.header-btn-primary:hover {
    color: white;
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 0.125rem;
}

header nav ul a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

header nav ul a:hover {
    color: var(--primary);
    background: var(--bg-alt);
    text-decoration: none;
}

header nav ul a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-alt);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-section-title {
        display: none;
    }

    .header-btn span {
        display: none;
    }

    .header-btn {
        padding: 0.375rem;
    }

    header nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 0.25rem;
    }

    header nav ul.active {
        display: flex;
    }

    header nav ul a {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: 0.75rem 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.breadcrumb ol li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--border);
}

.breadcrumb ol li:last-child::after {
    content: '';
}

.breadcrumb ol li:last-child {
    color: var(--text);
    font-weight: 600;
}

.breadcrumb ol li a {
    color: var(--text-light);
    transition: color var(--transition);
}

.breadcrumb ol li a:hover {
    color: var(--primary);
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #06b6d4 100%);
    color: white;
    padding: 4rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
}

.hero .lead {
    font-size: 1.0625rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    font-weight: 400;
}

/* ========== FACT BOX ========== */
.fact-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.fact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}

.fact-box h2 {
    font-size: 0.8125rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    border: none;
    padding: 0;
}

.fact-box ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.fact-box li {
    font-size: 0.9375rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 0.5rem;
}

.fact-box li:last-child {
    border-bottom: none;
}

.fact-box li strong {
    color: var(--text);
    min-width: fit-content;
}

/* ========== MAIN CONTENT ========== */
main {
    padding: 2.5rem 0;
}

main section {
    margin-bottom: 3rem;
}

main h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.625rem;
    display: inline-block;
}

main h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 600;
}

main p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

main ul, main ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

main li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

main li strong {
    color: var(--text);
}

main a {
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

main a:hover {
    border-bottom-color: var(--primary);
}

/* ========== FAQ ========== */
.faq-section details {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all var(--transition);
}

.faq-section details:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.faq-section details[open] {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.faq-section summary {
    padding: 1.125rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background var(--transition);
    font-size: 0.9375rem;
}

.faq-section summary:hover {
    background: var(--bg-alt);
}

.faq-section summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 300;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-alt);
    transition: all var(--transition);
}

.faq-section details[open] summary::after {
    content: '\2212';
    background: var(--primary);
    color: white;
}

.faq-section details p {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== RELATED PAGES ========== */
.related {
    background: var(--bg-alt);
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-light);
}

.related h2 {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.related ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.related li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition);
    position: relative;
}

.related li a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all var(--transition);
}

.related li a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.related li a:hover::before {
    background: var(--secondary);
    width: 8px;
    height: 8px;
}

/* ========== AUTHOR INFO ========== */
.author-info {
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 2rem !important;
    margin: 2.5rem 0 !important;
    box-shadow: var(--shadow) !important;
}

.author-info h2 {
    font-size: 0.875rem !important;
    color: var(--primary) !important;
    margin-bottom: 1.25rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 0 !important;
}

.author-info div p:first-child {
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    color: var(--text) !important;
    font-size: 0.875rem !important;
}

.author-info div p:nth-child(2) {
    font-size: 0.8125rem !important;
    color: var(--text-secondary) !important;
}

.author-info div p:nth-child(3) {
    font-size: 0.75rem !important;
    color: var(--text-light) !important;
}

/* ========== FOOTER ========== */
footer {
    background: #0f172a;
    color: rgba(255,255,255,0.7);
    padding: 2.5rem 0;
    text-align: center;
}

footer p {
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

footer a {
    color: rgba(255,255,255,0.9);
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0 2.5rem;
    }

    .hero h1 {
        font-size: 1.625rem;
    }

    .hero .lead {
        font-size: 0.9375rem;
    }

    main h2 {
        font-size: 1.25rem;
    }

    .fact-box {
        padding: 1.25rem;
    }

    .fact-box ul {
        grid-template-columns: 1fr;
    }

    .related ul {
        grid-template-columns: 1fr;
    }

    .author-info {
        padding: 1.25rem !important;
    }

    .author-info div {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 1.375rem;
    }

    main section {
        margin-bottom: 2rem;
    }
}

/* ========== DARK MODE ========== */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-light: #7dd3fc;
    --primary-dark: #0ea5e9;
    --secondary: #fbbf24;
    --secondary-light: #fcd34d;
    --accent: #22d3ee;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-warm: #1e293b;
    --border: #334155;
    --border-light: #1e293b;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.2);
}

[data-theme="dark"] header nav {
    background: rgba(15,23,42,0.92);
}

[data-theme="dark"] .menu-toggle {
    color: var(--text);
}

[data-theme="dark"] .menu-toggle:hover {
    background: var(--bg-alt);
}

@media (max-width: 768px) {
    [data-theme="dark"] header nav ul {
        background: rgba(15,23,42,0.98);
    }
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 50%, #0369a1 100%);
}

[data-theme="dark"] footer {
    background: #020617;
}

/* ========== DARK MODE TOGGLE ========== */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all var(--transition);
    color: var(--text-secondary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-alt);
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 18px;
    height: 18px;
    line-height: 1;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun,
:root:not([data-theme="dark"]) .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme="dark"]) .theme-toggle .icon-moon {
    display: inline;
}

/* ========== CONTENT IMAGES ========== */
.content-img {
    width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    max-height: 500px;
}

.content-img-sm {
    max-width: 400px;
}

.content-img-lg {
    max-height: 600px;
}

figure {
    margin: 1.5rem 0;
}

figure img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    object-fit: cover;
}

figcaption {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    text-align: center;
    font-style: italic;
}

/* ========== FOOTER (Enhanced) ========== */
.site-footer {
    background: #0f172a;
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 0;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer .footer-brand .footer-logo {
    font-size: 1.125rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.site-footer .footer-brand .footer-logo::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
}

.site-footer .footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}

.site-footer h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.site-footer .footer-links {
    list-style: none;
}

.site-footer .footer-links li {
    margin-bottom: 0.5rem;
}

.site-footer .footer-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.site-footer .footer-links a:hover {
    color: white;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

.site-footer .footer-bottom a {
    color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
    }

    .site-footer .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ========== READING PROGRESS BAR ========== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 1000;
    transition: width 0.1s linear;
}

/* ========== FIXED TOC SIDEBAR ========== */
.toc-sidebar {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 50;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.toc-sidebar.hidden {
    opacity: 0;
    visibility: hidden;
}

.toc-sidebar-inner {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.toc-sidebar-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.toc-sidebar h3 {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 1rem;
}

.toc-sidebar ol {
    list-style: none;
    counter-reset: toc;
}

.toc-sidebar li {
    counter-increment: toc;
    margin-bottom: 0.375rem;
}

.toc-sidebar li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-light);
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border-left: 2px solid transparent;
    line-height: 1.4;
}

.toc-sidebar li a::before {
    content: counter(toc, decimal-leading-zero);
    font-size: 0.6875rem;
    color: var(--text-light);
    font-weight: 600;
    min-width: 1.25rem;
    opacity: 0.6;
}

.toc-sidebar li a:hover,
.toc-sidebar li a.active {
    color: var(--primary);
    background: var(--bg-alt);
    border-left-color: var(--primary);
    text-decoration: none;
}

.toc-sidebar li a.active::before {
    color: var(--primary);
    opacity: 1;
}

@media (max-width: 1100px) {
    .toc-sidebar {
        display: none;
    }
}

/* ========== FLOATING ACTION BUTTONS ========== */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 90;
}

.fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.fab:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.fab-scroll-top {
    font-size: 1.25rem;
}

/* ========== CONTENT LAYOUT (with TOC) ========== */
.content-with-toc {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 3rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-with-toc main {
    min-width: 0;
}

@media (max-width: 1100px) {
    .content-with-toc {
        grid-template-columns: 1fr;
    }
}

/* ========== INLINE TOC (mobile) ========== */
.inline-toc {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.inline-toc h3 {
    font-size: 0.8125rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 1rem;
}

.inline-toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.inline-toc li {
    counter-increment: toc;
}

.inline-toc li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.inline-toc li a::before {
    content: counter(toc, decimal-leading-zero);
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    min-width: 1.5rem;
}

.inline-toc li a:hover {
    color: var(--primary);
    background: var(--bg);
    border-color: var(--border);
    text-decoration: none;
}

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

/* ========== SMOOTH ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* ========== BACK TO TOP (smooth) ========== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
