.project-detail-page {
  --project-header-height: 64px;
  --project-nav-height: 56px;
}

.project-detail-page .site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
}

.project-section-nav {
  position: sticky;
  top: var(--project-header-height);
  z-index: 4;
  background: #121212;
  color: #f2f0e7;
}

.project-section-links {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.project-section-links a {
  flex: none;
  display: grid;
  align-items: center;
  min-height: 56px;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  color: inherit;
  font: 600 .875rem var(--sans);
  white-space: nowrap;
  transition: color 300ms ease-in-out, border-color 300ms ease-in-out;
}

.project-section-links a:is(:hover, [aria-current="location"]) {
  color: #07bfb8;
  border-color: currentColor;
}

.project-section-links a:focus-visible {
  outline: 2px solid #07bfb8;
  outline-offset: -4px;
}

.project-detail-page main section[id] {
  scroll-margin-top: calc(var(--project-header-height) + var(--project-nav-height) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  .project-section-links a { transition: none; }
}

.project-detail-page .detail-section { padding-block: 32px; }
.project-detail-page .overview { padding-block: 0; }
.project-detail-page .detail-section h2 { font-size: clamp(32px, 5.5vw, 56px); }

@media (max-width: 44rem) {
  .project-detail-page { --mobile-project-card-gap: 12px; }
  .project-detail-page :is(.highlight-grid, .gallery-grid) {
    gap: var(--mobile-project-card-gap);
  }
  .project-detail-page .detail-section h2 { font-size: 28px; }
  .project-detail-page .detail-section h3 { font-size: 20px; }
  .project-detail-page .detail-section p { font-size: 16px; }
}

@media (min-width: 60rem) {
  .project-detail-page :is(
    .detail-section > p,
    .study-section > .frame > p:not(.study-label),
    .study-section .split > div > p:not(.study-label),
    .study-section .split > p
  ) {
    font-size: 20px;
    line-height: 1.6;
  }
}
