/* EHAI shared global nav — utilities canon (Dark Glassmorphism) */
/* Include with: <link rel="stylesheet" href="/nav.css"> + <script src="/nav.js" defer></script> */

#ehai-nav {
  --nav-bg: rgba(10, 8, 16, 0.7);
  --nav-ink: #FFFFFF;
  --nav-ink-2: #C5C2D0;
  --nav-ink-3: #8B8798;
  --nav-line: rgba(255, 255, 255, 0.08);
  --nav-surface: rgba(255, 255, 255, 0.04);
  --nav-play: #00E676;
  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-line);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#ehai-nav .ehai-nav-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px);
  height: 56px;
}

#ehai-nav .ehai-nav-mark {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--nav-ink);
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

#ehai-nav .ehai-nav-mark:hover {
  transform: scale(1.05);
}

#ehai-nav .ehai-nav-mark::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}

#ehai-nav .ehai-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
}
#ehai-nav .ehai-nav-links::-webkit-scrollbar { display: none; }

#ehai-nav .ehai-nav-link {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  color: var(--nav-ink-2);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.15s ease;
  white-space: nowrap;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#ehai-nav .ehai-nav-link:hover {
  color: var(--nav-ink);
  background: var(--nav-surface);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

#ehai-nav .ehai-nav-link[aria-current="page"] {
  color: var(--nav-ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#ehai-nav .ehai-nav-link .ehai-nav-count {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--nav-ink-3);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* Play — the only colored item */
#ehai-nav .ehai-nav-link.ehai-nav-play {
  color: var(--nav-play);
  font-weight: 600;
}
#ehai-nav .ehai-nav-link.ehai-nav-play::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nav-play);
  box-shadow: 0 0 6px var(--nav-play);
}
#ehai-nav .ehai-nav-link.ehai-nav-play:hover,
#ehai-nav .ehai-nav-link.ehai-nav-play[aria-current="page"] {
  color: var(--nav-play);
  background: rgba(0, 230, 118, 0.08);
  border-color: rgba(0, 230, 118, 0.2);
}

@media (max-width: 720px) {
  #ehai-nav .ehai-nav-inner { height: 50px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #ehai-nav .ehai-nav-link { transition: none; }
}
