.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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

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

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(168, 85, 247, 0) 0%,
        rgba(168, 85, 247, 0.3) 50%,
        rgba(168, 85, 247, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.8);
    }
}

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

@keyframes rotate3d {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

.rotate-3d {
    animation: rotate3d 8s linear infinite;
}

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

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

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@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 5s ease infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.twinkle {
    animation: twinkle 2s ease-in-out infinite;
}

.project-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}

.skill-item {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.3s ease,
                background 0.3s ease,
                color 0.3s ease;
}

.social-link {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease;
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.magnetic {
    transition: transform 0.3s ease;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.5),
                     0 0 20px rgba(168, 85, 247, 0.3),
                     0 0 30px rgba(168, 85, 247, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(168, 85, 247, 0.8),
                     0 0 40px rgba(168, 85, 247, 0.5),
                     0 0 60px rgba(168, 85, 247, 0.3);
    }
}

.text-glow {
    animation: textGlow 3s ease-in-out infinite;
}

.parallax {
    transform: translateZ(0);
    will-change: transform;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    }
}

.morph {
    animation: morph 8s ease-in-out infinite;
}

@keyframes floatUp {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(2deg);
    }
    75% {
        transform: translateY(-3px) rotate(-2deg);
    }
}

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

@keyframes iconPop {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.icon-pop {
    animation: iconPop 2s ease-in-out infinite;
}

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

.color-shift {
    animation: colorShift 4s ease-in-out infinite;
}

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

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

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

.slide-left {
    animation: slideLeft 0.6s ease-out forwards;
}

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

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

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3);
    }
}

.card-float {
    animation: cardFloat 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(168, 85, 247, 0.3);
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
    }
    50% {
        border-color: rgba(236, 72, 153, 0.6);
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
    }
}

.border-glow {
    animation: borderGlow 3s ease-in-out infinite;
}

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

.icon-spin-slow {
    animation: iconSpin 8s linear infinite;
}

@keyframes skillPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
    }
}

.skill-pulse {
    animation: skillPulse 2.5s ease-in-out infinite;
}

[data-theme="light"] .fade-in,
[data-theme="light"] .fade-in-left,
[data-theme="light"] .fade-in-right,
[data-theme="light"] .scale-in {
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.3s ease, background 0.3s ease;
}
