@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;500;600;800&family=VT323&display=swap');

* {
  text-align: center;
}

body {
  margin: 0;
  font-family: "Poppins";
}

article img {
  width: 100%;
}

/*images always keep their pixel size unless we tell them otherwise*/

article p {
  color: #777;
}

nav {
  display: flex;
  flex-direction: column;
  grid-area: nav;
  align-items: center;
  border: 1px solid #ddd;
}

nav a {
  text-decoration: none
}

header {
  grid-area: header;
}

h2 {
  font-size: 50px;

}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-areas:
    "header header header"
    "nav art info"
    "nav art info"
    "footer footer footer";

}

aside {
  grid-area: info;
  display: flex;
  justify-content: center;
  border: 1px solid #ddd;
}

article {
  grid-area: art;
  border: 1px solid #ddd;
}

/* when the screen is over 1200px wide, it should look like final1
When the screen is between 980-1200px wide, it should look like final2
When the screen is under 980px wide, it should look like final3 */

@media screen and (width < 1200px) and (width > 980px) {
  nav {
    flex-direction: row;
    justify-content: center;
    justify-content: space-evenly;
    border: none;
  }

  .grid-container {
    grid-template-areas:
      "header header header"
      "nav nav nav"
      "art art info"
      "footer footer footer";
  }

  aside {
    padding-right: 15px;
    border: none;
  }

  article {
    width: 90%;
    padding-left: 20px;
    border: none;
  }

  * {
    text-align: left;
  }

  header {
    text-align: center;
  }

  h2,
  h1 {
    text-align: center;
  }
}

@media screen and (width < 980px) {

  footer,
  aside {
    display: none;
  }

  .grid-container {
    grid-template-areas:
      "header header header"
      "nav nav nav"
      "art art art"
  }

  article {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    flex-wrap: wrap;
    border: none;
  }

  h2 {
    font-size: 30px;
  }

  h1 {
    font-size: 25px;
  }

  * {
    text-align: center;
  }

  nav {
    font-size: small;
    padding: 20px;
    border: none;
  }
}