.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  background: linear-gradient(180deg, rgba(10, 8, 20, 0.92), rgba(10, 8, 18, 0.35));
  border-bottom: 1px solid var(--card-border);
}

.site-header.is-scrolled {
  background: rgba(12, 10, 22, 0.94);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 84px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-well);
  color: var(--text-on-glass);
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle--icon {
  width: 40px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.theme-toggle--icon .theme-toggle__label {
  display: none;
}

.theme-toggle:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--accent));
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

html[data-theme="light"] .theme-toggle__icon {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.theme-toggle__label {
  font-size: 0.92rem;
  line-height: 1;
}

.theme-toggle--mobile {
  width: 100%;
  justify-content: center;
}

html[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(237, 243, 248, 0.92), rgba(237, 243, 248, 0.72));
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(237, 243, 248, 0.96);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .site-brand {
  color: var(--text);
}

html[data-theme="light"] .site-brand:hover {
  color: var(--text);
}

html[data-theme="light"] .menu-toggle {
  color: var(--text);
  background: var(--control-bg);
  border-color: var(--border);
}

html[data-theme="light"] .menu-toggle span {
  background: var(--text);
}

html[data-theme="light"] .site-nav {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .site-nav__link {
  color: rgba(15, 23, 42, 0.78);
}

html[data-theme="light"] .site-nav__link:hover,
html[data-theme="light"] .site-nav__link.is-active {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.site-brand:hover {
  color: #fff;
}

.site-brand:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 12px;
}

.site-brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.8);
}

.site-nav,
.site-actions {
  align-items: center;
  gap: 0.75rem;
}

.site-nav {
  margin-left: auto;
  padding: 0.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--surface-well);
}

.site-nav__link {
  color: var(--text-on-glass);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: #fff;
  background: var(--surface);
  transform: translateY(-1px);
}

.site-nav__link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.menu-toggle {
  margin-left: auto;
  width: 48px;
  height: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--control-bg);
  color: #fff;
}

.menu-toggle:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 84px 0 0;
  background: rgba(0, 0, 0, 0.72);
  padding: 1rem;
}

.mobile-nav__panel {
  max-width: 420px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(14, 14, 14, 0.94);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.mobile-nav__links {
  display: grid;
  gap: 0.75rem;
}

.mobile-nav__links .site-nav__link {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--surface-well);
}

.mobile-nav__logout {
  margin-top: 0.5rem;
}

.hero-section,
.auth-section,
.dashboard-section,
.not-found-section {
  padding: 3.5rem 0 5rem;
}

.section-block {
  padding: 1rem 0 4rem;
}

.section-block--tight {
  padding-top: 0;
}

@media (min-width: 992px) {
  .hero-section > .container {
    width: min(100% - 3rem, 1320px);
    max-width: 1320px;
  }

  .hero-section {
    padding-bottom: 3.5rem;
  }

  .hero-section + .section-block {
    padding-top: 0.5rem;
  }
}

