/* Animation CSS File */

/* Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(56, 228, 174, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(56, 228, 174, 0.6);
  }
  100% {
    box-shadow: 0 0 5px rgba(56, 228, 174, 0.3);
  }
}

@keyframes borderGlow {
  0% {
    border-color: rgba(56, 228, 174, 0.5);
  }
  50% {
    border-color: rgba(255, 126, 95, 0.7);
  }
  100% {
    border-color: rgba(56, 228, 174, 0.5);
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Initial state of elements to be animated */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 1s ease forwards;
}

.slide-in-right {
  animation: slideInRight 1s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 1s ease forwards;
}

.slide-in-up {
  animation: slideInUp 1s ease forwards;
}

/* Animation delay classes */
.delay-200 {
  animation-delay: 0.2s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-800 {
  animation-delay: 0.8s;
}

/* For elements animated on scroll */
.animate-on-scroll.visible {
  opacity: 1;
}

.animate-on-scroll.fade-in.visible {
  animation: fadeIn 1s ease forwards;
}

.animate-on-scroll.slide-in-right.visible {
  animation: slideInRight 1s ease forwards;
}

.animate-on-scroll.slide-in-left.visible {
  animation: slideInLeft 1s ease forwards;
}

.animate-on-scroll.slide-in-up.visible {
  animation: slideInUp 1s ease forwards;
}

/* Special animated elements */
.profile-image img:hover {
  animation: glowPulse 2s infinite;
}

.box:hover {
  animation: borderGlow 3s infinite;
}

.skill-level {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}

.primary-btn:hover, .secondary-btn:hover {
  animation: glowPulse 2s infinite;
}

.section-title::after {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}