/* variables declared here - these are the colors for the component, as well as the font stacks and sizes. */
:root {
  --black: #000;
  --white: #fff;
  --gray-950: #111;
  --gray-500: #6b6b6b;
  --yellow: #f4d04e;

  --figtree: "Figtree", serif;
  --font-weight-medium: 500;
  --font-weight-extra-bold: 900;
  --font-size-large: 1.5rem;
  --font-size-medium: 1.25rem;
  --font-size-regular: 1rem;
  --font-size-small: 0.875rem;
  --font-size-xsmall: 0.75rem;
  --font-size-xxsmall: 0.625rem;
}

/* resets */

html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

img {
  max-width: 100%;
  height: auto;
}

/* Styling */

body {
  height: 100vh;
  padding: 0;
  margin: 0;
  font-family: var(--figtree);
  line-height: 1.5;
  letter-spacing: 0px;
  background-color: var(--yellow);
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-card {
  width: 20.438rem;
  background-color: var(--white);
  padding: 1em;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid var(--black);
  box-shadow: 8px 8px 0px 0px var(--black);
}

.blog-post-image {
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.blog-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.938rem;
}

.blog-category {
  color: var(--gray-950);
  font-weight: var(--font-weight-extra-bold);
  font-size: var(--font-size-xsmall);
  align-self: flex-start;
  padding: 0.5rem 1.25rem;
  background-color: var(--yellow);
  text-align: center;
}

.blog-publication-date {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-xsmall);
}

.blog-post-title-link {
  font-weight: var(--font-weight-extra-bold);
  font-size: var(--font-size-medium);
  color: var(--gray-950);
  text-decoration: none;
}

.blog-post-title-link:hover,
.blog-post-title-link:focus {
  color: var(--yellow);
}

.blog-post-summary {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-small);
  color: var(--gray-500);
}

.blog-info-wrapper,
.blog-post-author-wrapper {
  margin-bottom: 1.5rem;
}

.blog-info-wrapper,
.blog-post-author-wrapper,
.attribution {
  width: 17.438rem;
}

.blog-post-author-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-post-author-image {
  height: 32px;
  width: 32px;
}

.blog-post-author {
  font-weight: var(--font-weight-extra-bold);
  font-size: var(--font-size-small);
  color: var(--gray-950);
}

.attribution {
  font-size: var(--font-size-xxsmall);
}
.attribution a {
  color: var(--gray-500);
}

.attribution a:hover,
.attribution a:focus {
  color: var(--yellow);
  text-decoration: none;
}

/* Media queries - mobile first design */

@media (min-width: 768px) {
  .preview-card {
    width: 24rem;
  }
  .blog-info-wrapper,
  .blog-post-author-wrapper,
  .attribution {
    width: 21rem;
  }
  .blog-category,
  .blog-publication-date {
    font-size: var(--font-size-small);
  }
  .blog-post-title {
    font-size: var(--font-size-large);
  }
  .blog-post-summary {
    font-size: var(--font-size-regular);
  }
  .attribution {
    font-size: var(--font-size-xsmall);
  }
}
