/* Common styles shared across pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a0e27;
    --accent: #ff6b35;
    --accent-light: #ff8c61;
    --text: #1a1a1a;
    --text-light: #6b7280;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --border: #e5e7eb;
}

html {
    scroll-padding-top: 88px;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

/* Hamburger: hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.back-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

/* Footer */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 2rem 2rem;
    text-align: center;
    margin-top: 0;
}

/* Shared article layout (blog article pages) */
.article-header {
    margin-top: 80px;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: white;
}

.article-header-content {
    max-width: 900px;
    margin: 0 auto;
}

.article-category {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text);
}

.article-body h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    margin: 3rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.article-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-body li {
    margin-bottom: 0.75rem;
}

.article-body strong {
    color: var(--primary);
    font-weight: 600;
}

.article-body code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: var(--accent);
}

.article-body pre {
    background: #1a1f3a;
    color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: #fff;
}

.article-cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.article-cta h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.article-cta p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

/* Mobile menu overlay: hidden on desktop */
.nav-menu-overlay {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    /* Hide in-header links on mobile; use body-level overlay instead */
    .nav-links {
        display: none;
    }

    /* Full viewport overlay - outside nav so not clipped by header */
    .nav-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        padding: 5rem 1.25rem 1.25rem;
        background: #f0f2f5;
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.nav-open .nav-menu-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu-overlay-links {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .nav-menu-overlay-links li {
        width: 100%;
        text-align: center;
        background: #ffffff;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .nav-menu-overlay-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 600;
        min-height: 48px;
        color: var(--text);
        text-decoration: none;
    }

    .nav-menu-overlay-links a:hover,
    .nav-menu-overlay-links a:active {
        color: var(--accent);
        background: rgba(255, 107, 53, 0.08);
        border-radius: 10px;
    }

    body.nav-open {
        overflow: hidden;
        overflow-x: hidden;
    }

    body.nav-open nav {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-container {
        padding: 1rem 1.25rem;
        position: relative;
        z-index: 1002;
        background: #ffffff;
    }

    .article-header h1 {
        font-size: 2.5rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.75rem;
    }

    .article-body h3 {
        font-size: 1.4rem;
    }
}

