/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 16px max(20px, 4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}

nav.s {
  background: rgba(3, 3, 5, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* LEFT — logo only */
.n-left {
  display: flex;
  align-items: center;
}

/* VERSION TAG — hidden desktop, shown under logo on mobile */
.n-ver {
  display: none;
  font-size: 6px;
  letter-spacing: 2px;
  color: rgba(200, 255, 0, 0.5);
}

.n-ver::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 6px var(--acid);
  animation: bl 2s ease-in-out infinite;
  margin-right: 5px;
  vertical-align: middle;
}

.n-logo {
  font-family: 'Bebas Neue', monospace;
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--text);
}

.n-logo em {
  color: var(--acid);
  font-style: normal;
}

.n-logo sup {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
  letter-spacing: 1px;
  vertical-align: super;
}

/* RIGHT — links + cta */
.n-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.n-lnk {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.80);
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}

.n-lnk::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--acid);
  transition: width .25s ease;
}

.n-lnk:hover {
  color: var(--text);
}

.n-lnk:hover::after {
  width: 100%;
}

.n-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.8);
}

.n-social::after {
  display: none;
}

.n-social svg {
  transition: transform 0.25s, filter 0.25s, color 0.25s;
}

.n-social:hover svg {
  transform: scale(1.15);
  color: var(--acid);
  filter: drop-shadow(0 0 5px rgba(200, 255, 0, 0.4));
}

.n-social[title="HuggingFace"]:hover svg,
.nm-soc[title="HuggingFace"]:hover {
  color: #FFD21E !important;
  filter: drop-shadow(0 0 5px rgba(255, 210, 30, 0.4));
}

.n-cta {
  font-size: 10px;
  letter-spacing: 3px;
  padding: 9px 22px;
  border: 1px solid rgba(200, 255, 0, 0.4);
  color: var(--acid);
  position: relative;
  overflow: hidden;
  transition: color .25s, box-shadow .25s;
}

.n-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: translateX(-101%);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
  z-index: -1;
}

.n-cta:hover {
  color: #000;
  box-shadow: 0 0 24px rgba(200, 255, 0, 0.4);
}

.n-cta:hover::before {
  transform: translateX(0);
}

/* SYSTEM STABLE BADGE */
.sys-stable {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 18px;
}

.ss-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: bl 2s ease-in-out infinite;
}

.ss-txt {
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(200, 255, 0, 0.7);
}

/* MODE SWITCHER — 3-way: dark / light / blue */
.mode-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  flex-shrink: 0;
  transition: border-color .4s, box-shadow .4s;
}

body:not(.light-mode):not(.blue-mode) .mode-switcher {
  border-color: rgba(200, 255, 0, 0.18);
  box-shadow: 0 0 10px rgba(200, 255, 0, 0.06);
}

body.light-mode .mode-switcher {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(255, 107, 0, 0.2);
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.07);
}

body.blue-mode .mode-switcher {
  border-color: rgba(255, 0, 255, 0.22);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.08);
}

.ms-btn {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.22);
  transition: color .25s, background .25s, box-shadow .25s, transform .2s;
  cursor: none;
  border: none;
  background: transparent;
  pointer-events: auto;
}

.ms-btn:not(.ms-active):hover {
  color: rgba(255, 255, 255, 0.55);
  transform: scale(1.1);
}

body.light-mode .ms-btn:not(.ms-active) {
  color: rgba(0, 0, 0, 0.28);
}

body.light-mode .ms-btn:not(.ms-active):hover {
  color: rgba(0, 0, 0, 0.6);
}

/* ACTIVE STATES — each button glows in its mode color */
.ms-btn[data-mode="dark"].ms-active {
  background: rgba(200, 255, 0, 0.1);
  color: #c8ff00;
  animation: ms-glow-dark 2.5s ease-in-out infinite;
}

