*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Card float animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

.card-float:nth-child(2) {
  animation-delay: -1.5s;
}

.card-float:nth-child(3) {
  animation-delay: -3s;
}

.card-float:nth-child(4) {
  animation-delay: -4.5s;
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(6, 13, 24, 0.92) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

.mobile-link {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

::-webkit-scrollbar-track {
  background: #060d18;
}

::-webkit-scrollbar-thumb {
  background: #142843;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e3a5f;
}

/* Selection color */
::selection {
  background: rgba(79, 209, 197, 0.3);
  color: #fff;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #4fd1c5;
  outline-offset: 2px;
}

/* Input autofill override */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0a1628 inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}
