/* Fade in animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  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(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes rotateIn {
  from {
    transform: rotate(-10deg);
    opacity: 0;
  }
  to {
    transform: rotate(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes reveal {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes borderPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
  }
}

@keyframes mouseWheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes arrowBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Applied animations */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.reveal-image {
  position: relative;
  overflow: hidden;
}

.reveal-image img {
  transform: scale(1.1);
  transition: transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal-image.revealed img {
  transform: scale(1);
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
  opacity: 0;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.float {
  animation: float 6s ease-in-out infinite;
}

.rotate-in {
  animation: rotateIn 0.6s ease-out forwards;
  opacity: 0;
}

.shimmer {
  background: linear-gradient(
    90deg, 
    var(--color-bg-primary) 0%, 
    var(--color-bg-secondary) 50%, 
    var(--color-bg-primary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Button hover animations */
.btn {
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-normal),
              color var(--transition-normal);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

/* Card hover animations */
.project-card, .skill-item {
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Icon animations */
.contact-icon, .social-link i {
  transition: transform var(--transition-normal),
              color var(--transition-normal);
}

.contact-item:hover .contact-icon,
.social-link:hover i {
  transform: scale(1.1);
  color: var(--color-primary);
}

/* Navigation link animations */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Back to top button animation */
.back-to-top {
  transition: opacity var(--transition-normal),
              transform var(--transition-normal),
              background-color var(--transition-normal);
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* Scroll indicator animation */
.wheel {
  animation: mouseWheel 1.5s infinite;
}

.arrow span {
  animation: arrowBounce 2s infinite;
}

.arrow span:nth-child(2) {
  animation-delay: 0.2s;
}

.arrow span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Form focus animation */
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

/* Project image hover effect */
.project-image {
  overflow: hidden;
}

.project-image img {
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* Skill progress animation */
@keyframes fillProgress {
  from {
    width: 0;
  }
  to {
    width: var(--percentage);
  }
}

.skill-progress {
  animation: fillProgress 1.5s ease-out forwards;
}