/* Portfolio themes share ASOC's palette while retaining SOAR's original artwork. */
html[data-theme="light"] {
  --bg: #fafbfc; --panel: #edf1f3; --ink: #152333; --muted: #576571;
  --line: #dce2e5; --accent: #7540a3; --button: #152333; --button-ink: #fff;
  color-scheme: light;
}
html[data-theme="black"] {
  --bg: #050505; --panel: #101010; --ink: #f5f5f3; --muted: #aaa9a5;
  --line: #292929; --accent: #ff756d; --button: #f4f4f1; --button-ink: #080808;
  color-scheme: dark;
}
html[data-theme="quantum"] {
  --bg: #06030c; --panel: #11091c; --ink: #fbf9ff; --muted: #b2a9be;
  --line: #38264c; --accent: #d49cff; --button: #c982ff; --button-ink: #10051b;
  color-scheme: dark;
}
html[data-theme="quantum"] body {
  background: radial-gradient(ellipse at 85% 250px, #35104d40, transparent 750px), var(--bg);
}
.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); }
html[data-theme="quantum"] .themes button[aria-pressed="true"] {
  background: linear-gradient(120deg, #d49cff, #a35bf5);
  box-shadow: 0 0 18px #b76aff40;
}
@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; }
}
