@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    background:
      linear-gradient(180deg, rgba(6, 10, 14, 0.18), rgba(6, 10, 14, 0.98) 42rem),
      #060a0e;
    padding-bottom: 0;
  }

  .app-shell {
    overflow: clip;
  }

  .topbar {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.72rem 0.9rem;
    overflow: visible;
  }

  .brand {
    gap: 0.58rem;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    font-size: 0.9rem;
  }

  .brand strong {
    font-size: 0.94rem;
    line-height: 1.05;
  }

  .brand small {
    display: none;
  }

  .topnav {
    display: none;
  }

  .topbar .topnav {
    display: none !important;
  }

  .topbar .topnav a {
    flex: 0 0 auto;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.72rem;
    color: #3a3228;
    background: rgba(47, 143, 131, 0.08);
  }

  .top-actions {
    gap: 0.42rem;
  }

  .icon-button {
    width: 2.55rem;
    height: 2.55rem;
    justify-content: center;
    padding: 0;
  }

  .icon-button span:not(.icon-dot) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .info-button,
  .menu-button {
    width: 2.55rem;
    height: 2.55rem;
  }

  .search-drawer {
    position: fixed;
    inset: 4.35rem 0.8rem auto 0.8rem;
    max-height: min(74vh, 36rem);
    overflow-y: auto;
    border-radius: 16px;
  }

  main {
    padding-top: 0;
  }

  section {
    width: 100vw;
    max-width: 100vw;
    padding: 4.6rem 1rem;
    scroll-margin-top: 5.2rem;
    overflow-x: hidden;
  }

  .section-heading {
    margin-bottom: 1.55rem;
  }

  .section-heading h2,
  .hero h1 {
    overflow-wrap: anywhere;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 2.85rem;
    line-height: 1.03;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.4rem;
    padding-top: 6.2rem;
    padding-bottom: 3rem;
  }

  .hero-copy {
    max-width: none;
    width: 100%;
    min-width: 0;
  }

  .hero-copy > p:not(.eyebrow) {
    max-width: none;
    width: 100%;
  }

  .hero-portrait {
    width: min(20rem, 82vw);
    max-width: none;
    justify-self: center;
    order: -1;
  }

  .runway {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .runway span,
  .hero-actions a,
  .primary-action,
  .secondary-action {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .show-grid,
  .overview-stage,
  .project-lab,
  .impact-grid,
  .fit-grid,
  .performance-layout,
  .contact-form,
  .streetview-overlay {
    grid-template-columns: 1fr;
  }

  .overview-stage {
    gap: 1.1rem;
  }

  .overview-story,
  .overview-gallery {
    max-height: none;
    overflow: visible;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .overview-grid article,
  .overview-closing {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 0;
  }

  .overview-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(8.5rem, 42%);
    gap: 0.72rem;
    padding: 0.08rem 0 0.55rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .overview-photo,
  .overview-photo.is-portrait {
    min-height: 10.5rem;
    aspect-ratio: 4 / 5;
    grid-row: auto;
    scroll-snap-align: start;
  }

  .journey-controls,
  .filter-group,
  .mode-toggle,
  .contact-actions,
  .walk-controls,
  .place-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .journey-controls button,
  .filter-group button,
  .mode-toggle button,
  .panel-toggle,
  .walk-controls button,
  .place-controls button,
  .contact-actions > * {
    min-height: 2.75rem;
    flex: 0 0 auto;
  }

  .journey-layout,
  .journey-section[data-view="timeline"] .journey-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .globe-stage {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  #globe {
    width: 100%;
    height: 100%;
  }

  .globe-hud {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    display: grid;
    gap: 0.16rem;
    padding: 0.6rem 0.7rem;
  }

  .globe-hud span:last-child {
    white-space: normal;
    overflow: visible;
  }

  .globe-zoom-controls {
    top: 0.65rem;
    right: 0.65rem;
  }

  .timeline,
  .timeline[data-view="timeline"],
  .timeline[data-view="location"] {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .timeline[data-view="timeline"] .timeline-button,
  .timeline-button,
  .timeline[data-view="location"] .timeline-button {
    height: auto;
    min-height: 0;
  }

  .timeline-card {
    min-width: 0;
  }

  .inline-location-detail,
  .location-detail {
    min-width: 0;
  }

  .streetview-section {
    min-height: 42rem;
    overflow: hidden;
  }

  .streetview-overlay {
    grid-template-areas:
      "title"
      "city"
      "walk"
      "place"
      "scene";
    gap: 0.8rem;
    padding: 1rem;
  }

  .streetview-overlay .section-heading.compact {
    min-width: 0;
  }

  .street-scene {
    min-height: 18rem;
    overflow: hidden;
  }

  .architecture {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(12rem, 78%);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .architecture > * {
    scroll-snap-align: start;
  }

  .project-reader {
    min-width: 0;
  }

  .reader-tabs {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .reader-tabs button {
    min-height: 2.75rem;
    flex: 0 0 auto;
  }

  .impact-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .impact-table-wrap table {
    min-width: 42rem;
  }

  .skills-cloud {
    justify-content: flex-start;
  }

  .skills-cloud span {
    min-height: 2.45rem;
    display: inline-flex;
    align-items: center;
  }

  .music-education-card,
  .performance-card,
  .recording-card,
  .fit-grid article,
  .show-grid article,
  .metric {
    border-radius: 12px;
  }

  .music-education-card .performance-list,
  .performance-layout,
  .recording-gallery {
    grid-template-columns: 1fr;
  }

  .recording-card {
    grid-template-columns: 1fr;
  }

  .recording-card video {
    width: 100%;
    max-height: 72vh;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    background: #05080b;
  }

  .contact-layout {
    max-width: none;
  }

  .contact-form {
    gap: 0.85rem;
  }

  .contact-form label,
  .contact-form .contact-actions,
  .contact-status,
  .message-field {
    grid-column: 1 / -1;
  }

  .contact-actions {
    flex-wrap: wrap;
  }

  .contact-actions > * {
    flex: 1 1 100%;
  }

  .guide-card {
    width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
  }

  .image-lightbox {
    max-width: 96vw;
  }

  .image-lightbox img {
    max-width: 96vw;
    max-height: 82vh;
    border-width: 4px;
    border-radius: 14px;
  }

  .image-lightbox-close {
    top: 0.35rem;
    right: 0.35rem;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding-inline: 0.72rem;
  }

  .top-actions {
    gap: 0.32rem;
    display: flex;
    position: static;
    z-index: 70;
  }

  .topbar {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }

  #searchMenuButton {
    display: inline-flex;
    position: fixed;
    top: 0.72rem;
    right: auto;
    left: calc(100vw - 3.05rem);
    z-index: 70;
  }

  .top-actions .icon-button {
    display: none;
  }

  .top-actions .info-button {
    display: none;
  }

  .info-button,
  .menu-button,
  .icon-button {
    width: 2.35rem;
    height: 2.35rem;
  }

  .menu-button {
    flex: 0 0 auto;
  }

  section {
    padding: 3.75rem 0.82rem;
  }

  .hero {
    padding-top: 5.8rem;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .hero h1 {
    width: auto !important;
    max-width: 18.8rem !important;
    font-size: 1.42rem;
    line-height: 1.16;
  }

  .hero-copy,
  .hero-copy > p:not(.eyebrow) {
    width: 100% !important;
    max-width: 18.8rem !important;
  }

  .hero-portrait {
    width: min(17rem, 78vw);
  }

  .overview-gallery {
    grid-auto-columns: minmax(8rem, 58%);
  }

  .globe-stage {
    aspect-ratio: 1 / 1.08;
  }

  .streetview-section {
    min-height: 39rem;
  }

  .street-scene {
    min-height: 16rem;
  }

  .architecture {
    grid-auto-columns: minmax(11rem, 86%);
  }

  .impact-table-wrap table {
    min-width: 38rem;
  }
}
