/* Phone navigation and hero composition */
@media (max-width: 899px) {
  html {
    scroll-padding-top: 78px;
  }

  .header.shell {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    max-width: none;
    padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 4%, transparent);
  }

  .identity,
  .menu-button {
    min-height: 44px;
  }

  .skip:focus {
    z-index: 40;
  }

  .header nav {
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    max-height: calc(100dvh - 78px - env(safe-area-inset-top));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 20px 35px color-mix(in srgb, var(--ink) 10%, transparent);
    counter-reset: mobile-nav;
  }

  .header nav.open {
    display: flex;
    flex-direction: column;
  }

  .header nav a {
    position: relative;
    min-height: clamp(68px, 12dvh, 90px);
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: -.045em;
  }

  .header nav a::before {
    counter-increment: mobile-nav;
    content: "0" counter(mobile-nav);
    align-self: center;
    width: 30px;
    color: var(--blue);
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
  }

  .header nav a > span {
    margin-left: auto;
    font-size: 11px;
    letter-spacing: 0;
  }

  .header nav .nav-contact {
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: var(--soft);
  }

  .header nav .nav-contact > span {
    color: var(--blue);
    font-size: 18px;
  }

  .header nav a:focus-visible {
    outline-offset: -3px;
  }

  .hero-layout {
    padding-top: 30px;
  }

  .sculpture-wrap {
    height: clamp(270px, 76vw, 330px);
    margin-top: 12px;
  }

  #work,
  #about,
  #certifications,
  #contact {
    scroll-margin-top: 82px;
  }
}

@media (max-width: 390px) {
  .header.shell {
    padding-inline: 16px;
  }

  .header nav {
    padding-inline: 16px;
  }

  .hero-top {
    font-size: 9px;
  }

  .hero-layout {
    padding-top: 24px;
  }

  .sculpture-wrap {
    height: 270px;
  }

  .scene-tools > span {
    max-width: 125px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header nav {
    scroll-behavior: auto;
  }
}
