/* Several page-specific stylesheets (trip.css, post.css, essays.css, limericks.css) give
   `body` its own horizontal padding, loaded after this file — since the navbar is a direct
   body child, plain width:100% would only fill body's padded content box, not the true
   viewport. Same full-bleed trick already used for .category-hero/.trip-map-wrap/.gallery
   sidesteps that entirely, regardless of whatever padding any given page's body ends up with. */
.site-nav {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--panel);
  background-image: radial-gradient(circle at 15% 0%, var(--panel-soft), var(--panel) 70%);
}

.site-nav-inner {
  width: 100%;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-nav-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Brand + links float together on the left; the locale switcher (rendered as this group's
   sibling, see layouts/_navbar.html.erb) stays pinned to the right via the parent's
   justify-content: space-between. */
.site-nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav-link {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav-link:hover {
  color: #fff;
}

.site-nav-link.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

@media (max-width: 620px) {
  .site-nav-inner {
    justify-content: center;
    text-align: center;
  }

  .site-nav-left {
    justify-content: center;
  }

  .site-nav-links {
    justify-content: center;
    gap: 1rem 1.25rem;
  }
}

/* Layout scaffolding: the navbar (natural height) plus .page-content (everything each page
   yields) share the viewport via flexbox, so .page-content's real available height is always
   "100vh minus however tall the navbar actually rendered" — no page needs to guess that
   number. Scoped to body.with-nav so the homepage's own layout is untouched. */
body.with-nav {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
