nav {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 1rem;
}
.mobile-nav-toggle {
  display: block;
  width: 4rem;
  height: max-content;
  background-color: transparent;
  position: absolute;
  top: 2rem;
  right: 2rem;
  border: none;
  &:hover {
    cursor: pointer;
  }
}
.primary-navigation {
  display: none;
  list-style-type: none;
  position: fixed;
  inset: 0 0 0 40%;
  background-color: var(--almost-white);
  color: var(--medium-gray);
  margin: 0;
  padding: min(15%, 10rem) min(8%, 5rem);
  overflow: scroll;
  & li {
    padding: 0;
    margin: 0;
    position: relative;
    width: max-content;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
  }
  & li:hover {
    color: var(--almost-black);
    cursor: pointer;
  }
  & button:hover {
    color: var(--almost-black);
  }
}
.arrow-down {
  margin: 0.2rem 1rem;
}
.user-registration-controls > button {
  display: block;
  padding: 0.5rem 3rem;
  background-color: var(--almost-white);
  border-radius: 10px;
  border: 2px solid var(--medium-gray);
  font-family: inherit;
  color: inherit;
  margin: 0.5rem 0;
  width: 100%;
  &:hover {
    color: var(--almost-black);
    cursor: pointer;
    border: 2px solid var(--almost-black);
  }
}
button.button-alt {
  border: none;
  &:hover {
    border: none;
  }
}
#backdrop {
  background-color: hsl(0 0% 0% / 0.5);
  position: absolute;
  inset: 0 0 0 0;
  display: none; /* to be switched */
}
#outer-user-registration-controls {
  display: none;
  & button {
    padding: 0.5rem 1rem;
  }
}
.sub-menu {
  display: none;
  box-shadow: 0 0 0 transparent;
  border-radius: 0;
  border: none;
  & li {
   flex-direction: row;
   align-items: center;
  }
}
@media screen and (min-width: 90rem) {
  nav:nth-child(1) {
    grid-area: logo;
  }
  nav:nth-child(2) {
    grid-area: primary-nav;
    grid-row-start: 1;
  }
  nav:nth-child(3) {
    grid-area: buttons;
  }
  nav {
    padding: 2rem 3rem;
    display: grid;
    justify-content: initial;
    grid-template-areas: "logo primary-nav buttons";
    grid-template-columns: 5rem 1fr 5rem;
  }
  .primary-navigation {
    position: static;
    display: flex;
    justify-self: start;
    overflow: initial;
    padding: 0 5%;
    align-items: flex-start;
    gap: 3rem;
    margin-left: min(5%, 35rem);
    & li {
      padding: 0;
      margin: 0;
      position: relative;
      width: max-content;
    }
    & :nth-child(1) > .sub-menu {
      top: 2rem;
      right: 0;
    }
    & :nth-child(2) > .sub-menu{
      top: 2rem;
      right: 0;
    }
  }

  .mobile-nav-toggle {
    display: none;
    position: absolute;
    pointer-events: none;
    width: 0.01px;
    height: 0.01px;
  }
  .sub-menu {
    position: absolute;
    display: none;
    box-shadow: 0 0 20px 8px hsl(0 0% 0% / 0.05);
    border-radius: 15px;
    padding: 1rem 2rem;
    background: var(--almost-white);
  }

  #close-icon {
    display: none;
  }
  #outer-user-registration-controls {
    display: initial;
    display: flex;
    width: 20rem;
    height: fit-content;
    justify-self: right;
  }
  #inner-user-registration-controls {
    display: none;
  }
}
/* to be used with JS */
.expanded {
  display: initial !important;
}
