/* ============================================
   Zeina Bkdash - Animations CSS
   ============================================ */

/* Particle background */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.35;
    }
    90% {
        opacity: 0.35;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered fade-in for children */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* Hero subtitle typing effect */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--neon-purple);
    margin-right: 4px;
    animation: blink 0.7s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Neon pulse */
@keyframes neonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.neon-pulse {
    animation: neonPulse 2s ease-in-out infinite;
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Glow pulse for cards */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(199, 125, 255, 0.06);
    }
    50% {
        box-shadow: 0 4px 12px rgba(199, 125, 255, 0.1);
    }
}

/* Shimmer effect for loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

/* Skill bar animation */
.skill-fill {
    width: 0;
    transition: width 1.5s ease;
}

.skill-fill.animated {
    /* Width set via inline style */
}

/* Counter animation */
.counter-animate {
    display: inline-block;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(199, 125, 255, 0.1);
    border: 1px solid rgba(199, 125, 255, 0.2);
    color: var(--neon-purple);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px rgba(199, 125, 255, 0.1);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background: rgba(199, 125, 255, 0.18);
    box-shadow: 0 4px 14px rgba(199, 125, 255, 0.15);
    transform: translateY(-3px);
}

/* Page transitions */
.site-main {
    animation: pageIn 0.6s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Gradient border animation */
@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-border {
    background-size: 200% 200%;
    animation: gradientBorder 3s ease infinite;
}
