/* Organism: site header (brand, nav links, theme and menu buttons), skip link, scroll progress. */

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; background: var(--accent); z-index: 60; }
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.links { display: flex; gap: 4px; }
.links a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .2s, background .2s; }
.links a:hover { color: var(--text); }
.links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
:root[data-theme="dark"] .i-sun, :root:not([data-theme]) .i-sun { display: block; }
:root[data-theme="dark"] .i-moon, :root:not([data-theme]) .i-moon { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .i-sun { display: none; }
  :root:not([data-theme]) .i-moon { display: block; }
}

@media (max-width: 720px) {
  .menu-btn { display: grid; }
  .links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .links.open { display: flex; }
  .links a { padding: 12px; font-size: 16px; }
  .brand-name { display: none; }
}
