.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
}

.menu-toggle {
  position: relative;
  z-index: 20;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  padding: 0;
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

html.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

html.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

html.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  position: fixed;
  top: 92px;
  right: max(16px, calc((100vw - 760px) / 2));
  z-index: 10;
  display: grid;
  gap: 16px;
  width: min(260px, calc(100vw - 32px));
  padding: 68px 28px 30px;
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

html.menu-open .site-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  width: max-content;
  font-size: 1.35rem;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .site-header {
    display: flex;
  }

  .site-nav {
    top: 104px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}
