/* Root Variables */
:root {
    --color-gold: #D4AF37;
    --color-void: #050505;
    --color-crimson: #8B0000;
    --color-vulcan: #FF6B35;
    --color-seraph: #F5F5DC;
    --color-lucy: #D8A7CA;
    --color-teal: #0ABDC6;
    --color-cyan: #00FFF5;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-void);
}

body {
    background-color: var(--color-void);
    color: #d1d5db;
    overflow-x: hidden;
}

/* Typography */
.font-serif {
    font-family: 'Cinzel', serif;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

/* Gold Selection */
::selection {
    background-color: rgba(212, 175, 55, 0.3);
    color: var(--color-gold);
}

/* Custom Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-void);
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border: 1px solid var(--color-teal);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal);
}

/* Canvas Background */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation Effects */
.nav-link {
    position: relative;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-link:hover {
    letter-spacing: 0.3em;
}

.nav-link[data-color="crimson"]:hover {
    color: var(--color-teal);
    text-shadow: 0 0 20px rgba(10, 189, 198, 0.5);
}

.nav-link[data-color="lucy"]:hover {
    color: var(--color-lucy);
    text-shadow: 0 0 20px rgba(216, 167, 202, 0.5);
}

.nav-link[data-color="vulcan"]:hover {
    color: var(--color-vulcan);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.nav-link[data-color="seraph"]:hover {
    color: var(--color-seraph);
    text-shadow: 0 0 20px rgba(245, 245, 220, 0.5);
}

/* Tesser Distortion Effect */
.nav-link[data-color="tesser"]:hover {
    color: #9ca3af;
    transform: skew(-5deg) scale(1.1);
    text-shadow: 2px 2px 0px rgba(212, 175, 55, 0.3);
    filter: blur(0.3px);
}

/* Expanding Words Animation */
.expansion-word {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transform: translateY(20px);
}

.expansion-word.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tagline Fade */
#tagline.visible {
    opacity: 1;
}

/* Section Transitions */
section {
    position: relative;
    z-index: 10;
}

/* Gold Accents */
.text-gold-400 {
    color: var(--color-gold);
}

.border-gold-500\/10 {
    border-color: rgba(212, 175, 55, 0.1);
}

.border-gold-500\/20 {
    border-color: rgba(212, 175, 55, 0.2);
}

.border-gold-500\/30 {
    border-color: rgba(212, 175, 55, 0.3);
}

.bg-gold-400\/20 {
    background-color: rgba(212, 175, 55, 0.2);
}

.bg-gold-500\/20 {
    background-color: rgba(212, 175, 55, 0.2);
}

.bg-gold-400\/60 {
    background-color: rgba(212, 175, 55, 0.6);
}

.text-gold-400\/60 {
    color: rgba(212, 175, 55, 0.6);
}

.text-gold-400\/80 {
    color: rgba(212, 175, 55, 0.8);
}

.text-gold-500 {
    color: var(--color-gold);
}

/* Background Colors */
.bg-void {
    background-color: var(--color-void);
}

.bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Focus States */
*:focus-visible {
    outline: 1px solid var(--color-gold);
    outline-offset: 4px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .expansion-word {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .font-serif.text-6xl {
        font-size: 3rem;
    }
    
    .font-serif.text-3xl {
        font-size: 1.5rem;
    }
    
    #primordial-nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
    }
}

/* Geometric decorative elements */
.geometric-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    opacity: 0.3;
}