/* ============================================================
   MV-SAM3D — shared cross-page global navigation
   Fully namespaced (.global-nav*) to avoid colliding with the
   existing .brand / .nav-links rules in the page-specific styles.
   Two render contexts via modifiers:
     .global-nav--inline   → sits inside a conventional site header
     .global-nav--overlay  → fixed translucent pill on full-screen pages
   Zero external assets.
   ============================================================ */

.global-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.global-nav__brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(240, 235, 225, 0.98);
  white-space: nowrap;
}

.global-nav__link {
  color: rgba(240, 235, 225, 0.88);
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.global-nav__link:hover,
.global-nav__link:focus-visible {
  color: #ffffff;
  border-color: rgba(134, 215, 234, 0.72);
  outline: none;
}

.global-nav__link--current {
  color: #0c1512;
  background: #86d7ea;
  border-color: #86d7ea;
  font-weight: 700;
}

.global-nav__link--current:hover,
.global-nav__link--current:focus-visible {
  color: #0c1512;
  border-color: #86d7ea;
}

/* ---- inline context (conventional header, right-hand group) ---- */
.global-nav--inline {
  border-left: 1px solid rgba(244, 241, 234, 0.18);
  padding-left: 0.9rem;
  margin-left: 0.2rem;
}

/* the header already carries a MV-SAM3D wordmark, so the inline
   variant drops its own brand label to avoid a duplicate. */
.global-nav--inline .global-nav__brand {
  display: none;
}

/* ---- overlay context (full-screen pages) ---- */
.global-nav--overlay {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 24px);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 16, 20, 0.72);
  border: 1px solid rgba(240, 235, 225, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.46);
}

.global-nav--overlay .global-nav__brand {
  padding-right: 0.4rem;
  margin-right: 0.1rem;
  border-right: 1px solid rgba(240, 235, 225, 0.16);
}

@media (max-width: 520px) {
  .global-nav {
    font-size: 0.66rem;
    gap: 0.4rem;
  }
  .global-nav--overlay {
    top: 8px;
    padding: 0.35rem 0.5rem;
  }
  .global-nav__link {
    padding: 0.24rem 0.4rem;
  }
}
