/* Sticky / fixed in-page section nav shell.
   Link labels stay in each page. Use class "nav-reveal" when JS toggles .visible on scroll. */

.nav {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav, rgba(10, 10, 15, 0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, #2a2a3a);
  padding: 12px 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}

.nav-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text, #e0e0e8);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-title:hover {
  text-decoration: none;
  color: var(--text, #e0e0e8);
}

.nav-links {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-links a {
  font-size: 0.8rem;
  color: var(--text-dim, #8888a0);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--mono, ui-monospace, monospace);
}

.nav-links a:hover {
  color: var(--accent, #498a9b);
  text-decoration: none;
}

/* Hidden until scroll JS adds .visible (chapter pages) */
.nav.nav-reveal {
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s, transform 0.3s;
  justify-content: space-between;
}

.nav.nav-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
