/* Custom styles and overrides */

:root {
  --color-teal-50: #f0fdfa;
  --color-teal-600: #0d9488;
  --color-slate-800: #1e293b;
}

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

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

/* Selection color */
::selection {
  background-color: rgba(13, 148, 136, 0.15);
  color: #0f766e;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
}

/* Scroll reveal base state — content is VISIBLE by default */
.reveal {
  opacity: 1;
  transform: none;
}

/* Scroll reveal enhanced state — only applied when JS runs and prefers-reduced-motion allows */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  /* Stagger delays for grid items */
  .reveal:nth-child(1) { transition-delay: 0ms; }
  .reveal:nth-child(2) { transition-delay: 100ms; }
  .reveal:nth-child(3) { transition-delay: 200ms; }
  .reveal:nth-child(4) { transition-delay: 300ms; }
  .reveal:nth-child(5) { transition-delay: 400ms; }
  .reveal:nth-child(6) { transition-delay: 500ms; }
}

/* Navbar styles */
#navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#navbar.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Mobile menu animation */
.menu-line {
  display: block;
}

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

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

#mobileMenu.open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 20px;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

/* Subtle hover animation for cards */
.group:hover .group-hover\\:scale-105 {
  transform: scale(1.05);
}

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

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

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print styles */
@media print {
  #navbar,
  #mobileMenu,
  .reveal {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
  }
}
