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

/* Root variables */
:root {
  --font-family: 'Figtree', sans-serif;
  --primary-bg: hsl(47, 88%, 63%);
  --card-bg: hsl(0, 0%, 100%);
  --text-color: hsl(0, 0%, 7%);
  --border-color: hsl(0, 0%, 7%);
  --border-radius: 1.5rem;
  --margin-block-end: 1rem;
}

/* Body styles */
body,main {
  height: 100vh;
  padding: .5rem;
  background: var(--primary-bg);
  font-family: var(--font-family);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card styles */
.card {
    background: var(--card-bg);
    max-width: 20.5rem;
    padding: 1.5rem;
    border: .1rem solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 8px 8px 0 0 var(--border-color);
}

.card-image {
    width: 100%;
    height: 12.5rem;
    margin: 0;
    object-fit: cover;
    border-radius: 0.6rem;
    margin-block-end: 1.2rem;
}

.tag {
    display: block;
    background: var(--primary-bg);
    max-width: 5.2rem;
    padding: .4rem;
    border-radius: .3rem;
    margin-block-end: var(--margin-block-end);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
}

time {
    display: block;
    color: var(--text-color);
    font-size: .85rem;
    font-weight: 500;
    margin-block-end: var(--margin-block-end);
}

a {
    display: block;
    font-size: 1.25rem;
    margin-block-end: var(--margin-block-end);
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-bg);
}

a:focus {
    color: var(--primary-bg);
    text-decoration: underline;
}

p {
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.5;
    margin-block-end: 1.5rem;
    color: hsl(0, 0%, 42%)
}

.author-info {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-block-end: 0;
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.author {
    font-size: .9rem;
    font-weight: 800;
    color: var(--text-color);
}


/* Utility classes */
.hidden {
  display: none;
}


/* Media Queries */
@media (min-width: 600px) {
  .card {
    max-width: 24.6rem;
    padding: 1.5rem;
  }

  .card-image-wrapper {
    width: 100%;
    overflow: hidden;
  }

  .card-image {
    object-fit: cover;
    border-radius: .6rem;
  }

  a {
    font-size: 1.56rem;
  }

  p {
    font-size: 1.05rem;
  } 
}