/* ===== Global Variables ===== */
:root {
    --primary: #FBBF24;
    --primary-hover: #F59E0B;
    --primary-light: #FEF3C7;
    --text: #000000;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --bg: #FFFFFF;
    --bg-subtle: #F9FAFB;
    --bg-dark: #111827;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Layout ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary-hover);
    color: var(--text);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== Code Block Component ===== */
.code-block {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: #1f2937;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    border-bottom: 1px solid #374151;
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #E5E7EB;
}

.code-block .keyword { color: #F59E0B; font-weight: 600; }
.code-block .function { color: #60A5FA; }
.code-block .string { color: #34D399; }
.code-block .comment { color: #6B7280; font-style: italic; }
.code-block .class { color: #A78BFA; }
.code-block .decorator { color: #F472B6; }
.code-block .number { color: #FCD34D; }
.code-block .boolean { color: #FB923C; }

/* ===== Focus Styles ===== */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Text Selection ===== */
::selection {
    background: var(--primary);
    color: var(--text);
}

/* ===== Motion Preferences ===== */
@media (prefers-reduced-motion: no-preference) {
    * {
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* ===== Global Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .nav-links a.active::after {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
    }

    .code-block pre {
        padding: 1rem;
    }

    .code-block code {
        font-size: 0.8rem;
    }
}
