header {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: center;
  top: 40px;
  z-index: 100;
}

header.sticky {
  position: fixed;
  top: 5px;
  background: #161616b1;
}

header ._wrapper {
  justify-content: space-between;
}

#logo {
  background: var(--main-color);
  position: relative;
  height: 100%;
  font-size: 2rem;
  font-weight: 800;
  padding: 0.8rem;
  text-align: right;
  z-index: 10;
}

header.sticky #logo {
  font-size: 1.5rem;
  padding: 0.5rem;
}

header.sticky * {
  transition: 0.1s;
}

#logo span {
  font-weight: 400;
}

#logo::before {
  content: "";
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  width: 100vw;
  background: var(--main-color);
  height: calc(100% + 12px);
  z-index: -1;
}

header.sticky #logo::before {
  height: 100%;
}

#menu {
  display: flex;
  padding: 0.8rem;
  max-width: 890px;
  width: 100%;
  justify-content: center;
  gap: 10%;
  flex: 1;
}

#menu li a {
  font-family: "Lato";
  font-size: 1.5rem;
  position: relative;
}

header.sticky #menu li a {
  font-size: 1.3rem;
}

#menu li a::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 100%;
  background: #fff;
  left: 0;
  bottom: -10px;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.25s;
}

#menu li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 1400px) {
  #logo {
    font-size: 1.9rem;
  }

  #logo::before {
    height: calc(100% + 5px);
  }
}

@media (max-width: 820px) {
  #logo {
    padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    font-size: 1.5rem;
  }

  header.sticky {
    top: 3px;
    box-shadow: 0 2px 3px #00000060;
  }

  #menu li a {
    font-size: 1.5rem;
  }

  #menu {
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  header ._wrapper {
    flex-direction: column;
  }

  #menu {
    position: absolute;
    visibility: hidden;
    top: 100%;
    flex-direction: column;
    padding: 20px 10px;
    align-items: center;
    background: #2424249c;
    backdrop-filter: blur(7px);
    transform: translateY(-20%);
    opacity: 0;
    transition: 0.3s;
    box-shadow: 0 2px 3px #00000060;
  }

  #menu li {
    width: 100%;
    text-align: center;
  }

  #menu li a {
    line-height: 2.5;
    font-size: 1.5rem;
    display: block;
    width: 100%;
    font-weight: 500;
  }

  header.sticky #menu li a {
    font-size: 1.5rem;
  }

  #menu li a:hover::after {
    display: none;
  }

  .menu-burger {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 40px;
    z-index: 6;
  }

  .menu-burger div {
    height: 3px;
    background: #fff;
    width: 100%;
    border-radius: 3px;
    transition: 0.3s;
  }

  .menu-burger.open {
    gap: 12px;
  }

  .menu-burger.open :nth-child(2) {
    opacity: 0;
  }

  .menu-burger.open div:first-child {
    transform: rotate(-45deg);
    transform-origin: top right;
  }

  .menu-burger.open div:last-child {
    transform: rotate(45deg);
    transform-origin: bottom right;
  }

  .menu-burger.open + #menu {
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
  }
}
