/* Base fonts */
body {
  font-family: 'Inter', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

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

::-webkit-scrollbar-track {
  background: #09090b;
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Subtle Glow Animation */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

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

/* Grid Pattern Background */
.bg-grid {
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Gradient Text Utility */
.text-gradient {
  background: linear-gradient(to bottom right, #ffffff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mask gradient for fading the grid */
.mask-image-gradient {
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

/* Custom Range Slider */
input[type='range'] {
  -webkit-appearance: none;
  background: transparent;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  margin-top: -6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

input[type='range']::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: #27272a;
  border-radius: 2px;
}

/* Horizontal Scroll Hide */
.hide-scroll::-webkit-scrollbar {
  display: none;
}

.hide-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Fade gradient for horizontal scroll (not critical but handy) */
.fade-right {
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 1));
}

/* =========================
   TECH STACK CAROUSEL
   ========================= */

@keyframes carousel-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.carousel-track {
  animation: carousel-scroll 30s linear infinite;
  will-change: transform;
}

.carousel-track:hover {
  animation-play-state: paused;
}

/* =========================
   INTERACTIVE DEMO ANIMATIONS
   (What We Can Do section)
   ========================= */

@keyframes pulse-bar {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

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

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

/* Only animate when you hover a card inside #work */
#work .group:hover .animate-pulse-bar {
  animation: pulse-bar 2s ease-in-out infinite;
}

#work .group:hover .animate-slide-up {
  animation: slide-up 0.5s ease-out;
}

#work .group:hover .animate-float {
  animation: float 3s ease-in-out infinite;
}

.button-shine {
  position: relative;
  overflow: hidden;
}

.button-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease;
}

.button-shine:hover::after {
  left: 150%;
}