/* ========================================
   JEETISM PORTFOLIO — KEYFRAME ANIMATIONS
   ======================================== */

/* ---------- LOADER ---------- */
@keyframes loaderBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes loaderFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ---------- GLOW ROTATION ---------- */
@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- PULSE ---------- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* ---------- BLINK ---------- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- FLOAT ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(10px) rotate(-3deg); }
}

/* ---------- SCROLL WHEEL ---------- */
@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* ---------- GLITCH ---------- */
@keyframes glitch-1 {
    0%   { clip: rect(36px, 9999px, 9px, 0); }
    5%   { clip: rect(25px, 9999px, 99px, 0); }
    10%  { clip: rect(67px, 9999px, 14px, 0); }
    15%  { clip: rect(20px, 9999px, 92px, 0); }
    20%  { clip: rect(6px, 9999px, 35px, 0); }
    25%  { clip: rect(76px, 9999px, 46px, 0); }
    30%  { clip: rect(55px, 9999px, 88px, 0); }
    35%  { clip: rect(2px, 9999px, 12px, 0); }
    40%  { clip: rect(86px, 9999px, 44px, 0); }
    45%  { clip: rect(15px, 9999px, 60px, 0); }
    50%  { clip: rect(47px, 9999px, 83px, 0); }
    55%  { clip: rect(90px, 9999px, 28px, 0); }
    60%  { clip: rect(33px, 9999px, 71px, 0); }
    65%  { clip: rect(58px, 9999px, 5px, 0); }
    70%  { clip: rect(42px, 9999px, 94px, 0); }
    75%  { clip: rect(11px, 9999px, 52px, 0); }
    80%  { clip: rect(73px, 9999px, 38px, 0); }
    85%  { clip: rect(29px, 9999px, 65px, 0); }
    90%  { clip: rect(81px, 9999px, 19px, 0); }
    95%  { clip: rect(48px, 9999px, 77px, 0); }
    100% { clip: rect(14px, 9999px, 56px, 0); }
}

@keyframes glitch-2 {
    0%   { clip: rect(65px, 9999px, 42px, 0); }
    5%   { clip: rect(13px, 9999px, 87px, 0); }
    10%  { clip: rect(51px, 9999px, 23px, 0); }
    15%  { clip: rect(77px, 9999px, 66px, 0); }
    20%  { clip: rect(30px, 9999px, 8px, 0); }
    25%  { clip: rect(94px, 9999px, 55px, 0); }
    30%  { clip: rect(18px, 9999px, 79px, 0); }
    35%  { clip: rect(62px, 9999px, 33px, 0); }
    40%  { clip: rect(7px, 9999px, 91px, 0); }
    45%  { clip: rect(44px, 9999px, 16px, 0); }
    50%  { clip: rect(83px, 9999px, 58px, 0); }
    55%  { clip: rect(26px, 9999px, 72px, 0); }
    60%  { clip: rect(69px, 9999px, 11px, 0); }
    65%  { clip: rect(38px, 9999px, 85px, 0); }
    70%  { clip: rect(54px, 9999px, 27px, 0); }
    75%  { clip: rect(90px, 9999px, 48px, 0); }
    80%  { clip: rect(20px, 9999px, 63px, 0); }
    85%  { clip: rect(75px, 9999px, 35px, 0); }
    90%  { clip: rect(41px, 9999px, 82px, 0); }
    95%  { clip: rect(59px, 9999px, 14px, 0); }
    100% { clip: rect(22px, 9999px, 70px, 0); }
}

/* ---------- HEARTBEAT ---------- */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}

/* ---------- FADE IN UP (scroll indicator) ---------- */
@keyframes fadeInUp {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(5px); }
}

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

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

/* ---------- SCALE PULSE ---------- */
@keyframes scalePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ---------- SLIDE IN FROM LEFT ---------- */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- SLIDE IN FROM RIGHT ---------- */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- GLOW PULSE ---------- */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), 0 0 40px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(0, 212, 255, 0.2);
    }
}

/* ============================================
   SCROLL-TRIGGERED ANIMATION CLASSES
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.animate-on-scroll:nth-child(2)  { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3)  { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4)  { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5)  { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6)  { transition-delay: 0.5s; }
.animate-on-scroll:nth-child(7)  { transition-delay: 0.6s; }
.animate-on-scroll:nth-child(8)  { transition-delay: 0.7s; }

/* ---------- TILT EFFECT ---------- */
[data-tilt] {
    transform-style: preserve-3d;
    will-change: transform;
}
