/* Shared site navigation — included by all pages */

/* Fixed rather than sticky: these pages set their own body padding
 * (timeline 46px, artifacts 34px, others 0), which displaced a sticky nav
 * both vertically and horizontally. Fixed positioning takes the nav out of
 * flow so it lands identically on every page. */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250,248,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line, rgba(124,58,237,.12));
}
html[data-theme="dark"] .site-nav {
  background: rgba(15,10,30,.92);
}

/* Reserve space for the fixed nav. This intentionally overrides the
 * top value of each page's own body padding shorthand. */
body {
  padding-top: 56px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 16px;
  flex-shrink: 0;
}
.nav-logo {
  height: 28px;
  width: auto;
  border-radius: 6px;
  padding: 3px 8px;
  background: #0f0a1e;
}
html[data-theme="dark"] .nav-logo {
  background: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted, #7c5aad);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: .15s;
}
.nav-link:hover {
  color: var(--ink, #1a0a2e);
  background: rgba(124,58,237,.06);
}
.nav-link.active {
  color: var(--ink, #1a0a2e);
  font-weight: 600;
  background: rgba(124,58,237,.08);
}
html[data-theme="dark"] .nav-link:hover {
  background: rgba(168,130,255,.1);
}
html[data-theme="dark"] .nav-link.active {
  background: rgba(168,130,255,.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(124,58,237,.12));
  background: var(--card, #ffffff);
  color: var(--muted, #7c5aad);
  text-decoration: none;
  cursor: pointer;
  transition: .15s;
}
.nav-btn:hover {
  border-color: var(--accent2, #9333ea);
  color: var(--accent2, #9333ea);
}
html[data-theme="dark"] .nav-btn {
  background: rgba(30,21,56,.8);
  border-color: rgba(168,130,255,.2);
}

/* Visually hidden but available to screen readers. Used where a page needs a
 * heading for its document outline without showing one. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hide nav when embedded in iframe */
html[data-bp-embedded] .site-nav { display: none }
html[data-bp-embedded] body { padding-top: 0 }

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 8px 6px;
  background: none;
  border: 1px solid var(--line, rgba(124,58,237,.12));
  border-radius: 8px;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--muted, #7c5aad);
  border-radius: 2px;
  transition: .2s;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-hamburger { display: flex }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg, #faf8ff);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px;
    gap: 2px;
  }
  html[data-theme="dark"] .nav-links {
    background: var(--bg, #0f0a1e);
  }
  .nav-links.open { display: flex }
  .nav-link { padding: 12px 14px; width: 100%; border-radius: 8px }
}
