/* ---------- Top bar (Dec 1, her notes) ----------
   Her words: "the top bar right now looks super ai", "the top bar should not be floating make it a better top bar",
   and the reading line "looks bad ... it's like straight black". So the bar is a plain full-width bar attached to the
   top of the screen (no floating glass pill, no outline, no rounded ends), on the page's own cream with a soft shadow
   under it. Links are quiet text, the section you're in is ink and a little heavier (no tinted pill). Contact is a
   small square-cornered ink button. The reading line is a thin garnet line along the bar's bottom edge, with no grey
   track. It still slides in as you leave the opening (html.at-top), and the name still glides into it. */
.nav { top: 0; left: 0; right: 0; gap: 14px; padding: 12px var(--pad); border: 0; border-radius: 0; background: color-mix(in srgb, var(--page) 95%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 12px 28px -24px rgba(26, 24, 22, 0.55); }
[data-theme="dark"] .nav { background: color-mix(in srgb, var(--page) 94%, transparent); border: 0; box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.9); }
.at-top .nav { transform: translateY(calc(-100% - 8px)); }
html { scroll-padding-top: 76px; }

.nav-name { font-size: 27px; }
.nav ul { gap: 4px; }
.nav ul a { padding: 8px 10px; border-radius: 0; font-size: 15px; font-weight: 500; color: var(--muted); background: none; transition: color 0.25s ease; }
.nav ul a:hover { color: var(--ink); background: none; }
.nav ul a[aria-current="true"] { color: var(--ink); font-weight: 650; background: none; box-shadow: none; }
.nav-cta { padding: 10px 18px; border-radius: 4px; font-size: 14.5px; }

/* the reading line: thin garnet along the bottom edge, nothing under it */
.nav .nav-track { border-radius: 0; }
.nav .nav-track::before, html .nav-track::before { background: none; }
.nav .nav-progress, html .nav-progress { height: 2px; background: var(--acc); opacity: 1; }

/* the menu on narrower screens drops down as a full-width sheet under the bar */
@media (max-width: 1240px) {
  .nav ul { top: 100%; left: 0; right: 0; padding: 8px var(--pad) 18px; border: 0; border-radius: 0; background: var(--page); box-shadow: 0 28px 40px -26px rgba(26, 24, 22, 0.5); }
  .nav ul a { padding: 10px 0; font-size: 24px; color: var(--ink); }
}
@media (max-width: 640px) {
  .nav { top: 0; left: 0; right: 0; gap: 6px; padding: 9px 12px 9px 16px; }
  .nav-name { font-size: 23px; }
}

/* the section links sit in the true middle of the bar (Dec 1, night, her note: "top menu bar seems off kilter"). They
   were pushed left of center by the buttons on the right. On wide screens they're centered on the page, whatever sits
   on either side; narrower screens keep the normal row until the Menu button takes over. */
@media (min-width: 1300px) {
  .nav ul { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; }
  .nav > .nav-name { margin-right: auto; }      /* the buttons stay together at the right edge */
  .nav > ul ~ * { margin-left: 0; }
}
/* with the links centered, Peel Back the Map's pill (shown only once it's switched on) keeps its words on wide screens
   and is just its orange below that, so it never crowds "More" */
@media (min-width: 1300px) and (max-width: 1559px) {
  .nav .pbtm-pill .pbtm-txt { display: none; }
  .nav .pbtm-pill { padding-left: 8px; padding-right: 8px; }
}

/* Dec 2 (her note: "the audrey huang in the top left is too small"): the name in the bar is bigger. */
.nav .nav-name { font-size: 32px; }
@media (max-width: 640px) { .nav .nav-name { font-size: 27px; } }

/* Dec 3 (her note: "peel the orange thing needs to be back"): the words "Peel Back the Map" are back beside the orange
   from 1400px up (a little smaller where the bar is tight), so it reads as the project again, not just a fruit. */
@media (min-width: 1400px) and (max-width: 1559px) {
  .nav .pbtm-pill .pbtm-txt { display: inline; font-size: 16.5px; }
  .nav .pbtm-pill { width: auto; padding: 0 10px 0 6px; gap: 6px; }
}
