/* ============================================
   SADEE JODI — Advanced Animations
   Includes CSS Animations & GSAP-ready classes
   ============================================ */

/* ---- Hero Section Animations ---- */
@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroTextReveal {
    0% { 
        opacity: 0; 
        transform: translateY(40px); 
        filter: blur(10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
        filter: blur(0); 
    }
}

@keyframes heroImageFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(1deg); }
    75% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-800px) translateX(100px) rotate(720deg); opacity: 0; }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.15); }
    20% { transform: scale(1); }
    30% { transform: scale(1.1); }
    40% { transform: scale(1); }
}

@keyframes orbitalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary); }
}

@keyframes progressBar {
    from { width: 0%; }
    to { width: var(--progress-width, 100%); }
}

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

@keyframes colorShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes borderGlow {
    0%, 100% { border-color: var(--primary); box-shadow: 0 0 5px rgba(233,30,99,0.3); }
    50% { border-color: var(--secondary); box-shadow: 0 0 20px rgba(124,77,255,0.3); }
}

@keyframes backgroundPan {
    from { background-position: 0% center; }
    to { background-position: -200% center; }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---- Floating Particles ---- */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

.particle-pink {
    background: radial-gradient(circle, rgba(233,30,99,0.6), transparent);
}

.particle-purple {
    background: radial-gradient(circle, rgba(124,77,255,0.6), transparent);
}

.particle-gold {
    background: radial-gradient(circle, rgba(255,215,0,0.6), transparent);
}

/* ---- Animated Backgrounds ---- */
.animated-bg {
    background-size: 400% 400%;
    animation: heroGradientShift 15s ease infinite;
}

.gradient-text-animated {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: backgroundPan 5s linear infinite;
}

/* ---- Hover Animations ---- */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-primary);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-base);
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* ---- Stagger Animation Delays ---- */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

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

.btn-ripple .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ---- Counter Animation ---- */
.counter-animated {
    display: inline-block;
    animation: countUp 0.5s ease-out;
}

/* ---- Card Entrance ---- */
.card-entrance {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.6s ease forwards;
}

/* ---- Heartbeat Icon ---- */
.heart-icon {
    animation: heartBeat 2s ease-in-out infinite;
    display: inline-block;
    color: var(--primary);
}

/* ---- Profile Card Shine ---- */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 40%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 60%,
        transparent 100%
    );
    transform: rotate(30deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.card-shine:hover::after {
    transform: rotate(30deg) translate(80%, -80%);
}

/* ---- Orbital Ring Decoration ---- */
.orbital-ring {
    position: absolute;
    border: 1px solid rgba(233, 30, 99, 0.1);
    border-radius: 50%;
    animation: orbitalSpin 20s linear infinite;
    pointer-events: none;
}

.orbital-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

/* ---- Page Transition ---- */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* ---- Loading Dots ---- */
.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Falling Rose Petals ---- */
.rose-petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.petal {
    position: absolute;
    top: -10%;
    background-image: url('../assets/images/image.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    box-shadow: none !important;
    animation: fallingPetal linear infinite;
    opacity: 0;
}

body.light-mode .petal {
    background-color: transparent !important;
    box-shadow: none !important;
}

@keyframes fallingPetal {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: var(--petal-opacity, 0.7);
    }
    90% {
        opacity: var(--petal-opacity, 0.7);
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift, 50px)) rotate(var(--spin, 360deg));
        opacity: 0;
    }
}
