/* General layout styles */

html {
  box-sizing: border-box;
  background-color: #0353a4;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  width: 95%;
  max-width: 960px;
  border: 4px double #000;
  background-color: #058c42;
  margin: 2%;
  display: flex;
  flex-direction: column;
}

/* Center headings */
h1,
h2,
h3 {
  text-align: center;
}

/* Link styles */
a {
  color: #000000;
}

a:focus {
  color: #a91622;
  text-decoration: none;
}

a:hover {
  color: #a91622;
  text-decoration: none;
}

a:active {
  color: purple;
  text-decoration: none;
}

/* Mobile styles */

/* Heading */
#document-title h1 {
  font-size: calc(1rem + 2vw);
  margin: 2% 0 0 0;
  padding: 0 1%;
}

#document-title h2 {
  font-size: calc(1rem + 1vw);
  margin: 1% 0 0 0;
  padding: 0 1%;
}

/* Vertical nav bar */
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5% 0;
}

nav ul {
  list-style-type: none;
  text-align: center;
  padding: 1%;
  width: 95%;
  border-top: 2px solid #000;
  border-bottom: 1px solid #000;
  margin: 0;
}

nav li {
  line-height: 2rem;
  text-transform: uppercase;
  font-weight: bold;
}

/* Main layout */
main {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  width: 90%;
  align-self: center;
}

article {
  background-color: #ffffff;
  border: 4px double #000;
  padding: 4%;
}

#main-article,
aside {
  margin: 2%;
}

aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2%;
}

/* Main text layout */
main h2 {
  font-size: calc(1rem + 1vw);
  border-bottom: 1px solid #000;
  padding-bottom: 5%;
  margin: 0 0 5% 0;
}

h3 {
  font-size: calc(1rem + 0.5vw);
}

p {
  line-height: 1.5rem;
}

/* Computer styles */

@media screen and (width > 800px) {
  /* Horizontal nav bar */
  nav ul {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

  /* Double space paragraphs */
  p {
    line-height: 2rem;
  }

  /* Single row menu */
  aside {
    display: flex;
    justify-content: space-between;
  }

  aside article {
    flex: 1;
  }
}
