/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0A0F1C;
    --bg-secondary: #111A2E;
    --bg-card: #151D33;
    --accent: #4F8CFF;
    --accent-hover: #3D7BEE;
    --green-accent: #22C55E;
    --text-primary: #FFFFFF;
    --text-secondary: #A5B4C7;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.10);
    --glass-bg: rgba(17, 26, 46, 0.7);
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== BASE & RESET ===== */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== GRID PATTERN ===== */
#grid-pattern {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center center;
}

/* ===== MOUSE GLOW ===== */
.mouse-glow {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.08) 0%, rgba(79, 140, 255, 0.03) 30%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: left, top;
}

/* ===== MAGNETIC BUTTONS ===== */
.magnetic-btn {
    transition: transform 0.3s var(--transition-smooth);
}

/* ===== AURORA BACKGROUND ===== */
.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    will-change: transform;
    animation: auroraFloat 20s ease-in-out infinite;
}

.aurora-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.4) 0%, rgba(99, 102, 241, 0.2) 40%, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.aurora-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.1) 40%, transparent 70%);
    top: 40%;
    right: -10%;
    animation-delay: -7s;
}

.aurora-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(79, 140, 255, 0.1) 40%, transparent 70%);
    bottom: -15%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes auroraFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -30px) scale(1.15);
    }
    50% {
        transform: translate(-20px, 40px) scale(0.9);
    }
    75% {
        transform: translate(-40px, -20px) scale(1.1);
    }
}

/* ===== LIGHT BEAMS ===== */
.light-beam {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(79, 140, 255, 0.15), transparent);
    opacity: 0;
    animation: beamPulse 8s ease-in-out infinite;
}

.light-beam-1 {
    left: 15%;
    animation-delay: 0s;
}

.light-beam-2 {
    left: 50%;
    animation-delay: -3s;
}

.light-beam-3 {
    left: 75%;
    animation-delay: -6s;
}

@keyframes beamPulse {
    0%, 100% {
        opacity: 0;
        transform: scaleY(0.8);
    }
    50% {
        opacity: 0.6;
        transform: scaleY(1);
    }
}

/* ===== GLASSMORPHISM UTILITIES ===== */
.glass {
    background: rgba(17, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-light {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== NAVBAR ===== */
#navbar {
    will-change: background, box-shadow;
}

#navbar.scrolled {
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== SCROLL REVEAL ===== */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    filter: blur(8px);
    transition: all 0.9s var(--transition-smooth);
}

.reveal {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0);
}

/* Staggered reveal delays */
.reveal-stagger-1 { transition-delay: 0ms; }
.reveal-stagger-2 { transition-delay: 80ms; }
.reveal-stagger-3 { transition-delay: 160ms; }
.reveal-stagger-4 { transition-delay: 240ms; }
.reveal-stagger-5 { transition-delay: 320ms; }

/* ===== PROGRESS BARS ANIMATION ===== */
.progress-bar {
    width: 0%;
    transition: width 1.6s var(--transition-smooth);
    will-change: width;
}

.progress-bar.animated {
    width: var(--target-width);
}

/* ===== GLOW EFFECTS ===== */
.glow-accent {
    box-shadow: 0 0 40px rgba(79, 140, 255, 0.15), 0 0 80px rgba(79, 140, 255, 0.05);
}

.glow-green {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.12);
}

/* ===== SMOOTH HOVER TRANSITIONS ===== */
.hover-lift {
    transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #4F8CFF 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ANIMATED BORDERS ===== */
.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(270deg, #4F8CFF, #22C55E, #8b5cf6, #4F8CFF);
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0A0F1C;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.pulse-subtle {
    animation: pulse-subtle 2.5s ease-in-out infinite;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

.float {
    animation: float 7s ease-in-out infinite;
}

.float-delay-1 { animation-delay: -2s; }
.float-delay-2 { animation-delay: -4s; }
.float-delay-3 { animation-delay: -6s; }

/* ===== SHIMMER EFFECT ===== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* ===== SCALE IN ANIMATION ===== */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-in {
    animation: scaleIn 0.6s var(--transition-smooth) forwards;
}

/* ===== FLOATING CARDS ===== */
.floating-card {
    animation: floatCard 8s ease-in-out infinite;
    will-change: transform;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ===== PARALLAX LAYER ===== */
.parallax-layer {
    will-change: transform;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .reveal-left,
    .reveal-right {
        transform: translateY(40px);
    }
    
    .reveal-left.visible,
    .reveal-right.visible {
        transform: translateY(0);
    }
    
    .mouse-glow {
        width: 300px;
        height: 300px;
    }
    
    .aurora {
        opacity: 0.3;
    }
    
    .aurora-1 { width: 250px; height: 250px; }
    .aurora-2 { width: 200px; height: 200px; }
    .aurora-3 { width: 180px; height: 180px; }
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(79, 140, 255, 0.3);
    color: #FFFFFF;
}

/* ===== FOCUS STYLES ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #4F8CFF;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ===== SMOOTH BORDER TRANSITIONS ===== */
.border-soft {
    transition: border-color 0.3s ease;
}

/* ===== NOISE TEXTURE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    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");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===== CARD HOVER GLOW ===== */
.card-glow {
    transition: box-shadow 0.4s var(--transition-smooth), border-color 0.4s var(--transition-smooth);
}

.card-glow:hover {
    box-shadow: 0 0 30px rgba(79, 140, 255, 0.1), 0 0 60px rgba(79, 140, 255, 0.05);
    border-color: rgba(79, 140, 255, 0.2);
}