@keyframes ms-glow-dark {

  0%,
  100% {
    box-shadow: 0 0 7px rgba(200, 255, 0, 0.35);
  }

  50% {
    box-shadow: 0 0 16px rgba(200, 255, 0, 0.65), 0 0 28px rgba(200, 255, 0, 0.18);
  }
}

.ms-btn[data-mode="light"].ms-active {
  background: rgba(255, 107, 0, 0.14);
  color: #ff6b00;
  animation: ms-glow-light 2.5s ease-in-out infinite;
}

@keyframes ms-glow-light {

  0%,
  100% {
    box-shadow: 0 0 7px rgba(255, 107, 0, 0.35);
  }

  50% {
    box-shadow: 0 0 16px rgba(255, 107, 0, 0.65), 0 0 28px rgba(255, 107, 0, 0.18);
  }
}

.ms-btn[data-mode="blue"].ms-active {
  background: rgba(255, 0, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 0, 255, 0.5);
  animation: ms-glow-blue 2.5s ease-in-out infinite;
  font-weight: 700;
}

@keyframes ms-glow-blue {

  0%,
  100% {
    box-shadow: 0 0 7px rgba(255, 0, 255, 0.4), inset 0 0 5px rgba(255, 0, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.8), 0 0 35px rgba(255, 0, 255, 0.25), inset 0 0 10px rgba(255, 0, 255, 0.4);
  }
}

/* Blue-mode nav overrides */
body.blue-mode .n-cta {
  border-color: rgba(255, 0, 255, 0.45);
}

body.blue-mode .n-cta:hover {
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 0, 255, 0.5);
}

body.blue-mode .ss-txt {
  color: rgba(255, 0, 255, 0.75);
}

/* Blue mode — n-ver mobile label */
body.blue-mode .n-ver {
  color: rgba(255, 0, 255, 0.6);
}

/* Blue mode — mobile nav slider */
body.blue-mode .nm-panel {
  border-left-color: rgba(255, 0, 255, 0.2);
}

body.blue-mode .nm-logo em {
  color: #ff00ff;
}

body.blue-mode .nm-logo span {
  color: rgba(255, 0, 255, 0.35);
}

body.blue-mode .nm-tagline {
  color: rgba(255, 0, 255, 0.45);
}

body.blue-mode .nm-x:hover {
  color: #ff00ff;
  border-color: rgba(255, 0, 255, 0.4);
}

body.blue-mode .nm-x:active {
  background: rgba(255, 0, 255, 0.1);
}

body.blue-mode .nm-a {
  color: rgba(255, 0, 255, 0.22);
}

body.blue-mode .nm-lnk:hover {
  background: rgba(255, 0, 255, 0.05);
  border-left-color: #ff00ff;
}

body.blue-mode .nm-lnk:active {
  background: rgba(255, 0, 255, 0.1);
  border-left-color: #ff00ff;
}

body.blue-mode .nm-lnk:hover .nm-t,
body.blue-mode .nm-lnk:active .nm-t {
  color: #ff00ff;
}

body.blue-mode .nm-lnk:hover .nm-a,
body.blue-mode .nm-lnk:active .nm-a {
  color: #ff00ff;
}

body.blue-mode .nm-btn-s {
  border-color: rgba(255, 0, 255, 0.25);
  color: rgba(255, 0, 255, 0.65);
}

body.blue-mode .nm-btn-s:hover {
  border-color: rgba(255, 0, 255, 0.5);
  color: #ff00ff;
}

body.blue-mode .nm-btn-s:active {
  background: rgba(255, 0, 255, 0.1);
  border-color: #ff00ff;
  color: #ff00ff;
}

body.blue-mode .nm-status-row {
  color: rgba(255, 0, 255, 0.65);
}

body.blue-mode .nm-dot {
  background: #ff00ff;
  box-shadow: 0 0 6px #ff00ff;
}

body.blue-mode .f-status {
  color: rgba(255, 0, 255, 0.35);
}

body.blue-mode .f-status em {
  color: rgba(255, 0, 255, 0.6);
}

