/* Portfolio themes share ASOC's palette while retaining SOAR's original artwork. */
html[data-theme="light"] {
  --bg: #fafbfc; --panel: #eceff2; --ink: #141f2e; --muted: #556270;
  --line: #d9e0e4; --accent: #6b35a0; --button: #141f2e; --button-ink: #fff;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #050505; --panel: #141414; --ink: #f8f7f4; --muted: #b4b3af;
  --line: #2b2b2b; --accent: #ff647a; --button: #f6f6f3; --button-ink: #080808;
  color-scheme: dark;
}
.nav-wrap { gap: 22px; }
header .brand span { display: none; }
header nav { gap: 20px; margin-left: auto; }
header .themes {
  display: flex; align-items: center; flex-shrink: 0; gap: 2px;
  padding: 4px; border: 1px solid var(--line); border-radius: 40px;
  background: var(--panel);
}
header .themes button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 12px; border: 0;
  font-size: 13px; line-height: 1.2; white-space: nowrap;
}
.themes svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
header .themes button:hover:not([aria-pressed="true"]) { color: var(--ink); background: var(--bg); }
@media (max-width: 1200px) {
  header .nav-wrap { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  header .themes { margin-left: auto; }
  header .menu-toggle { display: block; order: 3; }
  header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    margin: 0; padding: 20px 24px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px #0002;
    flex-direction: column; align-items: stretch; gap: 4px;
    max-height: calc(100dvh - 160px); overflow-y: auto;
  }
  header nav.open { display: flex; }
  header nav > a { padding: 12px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 165px; }
  header .nav-wrap { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  header .brand img { width: 40px; height: 40px; }
  header .menu-toggle { grid-column: 2; grid-row: 1; }
  header .themes { grid-column: 1 / -1; width: 100%; margin: 0; }
  header .themes button { flex: 1; padding-inline: 8px; }
}
@media (max-width: 360px) {
  header .themes button { font-size: 12px; gap: 5px; padding-inline: 6px; }
  .themes svg { width: 16px; height: 16px; }
}
