/* https://piccalil.li/blog/a-modern-css-reset */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --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%);
  --manrope: "Manrope", sans-serif;
}

body {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  background-color: var(--light-grayish-blue);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: 20.4375rem;
  background-color: #fff;
  border-radius: 10px;
}

.image-container {
  height: 200px;
  overflow: hidden;
}

.image-container img {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  object-position: 0px -15px;
}

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 0px 30px 18px 30px;
}

.text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.text h2 {
  font: 700 1.25rem var(--manrope);
  color: var(--very-dark-grayish-blue);
  line-height: 1.3;
  letter-spacing: 0.25px;
}

.text p {
  font: 500 0.8125rem var(--manrope);
  color: var(--desaturated-dark-blue);
  line-height: 1.4;
  letter-spacing: 0.12px;
}

.profile {
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.profile-details img {
  max-height: 40px;
  border-radius: 50%;
}

.profile-details-info .name {
  font: 700 0.8125rem var(--manrope);
  color: var(--very-dark-grayish-blue);
  line-height: 1.4;
  letter-spacing: 0.12px;
}

.profile-details-info .date {
  font: 500 0.8125rem var(--manrope);
  color: var(--desaturated-dark-blue);
  line-height: 1.4;
  letter-spacing: 0.12px;
}

.share-button {
  height: 32px;
  width: 32px;
  background-color: var(--light-grayish-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
}

.share-button-active {
  background-color: var(--desaturated-dark-blue);
}

.share-button-img-active {
  filter: brightness(10);
}

.social-links {
  position: absolute;
  background-color: var(--very-dark-grayish-blue);
  height: 76px;
  width: 100%;
  bottom: 0px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  display: flex;
  align-items: center;
  padding-inline: 30px;
  z-index: -1;
}

.active {
  z-index: 10;
}

.social-links-details {
  display: flex;
  align-items: center;
  gap: 24px;
}

.social-links-details span {
  font: 500 0.8125rem var(--manrope);
  color: var(--grayish-blue);
  line-height: 1.4;
  letter-spacing: 2.5px;
}

.links {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (min-width: 48rem) {
  body {
    padding: 227px 80px;
  }

  .card {
    flex-direction: row;
    max-width: 38rem;
    max-height: 21.625rem;
  }

  .image-container {
    width: 229px;
    height: 346px;
  }

  .image-container img {
    border-top-right-radius: 0px;
    border-bottom-left-radius: 10px;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .content {
    width: 19.4375rem;
    height: 16.5rem;
    gap: 24px;
    margin: 41px 36px 41px 0px;
    padding: 0;
  }

  .social-links {
    height: 55px;
    width: 248px;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    justify-content: center;
    padding-inline: 0;
  }

  .active {
    bottom: 65px;
    right: -105px;
  }

  .arrow {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--very-dark-grayish-blue);
    position: absolute;
    bottom: -12px;
    right: 110px;
  }
}

@media (min-width: 90rem) {
  body {
    padding: 260px 355px;
  }

  .card {
    max-width: 45.625rem;
    max-height: 17.5rem;
    gap: 40px;
  }

  .image-container {
    width: 285px;
    height: 280px;
  }

  .content {
    width: 22.8125rem;
    height: 13.75rem;
    margin: 30px 40px 30px 0;
  }
}
