@font-face {
  font-family: "Figtree";
  src: url(./assets/fonts/Figtree-VariableFont_wght.ttf);
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url(./assets/fonts/Figtree-Italic-VariableFont_wght.ttf);
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --color-white: hsl(0, 0%, 100%);
  --color-bg: hsl(47, 88%, 63%);
  --color-gray-500: hsl(0, 0%, 42%);
  --color-gray-950: hsl(0, 0%, 7%);
  --font-size-body: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

body {
  font-family: "Figtree", sans-serif;
  font-size: var(--font-size-body);
  background-color: var(--color-bg);
}

.page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  max-width: 384px;
  border-radius: 20px;
  border: 1px solid var(--color-gray-950);
  box-shadow: 8px 8px 0 0 #000;
  overflow: hidden;
  background-color: var(--color-white);
  padding: 24px;
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.card__body {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-gray-950);
  font-size: clamp(12px, 4vw, 14px);
  font-weight: 800;
  line-height: 150%;
  align-self: flex-start;
}

.card__time-published {
  color: var(--color-gray-950);
  font-size: clamp(12px, 4vw, 14px);
  font-weight: 500;
  line-height: 150%;
}

.card__sub-title a {
  text-decoration: none;
  color: var(--color-gray-950);
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 800;
  line-height: 150%;
  transition: color 0.2s ease;
}
.card__sub-title a:hover {
  color: var(--color-bg);
}
.card__sub-title a:focus-visible {
  outline: 2px solid var(--color-bg);
  outline-offset: 2px;
}

.card__description {
  color: var(--color-gray-500);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 500;
  line-height: 150%;
}

.card__author {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card__author-pic {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.card__author-name {
  color: var(--color-gray-950);
  font-size: 14px;
  font-weight: 800;
  line-height: 150%;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

.attribution a:hover {
  color: var(--color-gray-950);
}

.attribution a:focus-visible {
  outline: 2px solid var(--color-gray-950);
  outline-offset: 2px;
}
