body {
  min-height: 100vh;
  font-family: "Fira mono";
  background-color: var(--base);
  transition: all 200ms ease-in-out;
}

.no-scroll {
  overflow: hidden;
}

main {
  color: var(--contrast);
  
}

.hidden {
  display: none;
}

:root {
  --base: hsla(0, 0%, 100%, 1);
  --shade: hsla(228, 100%, 96%, 1);
  --subtle: hsla(223, 82%, 90%, 1);
  --tint: hsla(226, 14%, 30%, 1);
  --contrast: hsla(223, 28%, 15%, 1);
  --accent: hsl(222, 100%, 84%);
  --accent-subtle: hsla(225, 34%, 37%, 1);
  --sun: hsla(68, 100%, 83%, 1);
}

.darkmode {
  --base: hsla(223, 28%, 15%, 1);
  --shade: hsla(222, 44%, 8%, 1);
  --subtle: hsla(226, 14%, 30%, 1);
  --tint: hsla(223, 8%, 65%, 1);
  --contrast: hsla(0, 0%, 100%, 1);
  --accent: hsl(225, 34%, 37%);
  --accent-subtle: hsl(222, 100%, 84%);
}

/* Header*/

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--subtle);
  height: 4.5rem;
  padding: 0 1.5rem;
}

.header__logo {
  font-family: "Fira Sans";
  font-weight: 500;
  font-size: 2rem;
  text-decoration: none;
  color: var(--contrast);
}

.header__buttons {
  display: flex;
  gap: 1rem;
}

.mode-toggle,
.nav-toggle {
  background-color: hsla(0, 0%, 0%, 0);
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.mode-toggle:hover,
.nav-toggle:hover {
  transform: scale(1.1);
}

.mode-toggle__light path {
  fill: var(--sun);
}

.mode-toggle__dark path,
.nav-toggle path {
  fill: var(--contrast);
}

.nav {
  z-index: 1;
  display: none;
  background-color: var(--shade);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 4.5rem;
  left: 0;
  transition: all 200ms ease-in-out;
}

.is-active {
  display: block;
}

.nav__list {
  list-style: none;
  font-size: 3.5rem;
  font-weight: 500;
  padding: 0;
}

.nav__list li {
  border-top: 1px solid var(--subtle);
  padding-left: 1rem;
}

.nav__list li:last-child {
  margin: 0;
  border-top: none;
  border-radius: 0.5rem;
  left: 4%;
  bottom: 5.5rem;
  width: 92%;
  padding: 0.5rem 0;
  text-align: center;
  position: absolute;
  font-size: 2rem;
  font-weight: 400;
  font-family: "Fira Sans";
  background-color: var(--subtle);
}

.nav__list li a {
  color: var(--contrast);
  text-decoration: none;
}


/* Footer*/

.footer {
  border-top: 1px solid var(--subtle);
  background-color: none;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--tint);
}

.footer a {
  color: var(--tint);
}

.footer__x {
  position: relative;
  text-decoration: none;
  width: fit-content;
}

.footer__x::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 10px;
  background: var(--tint);
  mask: url('../images/icons/x.svg') no-repeat center;
}

@media (min-width: 64rem) {
  

  header {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin: 0 4rem;
    border-bottom: 1px solid var(--subtle);
  }

  .header {
    display: flex;
    justify-content: space-between;
    border: none;
    width: 100%;
    padding: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    display: block;
    position: static;
    height: 100%;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0);
  }

  .nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 1rem;
    font-family: "Fira Mono";
    font-weight: 400;

    white-space: nowrap;
    transition: all 300ms ease;
  }

  .nav__list li {
    border: none;
    transition: all 300ms ease;
  }

  .nav__list li:last-child {
    position: inherit;
    font-size: 1rem;
    background-color: var(--contrast);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: center;
    margin-left: 1rem;
    a {
      color: var(--base);
    }
  }

  .nav__list li a:hover {
    padding-bottom: 0.4rem;
    border-bottom: 0.2rem solid var(--accent);
    
  }

  .nav__list li:last-child:hover {
    background-color: var(--accent);
    a {
      color: var(--contrast);
    }
  }

  .nav__list li:last-child a:hover {
    border: none;
  }

  .footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem 0;
    margin: 0 4rem;
  }
}
