/* manrope-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  src: url("./fonts/manrope-v20-latin-500.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/manrope-v20-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

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

:root {
  --grey-900: hsl(217, 19%, 35%);
  --grey-500: hsl(214, 17%, 51%);
  --grey-400: hsl(212, 23%, 69%);
  --grey-200: hsl(210, 46%, 95%);

  --white: #ffffff;
}

body {
  font-family: "Manrope", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4em;
  letter-spacing: 0.016px;
  color: var(--grey-500);
  background-color: var(--grey-200);
}

h2,
.name {
  color: var(--grey-900);
  font-weight: 700;
}

.text-preset-1 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3em;
  letter-spacing: 0.25px;
}

.date {
  color: var(--grey-400);
}

.share {
  height: 2rem;
  width: 2rem;
  border-radius: 100vw;
  border: none;
  background-color: var(--grey-200);
  cursor: pointer;
}

img {
  max-width: 100%;
}

body,
main {
  min-height: 100vh;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4rem 0;
}

.article-preview {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 1.4286rem + 1.1905vw, 2.5rem);

  margin: 0 auto;
  max-width: 45.625rem;
  width: 87%;

  border-radius: 0.625rem;
  overflow: hidden;

  background-color: var(--white);

  .content {
    display: flex;
    flex-direction: column;
    gap: 3rem;

    .text h2 {
      margin-bottom: 1.5rem;
    }
  }

  .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.125rem;
  }

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

  .author-image {
    border-radius: 100vw;
    overflow: hidden;

    height: 2.5rem;
    width: 2.5rem;
  }
}

@media (min-width: 48rem) {
  .article-preview {
    flex-direction: row;

    .image {
      max-width: clamp(14.3125rem, 10.3125rem + 8.3333vw, 17.8125rem);

      img {
        height: 100%;
        object-fit: cover;
        object-position: left;
      }
    }

    .content {
      width: 100%;
      padding: clamp(1.875rem, 3.3482rem + -1.6369vw, 2.5625rem)
        clamp(2rem, 1.4286rem + 1.1905vw, 2.5rem);

      padding-left: 0;
    }

    .row {
      margin-bottom: 0;
    }
  }
}
