@media (max-width: 70rem) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .site-nav {
    order: 3;
    justify-self: end;
  }

  .theme-picker {
    justify-self: end;
  }

  .menu-toggle {
    display: inline-flex;
    min-height: 2.6rem;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line-strong);
    background: var(--bg-elevated);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
  }

  .menu-icon {
    display: grid;
    gap: 3px;
  }

  .menu-icon i {
    display: block;
    width: 1rem;
    height: 2px;
    background: currentColor;
  }

  .js .nav-links {
    position: fixed;
    top: 5rem;
    right: 1rem;
    left: 1rem;
    display: grid;
    gap: 0;
    padding: 0.75rem;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .js .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-study,
  .case-study:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(12rem, 38%) minmax(0, 1fr);
  }

  .case-study:nth-child(even) img {
    order: 0;
  }

  .case-study > img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (max-width: 48rem) {
  .container,
  .header-inner {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .header-inner {
    gap: 0.55rem;
  }

  .wordmark {
    font-size: 1rem;
    letter-spacing: 0.16em;
  }

  .theme-picker select {
    width: 6.75rem;
    padding: 0 1.5rem 0 0.6rem;
    font-size: 1rem;
  }

  .menu-toggle {
    gap: 0;
    padding-inline: 0.75rem;
  }

  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero {
    padding-top: 8rem;
  }

  .section {
    align-items: flex-start;
    overflow: hidden;
    padding: 6rem 0 2.5rem;
  }

  .section > .container {
    max-height: calc(100svh - 8.5rem);
    overflow-y: auto;
    scrollbar-color: var(--blue) transparent;
    scrollbar-width: thin;
  }

  .work {
    overflow: hidden;
  }

  .work > .container {
    max-height: calc(100svh - 8.5rem);
    overflow: hidden;
  }

  .hero-name {
    font-size: clamp(3.75rem, 20.5vw, 5rem);
    line-height: 0.86;
  }

  .hero-facts,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-facts div {
    padding-top: 1rem;
  }

  .two-column {
    gap: 2.5rem;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .expertise-card {
    min-height: 10rem;
  }

  .expertise-card h3 {
    margin-top: 2rem;
  }

  .slider-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .slider-actions button {
    flex: 1;
  }

  .case-study,
  .case-study:nth-child(even) {
    grid-template-rows: minmax(9rem, 30%) minmax(0, 1fr);
  }

  .case-study > img {
    aspect-ratio: auto;
  }

  .case-details div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .approach-list {
    grid-template-columns: 1fr;
  }

  .approach-list li,
  .approach-list li:nth-child(3n + 1) {
    min-height: 9rem;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .approach-list h3 {
    margin-top: 2rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js main > section > .container {
    opacity: 1;
    transform: none;
  }
}
