@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }

}

@keyframes slideIn {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

.button {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #d1cfcf; /* Light taupe color */
    transform: scale(1.05);
}

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

.image-hover:hover {
    transform: scale(1.1);
}

/* Base Animation Setup */
[data-animation] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.animated {
  opacity: 1;
}

/* Fade In Animation */
[data-animation="fade-in"] {
  transform: translateY(20px);
}

[data-animation="fade-in"].animated {
  transform: translateY(0);
}

/* Slide Up Animation */
[data-animation="slide-up"] {
  transform: translateY(60px);
}

[data-animation="slide-up"].animated {
  transform: translateY(0);
}

/* Fade Up Animation */
[data-animation="fade-up"] {
  transform: translateY(40px);
}

[data-animation="fade-up"].animated {
  transform: translateY(0);
}

/* Scale Animation */
[data-animation="scale"] {
  transform: scale(0.8);
}

[data-animation="scale"].animated {
  transform: scale(1);
}

/* Text Animations */
.animate-text {
  opacity: 1; /* Change from 0 to 1 to ensure visibility */
  transform: translateY(0); /* Reset any transform */
  animation: fadeInUp 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.animate-text-delay {
  opacity: 1; /* Change from 0 to 1 */
  transform: translateY(0);
  animation: fadeInUp 0.8s cubic-bezier(0.2, 1, 0.3, 1) 0.3s forwards;
}

.animate-text-delay-2 {
  opacity: 1; /* Change from 0 to 1 */
  transform: translateY(0);
  animation: fadeInUp 0.8s cubic-bezier(0.2, 1, 0.3, 1) 0.6s forwards;
}

.animate-slide-in {
  opacity: 0;
  transform: translateX(50px);
  animation: slideIn 1s cubic-bezier(0.2, 1, 0.3, 1) 0.3s forwards;
}

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

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

/* Button Hover Animation */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

/* Card Hover Effects */
.expertise-card, .project-card {
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Count Up Animation */
.count-up {
  display: inline-block;
  position: relative;
}

/* Pulse Animation for CTA elements */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 42, 58, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(26, 42, 58, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 42, 58, 0);
  }
}

.nav-cta {
  animation: pulse 2s infinite;
}

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

.hero h2 {
  background: linear-gradient(45deg, var(--navy), var(--navy-light), var(--accent));
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 5s ease infinite;
}

/* Floating animation for profile photo */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.profile-photo {
  animation: float 5s ease-in-out infinite;
}

/* Mouse scroll indicator animation */
@keyframes scrollDown {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  40% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  100% {
    opacity: 0;
  }
}

/* Skill bars animation */
@keyframes skillFill {
  from {
    width: 0;
  }
  to {
    width: var(--fill-width);
  }
}

/* Logo hover animation */
.logo h1 {
  transition: transform 0.3s ease;
}

.logo:hover h1 {
  transform: scale(1.05);
}