/* =========================================================
   nav.css — Fixed top navigation bar
   Inspired by marie-boulanger.com: flat, text-only, minimal
   ========================================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--content-gutter);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Logo / name mark on the left */
.nav__logo {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  color: var(--color-purple);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Link group on the right */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

/* Individual nav links */
.nav__link {
  font-family: var(--font-mono);
  font-size: calc(var(--text-sm) * 1.3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  cursor: pointer;
  position: relative;

  /* Reserve space so the element doesn't shift during scramble */
  display: inline-block;
  min-width: 4ch; /* overridden per-link via JS if needed */

  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-text);
}

/* Active / current page link */
.nav__link--active {
  color: var(--color-purple);
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-purple);
}

/* ---------------------------------------------------------
   Desktop: larger nav link text
   --------------------------------------------------------- */
@media (min-width: 1024px) {
  .nav__link {
    font-size: calc(var(--text-base) * 1.3);
  }
}

/* ---------------------------------------------------------
   Mobile: collapse links to a tighter layout
   --------------------------------------------------------- */
@media (max-width: 600px) {
  .nav__links {
    gap: var(--space-6);
  }

  .nav__link {
    font-size: calc(var(--text-xs) * 1.3);
  }

  .nav__logo {
    font-size: calc(var(--text-xs) * 1.3);
  }
}
