/* ══ NAV & THEME/LANG CONTROLS ══ */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border2);
  flex-shrink: 0;
}
.nav-logo {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .06em;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-logo .forge { color: var(--green); }
.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-decoration: none;
  padding: 6px 12px;
  transition: color .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--green); }
.nav-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.ctrl-btn {
  background: var(--ctrl-bg);
  border: 1px solid var(--ctrl-br);
  color: var(--ctrl-text);
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--body);
  transition: all .18s;
  line-height: 1.4;
}
.ctrl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ctrl-icon svg { display: block; }
.ctrl-btn:hover, .ctrl-btn.active {
  background: var(--ctrl-active-bg);
  border-color: var(--ctrl-active-br);
  color: var(--ctrl-active-text);
}
.ctrl-divider {
  width: 1px; height: 18px;
  background: var(--border2);
  margin: 0 2px;
}

@media (max-width: 760px) {
  /* Nav links used to be hidden entirely below this width, leaving mobile
     users with no way to reach a section except scrolling. Instead let the
     nav's own flex-wrap put them on their own row under the logo/controls. */
  .nav-center {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .nav-divider { display: none; }
}
@media (max-width: 480px) {
  .nav { padding: 8px 14px; }
  .nav-right { gap: 3px; }
  .ctrl-btn { padding: 4px 7px; font-size: 9px; }
}
