/* Mobile retains its narrative stage. Desktop joins the sections in normal flow. */
.portfolio25-mobile-link,
.portfolio25-menu-backdrop {
  display: none;
}
.portfolio25 {
  background: #000;
  position: relative;
}
.portfolio25-track,
.portfolio25-pin {
  position: relative;
}
.portfolio25-pin {
  background: #000;
}
.portfolio25-header-shell.hero25 {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  transform: translateY(-105%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.24s ease,
    visibility 0s linear 0.24s;
}
.portfolio25-header-shell.is-visible {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.portfolio25-header-shell .hero25-header {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .portfolio25-header-shell.hero25 {
    transition: none;
  }
}
@media (min-width: 768px) {
  .portfolio25.is-desktop .hero25 {
    background: linear-gradient(to bottom, #010608 0, #010608 calc(100% - 112px), #000 100%);
  }
  .portfolio25.is-desktop .hero25-space {
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 64px), transparent 100%);
  }
  .portfolio25.is-desktop .hero25-pause {
    bottom: calc(var(--hero-reveal-height) + 15px);
  }
}
@media (max-width: 700px),
  (orientation: landscape) and (max-width: 1100px) and (max-height: 600px) and (pointer: coarse) {
  body.portfolio25-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  .portfolio25-header-shell.menu-open {
    height: 100dvh;
    isolation: isolate;
  }
  .portfolio25-header-shell .portfolio25-menu-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    height: 100dvh;
    background: #0108128c;
    backdrop-filter: blur(24px) brightness(0.55);
    -webkit-backdrop-filter: blur(24px) brightness(0.55);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.25s,
      visibility 0.25s;
    pointer-events: none;
  }
  .portfolio25-header-shell.menu-open .portfolio25-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .portfolio25-header-shell .hero25-brand,
  .portfolio25-header-shell .hero25-menu-button {
    position: relative;
    z-index: 2;
  }
  .portfolio25-header-shell .hero25-menu-button {
    gap: 5px;
    align-items: flex-start;
    padding: 8px;
  }
  .portfolio25-header-shell .hero25-menu-button span {
    width: 17px;
    height: 1.5px;
    border-radius: 0;
    transform-origin: center;
  }
  .portfolio25-header-shell .hero25-menu-button span:nth-child(2) {
    margin-left: 6px;
  }
  .portfolio25-header-shell .hero25-menu-button span:nth-child(3) {
    margin-left: 12px;
  }
  .portfolio25-header-shell .hero25-menu-button[aria-expanded='true'] span:first-child {
    width: 26px;
    transform: translate(1px, 6.5px) rotate(45deg);
  }
  .portfolio25-header-shell .hero25-menu-button[aria-expanded='true'] span:nth-child(3) {
    width: 26px;
    margin-left: 0;
    transform: translate(1px, -6.5px) rotate(-45deg);
  }
  .portfolio25-header-shell .hero25-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-height));
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: clamp(35px, 10svh, 105px) 8vw 6svh;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-content: center;
  }
  .portfolio25-header-shell .hero25-nav a {
    display: block;
    flex: 0 0 auto;
    margin: 0;
    padding: clamp(14px, 3.2svh, 32px) 5px;
    border-bottom: 1px solid #b9d0dc40;
    font:
      italic 400 clamp(39px, 12.5vw, 76px)/1.04 'Times New Roman',
      serif;
    letter-spacing: -0.045em;
    transition:
      filter 0.22s,
      opacity 0.22s,
      transform 0.25s,
      text-shadow 0.25s;
    transform-origin: left center;
    isolation: isolate;
  }
  .portfolio25-header-shell .hero25-nav a:last-child {
    border-bottom: 0;
  }
  .portfolio25-header-shell .hero25-nav a::after {
    display: none;
  }
  .portfolio25-header-shell .hero25-nav a::before {
    content: '';
    position: absolute;
    inset: 6% -5% 6% -8%;
    z-index: -1;
    background: radial-gradient(ellipse at 38% 55%, #159aff80, #005ee34a 35%, transparent 70%);
    filter: blur(13px);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
  }
  .portfolio25-header-shell .hero25-nav.has-selection a:not(.is-selected) {
    filter: blur(3px);
    opacity: 0.45;
  }
  .portfolio25-header-shell .hero25-nav a.is-selected {
    transform: scale(1.06);
    color: #fff;
    text-shadow:
      0 0 12px #5fc6ff,
      0 0 32px #008cff;
  }
  .portfolio25-header-shell .hero25-nav a.is-selected::before {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio25-header-shell .hero25-nav a,
  .portfolio25-header-shell .hero25-nav a::before,
  .portfolio25-header-shell .portfolio25-menu-backdrop {
    transition: none;
  }
}
@media (max-width: 700px),
  (orientation: landscape) and (max-width: 1100px) and (max-height: 600px) and (pointer: coarse) {
  .portfolio25.is-story .portfolio25-track {
    height: var(--bridge-total);
  }
  .portfolio25.is-story .portfolio25-pin,
  .portfolio25.is-reduced .portfolio25-pin {
    position: sticky;
    top: calc(-1 * var(--bridge-reveal));
    height: calc(var(--bridge-h) + var(--bridge-reveal));
  }
  .portfolio25.is-story #hero-root,
  .portfolio25.is-reduced #hero-root {
    position: absolute;
    inset: 0;
  }
  .portfolio25.is-story #recognition-root {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--bridge-reveal);
    z-index: 2;
  }
  .portfolio25.is-story #recognition-root .rec25 {
    height: var(--bridge-h) !important;
    background: transparent;
  }
  .portfolio25.is-story #recognition-root .rec25-stage {
    position: relative;
    top: 0;
  }
  .portfolio25.is-story #demonstrations-root {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--bridge-reveal);
    z-index: 3;
  }
  .portfolio25.is-story #demonstrations-root .demo25 {
    height: var(--bridge-h);
  }
  .portfolio25.is-story #demonstrations-root .demo25-stage {
    position: relative;
    top: 0;
  }
  .portfolio25.is-story #demonstrations-root .demo25-field {
    transition: none;
  }
  .portfolio25.is-story #hero-root .hero25,
  .portfolio25.is-reduced #hero-root .hero25 {
    background: rgba(1, 6, 8, var(--bridge-hero-ink, 1));
  }
  .portfolio25.is-reduced .portfolio25-track {
    height: var(--bridge-total);
  }
}
/* A small readiness guard, shared by desktop, touch and reduced motion. */
.portfolio-background-wait {
  position: fixed;
  z-index: 2147482000;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 13px 20px;
  border: 1px solid #69d5ee66;
  border-radius: 999px;
  background: #041019f2;
  color: #fff6e8;
  font:
    400 14px/1.35 'Helvetica Neue Local',
    Helvetica,
    Arial,
    sans-serif;
  box-shadow: 0 6px 28px #0007;
}
.portfolio-background-wait[hidden] {
  display: none;
}
.portfolio-background-spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid #73d9ff30;
  border-top-color: #8ce8ff;
  border-radius: 50%;
  animation: portfolio-background-spin 0.85s linear infinite;
}
.portfolio-background-wait button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff6e8;
  color: #041019;
  cursor: pointer;
  font: inherit;
}
.portfolio-background-wait[data-error='true'] .portfolio-background-spinner {
  display: none;
}
@keyframes portfolio-background-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-background-spinner {
    animation: none;
    border-right-color: #8ce8ff;
  }
}

/* Full-viewport loading feedback only for an explicit navigation request. */
.portfolio-background-wait[data-navigation='true'] {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  transform: none;
  border: 0;
  border-radius: 0;
  justify-content: center;
  background: #01060899;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 18px;
}
