/* Shared site navigation styling -- single source of truth for the header/nav
   look and mobile hamburger behaviour across every static page. nav.js injects
   the markup into <header data-nav></header>; edit here (or in nav.js), never
   duplicate these rules into a page's own stylesheet again.
   Added 2026-09-21 (seo-33): Vas reported the menu looked and behaved
   differently depending which page he was on -- root cause was 10 separate
   copies of this markup/CSS that had drifted apart. */
header[data-nav] {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
header[data-nav] .header-row {
  display: flex;
  align-items: center;
  justify-content: center;
}
header[data-nav] .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  padding: 16px 0 0;
}
header[data-nav] .brand img { width: 56px; height: 56px; }
header[data-nav] .brand b { font-size: 30px; letter-spacing: -0.02em; }
header[data-nav] .nav-toggle { display: none; }
header[data-nav] .mainnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 26px;
  padding: 12px 0 14px;
}
header[data-nav] .mainnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
}
header[data-nav] .mainnav a:hover { color: var(--brand); }
@media (max-width: 480px) {
  header[data-nav] .brand img { width: 44px; height: 44px; }
  header[data-nav] .brand b { font-size: 24px; }
  header[data-nav] .mainnav { gap: 4px 16px; font-size: 14px; }
}
/* Collapse the nav behind a hamburger on mobile -- was wrapping to a second
   line at this width on the homepage only (Vas, DM 2026-09-13); now applied
   on every page so behaviour matches everywhere. */
@media (max-width: 600px) {
  header[data-nav] .header-row { justify-content: space-between; padding-right: 6px; }
  header[data-nav] .brand { padding: 12px 0; }
  header[data-nav] .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; background: none; border: 0; cursor: pointer;
  }
  header[data-nav] .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  header[data-nav] .mainnav { display: none; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 16px; }
  header[data-nav] .mainnav.open { display: flex; }
}
