/*
  1. Header
  2. Media Queries:
     640px
     - Hamburger menu
*/
/* header */
:root {
  --header-height: 60px;
}

.header {
  position: fixed;
  z-index: 100;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--background-color-contrast);
  color: var(--primary-color-contrast);
  padding: 0 20px;
}
.header > a {
  text-decoration: none;
  color: var(--primary-color-contrast);
}
.header__logo {
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
  font-size: 1.5rem;
  white-space: nowrap;
}
.header__nav > ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  height: 100%;
}
.header__nav > ul > li > a {
  text-decoration: none;
  color: var(--primary-color-contrast);
}
.header__nav > ul > li > a:hover {
  text-decoration: underline;
  text-decoration-color: white;
  text-decoration-thickness: 2px;
}

@media (max-width: 640px) {
  .header__nav {
    display: none;
  }
  .header__nav > ul {
    border-top: 1px solid var(--primary-color-contrast);
    position: absolute;
    width: 100%;
    height: calc(100vh - var(--header-height));
    top: var(--header-height);
    left: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 4rem;
    background-color: var(--background-color-contrast);
    font-size: 1.5rem;
  }
  .header__nav--open {
    display: block;
  }
  #nav-icon {
    width: 40px;
    height: 1.5rem;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%) rotate(0deg);
    right: 20px;
    cursor: pointer;
    transition: 0.5s ease-in-out;
  }
  #nav-icon span {
    background: var(--primary-color-contrast);
    transform-origin: center;
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
  }
  #nav-icon span:nth-child(1) {
    top: 0px;
  }
  #nav-icon span:nth-child(2) {
    top: 50%;
    transform: translate(0, -50%);
  }
  #nav-icon span:nth-child(3) {
    bottom: 0px;
  }
  #nav-icon.open span:nth-child(1) {
    top: 50%;
    left: 50%;
    transform: translate(-50%) rotate(-45deg);
  }
  #nav-icon.open span:nth-child(2) {
    width: 0%;
    opacity: 0;
  }
  #nav-icon.open span:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
  }
}