/* Base & Utilities */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f6f6f6;
}
::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #979797;
}

/* Selection */
::selection {
  background: #ff6a2e;
  color: white;
}

/* Scroll line animation */
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}
.animate-scroll-line {
  animation: scrollLine 1.5s ease-in-out infinite;
}

/* Nav scroll state */
nav.scrolled {
  background: rgba(246, 246, 246, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

nav.scrolled .menu-line {
  background: #1e1e1e;
}

/* Mobile menu transitions */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: none;
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* Hamburger animation */
.menu-open .menu-line:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}
.menu-open .menu-line:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Image hover zoom */
img {
  transition: transform 0.6s cubic-bezier(.25,.46,.45,.94);
}

/* Thin line accent */
.accent-line {
  position: relative;
}
.accent-line::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 1px;
  background: #ff6a2e;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .animate-scroll-line { animation: none; }
  img { transition: none; }
}
