/* ── NAV SHELL ── */
.nav {
  background: var(--nav-bg);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: opacity 0.35s var(--ease),
              background 0.3s,
              backdrop-filter 0.3s;
}
.nav.scrolled {
  opacity: 0.82;
  background: rgba(28, 23, 20, 0.6);
  backdrop-filter:        blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav:hover { opacity: 1; }

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── LEFT: logo + links ── */
.nav-left { display: flex; align-items: center; gap: 2rem; }

.nav-logo { height: 26px; width: auto; display: block; cursor: pointer; }

.nav-links { display: flex; gap: 1.5rem; }
.nav-link {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* ── RIGHT: icons + toggle ── */
.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-social-icon {
  width: 15px;
  height: 15px;
  fill: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: fill 0.2s;
  flex-shrink: 0;
}
.nav-social-icon:hover { fill: #fff; }

/* dark mode toggle */
.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.12);
}
.theme-btn:hover { background: rgba(255,255,255,0.08); }
.theme-icon { transition: stroke 0.2s; }
.theme-btn:hover .theme-icon { stroke: #fff; }

/* drawer theme button — no separator */
.drawer-mode .theme-btn {
  margin-left: 0;
  padding-left: 4px;
  border-left: none;
}

/* ── HAMBURGER (mobile only) ── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: rgba(255,255,255,0.7);
  transition: transform 0.25s, opacity 0.25s;
}

/* ── DRAWER (mobile menu) ── */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 240px;
  background: var(--nav-bg);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  padding: 3.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-drawer.open { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.125rem;
  cursor: pointer;
  line-height: 1;
}

.drawer-link {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: 0.85rem 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: color 0.2s;
}
.drawer-link:hover,
.drawer-link.active { color: #fff; }

.drawer-bottom {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 0.5px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drawer-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-mode-label {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.drawer-social { display: flex; gap: 14px; align-items: center; }
.drawer-social-icon {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: fill 0.2s;
}
.drawer-social-icon:hover { fill: #fff; }

/* ── LETTERBOXD IMAGE ICON ── */
.nav-right a[aria-label="Letterboxd"] img,
.nav-drawer a[aria-label="Letterboxd"] img {
  display: block;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.nav-right a[aria-label="Letterboxd"]:hover img,
.nav-drawer a[aria-label="Letterboxd"]:hover img {
  opacity: 1;
}

/* ── OVERLAY ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.nav-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links       { display: none; }
  .nav-right .theme-btn { display: none; }
  .nav-social-icon { display: none; }
  .nav-burger      { display: flex; }
  .nav { height: 48px; }
}