@media(max-width:480px) {
  .ms-btn {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }
}

/* PORTAL BUTTON — sleeker design without scanlines */
.nav-portal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(26, 123, 255, 0.1);
  border: 1px solid rgba(26, 123, 255, 0.4);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;
  transition: all .3s ease;
  box-shadow: 0 0 12px rgba(26, 123, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.nav-portal:hover {
  background: rgba(26, 123, 255, 0.25);
  border-color: rgba(26, 123, 255, 0.8);
  box-shadow: 0 0 20px rgba(26, 123, 255, 0.4), inset 0 0 10px rgba(26, 123, 255, 0.2);
  transform: translateY(-2px);
}

.np-arrow {
  font-size: 13px;
  line-height: 1;
  color: #4d9fff;
  transition: transform .3s ease;
}

.nav-portal:hover .np-arrow {
  transform: translateX(2px);
  color: #fff;
}

.np-lbl {
  font-size: 9px;
  letter-spacing: 2px;
  line-height: 1;
  font-weight: 700;
}

/* HAMBURGER BUTTON — hidden on desktop */
.nav-ham {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  transition: border-color .2s;
}

.nav-ham span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--acid);
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
}

.nav-ham.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-ham.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-ham.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-ham:hover {
  border-color: var(--acid);
}

/* MOBILE MENU OVERLAY */
.nm-ov {
  position: fixed;
  inset: 0;
  z-index: 9700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}

.nm-ov.open {
  opacity: 1;
  pointer-events: all;
}

.nm-ov::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* SLIDE PANEL */
.nm-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 360px);
  background: #030305;
  border-left: 1px solid rgba(255, 107, 0, 0.15);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nm-ov.open .nm-panel {
  transform: translateX(0);
}

/* PARTICLES CANVAS — dark mode only */
.nm-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* All panel content sits above canvas */
.nm-head,
.nm-tagline,
.nm-nav,
.nm-btns,
.nm-foot {
  position: relative;
  z-index: 1;
}

/* PANEL HEADER */
.nm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 404 = white, 200 = acid green (dark mode) / orange (light mode) */
.nm-logo {
  font-family: 'Bebas Neue', monospace;
  font-size: 38px;
  letter-spacing: 4px;
  color: #fff;
}

.nm-logo em {
  color: #c8ff00;
  font-style: normal;
}

.nm-logo span {
  font-size: 12px;
  color: rgba(200, 255, 0, 0.35);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  vertical-align: super;
  font-weight: 300;
}

.nm-x {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: none;
  transition: all .2s;
}

.nm-x:hover {
  color: #c8ff00;
  border-color: rgba(200, 255, 0, 0.4);
}

.nm-x:active {
  background: rgba(200, 255, 0, 0.1);
}

