.pill-nav-container {
  --nav-h: 46px;
  --pill-pad-x: 19px;
  --pill-gap: 3px;
  position: fixed;
  top: 94px;
  left: 50%;
  z-index: 99;
  transform: translateX(-50%);
  filter: drop-shadow(0 9px 20px rgba(0, 0, 0, .16));
}

.pill-nav {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-nav-items {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(12, 12, 14, .52);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.pill-logo {
  width: var(--nav-h);
  height: var(--nav-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(12, 12, 14, .52);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.pill-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) invert(1) contrast(1.25);
}

.pill-list,
.mobile-menu-list {
  list-style: none;
}

.pill-list {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: var(--pill-gap);
  padding: 3px;
}

.pill-list > li {
  height: 100%;
  display: flex;
}

.pill {
  height: 100%;
  min-width: 88px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 var(--pill-pad-x);
  color: var(--pill-text, #050505);
  border-radius: 999px;
  background: var(--pill-bg, #f3f3f1);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.pill .hover-circle {
  width: 130px;
  height: 130px;
  position: absolute;
  left: 50%;
  bottom: -102px;
  z-index: 1;
  border-radius: 50%;
  background: var(--base, #050505);
  transform: translateX(-50%) scale(0);
  transform-origin: 50% 78%;
  transition: transform .36s cubic-bezier(.22,.8,.2,1);
}

.label-stack {
  height: 1em;
  position: relative;
  z-index: 2;
  display: inline-block;
  overflow: hidden;
}

.pill-label,
.pill-label-hover {
  display: block;
  line-height: 1;
  transition: transform .3s cubic-bezier(.22,.8,.2,1), opacity .3s ease;
}

.pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hover-text, #f3f3f1);
  opacity: 0;
  transform: translateY(34px);
}

.static-pill-nav .pill:hover .hover-circle {
  transform: translateX(-50%) scale(1.35);
}

.static-pill-nav .pill:hover .pill-label {
  transform: translateY(-34px);
}

.static-pill-nav .pill:hover .pill-label-hover {
  opacity: 1;
  transform: translateY(0);
}

.pill.is-active::after {
  content: "";
  width: 5px;
  height: 5px;
  position: absolute;
  left: 50%;
  bottom: 5px;
  z-index: 4;
  border-radius: 50%;
  background: var(--base, #050505);
  transform: translateX(-50%);
}

.mobile-only {
  display: none;
}

.mobile-menu-button {
  width: var(--nav-h);
  height: var(--nav-h);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(12, 12, 14, .6);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.hamburger-line {
  width: 17px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: var(--pill-bg, #f3f3f1);
  transition: transform .25s ease;
}

.mobile-menu-button.is-open .hamburger-line:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.mobile-menu-button.is-open .hamburger-line:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu-popover {
  width: min(340px, calc(100vw - 32px));
  position: absolute;
  top: 56px;
  left: 50%;
  padding: 4px;
  visibility: hidden;
  opacity: 0;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(12, 12, 14, .72);
  box-shadow: 0 12px 34px rgba(0,0,0,.25);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  transform: translate(-50%, 8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.mobile-menu-popover.is-open {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-menu-list {
  display: grid;
  gap: 3px;
}

.mobile-menu-link {
  display: block;
  padding: 12px 16px;
  color: var(--pill-text, #050505);
  border-radius: 999px;
  background: var(--pill-bg, #f3f3f1);
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: .06em;
}

.mobile-menu-link.is-active {
  color: var(--hover-text, #f3f3f1);
  background: #343434;
}

@media (max-width: 768px) {
  .pill-nav-container {
    width: 100%;
    top: 18px;
  }

  .pill-nav {
    width: 100%;
    justify-content: space-between;
    padding: 0 16px;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: flex;
  }

  .mobile-menu-popover {
    display: block;
  }
}
