@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap");

:root {
  --yellow: hsl(47, 88%, 63%);
  --white: hsl(0, 0%, 100%);
  --gray-500: hsl(0, 0%, 42%);
  --gray-950: hsl(0, 0%, 7%);
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family: "Figtree", sans-serif;
  background-color: var(--yellow);
  color: var(--gray-950);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.card {
  display: flex;
  width: 384px;
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  flex-shrink: 0;
  border-radius: 20px;
  border: 1px solid var(--color-gray-950);
  background: var(--white);
  box-shadow: 8px 8px 0 0 #000;
}

.post-image {
  display: flex;
  align-items: center;
  align-self: stretch;
  border-radius: 10px;
}

.post-content {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
}

.tag {
  display: flex;
  font-weight: 800;
  padding: 4px 12px;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--gray-950);
  font-size: clamp(10px, 1.5vw, 12px);
}

.published-date {
  font-size: clamp(12px, 1.5vw, 14px);
  color: var(--gray-500);
}

.post-title {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 800;
  line-height: 1.2;
}

.post-title:hover {
  color: var(--yellow);
  cursor: pointer;
}

.post-description {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--gray-500);
  line-height: 150%;
  text-align: justify;
}

.author {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.author-name {
  font-size: 14px;
  font-weight: 500;
}

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 10px;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (max-width: 400px) {
  body {
    padding: 16px;
  }

  .card {
    width: 100%;
    padding: 16px;
    gap: 16px;
  }

  .post-content {
    gap: 16px;
  }
}