/* TAGLINE BAR */
.nm-tagline {
  padding: 9px 24px;
  font-size: 7px;
  letter-spacing: 3px;
  color: rgba(200, 255, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* NAV LINKS */
.nm-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nm-lnk {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background .2s, border-left-color .2s;
  cursor: none;
  border-left: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.nm-lnk:hover {
  background: rgba(200, 255, 0, 0.04);
  border-left-color: #c8ff00;
}

.nm-lnk:active {
  background: rgba(200, 255, 0, 0.08);
  border-left-color: #c8ff00;
}

/* Numbers — orange for contrast */
.nm-n {
  font-size: 9px;
  color: rgba(255, 107, 0, 0.6);
  letter-spacing: 2px;
  width: 22px;
  flex-shrink: 0;
}

.nm-t {
  font-family: 'Bebas Neue', monospace;
  font-size: 30px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.88);
  flex: 1;
  line-height: 1;
  transition: color .2s;
}

.nm-a {
  font-size: 13px;
  color: rgba(200, 255, 0, 0.25);
  transition: all .2s;
}

.nm-lnk:hover .nm-n,
.nm-lnk:active .nm-n {
  color: #ff6b00;
}

.nm-lnk:hover .nm-t,
.nm-lnk:active .nm-t {
  color: #c8ff00;
}

.nm-lnk:hover .nm-a,
.nm-lnk:active .nm-a {
  color: #c8ff00;
  transform: translateX(4px);
}

/* CTA BUTTONS */
.nm-btns {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nm-btn-p {
  display: block;
  text-align: center;
  padding: 13px 20px;
  background: #ff6b00;
  color: #000;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
  cursor: none;
  transition: opacity .2s;
  -webkit-tap-highlight-color: transparent;
}

.nm-btn-p:hover {
  opacity: .85;
}

.nm-btn-p:active {
  opacity: .65;
}

.nm-btn-s {
  display: block;
  text-align: center;
  padding: 11px 20px;
  border: 1px solid rgba(200, 255, 0, 0.25);
  color: rgba(200, 255, 0, 0.65);
  font-size: 9px;
  letter-spacing: 2px;
  cursor: none;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}

.nm-btn-s:hover {
  border-color: rgba(200, 255, 0, 0.5);
  color: #c8ff00;
}

.nm-btn-s:active {
  background: rgba(200, 255, 0, 0.1);
  border-color: #c8ff00;
  color: #c8ff00;
}

/* PANEL FOOTER */
.nm-foot {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nm-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  letter-spacing: 3px;
  color: rgba(200, 255, 0, 0.65);
}

.nm-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c8ff00;
  box-shadow: 0 0 6px #c8ff00;
  animation: bl 2s infinite;
  flex-shrink: 0;
}

.nm-foot-btm {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Email — white */
.nm-email {
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
}

.nm-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: none;
}

.nm-soc {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s, transform 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.nm-soc svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* HuggingFace icon content fills only ~80% of its viewBox; scale to match GitHub. */
.nm-soc[title="HuggingFace"] svg {
  transform: scale(1.22);
  transform-origin: center;
}

.nm-soc:hover {
  transform: scale(1.15);
}

.nm-soc[title="GitHub"]:hover {
  color: #fff;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

.nm-soc[title="LinkedIn"]:hover {
  color: #0a66c2;
  filter: drop-shadow(0 0 5px rgba(10, 102, 194, 0.4));
}

/* ── LIGHT MODE — white panel, all orange ── */
body.light-mode .nm-ov::before {
  background: rgba(200, 200, 200, 0.6);
}

body.light-mode .nm-panel {
  background: #fff;
  border-left-color: rgba(255, 107, 0, 0.25);
}

body.light-mode .nm-canvas {
  display: none;
}

/* Logo: 404 dark, 200 orange */
body.light-mode .nm-logo {
  color: #0a0a0a;
}

body.light-mode .nm-logo em {
  color: #ff6b00;
}

body.light-mode .nm-logo span {
  color: rgba(255, 107, 0, 0.5);
}

body.light-mode .nm-tagline {
  color: rgba(255, 107, 0, 0.55);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .nm-head {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .nm-x {
  color: rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .nm-x:hover {
  color: #ff6b00;
  border-color: rgba(255, 107, 0, 0.4);
}

body.light-mode .nm-lnk {
  border-bottom-color: rgba(0, 0, 0, 0.05);
  border-left-color: transparent;
}

body.light-mode .nm-lnk:hover,
.nm-lnk:active {
  background: rgba(255, 107, 0, 0.04);
  border-left-color: #ff6b00;
}

body.light-mode .nm-a {
  color: rgba(255, 107, 0, 0.25);
}

body.light-mode .nm-t {
  color: #0a0a0a;
}

body.light-mode .nm-lnk:hover .nm-t,
body.light-mode .nm-lnk:active .nm-t {
  color: #ff6b00;
}

body.light-mode .nm-lnk:hover .nm-a,
body.light-mode .nm-lnk:active .nm-a {
  color: #ff6b00;
}

body.light-mode .nm-btns {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .nm-btn-p {
  background: #ff6b00;
  color: #fff;
}

body.light-mode .nm-btn-p:active {
  opacity: .65;
}

body.light-mode .nm-btn-s {
  border-color: rgba(255, 107, 0, 0.25);
  color: rgba(255, 107, 0, 0.7);
}

body.light-mode .nm-btn-s:hover {
  border-color: #ff6b00;
  color: #ff6b00;
}

body.light-mode .nm-btn-s:active {
  background: rgba(255, 107, 0, 0.08);
  border-color: #ff6b00;
  color: #ff6b00;
}

body.light-mode .nm-foot {
  border-top-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .nm-status-row {
  color: rgba(255, 107, 0, 0.65);
}

body.light-mode .nm-dot {
  background: #ff6b00;
  box-shadow: none;
}

body.light-mode .nm-email {
  color: rgba(0, 0, 0, 0.55);
}

body.light-mode .nav-ham {
  border-color: rgba(0, 0, 0, 0.22);
}

body.light-mode .nav-ham span {
  background: #ff6b00;
}

/* FOOTER PRIVACY LINK */
.f-privacy {
  color: var(--orange);
  letter-spacing: 2px;
  font-size: 9px;
  text-decoration: none;
  transition: opacity .2s;
}

.f-privacy:hover {
  opacity: .7;
}

/* FOOTER SYSTEM STATUS */
.f-status {
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(200, 255, 0, 0.35);
}

.f-status em {
  color: rgba(200, 255, 0, 0.6);
  font-style: normal;
}

/* ── LIGHT MODE ── */
body.light-mode nav.s {
  background: rgba(235, 235, 235, 0.97);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .n-logo {
  color: #0a0a0a;
}

body.light-mode .n-logo sup {
  color: rgba(0, 0, 0, 0.3);
}

body.light-mode .n-lnk {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .n-lnk:hover {
  color: #0a0a0a;
}

body.light-mode .n-cta {
  border-color: rgba(255, 107, 0, 0.5);
  color: var(--acid);
}

body.light-mode .n-cta:hover {
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 107, 0, 0.35);
}

body.light-mode .ss-txt {
  color: rgba(255, 107, 0, 0.7);
}

body.light-mode .mode-toggle {
  border-color: rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .mode-toggle:hover {
  border-color: var(--acid);
  color: var(--acid);
}

@media(max-width:960px) {
  nav {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .n-right {
    gap: 10px;
  }

  .n-right .n-lnk {
    display: none;
  }

  .sys-stable {
    display: none;
  }

  .n-cta {
    display: none;
  }

  /* Logo + version stacked */
  .n-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .n-ver {
    display: block;
  }

  /* Portal button — compact on mobile, hide label */
  .nav-portal {
    padding: 4px 9px 4px 7px;
    gap: 3px;
  }

  .np-lbl {
    display: none;
  }

  .np-arrow {
    font-size: 12px;
  }

  /* Mode toggle — visible, boosted contrast */
  .mode-toggle {
    font-size: 14px;
    padding: 6px 10px;
    flex-shrink: 0;
    border-color: rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.88);
  }

  /* Hamburger — show on mobile */
  .nav-ham {
    display: flex;
  }
}

@media(max-width:480px) {
  nav {
    padding: 10px 16px;
  }

  .n-cta {
    padding: 7px 12px;
    font-size: 8px;
    letter-spacing: 1px;
  }

  .mode-toggle {
    font-size: 13px;
    padding: 5px 8px;
  }

  .n-logo {
    font-size: 24px;
    letter-spacing: 3px;
  }
}

/* Light mode mobile nav */
@media(max-width:960px) {
  body.light-mode nav {
    background: rgba(235, 235, 235, 0.98) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
  }
}

/* Blue mode mobile nav */
@media(max-width:960px) {
  body.blue-mode nav {
    background: rgba(0, 8, 20, 0.97) !important;
    border-bottom-color: rgba(26, 123, 255, 0.1) !important;
  }
}