*, *::after, *::before {
  margin: 0;
  padding: 0;
  --color1: hsl(197, 37%, 24%);
  --color2: hsl(173, 58%, 39%);
  --color3: hsl(43, 80%, 75%);
  --color4: hsl(27, 87%, 67%);
  --color5: hsl(12, 76%, 61%);
  --standard-margin: clamp(1.5em, 3vw, 3em);
  --header-footer-margin: .5em;
}

body {
  font-family: Arial, Helvetica, sans-serif;

  height: 100vh;
  display: grid;
  grid-template-areas:
  "header header"
  "main aside"
  "footer footer";
  grid-template-rows: max-content 1fr max-content;
  grid-template-columns: 1fr 23vw;
}

h1, h2, h3, h4 {
  font-family: serif;
  color: var(--color3);
}

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  text-align: center;
}

/* header */
header {
  grid-area: header;
  background-color: var(--color1);
  color: var(--color3);

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1em var(--standard-margin);
  margin-bottom: var(--header-footer-margin);
}

header nav {
  margin: auto 0;
}

header ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
}

header a {
  text-decoration: 0;
  color: var(--color3);
  font-size: 1.1rem;
}
/* header */

/* main */
main {
  margin: var(--standard-margin);
  grid-area: main;
  margin-right: 0;
}

.post {
  display: flex;
  background-color: var(--color2);
  text-decoration: none;
  max-height: 10em;
  overflow: hidden;
  margin-bottom: calc(var(--standard-margin));
}

.post img {
  aspect-ratio: 4/3;
  width: max(10em, 15vw);
  object-fit: cover;
}

.post__data {
  padding: 1em 1.5em;
  display: flex;
  flex-direction: column;
  gap: .5em;
  position: relative;
}

.post__data::after {
  content: "";
  width: 100%;
  height: 100%;
  translate: -1.5em;
  position: absolute;
  background: linear-gradient(transparent 20%, var(--color2));
}

.post__data p {
  color: white;
}
/* main */

/* aside */
aside {
  margin: var(--standard-margin);
  grid-area: aside;

  background-color: var(--color2);
  padding: 1em;
}

aside h2 {
  text-align: center;
  text-transform: uppercase;
}

aside ul {
  margin-top: 1em;
  margin-left: 1em;
  color: white;

  display: flex;
  flex-direction: column;
  gap: .8em;
}

aside a {
  color: white;
}
/* aside */

/* footer */
footer {
  grid-area: footer;
  background-color: var(--color1);
  padding: 1em var(--standard-margin);
  margin-top: var(--header-footer-margin);
}

footer p {
  color: var(--color3);
  font-family: monospace;
  font-weight: bolder;
  font-size: 1.1rem;

  width: fit-content;
  margin: auto;
}

footer a {
  color: currentColor;
}
/* footer */

@media (max-width: 992px) {
  body {
    grid-template-areas:
    "header"
    "main"
    "aside"
    "footer";
    grid-template-rows: max-content 1fr max-content max-content;
    grid-template-columns: 100%;
  }

  main {
    margin: var(--standard-margin);
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  header {
    justify-content: center;
    gap: 1em;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 2.3rem;
  }

  header nav {
    font-size: .5rem;
  }

  .post {
    flex-direction: column;
    max-height: 18em;
  }

  .post img {
    aspect-ratio: 16/9;
    width: 100%;
    height: 8em;
  }

  aside {
    margin-top: 2em;
  }
}
