/* Keep the existing navigation available without changing the page layout. */
:root {
  --navigation-height: 56px;
}

html {
  scroll-padding-top: calc(var(--navigation-height) + 16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--navigation-height);
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(2rem, calc((100% - var(--max)) / 2 + 2rem));
  border: 0;
  background: #fff;
}

/* A continuous, lightly frosted strip avoids a floating white rectangle. */
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .site-header {
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

/* Keep field contents readable and show keyboard focus on the dark form. */
.contact-form label {
  font-size: .75rem;
}

.contact-form input,
.contact-form textarea {
  font-size: 1rem;
  border-bottom-color: #888;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

.contact-form button {
  background: #242424;
  border: 1px solid #888;
}

.contact-form .form-note {
  font-size: .8125rem;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Leave the sun and its reflection clear in the lower-right photo. */
.hobby-grid .sunset-collage figcaption {
  top: calc(66% + 3px);
  bottom: auto;
  padding-top: 0;
  padding-bottom: 0;
}

.hobby-grid .sunset-collage figcaption strong {
  margin-top: 0;
}

@media (max-width: 780px) {
  :root {
    --navigation-height: 52px;
  }

  .site-header {
    padding-inline: 1.15rem;
  }

  .hobby-grid .sunset-collage figcaption {
    top: calc(61% + 3px);
  }

  .site-header nav {
    top: calc(100% - 6px);
    max-height: calc(100vh - var(--navigation-height) - 24px);
    max-height: calc(100dvh - var(--navigation-height) - 24px);
    overflow-y: auto;
  }
}
