/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f1120;
}
::-webkit-scrollbar-thumb {
  background: #2a2d4a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3d5a;
}

/* Navbar scrolled state */
#navbar.scrolled {
  background: rgba(15, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Language button active state */
.lang-btn.active,
.lang-btn-mobile.active {
  background: linear-gradient(135deg, #0652e9, #62e1e9);
  color: #fff;
  border-radius: 9999px;
}

.lang-btn:not(.active) {
  color: rgba(255, 255, 255, 0.5);
}
.lang-btn:not(.active):hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile menu toggle animation */
#mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
#mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Fade-in animations */
.animate-fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.7s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

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

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Service card hover glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.service-card {
  position: relative;
  overflow: hidden;
}

/* Project card subtle shine effect */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  transition: left 0.8s ease;
  pointer-events: none;
}
.project-card:hover::after {
  left: 100%;
}
.project-card {
  position: relative;
  overflow: hidden;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0652e9, #62e1e9);
  border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Form focus glow */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(6, 82, 233, 0.15);
}

/* Selection color */
::selection {
  background: rgba(6, 82, 233, 0.4);
  color: #fff;
}
