/* Base & Utilities */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll Reveal */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-reveal="delayed"] {
  transition-delay: 0.15s;
}

.reveal[data-reveal="delayed-2"] {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* Card Hover */
.card-hover {
  will-change: transform, box-shadow;
}

/* Navbar */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-text {
  color: #1e293b;
}

#navbar:not(.scrolled) .nav-text {
  color: #fff;
}

#navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
  color: #fff;
}

#navbar:not(.scrolled) .menu-line {
  background: #fff;
}

#navbar.scrolled .menu-line {
  background: #475569;
}

/* Mobile Menu */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #0d9488;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

/* Menu Animation */
.menu-line {
  width: 20px;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Gradient Hero Pattern */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(20, 184, 166, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(100, 116, 139, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(45, 212, 191, 0.2) 0%, transparent 50%);
  z-index: 0;
}

/* Smooth section transitions */
section {
  position: relative;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #134e4a;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
