/* React Bits Pill Nav adapted to the existing fixed header. */
#portfolio-header { mix-blend-mode: normal; pointer-events: none; }
#portfolio-header > .header-contact { mix-blend-mode: difference; pointer-events: auto; }
.header-brand {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 50;
  mix-blend-mode: difference;
}
@media (min-width: 1024px) { .header-brand { left: 48px; } }
#portfolio-header > .header-contact { margin-left: auto; }

#portfolio-header .pill-nav-container {
  --base: #fff;
  --pill-bg: #120F17;
  --pill-text: #fff;
  --hover-text: #120F17;
  --nav-h: 42px;
  --pill-pad-x: 18px;
  --pill-gap: 13px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  width: max-content;
  pointer-events: auto;
  mix-blend-mode: normal;
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease, visibility .18s ease;
}

#portfolio-header .pill-nav-container.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#portfolio-header .pill-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
}

#portfolio-header .pill-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--nav-h);
  width: var(--nav-h);
  height: var(--nav-h);
  padding: 8px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--base);
  color: var(--pill-bg);
  position: relative;
  cursor: pointer;
}

#portfolio-header .pill-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

#portfolio-header .logo-edit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgb(18 15 23 / 68%);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

#portfolio-header .logo-edit-overlay svg { width: 17px; height: 17px; }
body.pill-logo-editable #portfolio-header .pill-logo:hover .logo-edit-overlay,
body.pill-logo-editable #portfolio-header .pill-logo:focus-visible .logo-edit-overlay { opacity: 1; }
body.pill-logo-editable #portfolio-header .pill-logo { outline: 1px solid rgb(255 255 255 / 35%); outline-offset: 2px; }

#portfolio-header .pill-nav-items {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  overflow: hidden;
  border-radius: 9999px;
  background: var(--base);
}

#portfolio-header .pill-list {
  display: flex;
  align-items: stretch;
  gap: var(--pill-gap);
  height: 100%;
  padding: 3px;
  margin: 0;
  list-style: none;
}

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

#portfolio-header .pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--pill-pad-x);
  overflow: hidden;
  border-radius: 9999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .05em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

#portfolio-header .pill .hover-circle {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  display: block;
  border-radius: 50%;
  background: var(--base);
  pointer-events: none;
  transform: scale(0);
  will-change: transform;
}

#portfolio-header .pill .label-stack {
  position: relative;
  z-index: 2;
  display: inline-block;
  line-height: 1;
}

#portfolio-header .pill .pill-label,
#portfolio-header .pill .pill-label-hover {
  display: inline-block;
  line-height: 1;
  will-change: transform, opacity;
}

#portfolio-header .pill .pill-label-hover {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  color: var(--hover-text);
  opacity: 0;
  transform: translateY(50px);
}

#portfolio-header .pill.is-active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  z-index: 4;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--base);
}

#portfolio-header .mobile-menu-button,
#portfolio-header .mobile-menu-popover { display: none; }

#portfolio-header .pill-nav-container.no-gsap .pill .hover-circle,
#portfolio-header .pill-nav-container.no-gsap .pill .pill-label,
#portfolio-header .pill-nav-container.no-gsap .pill .pill-label-hover { transition: transform .3s ease, opacity .3s ease; }
#portfolio-header .pill-nav-container.no-gsap .pill .hover-circle { transform: translateX(-50%) scale(0); }
#portfolio-header .pill-nav-container.no-gsap .pill:hover .hover-circle,
#portfolio-header .pill-nav-container.no-gsap .pill:focus-visible .hover-circle { transform: translateX(-50%) scale(1.2); }
#portfolio-header .pill-nav-container.no-gsap .pill:hover .pill-label,
#portfolio-header .pill-nav-container.no-gsap .pill:focus-visible .pill-label { transform: translateY(-50px); }
#portfolio-header .pill-nav-container.no-gsap .pill:hover .pill-label-hover,
#portfolio-header .pill-nav-container.no-gsap .pill:focus-visible .pill-label-hover { transform: translateY(0); opacity: 1; }

@media (max-width: 768px) {
  #portfolio-header .pill-nav-container {
    top: calc(100% + 8px);
    transform: translateX(-50%);
  }
  #portfolio-header .pill-nav-items { display: none; }
  #portfolio-header .mobile-menu-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: var(--nav-h);
    height: var(--nav-h);
    border: 0;
    border-radius: 50%;
    background: var(--base);
    color: var(--pill-bg);
    cursor: pointer;
  }
  #portfolio-header .hamburger-line {
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: var(--pill-bg);
    transform-origin: center;
  }
  #portfolio-header .mobile-menu-popover {
    position: absolute;
    top: calc(var(--nav-h) + 8px);
    left: 50%;
    z-index: 61;
    display: block;
    width: 196px;
    padding: 3px;
    transform: translateX(-50%);
    border-radius: 22px;
    background: var(--base);
    box-shadow: 0 8px 32px rgb(0 0 0 / 20%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  #portfolio-header .mobile-menu-popover.is-open { opacity: 1; visibility: visible; }
  #portfolio-header .mobile-menu-list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
  #portfolio-header .mobile-menu-link {
    display: block;
    padding: 12px 16px;
    border-radius: 9999px;
    background: var(--pill-bg);
    color: var(--pill-text);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
  }
  #portfolio-header .mobile-menu-link.is-active,
  #portfolio-header .mobile-menu-link:hover { background: #e8e2ed; color: var(--hover-text); }
}

@media (prefers-reduced-motion: reduce) {
  #portfolio-header .pill .hover-circle,
  #portfolio-header .pill .pill-label,
  #portfolio-header .pill .pill-label-hover,
  #portfolio-header .pill-logo img { transition: none !important; animation: none !important; }
  #portfolio-header .pill:hover { background: var(--base); color: var(--hover-text); }
  #portfolio-header .pill:hover .pill-label { color: var(--hover-text); }
  #portfolio-header .pill .pill-label-hover,
  #portfolio-header .pill .hover-circle { display: none; }
}

/* Shared header geometry and typography, independent of page utility CSS. */
:root{--site-header-x:24px;--site-header-y:20px}
@media(min-width:1024px){:root{--site-header-x:48px}}
.header-brand{top:var(--site-header-y);left:var(--site-header-x);display:flex;align-items:center;gap:8px;color:#fff;font-family:'Syne',sans-serif;font-size:24px;font-weight:900;line-height:32px;letter-spacing:-1.2px;text-transform:uppercase;text-decoration:none}
.header-brand .brand-dot{width:12px;height:12px;display:inline-block;border-radius:50%;background:#E50914;transition:transform .15s}.header-brand:hover .brand-dot{transform:scale(1.25)}
#portfolio-header>.header-contact{position:fixed;right:var(--site-header-x);top:var(--site-header-y);display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:10px 20px;border:1px solid #ffffff33;border-radius:999px;color:#fff;font:700 12px/16px 'Noto Sans SC',sans-serif;letter-spacing:1.2px;text-decoration:none;transition:background .18s,color .18s}#portfolio-header>.header-contact:hover{background:#fff;color:#000}
#portfolio-header .pill-nav-container{position:fixed;top:41px}
@media(max-width:768px){#portfolio-header .pill-nav-container{top:86px;transform:translateX(-50%)}}

#portfolio-header .pill,#portfolio-header .mobile-menu-link{font-family:'Noto Sans SC',sans-serif}
/* Keep the shared brand above Work's opaque sticky header. */
.header-brand{z-index:70}

.editable-active #portfolio-header .pill-label{transform:none!important}.editable-active #portfolio-header .pill-label-hover{opacity:0!important}
