/* ── Left Sidebar (fixed) ────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: var(--sp-10) var(--sp-6);
  z-index: 50;
  background-color: var(--color-bg);
}

.nav__brand {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-10);
}

.nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  transition: color var(--t-fast);
  line-height: 1.4;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
}

.nav__link--back {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

.nav__link--cv {
  margin-top: var(--sp-4);
}

/* ── Mobile top bar ──────────────────────────── */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding-inline: var(--sp-6);
  align-items: center;
  justify-content: space-between;
}

.mobile-topbar__brand {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
}

/* ── Hamburger button ────────────────────────── */
.nav__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-primary);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  height: 1.5px;
  background-color: var(--color-text-primary);
  border-radius: 2px;
}

/* ── Mobile Overlay ──────────────────────────── */
.nav__mobile {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  transform: translateX(-100%);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__mobile.is-open {
  transform: translateX(0);
}

.nav__mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  margin-bottom: var(--sp-8);
}

.nav__close {
  font-size: 1.125rem;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.nav__mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.nav__mobile-link {
  font-family: var(--font-hero);
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--t-fast);
  text-decoration: none;
  display: block;
}

.nav__mobile-link:hover {
  color: var(--color-text-muted);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 767px) {
  .nav {
    display: none;
  }

  .mobile-topbar {
    display: flex;
  }

  .nav__hamburger {
    display: flex;
  }
}

@media (min-width: 768px) {
  .nav__mobile,
  .mobile-topbar {
    display: none !important;
  }
}
