:root {
  /* Colors */
  --clr-backround: #f4d04e;
  --clr-card-background: #ffffff;
  --clr-card-foreground: #111111;
  --clr-muted-foreground: #7f7f7f;

  /* Font sizes */
  --fs-xl: calc((24 / 16) * 1rem);
  --fs-m: calc((16 / 16) * 1rem);
  --fs-s: calc((14 / 16) * 1rem);

  @media screen and (max-width: 375px) {
    /* Font sizes */
    --fs-xl: calc((20 / 16) * 1rem);
    --fs-m: calc((14 / 16) * 1rem);
    --fs-s: calc((12 / 16) * 1rem);
  }
}

/* Load custom font styles */
@font-face {
  font-family: 'Figtree';
  src: url('../assets/fonts/Figtree-VariableFont_wght.ttf'),
    url('../assets/fonts/Figtree-Italic-VariableFont_wght.ttf');
}

/* Utility classes - The utility classes will be used many times. 
It purpose is to slim down the amount of boilerplate we need to write. */
.font-body {
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
    sans-serif;
  color: var(--clr-card-foreground);
}

/* Main classes */
.main {
  background: var(--clr-backround);
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.card {
  --shadow-pos: 8px;
  --card-title-color: var(--clr-card-foreground);

  background: var(--clr-card-background);
  padding: 24px;
  border-radius: 24px;
  max-width: 384px;

  display: flex;
  flex-direction: column;
  gap: 1em;

  outline: solid 1px var(--clr-card-foreground);
  box-shadow: var(--shadow-pos) var(--shadow-pos) var(--clr-card-foreground);
  transition: box-shadow 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);

  margin: 2em;
}

.card:hover {
  --shadow-pos: 16px;
  --card-title-color: var(--clr-backround);
}

.card-image {
  position: relative;
  padding-top: calc((200 / 336) * 100%);
}

.card-image > img {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  top: 0;
  border-radius: 10px;
}

.card-content {
  display: flex;
  flex-direction: column-reverse;
  gap: 1em;
}

.card-label {
  background: var(--clr-backround);
  color: var(--clr-card-foreground);
  font-weight: 800;
  width: max-content;
  padding: 0.4em 0.8em;
  min-height: 29px;
  border-radius: 4px;
  margin-bottom: 1.3em;
}

.card-content__publish p:last-child {
  font-size: var(--fs-s);
}

.card-content__description h4 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--card-title-color);
  margin-bottom: 1.1em;
  transition: color 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.card-content__description p {
  font-size: var(--fs-m);
  color: var(--clr-muted-foreground);
  line-height: 1.1em;
  font-weight: 500;
}

.card-author-credential {
  display: flex;
  gap: 0.8em;
  align-items: center;
  margin-top: 1.1em;
}

.card-author-credential img {
  --dim: 32px;
  width: var(--dim);
  height: var(--dim);
  border-radius: 100%;
}

.card-author-credential p {
  font-weight: 800;
  font-size: var(--fs-s);
}
