/* Floating monochrome header. Loaded after the shared motion styles. */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 30;
  isolation: isolate;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  min-height: 86px;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header::before, .site-header::after { content: none; }
.site-header .wordmark {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 10px;
  font-size: 36px;
  color: #fff;
  text-shadow: none;
}
.brand-bear { width: 32px; height: 32px; flex-shrink: 0; }
.site-header .brand-signature { color: #fff; }
.site-header .main-nav {
  order: 0;
  width: auto;
  margin: 0;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(0,0,0,.4);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.45);
}
.site-header .main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 12px;
  color: #a3a3a3;
  font-size: 12px;
  transition: color .2s ease;
}
.nav-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-header .nav-indicator {
  top: 6px;
  height: calc(100% - 12px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #d4d4d4);
  box-shadow: 0 2px 12px rgba(255,255,255,.12), inset 0 1px 0 #fff;
  transition: transform .35s cubic-bezier(.22,1,.36,1), width .35s cubic-bezier(.22,1,.36,1);
}
.site-header .main-nav a.is-highlighted { color: #0a0a0a; }
.site-header .header-right { justify-self: end; }
.site-header .theme-toggle {
  position: relative;
  width: 66px;
  height: 36px;
  padding: 4px;
  border-color: #343434;
  background: #050505;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6);
}
.site-header .toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #fff, #bfbfbf);
  box-shadow: 0 0 12px rgba(255,255,255,.18);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
:root[data-theme="light"] .site-header .toggle-knob { transform: translateX(30px); }
.site-header .theme-toggle svg { position: absolute; top: 10px; width: 14px; height: 14px; fill: none; stroke: #999; stroke-width: 1.5; stroke-linecap: round; }
.theme-moon { left: 10px; }
.theme-sun { right: 10px; }
.site-header .theme-toggle:hover { border-color: #777; transform: none; }
#main-content, #home, #projects, #stack-title { scroll-margin-top: 126px; }
.site-header a:focus-visible, .site-header button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 12px; }
  .site-header .main-nav { justify-self: center; }
  .site-header .main-nav a { padding-inline: 12px; }
  .site-header .wordmark { font-size: 31px; }
  .brand-bear { width: 28px; height: 28px; }
}
@media (max-width: 680px) {
  .site-header { top: 10px; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; }
  .site-header .header-right { grid-column: 2; grid-row: 1; }
  .site-header .main-nav { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
  .site-header .main-nav a { flex: 1; padding-inline: 10px; }
  #main-content, #home, #projects, #stack-title { scroll-margin-top: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .nav-indicator, .site-header .toggle-knob { transition: none; }
}
@media (max-width: 400px) {
  .site-header .main-nav a { gap: 6px; padding-inline: 8px; font-size: 11px; }
  .site-header .nav-icon { width: 12px; height: 12px; }
}
