/* =========================================================
   HEADER: photo + name on the left, a centred glass pill menu,
   Résumé on the right. Sticky; the pill keeps its glass look over
   whatever scrolls underneath. Active item = sliding navy pill.
   ========================================================= */
.site-header {
  background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.site-header .nav { height: 84px; grid-template-columns: 1fr auto 1fr; }

/* ---------- Brand ---------- */
.nav__brand { justify-self: start; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #141414; }
.nav__avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 26%;
  box-shadow: 0 0 0 2px #fff, 0 4px 12px -4px rgba(30, 25, 15, .35);
}
.nav__name { font: 700 20px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.02em; }

/* ---------- Glass pill menu ---------- */
.site-header .nav__links {
  position: relative; grid-column: 2;
  display: flex; gap: 4px; align-items: center; padding: 6px; margin: 0; list-style: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 0 0 1px rgba(110, 85, 55, .10),
    0 10px 30px -14px rgba(30, 25, 15, .30);
}
.site-header .nav__links li { position: relative; z-index: 1; border: 0; }
.site-header .nav__links a {
  display: block; padding: 10px 22px; border-radius: 999px; border: 0;
  font: 500 16px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #2b2f3a; text-decoration: none;
  transition: color .25s ease, background-color .2s ease;
}
.site-header .nav__links a:hover { background: rgba(28, 42, 79, .06); }
.site-header .nav__links a[aria-current] { color: #fff; border: 0; font-weight: 500; background: none; }
.site-header .nav__links a:focus-visible { outline: 2px solid #1c2a4f; outline-offset: 2px; }

.nav__pill {
  position: absolute !important; z-index: 0 !important; top: 6px; bottom: 6px; left: 0; width: 0;
  border-radius: 999px; background: #1c2a4f;
  box-shadow: 0 4px 12px -4px rgba(28, 42, 79, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .45s cubic-bezier(.3, 1.25, .5, 1), width .45s cubic-bezier(.3, 1.25, .5, 1);
  pointer-events: none;
}
.site-header .nav__cta { display: none; }            /* Résumé lives outside the pill on desktop */

/* ---------- Résumé ---------- */
.nav__resume {
  justify-self: end; display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: 999px; text-decoration: none;
  font: 500 15px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1c2a4f; background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px rgba(28, 42, 79, .22), 0 10px 30px -14px rgba(30, 25, 15, .30);
  transition: background-color .2s ease, color .2s ease;
}
.nav__resume:hover { background: #1c2a4f; color: #fff; }

@media (prefers-reduced-motion: reduce) { .nav__pill { transition: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .site-header .nav { height: 72px; grid-template-columns: 1fr auto; }
  .nav__avatar { width: 38px; height: 38px; }
  .nav__name { font-size: 18px; }
  .nav__resume, .nav__pill { display: none; }
  .site-header .nav__toggle {
    border: 0; padding: 10px 18px; border-radius: 999px; font: 500 15px/1 ui-sans-serif, system-ui, sans-serif; color: #1c2a4f;
    background: rgba(255, 255, 255, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px rgba(110, 85, 55, .14);
  }
  .site-header .nav__links {
    display: none; position: absolute; top: 72px; left: 16px; right: 16px; grid-column: auto;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 22px;
    background: rgba(255, 255, 255, .82);
  }
  .site-header .nav__links.is-open { display: flex; }
  .site-header .nav__links a { padding: 14px 18px !important; font-size: 17px; }
  .site-header .nav__links a[aria-current] { background: #1c2a4f; }
  .site-header .nav__cta { display: block; margin: 0; }
  .site-header .nav__cta a { color: #1c2a4f; font-weight: 600; }
}

/* ---------- Left-aligned menu (no photo/name), Résumé stays right ---------- */
.site-header .nav { grid-template-columns: auto 1fr; }
.site-header .nav__links { grid-column: 1; justify-self: start; }
.nav__resume { grid-column: 2; }
@media (max-width: 760px) {
  .site-header .nav { grid-template-columns: auto 1fr; }
  .site-header .nav__toggle { grid-column: 1; justify-self: start; }
}

/* =========================================================
   Centred menu + real frosted glass
   ========================================================= */
.site-header .nav { grid-template-columns: 1fr auto 1fr; }
.site-header .nav__links { grid-column: 2; justify-self: center; }
.nav__resume { grid-column: 3; justify-self: end; }

/* Frosted glass that stays readable over photos and text while scrolling */
.site-header .nav__links,
.nav__resume {
  background: rgba(251, 248, 242, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
          backdrop-filter: blur(18px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 0 0 1px rgba(110, 85, 55, .14),
    0 10px 30px -12px rgba(30, 25, 15, .32);
}
.nav__resume { color: #1c2a4f; }
/* The intro animation on the header blocks the blur underneath it (an animated
   ancestor isolates the backdrop), so it is released once the intro has finished. */
html.pp-settled .site-header { animation: none; }

@media (max-width: 760px) {
  .site-header .nav { grid-template-columns: auto 1fr; }
  .site-header .nav__toggle {
    background: rgba(251, 248, 242, .72);
    -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  }
}
