/* ============================================================
   NAV.CSS — Le Clue Portfolio
   Desktop: transparent nav with pill links
   Mobile: hamburger icon + full screen overlay menu
   ============================================================ */

/* ── NAV CONTAINER ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 48px;
  background: transparent;
  transition:
    height 0.35s ease,
    background 0.35s ease,
    backdrop-filter 0.35s ease,
    border-color 0.35s ease;
}

.nav.scrolled,
.nav--slim {
  height: var(--nav-height-slim);
  background: rgba(6,9,20,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav--solid {
  background: rgba(6,9,20,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── LOGO ────────────────────────────────────────────────── */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.2s;
}

.nav__logo-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.nav__logo:hover .nav__logo-mark { opacity: 0.85; }

.nav__logo-name {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav__logo:hover .nav__logo-name { color: #fff; }

/* ── DESKTOP NAV LINKS ───────────────────────────────────── */
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin-left: auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.nav__link:hover { color: rgba(255,255,255,0.88); }

.nav__link.active,
.nav__link[aria-current="page"] {
  color: rgba(255,255,255,0.88);
  background: rgba(20,184,166,0.12);
  border-color: rgba(20,184,166,0.3);
}

/* ── HAMBURGER BUTTON ────────────────────────────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: calc(var(--z-nav) + 2);
}

.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Animate to X when open */
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE OVERLAY ──────────────────────────────────────── */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,9,20,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: calc(var(--z-nav) + 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav__overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.nav__overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 40px;
}

.nav__overlay-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav__overlay-link:hover,
.nav__overlay-link.active,
.nav__overlay-link[aria-current="page"] {
  color: #2DD4BF;
  background: rgba(20,184,166,0.08);
  border-color: rgba(20,184,166,0.2);
}

.nav__overlay-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: color 0.2s;
}

.nav__overlay-close:hover { color: #fff; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
}

@media (max-width: 860px) {
  /* Hide desktop links, show hamburger */
  .nav__links { display: none !important; }
  .nav__hamburger { display: flex !important; }
}
