/* Header styles - build on base.css */

.sm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #050608 0%, #080b10 45%, #050608 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.sm-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.sm-header__brand {
  display: flex;
  align-items: center;
}

.sm-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.sm-header__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #3af3ff 0%, #007bff 40%, #00ff85 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 24px rgba(0, 255, 133, 0.4);
}

.sm-header__logo-text {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f9fafb;
  white-space: nowrap;
}

/* Navigation */
.sm-header__nav {
  display: flex;
}

.sm-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sm-header__nav-item {
  position: relative;
}

.sm-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e5e7eb;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.sm-header__nav-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.5), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.sm-header__nav-link:hover,
.sm-header__nav-link:focus-visible {
  color: #f9fafb;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.sm-header__nav-link:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

.sm-header__nav-link:hover::after,
.sm-header__nav-link:focus-visible::after {
  opacity: 1;
}

.sm-header__nav-item--accent .sm-header__nav-link--accent {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: #020617;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
}

.sm-header__nav-item--accent .sm-header__nav-link--accent:hover,
.sm-header__nav-item--accent .sm-header__nav-link--accent:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.6);
}

/* Mobile toggle */
.sm-header__toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 10% 0, rgba(59, 130, 246, 0.4), transparent 60%), rgba(15, 23, 42, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.12s ease;
}

.sm-header__toggle:hover {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7), 0 10px 30px rgba(15, 23, 42, 0.9);
}

.sm-header__toggle:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 3px;
}

.sm-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #e5e7eb;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

.sm-header__toggle-bar + .sm-header__toggle-bar {
  margin-top: 3px;
}

/* Toggle animated state */
.sm-header__toggle[aria-expanded="true"] .sm-header__toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.sm-header__toggle[aria-expanded="true"] .sm-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.sm-header__toggle[aria-expanded="true"] .sm-header__toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
  .sm-header__inner {
    padding-inline: 1rem;
  }

  .sm-header__toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .sm-header__nav {
    position: fixed;
    inset: 56px 0 auto 0;
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    transform: translateY(-120%);
    transition: transform 0.2s ease-out;
  }

  .sm-header__nav-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1rem 0.85rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .sm-header__nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
  }

  .sm-header__nav-link::after {
    display: none;
  }

  .sm-header__nav-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.6);
    margin-right: 0.5rem;
  }

  .sm-header__nav-item--accent .sm-header__nav-link--accent {
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    color: #020617;
  }

  .sm-header__nav--open {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-header,
  .sm-header * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}