/* Animations and Keyframes */
@keyframes morphBlob {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

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

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(8px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
}

@keyframes scrollDown {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-5px, -5px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(5px, 5px);
  }
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

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

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

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

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 163, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 163, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 163, 255, 0);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(0, 163, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 163, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 163, 255, 0.5);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.5s ease forwards;
}

.fade-in-right {
  animation: fadeInRight 0.5s ease forwards;
}

.fade-in-down {
  animation: fadeInDown 0.5s ease forwards;
}

/* Animated Elements */
.home-section .subtitle {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.2s;
}

.home-section .title {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.4s;
}

.home-section .typing-text {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.6s;
}

.home-section .cta-buttons {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.8s;
}

.home-section .social-links {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 1s;
}

/* Neon Glow Animation
@keyframes neon-pulse {
  from {
    filter: drop-shadow(0 0 2px #ffa500) drop-shadow(0 0 5px #ff8c00);
  }
  to {
    filter: drop-shadow(0 0 5px #ffa500) drop-shadow(0 0 15px #ff4500);
  }
} */

.profile-img-wrapper {
  opacity: 0;
  animation: fadeInRight 0.5s ease forwards 0.5s, morphBlob 8s ease-in-out infinite;
}

.welcome-badge {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.1s;
}

.hero-description {
  opacity: 0;
  animation: fadeInDown 0.5s ease forwards 0.7s;
}

.floating-badge {
  opacity: 0;
  animation: scaleIn 0.5s ease forwards 1.2s;
}

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

.section-header {
  opacity: 0;
}

.section-header.show {
  animation: fadeInDown 0.5s ease forwards;
}

.skill-item, .project-item, .timeline-item, .tool-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-item.show, .project-item.show, .timeline-item.show, .tool-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* Glowing Effect */
.glow-effect {
  position: relative;
  z-index: 1;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-effect:hover::before {
  opacity: 0.4;
  animation: glowPulse 1.5s infinite;
}

/* Hover Animation for Project Items */
.project-item {
  overflow: hidden;
}

.project-item::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(0, 163, 255, 0.2), transparent);
  transition: all 0.5s ease;
  z-index: 2;
}

.project-item:hover::before {
  top: 100%;
  left: 100%;
}

/* Loading Animations */
.counter {
  display: inline-block;
  position: relative;
}

.counter::after {
  content: '%';
  position: absolute;
  top: 0;
  right: -2rem;
}

/* Parallax Effect */
.parallax {
  transition: transform 0.2s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Section Animation Delay */
.about-content > div {
  opacity: 0;
}

.about-content.show .about-image {
  animation: fadeInLeft 0.5s ease forwards;
}

.about-content.show .about-text {
  animation: fadeInRight 0.5s ease forwards 0.2s;
}

/* Staggered Animations */
.skills-grid .skill-item:nth-child(1) { transition-delay: 0.1s; }
.skills-grid .skill-item:nth-child(2) { transition-delay: 0.2s; }
.skills-grid .skill-item:nth-child(3) { transition-delay: 0.3s; }
.skills-grid .skill-item:nth-child(4) { transition-delay: 0.4s; }

.tools-grid .tool-item:nth-child(1) { transition-delay: 0.1s; }
.tools-grid .tool-item:nth-child(2) { transition-delay: 0.15s; }
.tools-grid .tool-item:nth-child(3) { transition-delay: 0.2s; }
.tools-grid .tool-item:nth-child(4) { transition-delay: 0.25s; }
.tools-grid .tool-item:nth-child(5) { transition-delay: 0.3s; }
.tools-grid .tool-item:nth-child(6) { transition-delay: 0.35s; }
.tools-grid .tool-item:nth-child(7) { transition-delay: 0.4s; }
.tools-grid .tool-item:nth-child(8) { transition-delay: 0.45s; }

.projects-grid .project-item:nth-child(1) { transition-delay: 0.1s; }
.projects-grid .project-item:nth-child(2) { transition-delay: 0.2s; }
.projects-grid .project-item:nth-child(3) { transition-delay: 0.3s; }
.projects-grid .project-item:nth-child(4) { transition-delay: 0.2s; }
.projects-grid .project-item:nth-child(5) { transition-delay: 0.3s; }
.projects-grid .project-item:nth-child(6) { transition-delay: 0.4s; }

.timeline .timeline-item:nth-child(1) { transition-delay: 0.1s; }
.timeline .timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline .timeline-item:nth-child(3) { transition-delay: 0.3s; }

/* Particle Animation */
.particles-js-canvas-el {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}