:root {
    --bg: #05070a;
    --bg-1: #080c14;
    --bg-2: #0c1220;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);

    --text: #f0eee9;
    --text-secondary: #8e96a6;
    --text-tertiary: #5b6576;
    --text-faint: #3a4356;

    --accent: #d4a574;
    --accent-light: #e8c9a0;
    --accent-dark: #b8864e;
    --accent-glow: rgba(212, 165, 116, 0.2);
    --accent-violet: #a88cc4;
    --accent-violet-glow: rgba(168, 140, 196, 0.15);

    --border: rgba(212, 216, 224, 0.08);
    --border-light: rgba(212, 216, 224, 0.15);

    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;

    --radius: 8px;
    --radius-sm: 4px;
    --transition: 0.2s ease;

    --font-display: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
}

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

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

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

body.void-static {
    background: radial-gradient(circle at 50% 30%, #13111e 0%, #05070a 60%);
}

#void-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.95;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    z-index: 9999;
    text-decoration: none;
}

.skip-link:focus {
    top: var(--space-md);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 var(--space-xl);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 7, 10, 0.85);
    border-color: var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 26px;
    height: 26px;
    display: block;
}

.logo span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    min-height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 180px;
    padding: 0.5rem 0.75rem;
    padding-right: 1.75rem;
    min-height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-faint);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    width: 240px;
}

.search-hint {
    position: absolute;
    right: 0.6rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    pointer-events: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    color: var(--text);
    margin-left: auto;
}

.nav-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl) var(--space-3xl);
    position: relative;
    z-index: 1;
}

.page-header {
    padding: 8rem var(--space-xl) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.page-header h1 .accent {
    color: var(--accent);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.5;
    max-width: 600px;
}

footer {
    border-top: 1px solid var(--border);
    padding: var(--space-xl);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-brand img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition);
}

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

.back-to-top {
    position: fixed;
    right: var(--space-xl);
    bottom: var(--space-xl);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color var(--transition), border-color var(--transition);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }

@media (max-width: 900px) {
    .navbar {
        padding: 0 var(--space-lg);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-md) var(--space-lg);
        background: rgba(5, 7, 10, 0.95);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(12px);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .search-input {
        width: 140px;
    }

    .search-input:focus {
        width: 180px;
    }

    .container {
        padding: 0 var(--space-md) var(--space-2xl);
    }

    footer {
        padding: var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .back-to-top {
        right: var(--space-md);
        bottom: var(--space-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .back-to-top {
        transition: none;
    }
}
