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

:root {
  /* Colors */
  --very-dark-grayish-blue: hsl(217, 19%, 35%);
  --desaturated-dark-blue: hsl(214, 17%, 51%);
  --grayish-blue: hsl(212, 23%, 69%);
  --light-grayish-blue: hsl(210, 46%, 95%);
  --white: hsl(0, 0%, 100%);

  /* Typography */
  --font-family: "Manrope", sans-serif;
  --fs-13: 13px;
}

html,
body {
  line-height: 1.6;
  scroll-behavior: smooth;
  background: var(--light-grayish-blue);
  font-family: var(--font-family);
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}
button {
  border: none;
  outline: none;
  cursor: pointer;
}
img {
  display: block;
}
main {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--light-grayish-blue);
  padding: 20px;
}
article {
  display: grid;
  grid-template-columns: 285px minmax(300px, 445px);
  max-width: 730px;
  border-radius: 10px;
  box-shadow: 6px 6px 5px hsla(0, 0%, 0%, 0.02),
    25px 25px 20px hsla(0, 0%, 0%, 0.03), 100px 100px 80px hsla(0, 0%, 0%, 0.05);
}
.image-container {
  overflow: hidden;
  border-radius: 10px 0 0 10px;
}
.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
}
.content {
  background: var(--white);
  padding: 32px 40px;
  border-radius: 0 10px 10px 0;
}
.title {
  font-size: 20px;
  color: var(--very-dark-grayish-blue);
  margin-bottom: 12px;
  line-height: 1.4;
}

.text {
  margin-top: 18px;
  color: var(--desaturated-dark-blue);
  font-size: var(--fs-13);
  line-height: 1.5;
}
.footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.author {
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 15px;
}

.author-name {
  color: var(--very-dark-grayish-blue);
  font-size: var(--fs-13);
}

.publish-date {
  color: var(--grayish-blue);
  font-size: var(--fs-13);
}
.share {
  position: relative;
}

.share-button {
  background: var(--light-grayish-blue);
  padding: 6px;
  border-radius: 20px;
  font-size: 20px;
  color: var(--desaturated-dark-blue);
  transition: all 0.25s ease;
}

.share-button:hover,
.share-button.active {
  background: var(--desaturated-dark-blue);
  color: var(--light-grayish-blue);
}
.share-option {
  --scale: 0;
  --translateX: -50%;
  --translateY: 0;

  background: var(--very-dark-grayish-blue);
  position: absolute;
  bottom: calc(100% + 28px);
  left: 50%;
  transform: translate(var(--translateX), var(--translateY)) scale(var(--scale));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px -5px #0003;
  transform-origin: bottom;
  visibility: hidden;
  transition: all 0.25s ease;
}
.share-option.active {
  --scale: 1;
  visibility: visible;
}

.share-option::after {
  content: "";
  background: var(--very-dark-grayish-blue);
  width: 20px;
  height: 20px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
}

.share-option span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--grayish-blue);
  margin-right: 5px;
}

.share-option img {
  font-size: 22px;
}

.share-option img:hover {
  filter: invert(1);
}
@media screen and (max-width: 768px) {
  :root {
    --fs-13: 12px;
  }

  article {
    grid-template-columns: 1fr;
    max-width: 294px;
    overflow: hidden;
  }

  .image-container,
  .content {
    border-radius: 0;
  }

  .image-container {
    height: 180px;
  }

  .content {
    padding: 30px 28px 20px;
  }

  .title {
    font-size: 15px;
  }

  .text {
    margin-bottom: 30px;
  }

  .footer {
    position: relative;
  }

  .avatar {
    width: 35px;
    height: 35px;
  }

  .share {
    position: static;
    z-index: 1;
  }

  .share-button {
    font-size: 16px;
  }

  .share-option {
    --scale: 1;
    --translateX: 0;
    --translateY: 100%;

    inset: -20px -28px;
    border-radius: 0;
    padding: 17px 30px;
    z-index: -1;
  }

  .share-option.active {
    --translateY: 0;
  }
}
