@import url("./fonts.css");

:root {
  --yellow: hsl(47, 88%, 63%);
  --white: hsl(0, 0%, 100%);
  --gray-500: hsl(0, 0%, 42%);
  --gray-950: hsl(0, 0%, 7%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Figtree";
}

body {
  font-family: "Figtree", sans-serif;
  background-color: var(--yellow);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.2rem;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--gray-950);
  border-radius: 16px;
  box-shadow: 8px 8px 0 var(--gray-950);
  max-width: 394px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: box-shadow 0.3s ease;
}
.card:hover {
  box-shadow: 16px 16px 0 var(--gray-950);
}

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

.category {
  background-color: var(--yellow);
  color: var(--gray-950);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.date {
  color: var(--gray-950);
  font-size: 14px;
  font-weight: 500;
  margin-top: -12px;
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-950);
  line-height: 1.5;
  margin-top: -8px;
  transition: color 0.3s ease;
  cursor: pointer;
}

.card-title:hover,
.card-title:focus {
  color: var(--yellow);
  outline: none;
}

.card-description {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.5;
  font-weight: 500;
  margin-top: -8px;
}

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

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-950);
}

/* Responsive Design */
@media (max-width: 375px) {
  body {
    padding: 1rem;
  }

  .card {
    max-width: 100%;
    padding: 20px;
  }

  .card-title {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 2rem;
  }

  .card {
    max-width: 384px;
  }
}

@media (min-width: 1440px) {
  .card {
    max-width: 384px;
  }
}
