html {
  scroll-padding-top: 84px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.site-header__brand-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.24s ease;
  content: "";
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.nav-toggle__icon::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-link-subtitle {
  display: none;
}

.nav-scrim {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .site-header .wrap,
  .site-header .shell,
  .site-header .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .brand {
    font-size: clamp(0.94rem, 3.7vw, 1.05rem);
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1002;
    flex: 0 0 auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, calc(100vw - 56px));
    padding: 5.25rem 1rem 1.25rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.7rem;
    margin: 0;
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform 0.24s ease;
    z-index: 1001;
  }

  body.nav-open .site-nav {
    transform: translateX(0);
  }

  .site-nav a {
    width: 100%;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    box-shadow: none;
    line-height: 1.3;
  }

  .nav-link-title {
    font-size: 1rem;
    font-weight: 700;
  }

  .nav-link-subtitle {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.84rem;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 999;
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-toggle__icon {
    background: transparent;
  }

  body.nav-open .nav-toggle__icon::before {
    transform: translateY(6px) rotate(45deg);
  }

  body.nav-open .nav-toggle__icon::after {
    transform: translateY(-6px) rotate(-45deg);
  }
}