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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #161a1d;
}
::-webkit-scrollbar-thumb {
  background: #3e484e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #55636a;
}

/* Selection */
::selection {
  background: rgba(255, 107, 53, 0.3);
  color: #fff;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(12deg); }
  50% { transform: translateY(-20px) rotate(12deg); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

.animate-float-delayed {
  animation: float-delayed 4s ease-in-out infinite;
  animation-delay: 1s;
}

/* Navbar scroll state */
nav.scrolled {
  background: rgba(13, 16, 18, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-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);
}

/* Nav links */
.nav-link {
  position: relative;
}

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

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

/* Mobile links */
.mobile-link {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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; }

/* Hero background */
.hero-bg {
  will-change: transform;
}

/* Image hover effects */
.group:hover .group-hover\\:scale-110 {
  transform: scale(1.1);
}

/* Card hover */
.rounded-3xl {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rounded-3xl:hover {
  box-shadow: 0 0 60px rgba(255, 107, 53, 0.08);
}

/* Button focus */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #ff8a52;
  outline-offset: 2px;
}

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

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .font-display {
    line-height: 1.1;
  }
}

/* Print styles */
@media print {
  nav, #contact, footer {
    display: none;
  }
}
