/* Base Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; filter: blur(5px); }
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100px); opacity: 0; filter: blur(5px); }
  to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; filter: blur(5px); }
  to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; filter: blur(10px); }
  to { transform: scale(1); opacity: 1; filter: blur(0); }
}

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

@keyframes highlight {
  0% { background-color: transparent; }
  50% { background-color: rgba(59, 130, 246, 0.2); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  100% { background-color: transparent; }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
  100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.2); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Unified Animation Classes */
.animate {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}

.fade-in { animation-name: fadeIn; }
.slide-up { animation-name: slideUp; }
.slide-left { animation-name: slideInLeft; }
.slide-right { animation-name: slideInRight; }
.scale-in { animation-name: scaleIn; }
.bounce { animation-name: bounce; }
.float { animation: float 3s ease-in-out infinite; }

/* Unified Transition Class */
.transition-base {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Animations */
.section-animate {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(5px);
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Interactive Elements */
.hover-scale {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Card Animations */
.card-hover {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
  animation: glow 2s ease-in-out infinite;
}

/* Icon Animations */
.icon-hover {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-hover:hover {
  transform: translateY(-5px) scale(1.15) rotate(5deg);
  color: var(--primary-blue);
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

/* Text Animation */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  opacity: 0.7;
}

@keyframes blink {
  from, to { opacity: 0.7; }
  50% { opacity: 0; }
}

/* Project Card Animations */
.project-card {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
  animation: glow 2s ease-in-out infinite;
}

/* Skill Card Animation */
.skill-card {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover {
  transform: translateY(-8px) rotate(2deg);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
  animation: glow 2s ease-in-out infinite;
}

.skill-card img {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover img {
  transform: scale(1.1) rotate(-5deg);
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.4));
}

/* Highlight Effect */
.highlight {
  animation: highlight 2s cubic-bezier(0.4, 0, 0.2, 1);
}