main {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  column-gap: 5vw;
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "headline headline" "avatar subheadline" "avatar intro" "avatar content";
}

h1 {
  grid-area: headline;
}

h2 {
  grid-area: subheadline;
}

.intro {
  grid-area: intro;
  margin-bottom: 1em;
}

.content {
  grid-area: content;
}

.avatar {
  aspect-ratio: 1800/1868;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 35vw;
  display: grid;
  z-index: 1;
  margin-top: 1.5rem;
  /* Image placeholders */
}
.avatar::before, .avatar::after {
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-image: url("/assets/images/melania-chiru-hi.png");
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 0;
  width: 100%;
  aspect-ratio: 1800/1868;
}
.avatar::before {
  transition: all 0.5s ease-in-out;
  transform: translate(-25%, 25%) rotate(-3deg);
  opacity: 0;
}
.avatar::after {
  background-position: right center;
  width: 25%;
  aspect-ratio: 450/1868;
  z-index: 5;
  opacity: 0;
  transition: all 0.5s ease-in-out;
  transition-delay: 0.4s;
}
.avatar.animatable--on::before {
  transform: translate(0, 0) rotate(0deg);
  opacity: 1;
}
.avatar.animatable--on::after {
  opacity: 1;
}

.avatar-mobile {
  width: 50vw;
  aspect-ratio: 591/616;
  background: url("/assets/images/melania-chiru-hi-mobile.png") no-repeat center;
  background-size: contain;
  float: left;
  margin-right: 5vw;
}
@media screen and (min-width: 601px) {
  .avatar-mobile {
    display: none;
  }
}

/* Local styling */
.speach {
  width: 35vw;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.speach__bubble {
  transition: all 0.3s ease-in-out;
}
.speach__bubble:first-child {
  margin-top: auto;
}
.speach__bubble.active:first-child {
  font-size: 130%;
  max-width: none;
}
.speach__spacer {
  transition: all 0.3s ease-in-out;
  transition-delay: 0.1s;
}
.speach__spacer.active {
  flex-grow: 1;
}
.speach__stage-2 {
  display: none;
}
.speach::after {
  aspect-ratio: 1800/1868;
  width: 100%;
  content: "";
  margin-top: -15%;
}

/* Responsiveness */
@media screen and (min-width: 820px) and (max-width: 1023px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
  .avatar {
    width: 50vw;
  }
  .speach {
    width: 50vw;
  }
}
@media screen and (min-width: 601px) and (max-width: 819px) {
  main {
    column-gap: 8vw;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "headline headline" "subheadline subheadline" "intro content" "avatar content";
  }
  .avatar {
    width: 55vw;
  }
  .speach__bubble.active:first-child {
    font-size: 100%;
  }
  .speach {
    width: 50vw;
  }
  .speach::after {
    margin-top: -6%;
  }
}
@media screen and (max-width: 599px) {
  main {
    display: block;
    margin-right: 0;
  }
  .avatar {
    display: none;
  }
}
