/* ============================================
   ANIMATIONS
   ============================================ */

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
    }
}

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

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

/* Hero animations */
.hero-fade-up.animate {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-fade-up.animate.delay-1 {
    animation-delay: 0.1s;
}

.hero-fade-up.animate.delay-2 {
    animation-delay: 0.2s;
}

.hero-fade-up.animate.delay-3 {
    animation-delay: 0.3s;
}

.hero-fade-up.animate.delay-4 {
    animation-delay: 0.4s;
}

/* Scroll reveal animations */
.scroll-reveal.visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animations for skill cards */
.skill-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.skill-card:nth-child(1) { animation-delay: 0s; }
.skill-card:nth-child(2) { animation-delay: 0.1s; }
.skill-card:nth-child(3) { animation-delay: 0.2s; }
.skill-card:nth-child(4) { animation-delay: 0.3s; }
.skill-card:nth-child(5) { animation-delay: 0.4s; }
.skill-card:nth-child(6) { animation-delay: 0.5s; }

/* Project cards animations */
.project-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }
.project-card:nth-child(4) { animation-delay: 0.3s; }

/* Timeline animations */
.timeline-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }

/* Contact items animations */
.contact-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.contact-item:nth-child(1) { animation-delay: 0s; }
.contact-item:nth-child(2) { animation-delay: 0.1s; }
.contact-item:nth-child(3) { animation-delay: 0.2s; }

/* Parallax effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

button, a {
    transition: all 0.3s ease;
}

/* Loading animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Hover effects */
@keyframes lift {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

.lift-on-hover:hover {
    animation: lift 0.6s ease-in-out;
}

/* Text reveal animation */
@keyframes textReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 0.8s ease-out forwards;
}

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

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

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

.bounce-custom {
    animation: bounce-custom 1s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Zoom in animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
}

/* Flip animation */
@keyframes flip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.flip {
    animation: flip 0.8s ease-in-out;
}

/* Slide down animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.4s ease-out forwards;
}

/* Slide up animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

/* Blink animation */
@keyframes blink {
    0%, 49%, 100% {
        opacity: 1;
    }
    50%, 99% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s ease-in-out infinite;
}

/* Wiggle animation */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-2deg);
    }
    75% {
        transform: rotate(2deg);
    }
}

.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* Shake animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Heartbeat animation */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

.heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

/* Fade in left animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

/* Fade in right animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

/* Rotate animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Skew animation */
@keyframes skew {
    0%, 100% {
        transform: skewX(0deg);
    }
    50% {
        transform: skewX(5deg);
    }
}

.skew {
    animation: skew 0.6s ease-in-out;
}

/* Blur animation */
@keyframes blur {
    0% {
        filter: blur(0px);
    }
    50% {
        filter: blur(5px);
    }
    100% {
        filter: blur(0px);
    }
}

.blur {
    animation: blur 0.8s ease-in-out;
}

/* Glow text animation */
@keyframes glowText {
    0%, 100% {
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(102, 126, 234, 1);
    }
}

.glow-text {
    animation: glowText 2s ease-in-out infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Transition for theme changes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}
