/* Section sub-nav — desktop: horizontal bar */
.section-subnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(7, 17, 43, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(196, 151, 58, 0.10);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.section-subnav.is-visible {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.section-subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-subnav-inner::-webkit-scrollbar { display: none; }
.section-subnav-inner a {
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
  color: #7A8299;
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.section-subnav-inner a:hover {
  color: #D9B06A;
  background: rgba(196, 151, 58, 0.04);
}
.section-subnav-inner a.is-active {
  color: #C4973A;
  border-color: rgba(196, 151, 58, 0.3);
  background: rgba(196, 151, 58, 0.06);
}
.section-subnav-inner .separator {
  color: rgba(196, 151, 58, 0.15);
  font-size: 6px;
  flex-shrink: 0;
  margin: 0 1px;
}

/* Mobile sub-nav toggle button (hidden by default, shown in ::before) */
.section-subnav-toggle { display: none; }

/* Mobile: top bar with burger icon that opens dropdown */
@media (max-width: 720px) {
  .section-subnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(7, 17, 43, 0.97);
    border-bottom: 1px solid rgba(196, 151, 58, 0.12);
    border-radius: 0;
    max-width: 100%;
  }
  /* Collapsed state: just show a thin bar with hamburger */
  .section-subnav:not(.is-open) .section-subnav-inner {
    display: none;
  }
  /* The toggle bar */
  .section-subnav::before {
    content: "☰";
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #C4973A;
    font-size: 16px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
  }
  .section-subnav::after {
    content: attr(data-active-label);
    position: absolute;
    top: 0;
    left: 40px;
    right: 0;
    padding: 11px 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #C4973A;
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Open state: full dropdown below the bar */
  .section-subnav.is-open .section-subnav-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 16px 12px;
    gap: 0;
    border-top: 1px solid rgba(196, 151, 58, 0.08);
  }
  .section-subnav.is-open .section-subnav-inner a {
    padding: 10px 8px;
    font-size: 11px;
    border-bottom: 1px solid rgba(196, 151, 58, 0.06);
  }
  .section-subnav.is-open .section-subnav-inner a:last-child {
    border-bottom: none;
  }
  .section-subnav .separator { display: none; }
}

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (max-width: 720px) { html { scroll-padding-top: 44px; } }
