.main-navigation {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.main-navigation > a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-arrow {
  display: inline-block;
  font-size: 0.75em;
  transition: transform 0.2s ease;
}

.nav-dropdown[open] .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-content {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 0.4rem 0;

  background-color: #202126;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.nav-dropdown-content a {
  display: block;
  padding: 0.65rem 1rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown-content a:hover,
.nav-dropdown-content a:focus,
.nav-dropdown-content a.selected {
  background-color: rgba(255, 255, 255, 0.08);
}

@media screen and (max-width: 45em) {
  header {
    align-items: flex-start;
  }

  .main-navigation {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem;
  }

  .nav-dropdown-content {
    right: 0;
    min-width: 210px;
  }
}