nav {
  padding: 30px;
}

nav ul {
  float: right;
}

nav ul li {
  display: inline-block;
  float: left;
}

nav ul li:not(:first-child) {
  margin-left: 25px;
}

nav ul li a {
  display: inline-block;
  outline: none;
  color: black;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
}

/* nav ul li a:hover {
  color: rgb(189, 189, 189);
  text-decoration: none;
} */

@media screen and (max-width: 560px) {
  .logo {
    max-width: 80px;
    margin-top: -5% !important;
    margin-left: -5% !important;
  }

  .nav-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: -1;
    background: #1d1f20;
    opacity: 0;
    transition: all 0.2s ease;
  }

  .nav-container ul {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    width: 100%;
  }

  .nav-container ul li {
    display: block;
    float: none;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .nav-container ul li:nth-child(1) a {
    transition-delay: 0.2s;
  }

  .nav-container ul li:nth-child(2) a {
    transition-delay: 0.3s;
  }

  .nav-container ul li:nth-child(3) a {
    transition-delay: 0.4s;
  }

  .nav-container ul li:nth-child(4) a {
    transition-delay: 0.5s;
  }

  .nav-container ul li:not(:first-child) {
    margin-left: 0;
  }

  .nav-container ul li a {
    padding: 10px 25px;
    opacity: 0;
    color: black;
    font-size: 34px;
    font-weight: 600;
    transform: translateY(-20px);
    transition: all 0.2s ease;
    font-family: 'Dosis', sans-serif;
  }

  .link {
    position: relative;
    transition: clip-path 275ms ease;
  }
  .link:hover span::before,
  .link:focus span::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  .link span {
    position: relative;
    display: inline-block;
    color: black;
  }
  .link span::before {
    position: absolute;
    content: attr(data-content);
    color: black;
    text-decoration: underline;
    text-decoration-color: black;
    clip-path: polygon(0 0, 0 0, 0% 100%, 0 100%);
    transition: clip-path 275ms ease;
  }

  .nav-open {
    position: absolute;
    right: 24px;
    top: 15px;
    display: block;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 9999;
    border-radius: 50%;
  }

  .nav-open i {
    display: block;
    width: 30px;
    padding: 1.2px;
    height: 2px;
    background: #1f2227;
    border-radius: 5px;
    margin-left: 14px;
  }

  .nav-open i:nth-child(1) {
    margin-top: 16px;
  }

  .nav-open i:nth-child(2) {
    margin-top: 4px;
    opacity: 1;
  }

  .nav-open i:nth-child(3) {
    margin-top: 4px;
  }
}

@media screen and (min-width: 561px) {
  .logo {
    max-width: 80px;
    margin-top: 10px !important;
    margin-left: 10px !important;
  }

  .link {
    position: relative;
    transition: clip-path 275ms ease;
  }
  .link:hover span::before,
  .link:focus span::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  .link span {
    position: relative;
    display: inline-block;
    color: rgb(61, 61, 61);
  }
  .link span::before {
    position: absolute;
    content: attr(data-content);
    color: rgb(61, 61, 61);
    text-decoration: underline;
    text-decoration-color: rgb(61, 61, 61);
    clip-path: polygon(0 0, 0 0, 0% 100%, 0 100%);
    transition: clip-path 275ms ease;
  }
}

.nav-container ul {
  margin-top: -50px !important;
  margin-right: 25px !important;
}

#nav:checked + .nav-open {
  transform: rotate(45deg);
}

#nav:checked + .nav-open i {
  background: #fff;
  transition: transform 0.2s ease;
}

#nav:checked + .nav-open i:nth-child(1) {
  transform: translateY(6px) rotate(180deg);
}

#nav:checked + .nav-open i:nth-child(2) {
  opacity: 0;
}

#nav:checked + .nav-open i:nth-child(3) {
  transform: translateY(-6px) rotate(90deg);
}

#nav:checked ~ .nav-container {
  z-index: 9990;
  opacity: 1;
}

#nav:checked ~ .nav-container ul li a {
  opacity: 1;
  transform: translateY(0);
}
