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

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

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

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

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

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

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--shadow);
  }
  50% {
    box-shadow: 0 0 20px var(--shadow);
  }
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Fallback for elements that should be visible by default */
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section-specific animations */
.project-card {
  opacity: 0;
  transform: translateY(50px) scale(0.9);
  transition: all 0.8s ease-out;
}

.project-card.animated {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.contact-method {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease-out;
}

.contact-method.animated {
  opacity: 1;
  transform: translateX(0);
}

.skill-category {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease-out;
}

.skill-category.animated {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

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

.float {
  animation: float 6s ease-in-out infinite;
}

.bounce {
  animation: bounce 2s infinite;
}

.pulse {
  animation: pulse 2s infinite;
}

.glow {
  animation: glow 2s infinite;
}

/* Hover Animations */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform 0.3s ease;
}

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

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 10px 25px var(--shadow);
}

/* Loading Animations */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: "";
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

/* Stagger Animation Delays */
.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}
.stagger-6 {
  animation-delay: 0.6s;
}
.stagger-7 {
  animation-delay: 0.7s;
}
.stagger-8 {
  animation-delay: 0.8s;
}
