:root {
  --VeryDarkGrayishBlue: hsl(217, 19%, 35%);
  --DesaturatedDarkBlue: hsl(214, 17%, 51%);
  --GrayishBlue: hsl(212, 23%, 69%);
  --LightGrayishBlue: hsl(210, 46%, 95%);
}

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

* {
  margin: 0;
  padding: 0;
  font: inherit;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  padding: 5rem 1.5rem;
  background-color: var(--LightGrayishBlue);
  color: var(--DesaturatedDarkBlue);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-radius: 10px;
  background-color: white;
  overflow: hidden;
  box-shadow: 5px 10px 20px 10px rgba(0, 0, 0, 0.05);
}

.card-image {
  max-height: 13rem;
  object-fit: cover;
  object-position: 0 20%;
}

.contents {
  display: flex;
  flex-direction: column;
  padding: 0 2rem;
  gap: 1rem;
  /* flex: 1; */
}

.title {
  color: var(--VeryDarkGrayishBlue);
  line-height: 1.5;
  font-weight: 700;
}

p {
  font-size: 0.83rem;
  line-height: 1.5;
}

.author {
  display: flex;
  width: 100%;
  max-height: 5rem;
  align-items: center;
  position: relative;
  padding-block: 1rem;
  gap: 1rem;
}

.author-img {
  border-radius: 50%;
  width: 2.7rem;
  height: 2.7rem;
}

.author-name {
  font-size: 0.83rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.publish-date {
  color: var(--GrayishBlue);
}

.share-button {
  margin-left: auto;
  padding: 0.6rem;
  border-radius: 50%;
  background-color: var(--LightGrayishBlue);
  color: var(--DesaturatedDarkBlue);
  border: none;
  cursor: pointer;
}

.share-container {
  display: none;
  position: absolute;
  bottom: 0;
  left: -2rem;
  right: -2rem;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  color: var(--GrayishBlue);
  background-color: var(--VeryDarkGrayishBlue);
  padding: 1rem 2rem;
  margin-top: 1rem;
  gap: 1rem;
}

.share-icons {
  display: flex;
  gap: 1rem;
  cursor: pointer;
}

.share-container .share-button {
  background-color: var(--DesaturatedDarkBlue);
  color: white;
}

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .card {
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    max-width: 45rem;
    gap: 0;
    display: grid;
    grid-template-columns: 16.5rem 1fr;
    overflow: visible;
  }

  .card-image {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 10px 0 0 10px;
  }

  .contents {
    padding: 2rem;
  }

  .title {
    word-spacing: 0.1rem;
  }

  .author {
    padding-block: 0;
    padding-top: 1rem;
  }

  .clicked {
    background-color: var(--DesaturatedDarkBlue);
    color: white;
  }

  .share-container {
    top: -3rem;
    left: 16.4rem;
    right: 0;
    border-radius: 10px;
    padding: 0;
    width: 14rem;
    height: 3rem;
    margin: 0;
  }

  .share-container::after {
    content: "";
    border: 12px solid transparent;
    border-top-color: var(--VeryDarkGrayishBlue);
    border-bottom: 0;
    bottom: -0.7rem;
    position: absolute;
  }

  .share-container .share-button {
    display: none;
  }
}
