*,
*::before,
*::after {
  box-sizing: border-box; /* padding and border count inside every element's width */
}

body {
  font-family: "Figtree", sans-serif; /* the font from the style guide, with a fallback */
  font-size: 16px; /* the paragraph size the style guide gives */
  background-color: hsl(47, 88%, 63%); /* the page background color from the style guide */
  min-height: 100vh; /* makes the body at least as tall as the screen */
  display: flex; /* turns the body into a flex container */
  flex-direction: column; /* stacks main and footer top to bottom */
}

main {
  flex: 1; /* main grows to fill the leftover height, pushing the footer to the bottom */
  display: grid; /* makes main a grid container */
  place-items: center; /* centers the card both horizontally and vertically */
}

.card {
  max-width: 24rem; /* caps the card at 384px so the text wraps instead of stretching it */
  background-color: hsl(0, 0%, 100%); /* the White from the style guide, so the card is visible */
  padding: 1.5rem; /* space between the card's edge and its content (24px) */
  border-radius: 1.5rem; /* rounds the corners of the card (24px) */
  box-shadow: 0.7rem 0.7rem 0em hsl(0, 0%, 7%); /* adds a bold shadow */
  max-width: 24rem; /* whole card caps at 384px */
  padding: 2rem; /* 32px inside edges, so the text column is about 320px */
}

.card__tag {
  background-color: hsl(47, 88%, 63%); /* the Yellow from the style guide */
  display: inline-block; /* shrinks the box to hug the word, but still lets padding and margins work */
  border-radius: 0.3rem; /* rounds the corners of the tag (~5px) */
  padding: 0.5rem .9rem; /* adds space inside the tag (8px top/bottom, 14px left/right) */
  font-weight: 800; /* makes the tag text bold */
}

.card__date {
  color: hsl(0, 0%, 42%); /* the Gray from the style guide */
  font-size: 0.875rem; /* makes the date text smaller (14px) */
  margin: 0.5rem 0 1.5rem; /* adds space above and below the date (8px top, 24px bottom) */
}

.card__title {
  font-size: 1.35rem; /* title size: font-size passes down to the link inside */
  font-weight: 800; /* weight passes down too */
  margin: 0; /* removes the h1's default margin so you control the spacing */
}

.card__link {
  color: hsl(0, 0%, 7%); /* links ignore the h1's color, so the link sets its own */
  text-decoration: none; /* removes the browser's underline */
}

.card__link:hover {
  color: hsl(47, 88%, 63%); /* changes the link color on hover to the Yellow from the style guide */
}

.card__link:focus-visible {
  outline: 0.2rem solid hsl(0, 0%, 7%); /* adds a thick outline on focus for accessibility */
  outline-offset: 0.2rem; /* moves the outline away from the link text */
}

.card__description {
  color: hsl(0, 0%, 42%); /* the Gray from the style guide */
  line-height: 1.5; /* makes the text easier to read by adding space between lines */
  margin: 1.5rem 0; /* adds space above and below */
  font-size: 1rem; /* sets the description text size to 16px */
}

.card__image {
  width: 100%; /* image stretches to fill the card's inner width */
  display: block; /* images are inline by default, which leaves a small gap under them */
  height: auto; /* keeps the image's proportions as the width changes */
  border-radius: 0.25rem; /* round the corners; compare with the design's corner size */
  margin-bottom: 1rem; /* space between the image and the tag below it */
}

.card__author {
  display: flex; /* puts the avatar and name side by side */
  align-items: center; /* lines them up on the vertical middle */
  gap: 0.75rem; /* space between avatar and name */
}

.card__avatar {
  width: 2.5rem; /* avatar size; the design's looks around 2.5rem */
  height: 2.5rem; /* same value as width so it's a square */
  border-radius: 50%; /* turns the square into a circle */
}

.card__author-name {
  font-weight: 800; /* the name is bold in the design (800 is what you have loaded) */
  font-size: 1.125rem; /* matches the design's text size */
}

.attribution {
  font-size: 0.6875rem; /* tiny 11px text for the credit line */
  text-align: center; /* centers the line at the bottom of the page */
  padding: 1rem; /* breathing room so it doesn't touch the card or the screen edge */
}

.attribution a {
  color: hsl(228, 45%, 44%); /* the starter's link blue, instead of the browser default */
}

@font-face {
  font-family: "Figtree"; /* the name your font-family rule asks for */
  src: url("./assets/fonts/static/Figtree-Medium.ttf") format("truetype"); /* the 500 weight file */
  font-weight: 500; /* tells the browser this file is the 500 weight */
}

@font-face {
  font-family: "Figtree"; /* same family name, so the browser groups the weights together */
  src: url("./assets/fonts/static/Figtree-ExtraBold.ttf") format("truetype"); /* the 800 weight file */
  font-weight: 800; /* tells the browser this file is the 800 weight */
}