/* =============================================
   Global Styles & Variables
   ============================================= */

:root {
    /* Colors */
    --primary-bg: #000000;
    --secondary-bg: #0a0a0a;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #4b5563;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-glow: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent);
    --gradient-card: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.9));
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;
    
    /* Z-index */
    --z-background: -1;
    --z-base: 1;
    --z-elevated: 10;
    --z-overlay: 100;
    --z-modal: 1000;
}

/* =============================================
   Reset & Base Styles
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* =============================================
   Typography
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-blue);
}

/* =============================================
   Utility Classes
   ============================================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 20px var(--accent-cyan),
                 0 0 40px var(--accent-blue);
}

/* =============================================
   Particle Canvas (Background)
   ============================================= */

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    opacity: 0.6;
}

/* =============================================
   Loading Animation
   ============================================= */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
}

.loader-ring {
    width: 100px;
    height: 100px;
    border: 3px solid transparent;
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 1024px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }
}

/* =============================================
   Animations
   ============================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--accent-cyan));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--accent-blue));
    }
}

/* =============================================
   Accessibility
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
