nav {
    height: 80px;
}



html, body {
  margin: 0;
  height: 100%;
}

* {  
  box-sizing: border-box;
}

.top-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: #fff; 
  color: #303030;
  height: 80px;
  padding: 1em 1em 1em 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.menu {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  margin: 0;
  padding: 0;
  max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  
}

.menu > li {
  margin: 0 1rem;
  overflow: hidden;
  
}

.menu > li > a {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.125rem;
    color: #303030;
    padding-left: 1rem;
}



.menu-button-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#menu-toggle {
  display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
  display: block;
  background-color: #303030;
  position: absolute;
  height: 4px;
  width: 30px;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.menu-button::before {
  content: '';
  margin-top: -8px;
}

.menu-button::after {
  content: '';
  margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0px;
  transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0px;
  transform: rotate(-405deg);
}




  .menu-button-container {
    display: flex;
  }
  .menu {
    position: absolute;
    top: 0;
    margin-top: 80px;
    left: 0;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
  }
  #menu-toggle ~ .menu li {
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  #menu-toggle:checked ~ .menu li {
    
    height: 4.5em;
    padding: 0.5em;
    transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .menu > li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 1.5em 0;
    width: 100%;
    color: #303030;
    background-color: #fafafa;
  }
  .menu > li:not(:last-child) {
    border-bottom: 1px solid #444;
  }

  @media (min-width: 601px) {
    
    header {
        left: calc((100vw - 600px) / 2);
    }
  }