/* Custom scrollbar for a more modern look */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #0f0f23 0%, #1a1a2e 100%);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #64ffda 0%, #448aff 100%);
  border-radius: 10px;
  border: 2px solid #1a1a2e;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7cffe8 0%, #5c9fff 100%);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

/* Define custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(5deg);
  }
  66% {
    transform: translateY(-10px) rotate(-5deg);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Tech tag styling */
.tech-tag {
  display: inline-block;
  background-color: rgba(100, 255, 218, 0.1);
  color: #64ffda;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(100, 255, 218, 0.3);
}

/* Accessibility improvements */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #64ffda;
  color: #0f0f23;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus visible styles for better keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #64ffda;
  outline-offset: 2px;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #64ffda 0%, #448aff 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.4);
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Enhanced glow effect */
.glow {
  box-shadow:
    0 0 20px rgba(100, 255, 218, 0.3),
    0 0 40px rgba(100, 255, 218, 0.2),
    0 0 60px rgba(100, 255, 218, 0.1);
}

.glow-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-hover:hover {
  box-shadow:
    0 0 30px rgba(100, 255, 218, 0.5),
    0 0 60px rgba(100, 255, 218, 0.3),
    0 0 90px rgba(100, 255, 218, 0.2);
  transform: translateY(-5px) scale(1.02);
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Pulse animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.gradient-animate {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* Card hover effects */
.card-hover {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.card-hover:hover::before {
  width: 300%;
  height: 300%;
}

/* Bounce animation for buttons */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.bounce-on-hover:hover {
  animation: bounce 0.6s ease;
}

/* Rotate animation for skill cards */
@keyframes rotate-gentle {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

.rotate-on-hover:hover {
  transform: rotate(5deg) scale(1.05);
}

/* Background particles */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

.particle {
  animation: float-particle 15s linear infinite;
}

/* Enhanced shadow effects */
.shadow-neon {
  box-shadow:
    0 0 3px rgba(100, 255, 218, 0.3),
    0 0 8px rgba(100, 255, 218, 0.2),
    0 0 15px rgba(100, 255, 218, 0.1);
}

/* Text reveal animation */
@keyframes text-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: text-reveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
