/* ====================================
   ANIMATIONS
==================================== */

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

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

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

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

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Section animations */
section {
  opacity: 1;
}

section.active {
  opacity: 1;
  animation: slideUp 0.8s ease-out forwards;
}

/* Project cards */
.project-card {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }
.project-card:nth-child(4) { animation-delay: 0.3s; }
.project-card:nth-child(5) { animation-delay: 0.4s; }
.project-card:nth-child(6) { animation-delay: 0.5s; }
.project-card:nth-child(7) { animation-delay: 0.6s; }
.project-card:nth-child(8) { animation-delay: 0.7s; }
.project-card:nth-child(9) { animation-delay: 0.8s; }
.project-card:nth-child(10) { animation-delay: 0.9s; }
.project-card:nth-child(11) { animation-delay: 1s; }
.project-card:nth-child(12) { animation-delay: 1.1s; }

/* Timeline items */
.timeline-item {
  animation: slideUp 0.8s ease-out forwards;
  opacity: 0;
}

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.8s; }

/* Info cards */
.info-card {
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

.info-card:nth-child(1) { animation-delay: 0s; }
.info-card:nth-child(2) { animation-delay: 0.1s; }
.info-card:nth-child(3) { animation-delay: 0.2s; }
.info-card:nth-child(4) { animation-delay: 0.3s; }

/* Service cards */
.service-card {
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

.service-card:nth-child(1) { animation-delay: 0s; }
.service-card:nth-child(2) { animation-delay: 0.1s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.3s; }
.service-card:nth-child(5) { animation-delay: 0.4s; }
.service-card:nth-child(6) { animation-delay: 0.5s; }
.service-card:nth-child(7) { animation-delay: 0.6s; }
.service-card:nth-child(8) { animation-delay: 0.7s; }
.service-card:nth-child(9) { animation-delay: 0.8s; }
.service-card:nth-child(10) { animation-delay: 0.9s; }
.service-card:nth-child(11) { animation-delay: 1s; }
.service-card:nth-child(12) { animation-delay: 1.1s; }

/* Tech marquee */
.tech-marquee-wrap {
  animation: fadeIn 0.8s ease-out forwards;
}

.tech-pill {
  animation: scaleUp 0.5s ease-out forwards;
}

/* Social cards */
.social-card {
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

.social-card:nth-child(1) { animation-delay: 0s; }
.social-card:nth-child(2) { animation-delay: 0.2s; }
.social-card:nth-child(3) { animation-delay: 0.4s; }
.social-card:nth-child(4) { animation-delay: 0.6s; }
.social-card:nth-child(5) { animation-delay: 0.8s; }

/* Contact cards */
.contact-card {
  animation: slideUp 0.7s ease-out forwards;
  opacity: 0;
}

.contact-card:nth-child(1) { animation-delay: 0s; }
.contact-card:nth-child(2) { animation-delay: 0.12s; }
.contact-card:nth-child(3) { animation-delay: 0.24s; }
.contact-card:nth-child(4) { animation-delay: 0.36s; }
.contact-card:nth-child(5) { animation-delay: 0.48s; }

/* Achievement cards */
.achievement-card {
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

.achievement-card:nth-child(1) { animation-delay: 0s; }
.achievement-card:nth-child(2) { animation-delay: 0.2s; }
.achievement-card:nth-child(3) { animation-delay: 0.4s; }
.achievement-card:nth-child(4) { animation-delay: 0.6s; }

/* Hero elements */
.hero-badge {
  animation: slideUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-title {
  animation: slideUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.hero-description {
  animation: slideUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

.hero-cta {
  animation: slideUp 0.8s ease-out 0.8s forwards;
  opacity: 0;
}

.hero-stats {
  animation: slideUp 0.8s ease-out 1s forwards;
  opacity: 0;
}

.hero-right {
  animation: slideInRight 1s ease-out 0.3s forwards;
  opacity: 0;
}

/* Text reveal effects */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  animation: textRevealAnimation 0.8s ease-out forwards;
}

@keyframes textRevealAnimation {
  from { left: 0; }
  to { left: 100%; }
}

/* Glow effects */
.glow-effect {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.8);
  }
}

/* Smooth transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
