/* ==========================================================================
   doddo.bio nav. Shared by the landing page and the blog.
   ========================================================================== */

.nav {
  position: relative;
  z-index: 6;
  padding-block: clamp(16px, 2.4vw, 24px);
}

/* The nav sits close to the screen edges instead of sharing the centred
   1200px copy column, so the header does not read as pinched. */
.nav .shell {
  width: min(100%, 1440px);
  padding-inline: clamp(16px, 5vw, 72px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  color: var(--green);
}

.brand__word {
  width: auto;
  height: clamp(24px, 2.6vw, 30px);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(var(--sp-8), 1.2vw, var(--sp-16));
  margin-left: auto;
}

/* inline-flex + min-height gives the 44pt hit area without adding visible
   height; the 8px inline padding is subtracted back out of .nav__right's gap. */
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  padding-inline: var(--sp-8);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--on-grad-75);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--green);
}

/* Phones. "doddo.bio" is 764 units wide and the right side holds three
   items, so the spacing tightens and the wordmark scales with the viewport:
   19px tall at 360, back to the full 24px from about 400. The links' 8px
   padding keeps their hit area and now carries the spacing on its own. */
@media (max-width: 479px) {
  .nav__inner {
    gap: var(--sp-12);
  }

  .nav__right {
    gap: 0;
  }

  .nav__right .btn--sm {
    margin-left: var(--sp-4);
    padding-inline: var(--sp-12);
  }

  .brand__word {
    height: clamp(19px, calc(14.1vw - 32px), 24px);
  }
}

/* Below 360 there is no room for all three, so Blog goes and the nav is
   the wordmark plus Log in and Sign up. */
@media (max-width: 359px) {
  .nav__link--blog {
    display: none;
  }

  .brand__word {
    height: 20px;
  }
}
