/* ABOUT PAGE */
section {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-areas: "about" "headshot";
  justify-items: center;
}

section > div:first-child {
  grid-area: headshot;
}

section > div:nth-child(2) {
  grid-area: about;
}

/* selfie img */
main img {
  border: 2px solid var(--secondary);
  border-radius: 50%;
  width: 20rem;
  height: 20rem;
  background: linear-gradient(to bottom, #8dfdc1, #5cfca7 60%, #58aba8 80%);
  animation: img-scale 0.3s ease;
}

@keyframes img-scale {
  0% {
    transform: scale(0.25);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  main img {
    animation: none;
  }
}

section + section {
  display: block;
}

h2 + div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 1rem 0;
}

h2 + div > div {
  margin-left: 1rem;
}

h2 + div p strong {
  border-bottom: 2px solid var(--alert);
}

@media (min-width: 769px) {
  section {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas: "about headshot";
  }

  section > div:first-child {
    grid-area: about;
  }

  section > div:nth-child(2) {
    grid-area: headshot;
    justify-self: end;
  }

  h2 + div > div {
    margin-left: inherit;
  }
}

.image-container {
  position: relative;
  width: 320px;
  height: 320px;
}

.skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 50%;
  opacity: 1;
  transition: opacity 0.3s ease;
  transform: scale(0.25);
}

.skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading.loaded {
  opacity: 1;
}
