/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */

/* Cursor Animation */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--glow-purple);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--glow-purple);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(138, 43, 226, 0.1);
    border-color: transparent;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--glow-purple), var(--accent-gold));
    width: 0%;
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-main);
    display: inline-block;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite alternate;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: var(--glow-purple);
    animation: loading 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Particles Container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1; /* Below content but above background */
    pointer-events: none;
}

/* Button Ripple Effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.7);
}

/* Keyframes */
@keyframes loading {
    0% { width: 0; }
    50% { width: 60%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { transform: scale(1); text-shadow: 0 0 10px rgba(138,43,226,0.5); }
    100% { transform: scale(1.1); text-shadow: 0 0 30px rgba(138,43,226,0.8); }
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

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

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Typed.js Cursor Fix */
.typed-cursor {
    font-size: 3.5rem;
    color: var(--glow-purple);
    font-weight: 300;
}
