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

:root {
  --heading-color: hsl(217, 19%, 35%);
  --defaut_font-color: hsl(214, 17%, 51%);
  --light_font-color: hsl(212, 23%, 69%);
  --bg_color: hsl(210, 46%, 95%);

  --font-family: "Manrope", sans-serif;
}

body {
  background-color: var(--bg_color);
  font-family: var(--font-family);
  color: var(--defaut_font-color);
  font-size: 13px;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2em;
}

.social-link {
  /* height: 100%; */
  text-decoration: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

main {
  background-color: #fff;
  width: 100%;
  max-width: 700px;
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  gap: 3em;
}

.image__section {
  width: 100%;
  overflow: hidden;
  height: 230px;
  .image {
    max-width: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 10px 10px 0 0;
  }
}

.text__section {
  padding: 0 2em;
  display: flex;
  flex-direction: column;
  gap: 1em;

  .text__section--heading {
    color: var(--heading-color);
    font-size: 1.4em;
    line-height: 1.5em;
  }
  .text__section--paragraph {
    font-size: 1.1em;
    line-height: 1.5em;
  }
}

.author__section {
  position: relative;
  padding: 1.5em 0;
  display: flex;
  align-items: center;
  gap: 1em;

  .author__section--image {
    width: 3em;
    height: 3em;
    border-radius: 50%;
  }

  .author__section--info {
    display: flex;
    flex-direction: column;
    gap: 0.2em;

    .author__section--name {
      color: var(--heading-color);
    }
    .author__section--date {
      color: var(--light_font-color);
    }
  }
  .author__section--share-icon {
    background-color: var(--bg_color);
    width: 2.5em;
    height: 2.5em;
    margin-left: auto;
    display: grid;
    place-content: center;
    border-radius: 50%;
    z-index: 1;
    font-size: 1.1em;
    cursor: pointer;
  }
  .active {
    background-color: var(--defaut_font-color);
    color: #fff;
  }
}

.author__section--share-box {
  display: none;
  position: absolute;
  top: 0;
  left: -2em;
  width: calc(100% + 4em);
  height: 100%;
  padding: 1.5em 2em;
  gap: 1em;
  align-items: center;
  background-color: var(--heading-color);
  border-radius: 0 0 10px 10px;

  .share-box__text {
    text-transform: uppercase;
    color: var(--light_font-color);
    font-size: 1.1em;
    letter-spacing: 0.3em;
    margin-right: 0.5em;
  }
}

@media screen and (min-width: 800px) {
  main {
    height: 300px;
    flex-direction: row;
    gap: 0;
  }

  .image__section {
    height: 100%;
    width: 40%;

    .image {
      height: 100%;
      object-position: top left;
      border-radius: 10px 0 0 10px;
    }
  }

  .text__section {
    width: 60%;
    padding: 2em 2em;
    display: flex;
    flex-direction: column;
  }

  .author__section {
    padding-bottom: 0;
  }

  .author__section--share-box {
    position: absolute;
    top: -50px;
    left: 230px;
    width: fit-content;
    height: 90%;
    padding: 0 3em;
    gap: 1em;
    align-items: center;
    background-color: var(--heading-color);
    border-radius: 10px;
  }
  .author__section--share-box::after {
    content: "";
    position: absolute;
    display: block;
    width: 30px;
    height: 30px;
    top: 27px;
    left: 105px;
    transform: rotate(45deg);
    background-color: var(--heading-color);
  }
}

.attribution {
  margin-top: 1em;
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
