/* ========================================
   LEGION Coder - Windsurf Design System
   ======================================== */

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

:root {
    /* Colors - Windsurf Palette */
    --bg-primary: #0B100F;
    --bg-secondary: #12121a;
    --bg-card: #161620;
    --bg-hover: #1e1e2e;
    --accent-mint: #34E8BB;
    --accent-mint-hover: #2AD4A0;
    --accent-mint-active: #1FB89A;
    --accent-mint-glow: rgba(52, 232, 187, 0.3);
    --accent-pink: #FB9CE5;
    --accent-purple: #430A5E;
    --accent-purple-light: #5A1A7A;
    --accent-teal: #003326;
    --accent-teal-light: #004d3a;
    --text-primary: #FFFFFF;
    --text-secondary: #C0C1C6;
    --text-muted: #64748B;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(255, 255, 255, 0.2);
    --error-red: #ef4444;
    --success-green: #22c55e;

    /* Typography */
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: 72px; font-weight: 300; }
h2 { font-size: 56px; }
h3 { font-size: 40px; }
h4 { font-size: 32px; }
h5 { font-size: 24px; }
h6 { font-size: 20px; font-weight: 600; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-mint);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--accent-mint-hover);
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(52, 232, 187, 0.08), transparent),
        radial-gradient(ellipse 50% 40% at 80% 40%, rgba(168, 85, 247, 0.06), transparent),
        radial-gradient(ellipse 40% 30% at 20% 70%, rgba(251, 156, 229, 0.04), transparent);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    padding: 0 var(--space-2xl);
    background: rgba(11, 16, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-mint);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 16px;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-normal);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-mint);
    transition: width var(--transition-normal);
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent-mint);
    color: var(--bg-primary);
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 4px;
    line-height: 1.5;
}

.btn-primary:hover {
    background: var(--accent-mint-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(52, 232, 187, 0.3);
}

.btn-primary:active {
    background: var(--accent-mint-active);
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    line-height: 1.5;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 4px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-mono {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    font-size: 20px;
}

.btn-social {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
}

.btn-social:hover {
    background: var(--bg-hover);
    border-color: var(--border-color-hover);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-xl);
    transition: all var(--transition-slow);
}

.card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.card-purple {
    background: var(--accent-purple);
    border: none;
}

.card-purple:hover {
    background: var(--accent-purple-light);
}

.card-teal {
    background: var(--accent-teal);
    border: none;
}

.card-teal:hover {
    background: var(--accent-teal-light);
}

.card-highlight {
    border: 1px solid var(--accent-mint);
    position: relative;
}

.card-highlight::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    right: var(--space-lg);
    background: var(--accent-mint);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-mint);
    box-shadow: 0 0 0 3px rgba(52, 232, 187, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--error-red);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: var(--error-red);
    font-size: 13px;
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: var(--space-xs);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-mint);
}

.form-checkbox span {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-checkbox a {
    color: var(--accent-mint);
}

/* Feature Cards */
.feature-card {
    background: var(--accent-purple);
    border-radius: 4px;
    padding: var(--space-xl);
    transition: all var(--transition-slow);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 15px -3px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: rgba(52, 232, 187, 0.1) 0px 20px 40px;
}

.feature-card.teal {
    background: var(--accent-teal);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-mint);
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Pricing Cards */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-2xl);
    transition: all var(--transition-slow);
    position: relative;
}

.pricing-card:hover {
    border-color: var(--accent-mint);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured {
    border-color: var(--accent-mint);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(52, 232, 187, 0.05) 100%);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-mint);
    color: var(--bg-primary);
    padding: 4px 16px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.pricing-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.pricing-price {
    font-size: 48px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.pricing-price span {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-xl);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.pricing-features li i {
    color: var(--accent-mint);
    font-size: 16px;
}

/* Timeline/Changelog */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 64px;
    padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 4px;
    width: 20px;
    height: 20px;
    background: var(--accent-mint);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent-mint);
}

.timeline-dot.major {
    width: 28px;
    height: 28px;
    left: 11px;
    background: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-mint);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-xl);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.timeline-version {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-mint);
}

.timeline-badge {
    background: var(--accent-purple);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-left: auto;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.timeline-list {
    list-style: none;
}

.timeline-list li {
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.timeline-list li::before {
    content: '•';
    color: var(--accent-mint);
    font-weight: bold;
}

/* Code Preview */
.code-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 15px -3px;
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #22c55e; }

.code-title {
    margin-left: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
}

.code-body {
    padding: var(--space-xl);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.8;
    overflow-x: auto;
}

.code-line {
    display: flex;
    gap: var(--space-md);
}

.line-num {
    color: var(--text-muted);
    min-width: 2rem;
    text-align: right;
    user-select: none;
}

.code-content { color: var(--text-secondary); }
.code-keyword { color: #c678dd; }
.code-function { color: #61afef; }
.code-string { color: #98c379; }
.code-comment { color: #5c6370; font-style: italic; }
.code-variable { color: #e06c75; }

/* Footer */
footer {
    padding: var(--space-2xl) var(--space-xl);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--space-sm);
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition-normal);
}

.footer-column a:hover {
    color: var(--accent-mint);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-normal);
}

.footer-social a:hover {
    background: var(--accent-mint);
    border-color: var(--accent-mint);
    color: var(--bg-primary);
}

/* Page Layouts */
.page-header {
    padding: calc(64px + var(--space-3xl)) var(--space-xl) var(--space-2xl);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #fff 0%, var(--accent-mint) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 20px;
    color: var(--text-secondary);
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(64px + var(--space-xl)) var(--space-xl);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-2xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Download Page */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-slow);
}

.download-card:hover {
    border-color: var(--accent-mint);
    transform: translateY(-4px);
}

.download-card .platform-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    background: var(--bg-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent-mint);
}

.download-card h3 {
    font-size: 20px;
    margin-bottom: var(--space-xs);
}

.download-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: var(--space-lg);
}

/* Docs Page */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.docs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-xl);
    transition: all var(--transition-slow);
    text-decoration: none;
}

.docs-card:hover {
    border-color: var(--accent-mint);
    transform: translateY(-4px);
}

.docs-card .docs-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-purple);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-mint);
    margin-bottom: var(--space-md);
}

.docs-card h3 {
    font-size: 18px;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.docs-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Features Showcase */
.showcase-section {
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid var(--border-color);
}

.showcase-section:last-child {
    border-bottom: none;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.showcase-grid.reverse {
    direction: rtl;
}

.showcase-grid.reverse > * {
    direction: ltr;
}

.showcase-content h3 {
    font-size: 32px;
    margin-bottom: var(--space-md);
}

.showcase-content p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: var(--space-lg);
}

.showcase-image {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.animate-slide-in {
    animation: slideIn 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 1024px) {
    h1 { font-size: 56px; }
    h2 { font-size: 48px; }
    h3 { font-size: 36px; }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .showcase-grid.reverse {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 var(--space-md);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-md);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    h3 { font-size: 24px; }

    .page-header {
        padding: calc(64px + var(--space-xl)) var(--space-md) var(--space-xl);
    }

    .page-content {
        padding: var(--space-xl) var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item {
        padding-left: 48px;
    }

    .timeline-dot {
        left: 7px;
        width: 18px;
        height: 18px;
    }

    .timeline-dot.major {
        width: 24px;
        height: 24px;
        left: 4px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-mint);
}

/* Selection */
::selection {
    background: rgba(52, 232, 187, 0.3);
    color: var(--text-primary);
}
