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

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.2;
  }

  40% {
    opacity: 0.4;
  }

  60% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    opacity: 1;
  }
}

:root {
  font-size: 13px;
  --vdk-gray-blue: hsl(217, 19%, 35%);
  --desat-drk-blue: hsl(214, 17%, 51%);
  --gray-blue: hsl(212, 23%, 69%);
  --lt-gray-blue: hsl(210, 46%, 95%);
}

body {
  background-color: var(--lt-gray-blue);
  font-family: 'Manrope', sans-serif;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.article__preview {
  background-color: #FFF;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.2);
  max-width: 350px;
  margin: 0 auto;
}

.article__preview-image {
  border-radius: 0.5rem 0.5rem 0 0;
  height: 225px;
  width: 100%;
  object-fit: cover;
  object-position: center 25%;
  max-width: 100%;
}

.article__preview-header, .article__preview-content, .article__preview-footer {
  padding: 0 2rem;
}

.article__preview-title {
  color: var(--vdk-gray-blue);
  font-size: 1.25rem;
  margin: 2rem 0 1rem;
}

.article__preview-content {
  color: var(--desat-drk-blue);
  line-height: 1.7;
  margin: 1rem 0 0;
}

.article__preview-footer {
  display: grid;
  grid-template: repeat(3, auto) / repeat(6, 1fr);
  padding: 2.5rem 2rem 1.5rem;
  position: relative;
}

.article__author-image {
  border-radius: 50%;
  grid-row: 1/3;
  grid-column: 1/2;
  max-width: 100%;
}

.article__author-name {
  align-self: end;
  color: var(--vdk-gray-blue);
  font-size: 1rem;
  grid-row: 1/2;
  grid-column: 2/6;
  padding-left: 1rem;
}

.article__author-date {
  color: var(--gray-blue);
  align-self: start;
  grid-row: 2/3;
  grid-column: 2/5;
  padding-left: 1rem;
}

.article__share-btn {
  align-self: center;
  justify-self: end;
  background-color: var(--lt-gray-blue);
  border-radius: 50%;
  border: none;
  grid-row: 1/3;
  grid-column: 6/7;
  height: 65%;
  width: 65%;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 100;
}

.article__share-btn:hover {
  background-color: var(--desat-drk-blue);
  color: #FFF;
}

.article__share-btn:hover .article__share-btn-svg path {
  fill: #FFF;
}

.article__share-icons {
  align-items: stretch;
  animation-duration: 0.3s;
  animation-name: fadeIn;
  background-color:var(--vdk-gray-blue);
  bottom: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  display: none;
  grid-template: repeat(2, auto) / repeat(6, 1fr);
  justify-items: center;
  position: absolute;
  padding: 2.5rem 2rem;
  width: 100%;
  transition: background-color 0.3s;
}

.article__share-icons.active {
  display: grid;
}

.article__share-btn.active .article__share-btn-svg path {
  fill: #FFF;
}

.article__share-btn.active {
  background-color: var(--desat-drk-blue);
}

.article__share-icons .social-links {
  display: flex;
  align-items: center;
}

.article__share-content {
  color: var(--gray-blue);
  letter-spacing: 0.5em;
  grid-row: 1/3;
  grid-column: 1/2;
}


@media only screen and (min-width: 769px) {
  .article__preview {
    border-radius: 0.5rem;
    display: grid;
    grid-template: auto auto auto auto / auto auto auto auto auto auto auto;
    max-width: 750px;
  }

  .article__preview-image {
    border-radius: 0.5rem 0 0 0.5rem;
    grid-row: 1/5;
    grid-column: 1/5;
    height: 100%;
    width: 100%;
    object-position: left center;
  }

  
  .article__preview-header {
    grid-row: 1/2;
    grid-column: 5/8;
    padding: 3rem 3rem 0 3rem;
  }
  
  .article__preview-title {
    font-size: 1.5rem;
    margin: 0;
  }

  .article__preview-content {
    grid-row: 2/3;
    grid-column: 5/8;
    margin-top: 1.5rem;
    padding: 0 3rem;
  }

  .article__preview-footer {
    grid-row: 3/5;
    grid-column: 5/8;
    padding: 1.5rem 3rem 3rem;
  }

  .article__share-icons {
    border-radius: 0.5rem;
    padding: 1rem;
    width: 250px;
    height: 50px;
    right: -65px;
    top: -55px;
  }
  
  .article__share-icons.active {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
  }

  .article__share-icons.active::after {
    position: absolute;
    content: '';
    height: 0;
    width: 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    border-width: 1rem 1rem 0 1rem;
    border-color: var(--vdk-gray-blue) transparent;
    border-style: solid;
  }
}