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

/* Header transition */
#header {
  background: transparent;
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-scrolled .header-logo {
  color: #1a1a1a;
}

.header-scrolled .header-logo-accent {
  color: #e67e22;
}

.header-scrolled .nav-link {
  color: #7a7a7a;
}

.header-scrolled .nav-link:hover {
  color: #1a1a1a;
}

.header-scrolled #menu-toggle {
  color: #1a1a1a;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll line animation */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* Selection color */
::selection {
  background: rgba(230, 126, 34, 0.15);
  color: #1a1a1a;
}

/* Smooth hover for links */
a {
  transition: color 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

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

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

/* Typography refinements */
body {
  font-feature-settings: "palt" 1;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-feature-settings: "palt" 1;
  letter-spacing: 0.04em;
}

/* Orbit animation - badges circle around image, text stays upright */
.orbit-ring {
  position: absolute;
  top: 40%;
  left: 36%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
}

.orbit-badge {
  position: absolute;
  animation: orbit 15s linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes orbit {
  0%   { transform: rotate(0deg)   translateX(135px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(135px) rotate(-360deg); }
}

@media (min-width: 768px) {
  @keyframes orbit {
    0%   { transform: rotate(0deg)   translateX(165px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(165px) rotate(-360deg); }
  }
}
