:root {
  --box-height: 7rem;
}

body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  background: #444;
  color: white;
  min-height: 100vh;
}
header {
  background: #222;
  padding: 0.5rem;
}
header h1 {
  margin: 0;
}
footer {
  background: #222;
  padding: 1rem;
  position: sticky;
  top: 100%;
}
nav {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(1, calc(var(--box-height) + 1));
}
nav > a {
  position: relative;
  display: block;
  text-align: center;
  height: var(--box-height);
  color: white;
  background: #333;
  border-radius: 0.5rem;
  text-decoration: none;
  overflow-y: auto;
  overflow-x: hidden;
}
nav > a > div {
  padding: 0.5rem;
  border-radius: 0.5rem;
}
a {
  color: white;
}
#main {
  margin: 0.5rem;
}
.nav-title {
  font-weight: bold;
  text-decoration: underline;
  display: block;
}

@media screen and (max-width: 600px) {
  .nav-title {
    font-size: 0.8rem;
  }
  .nav-desc {
    font-size: 0.75rem;
  }
}
@media screen and (max-width: 400px) {
  nav {
    grid-template-columns: repeat(2, 1fr);
  }
}
