/* Site-wide responsive and rendering improvements. Loaded after styles.css. */
html {
  scroll-padding-top: 92px;
}

.nav-links {
  min-width: 0;
}

.button,
.text-link,
.nav-links a {
  touch-action: manipulation;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-shell nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem .45rem;
}

.footer-shell a {
  white-space: nowrap;
}

@supports (content-visibility: auto) {
  .content-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 720px;
  }
}

@media (hover: none), (pointer: coarse) {
  .work-card:hover,
  .work-card:focus-within {
    transform: none;
  }
}

@media (max-width: 1020px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-shell {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: .35rem;
    padding: .75rem 0 .55rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: .25rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .15rem 0 .3rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: .35rem .65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
  }

  .nav-links a[aria-current="page"] {
    border-color: rgba(214, 168, 79, .28);
    background: rgba(214, 168, 79, .08);
  }

  .hero {
    min-height: auto;
    padding: 4rem 0;
  }

  .hero-grid,
  .section-grid,
  .resume-panel {
    grid-template-columns: 1fr;
  }

  .operator-panel {
    max-width: 560px;
  }

  .resume-box {
    min-height: auto;
  }

  .section-heading-row {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 116px;
  }

  body {
    background: linear-gradient(180deg, #0b0d0e 0%, #0d1011 55%, #0b0d0e 100%);
  }

  body::before,
  .site-noise {
    display: none;
  }

  .shell,
  .nav-shell {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  .brand {
    font-size: .92rem;
  }

  .page-hero {
    padding: 3.25rem 0 2rem;
  }

  .content-section {
    padding: 3.25rem 0;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
    line-height: .98;
    letter-spacing: -.055em;
  }

  .page-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.75rem, 8vw, 2.65rem);
    line-height: 1.06;
    letter-spacing: -.035em;
  }

  .hero-lede,
  .page-lede,
  .section-copy {
    font-size: 1rem;
  }

  .hero-actions,
  .section-cta {
    gap: .65rem;
    margin-top: 1.5rem;
  }

  .button {
    width: 100%;
    min-height: 48px;
    padding-inline: .9rem;
  }

  .work-grid,
  .systems-list,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .operator-panel,
  .work-card,
  .resume-panel,
  .systems-list article,
  .info-card,
  .note-panel,
  .timeline-card {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .26);
  }

  .portrait-placeholder {
    min-height: 230px;
  }

  .work-visual {
    min-height: 145px;
  }

  .systems-list article,
  .info-card,
  .note-panel,
  .work-body {
    padding: 1.05rem;
  }

  .timeline-shell::before {
    left: 22px;
  }

  .timeline-item {
    grid-template-columns: 46px 1fr;
    gap: .75rem;
  }

  .timeline-marker {
    width: 46px;
    height: 46px;
    box-shadow: 0 0 0 5px rgba(11, 13, 14, .92);
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.25rem 0;
  }

  .footer-shell nav {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .nav-links a {
    min-height: 40px;
    padding-inline: .55rem;
    font-size: .84rem;
  }

  .status-list div {
    grid-template-columns: 78px 1fr;
  }

  .timeline-card {
    padding: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
