@tailwind base;
@tailwind components;
@tailwind utilities;

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Improved smooth scrolling with custom duration */
* {
  scroll-behavior: smooth;
}


/* Scroll offset to account for fixed header */
section[id] {
  scroll-margin-top: 100px;
}


/* Custom smooth scroll animation */
@keyframes smoothScroll {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-smooth-scroll {
  animation: smoothScroll 0.6s ease-out;
}

/* Fade in animation for sections */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

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

/* Scroll indicator styles */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  z-index: 9999;
  transition: width 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #e5e7eb; /* light gray for light mode */
  border-radius: 8px;
}
.custom-scrollbar.scrollbar-dark::-webkit-scrollbar-thumb {
  background: #374151; /* dark gray for dark mode */
}
.custom-scrollbar.scrollbar-dark::-webkit-scrollbar-track {
  background: #1f2937;
}
.custom-scrollbar.scrollbar-light::-webkit-scrollbar-thumb {
  background: #e5e7eb;
}
.custom-scrollbar.scrollbar-light::-webkit-scrollbar-track {
  background: #f9fafb;
}

/* For Firefox */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb #f9fafb;
}
.custom-scrollbar.scrollbar-dark {
  scrollbar-color: #374151 #1f2937;
}

@keyframes sway {
  0% { transform: translate(-50%, 0) rotate(-2deg); }
  50% { transform: translate(-50%, 0) rotate(2deg); }
  100% { transform: translate(-50%, 0) rotate(-2deg); }
}

.animate-sway {
  animation: sway 4s ease-in-out infinite;
}
