/* ── Site Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 48px;
  /* Fallback for browsers without color-mix support (pre-2023). */
  background: rgba(10, 10, 15, 0.85);
  /* Theme-aware translucent header — follows --bg of the active theme. */
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-logo {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 1px;
  display: flex;
  flex-wrap: wrap;
  line-height: 1;
}
.site-header-logo .accent {
  color: var(--accent);
}
.site-header-slogan {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  white-space: nowrap;
  width: 100%;
  margin-top: 3px;
}
.site-header-nav {
  display: flex;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}
.site-nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 120ms ease-out, background 120ms ease-out;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.site-nav-link:hover {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}
.site-nav-link.active {
  color: var(--accent);
  background: var(--surface2);
}
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}
.site-header-hamburger {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}
.site-header-hamburger:hover { color: var(--text); }

/* Mobile nav dropdown */
.site-header-dropdown {
  display: none;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  z-index: 199;
  flex-direction: column;
  gap: 4px;
}
.site-header-dropdown.open {
  display: flex;
}
.site-header-dropdown .site-nav-link {
  padding: 10px 16px;
  font-size: 12px;
}

/* ── Site Footer ────────────────────────────────────── */
.site-footer {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  opacity: 0.6;
  margin-top: auto;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  opacity: 1;
}
.site-footer-systems {
  margin-bottom: 2px;
}
.site-footer-note {
  font-size: 9px;
  opacity: 0.7;
  margin-bottom: 6px;
}
.site-footer-version {
  margin-bottom: 6px;
}
.site-footer-attr {
  opacity: 0.8;
}

@media (max-width: 1200px) {
  .site-header-nav { display: none; }
  .site-header-hamburger { display: block; }
  .site-header-slogan { display: none; }
  .site-header-actions { margin-left: auto; }
}
@media (max-width: 768px) {
  .site-header { padding: 0 12px; }
}
