:root {  
  font-size: calc(9px + 0.9667vmin);
}

:root, header {
  min-width: 20em;
}

header h1 img {
  min-width: 5.6em;
  max-width: calc(100vw - 5em);
}

#mainnav-button {
  display: none;
  
  position: relative;
  top: -0.2em;
  
  padding: 0.1em 0.34em;
  
  background-color: rgb(67, 81, 82);
  border: none;
  border-radius: 0.4em;
  
  font-size: 200%;
  color: white;
  text-align: center;
  
  cursor: pointer;
}

@media (max-aspect-ratio: 5/4) {
  header {
    padding-left: 2em;
    padding-right: 2em;
  }
  
  #mainnav {
    display: none;
    
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    
    max-height: 100%;
    overflow: auto;
    
    padding-top: 8em;
    padding-bottom: 2em;
    
    background-color: white;
    
    font-size: 150%;
    
    box-shadow: 0 0.1em 1.2em rgba(67, 81, 82, 0.75);
  }
  
  #mainnav ul {
    flex-direction: column;
    align-items: center;
  }
  
  #mainnav-button {
    display: block;
  }
  
  #sidenav {
    display: none;
  }
  
  main {
    margin-left: 0;
    padding: 0 2em;
  }
  
  #content .page .picture {
    margin-right: 3em;
  }
  
  #content .page .picture img {
    width: 35%;
  }
}

@media (max-aspect-ratio: 2/3) {
  body {
    background-position: 20% bottom;
  }
  
  #content .page {
    flex-direction: column;
  }
  
  #content .page .picture {    
    margin-bottom: 2em;
    margin-right: 0;
  }
  
  #content .page .picture img {
    width: 100%;
    position: static !important;
    opacity: 1 !important;
    left: unset;
  }
}