/* Custom Animations & Effects */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    @apply bg-slate-900 text-white antialiased;
  }
}

@layer components {
  .gradient-text {
    @apply text-transparent bg-clip-text bg-gradient-to-r from-indigo-500 to-purple-500;
  }
  
  .fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
  }
  
  .fade-in-on-scroll {
    @apply opacity-0 translate-y-8;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .fade-in-on-scroll.visible {
    @apply opacity-100 translate-y-0;
  }
  
  .floating {
    animation: float 6s ease-in-out infinite;
  }
  
  .skill-category {
    @apply p-6 rounded-2xl bg-slate-800/50 border border-slate-700 backdrop-blur-sm transition-all duration-300 hover:-translate-y-1 hover:border-indigo-500/50;
  }
}

/* Particle Background */
#particles {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  animation: particleFloat 20s infinite ease-in-out;
}

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

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

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-20px, -30px) scale(1.05);
  }
  66% {
    transform: translate(20px, -10px) scale(0.95);
  }
}

/* Glassmorphism Enhancement */
.glass {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #818cf8, #c084fc);
}

/* Text Selection */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
}

/* Focus Styles */
a:focus, button:focus {
  outline: 2px solid rgba(99, 102, 241, 0.5);
  outline-offset: 2px;
}

/* Mobile Menu Animation */
.mobile-menu-enter {
  animation: slideDown 0.3s ease-out;
}

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

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

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.project-card .project-overlay {
  opacity: 0;
  transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* Theme Toggle Animation */
#theme-toggle i {
  transition: all 0.3s ease;
}

#theme-toggle:hover i {
  transform: rotate(180deg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .gradient-text {
    font-size: 3rem;
  }
  
  .skill-category {
    @apply p-4;
  }
}