:root {
    --cursor-size: 8px;
    --cursor-outline-size: 36px;
    --primary: #6366f1;
    /* Indigo */
    --secondary: #00f3ff;
    /* Neon Blue */
    --accent: #bc13fe;
    /* Neon Purple */
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --dark-bg: #020617;
    /* Deeper Navy */
    --surface: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 10px;
}

html,
body {
    background-color: #ffffff;
    color: #1e293b;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark {
    background-color: var(--dark-bg);
    color: var(--text-main);
}

/* Cursor Fallback: Only hide browser cursor if custom cursor is active and working */
body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active .hover-target {
    cursor: none !important;
}

/* Cursor Enhancements */
.cursor-dot {
    width: var(--cursor-size);
    height: var(--cursor-size);
    background-color: var(--secondary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: transform;
    box-shadow: 0 0 15px var(--secondary);
}

.cursor-outline {
    width: var(--cursor-outline-size);
    height: var(--cursor-outline-size);
    border: 1.5px solid var(--secondary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s, opacity 0.3s;
    will-change: transform;
}

body.custom-cursor-active .cursor-dot,
body.custom-cursor-active .cursor-outline {
    opacity: 1;
}

body.hovering .cursor-outline {
    width: 56px;
    height: 56px;
    background-color: rgba(0, 243, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.3);
}

/* Glassmorphism Classes */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.dark .glass-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Neon Text */
.text-neon {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.dark .text-neon {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8),
        0 0 20px var(--secondary);
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--neon-blue));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-move 3s linear infinite;
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.8), 0 0 5px var(--neon-blue);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s infinite;
}

/* Utility - Magnetic Button Effect (base styles) */
.btn-magnetic {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Staggered Grid Helper */
.stagger-grid>* {
    opacity: 1;
    /* Revealed by default, animated by JS if active */
}

/* Section Header Lines */
.section-line {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--neon-blue));
    transition: width 1s ease-out;
}


/* AI/Tech Image Style */
.ai-style {
    filter: contrast(1.2) saturate(1.2) sepia(0.2);
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue), inset 0 0 20px rgba(0, 243, 255, 0.5);
    transition: all 0.5s ease;
    mix-blend-mode: normal;
}

.ai-style:hover {
    filter: contrast(1.4) saturate(1.5) sepia(0) brightness(1.1);
    box-shadow: 0 0 25px var(--neon-purple), inset 0 0 30px rgba(188, 19, 254, 0.5);
    border-color: var(--neon-purple);
}