:root {
  --site-header-offset: 80px;
  --site-header-bg: rgba(250, 250, 250, 0.68);
  --site-header-fg: #000000;
  --site-header-button-bg: #000000;
  --site-header-button-fg: #ffffff;
  --site-header-focus: #007aff;
}

body {
  padding-top: var(--site-header-offset);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  color: var(--site-header-fg);
  background: var(--site-header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
}

.header-inner {
  width: min(100%, 1440px);
  min-height: 80px;
  margin: 0 auto;
  padding-left: 216px;
  padding-right: 216px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.site-wordmark {
  justify-self: start;
  display: block;
  width: 67px;
  height: 21px;
  color: inherit;
  text-decoration: none;
}

.site-wordmark img {
  display: block;
  width: 67px;
  height: 21px;
  filter: brightness(0);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.header-link,
.active-link {
  color: inherit;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.header-link:hover {
  opacity: 0.58;
  text-decoration: none;
}

.active-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--site-header-button-bg);
  color: var(--site-header-button-fg);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.active-link:hover {
  background: #1c1c1c;
  text-decoration: none;
}

.header-link:focus-visible,
.active-link:focus-visible,
.site-wordmark:focus-visible {
  outline: 2px solid var(--site-header-focus);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  :root {
    --site-header-offset: 121px;
  }

  .header-inner {
    min-height: auto;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand button"
      "nav nav";
    gap: 18px 24px;
    padding: 24px 48px 22px;
  }

  .site-wordmark {
    grid-area: brand;
  }

  .header-nav {
    grid-area: nav;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
  }

  .active-link {
    grid-area: button;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header-nav {
    flex-wrap: wrap;
    gap: 16px;
    overflow: visible;
  }
}
