/* =========================================
   REFINED PREMIUM ANIMATIONS
   ========================================= */

/* Gradient Text Animation */
.text-gradient {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--accent),
    var(--primary-dark),
    var(--primary)
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Stagger Fade In for Cards */
.skill-card,
.short-card,
.timeline-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.active.skill-card,
.active.short-card,
.active.timeline-item {
  opacity: 1;
  transform: translateY(0);
}

/* Float Animation for Images */
.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Progress Fill */
.active .progress {
  animation: progressFill 1.5s cubic-bezier(0.1, 0.5, 0.5, 1) forwards;
  transform-origin: left;
}

@keyframes progressFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Button Pulse */
.hero .btn-primary {
  animation: heroPulse 3s infinite;
}

@keyframes heroPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Timeline Glow */
.timeline-content:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.1);
}

/* Subtle Shimmer for Cards */
.glass {
  position: relative;
  overflow: hidden;
}

.glass::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  transition: 0.6s;
}

.glass:hover::after {
  left: 150%;
}

/* Nav Link Animation */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}
