/*container for everything*/
#homepage-container {
  width: 100%;
  min-height: 100vh;
  background: rgb(240, 240, 240);
  padding: 1px 0;
  overflow-x: hidden;
}

/*top container styling*/
#homepage-top {
  padding: 0 1em;
  position: relative;
}
#homepage-top .material-icons {
  display: none;
}

/*title text animation*/
@keyframes titleFade {
  0% {
    opacity: 0;
    -webkit-transform: translateY(1em);
        -ms-transform: translateY(1em);
            transform: translateY(1em);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
        -ms-transform: translateY(0);
            transform: translateY(0);
  }
}
@keyframes delayedFade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/*title text*/
#homeTitle {
  margin: 0 auto;
  margin-top: 7.5em;
  margin-bottom: 2em;
  padding: 0 1.5em;
  text-align: center;
  max-width: 44em;
}
@media (max-width: 44em) {
  #homeTitle {
    max-width: 100%;
  }
}
#homeTitle h1 {
  font-size: 2.5em;
  word-wrap: normal;
  hyphens: manual;
  animation: titleFade 1.5s ease forwards;
}
#homeTitle p {
  position: relative;
  font-style: italic;
  color: rgba(0, 0, 0, 0.5);
  display: inline-block;
  padding: 0 0.5em;
  margin-top: 0;
  margin-bottom: 2em;
  z-index: 1;
  animation: delayedFade 1s ease forwards;
}
html[lang^="zh"] #homeTitle p {
  font-style: normal;
}
#homeTitle p::before, #homeTitle p::after { /*dash around the subtitle*/
  position: absolute;
  content: "";
  display: block;
  width: 2em;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  top: 50%;
  left: 0;
  -webkit-transform: translate(-100%, -50%);
      -ms-transform: translate(-100%, -50%);
          transform: translate(-100%, -50%);
  z-index: 0;
}
#homeTitle p::after {
  left: 100%;
  -webkit-transform: translate(0, -50%);
      -ms-transform: translate(0, -50%);
          transform: translate(0, -50%);
}
@media (max-width: 35em){  /*some really small screen styling*/
  #homeTitle {
    padding: 0 1em;
  }
  #homeTitle h1 {
    font-size: 2em;
  }
  #homeTitle p::before, #homeTitle p::after {
    display: none;
  }
  #homeTitle p {
    margin-bottom: 1em;
  }
}

/*svg styling*/
#topBackground {
  fill: rgb(250, 250, 250);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  display: none;
}

/*images and general image styling*/
div.three-column-cont {
  width: 100%;
}
div.three-column-cont .top-img {
  max-width: 100%;
}
.img-container {
  max-height: 100%;
}
.img-container img {
  vertical-align: top;
  max-height: 100%;
  max-width: 100%;
}

/*carousel for top images styling - on mobile*/
#homeTopImages-container {
  position: relative;
  margin: 0 auto;
  margin-top: 1em;
  max-width: 25em;
}
@media (max-width: 29em) {
  #homeTopImages-container {
    margin: 0 1em;
    margin-top: 1em;
  }
}
#carousel-overflow-container {
  width: 100%;
  overflow: hidden; /*hiding overflow - for carousel*/
}
#homeTopImages {
  position: relative;
  z-index: 3;
  width: 300%;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
     -ms-flex-align: center;
        align-items: center;
  transition: 0.4s ease;
  -webkit-transform: translateX(0%);
      -ms-transform: translateX(0%);
          transform: translateX(0%);
}
#homeTopImages .img-container {
  -webkit-box-flex: 1;
          -ms-flex: 1 1 0px;
              flex: 1 1 0px;
  min-width: 0px;
  text-align: center;
  z-index: 3;
}

/*carousel arrows*/
body.no-js #homepage-top #homeTopImages-container .carousel-arrows {
  display: none;
}
#homepage-top #homeTopImages-container .carousel-arrows {
  position: absolute;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 3em;
  height: 3em;
  text-align: center;
  background: rgb(250, 250, 250);
  box-shadow: 0 0.25em 0.6em rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  z-index: 4;
}
#homepage-top #homeTopImages-container .carousel-arrows#forward {
  right: 0;
  -webkit-transform: translate(50%, -50%);
      -ms-transform: translate(50%, -50%);
          transform: translate(50%, -50%);
}
#homepage-top #homeTopImages-container .carousel-arrows:hover {
  cursor: pointer;
}
#homepage-top #homeTopImages-container .carousel-arrows .material-icons {
  font-size: 1.75em;
  color: gray;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  display: block;
  z-index: 4;
}

/*dots on the bottom*/
#carousel-dots {
  position: relative;
  width: 100%;
  padding-top: 1em;
  text-align: center;
  z-index: 3;
}
#carousel-dots > .dot {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 1px solid black;
  background-color: transparent;
  display: inline-block;
  margin: 0 0.5em;
  transition: 0.2s ease;
}
#carousel-dots > .dot.active {
  background-color: black;
  pointer-events: none;
}
#carousel-dots > .dot:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
}

/*no js carousel (automatically animated)*/
@-webkit-keyframes noJSCarousel {
  0% {
    -webkit-transform: translateX(0%);
            transform: translateX(0%);
  }
  22.5% {
    -webkit-transform: translateX(0%);
            transform: translateX(0%);
  }
  27.5% {
    -webkit-transform: translateX(-33.33%);
            transform: translateX(-33.33%);
  }
  72.5% {
    -webkit-transform: translateX(-33.33%);
            transform: translateX(-33.33%);
  }
  77.5% {
    -webkit-transform: translateX(-66.66%);
            transform: translateX(-66.66%);
  }
  100% {
    -webkit-transform: translateX(-66.66%);
            transform: translateX(-66.66%);
  }
}
@keyframes noJSCarousel {
  0% {
    -webkit-transform: translateX(0%);
        -ms-transform: translateX(0%);
            transform: translateX(0%);
  }
  22.5% {
    -webkit-transform: translateX(0%);
        -ms-transform: translateX(0%);
            transform: translateX(0%);
  }
  27.5% {
    -webkit-transform: translateX(-33.33%);
        -ms-transform: translateX(-33.33%);
            transform: translateX(-33.33%);
  }
  72.5% {
    -webkit-transform: translateX(-33.33%);
        -ms-transform: translateX(-33.33%);
            transform: translateX(-33.33%);
  }
  77.5% {
    -webkit-transform: translateX(-66.66%);
        -ms-transform: translateX(-66.66%);
            transform: translateX(-66.66%);
  }
  100% {
    -webkit-transform: translateX(-66.66%);
        -ms-transform: translateX(-66.66%);
            transform: translateX(-66.66%);
  }
}
@-webkit-keyframes noJSCarouselDot1 {
  0% {
    background-color: black;
  }
  22.5% {
    background-color: black;
  }
  27.5% {
    background-color: transparent;
  }
  100% {
    background-color: transparent;
  }
}
@keyframes noJSCarouselDot1 {
  0% {
    background-color: black;
  }
  22.5% {
    background-color: black;
  }
  27.5% {
    background-color: transparent;
  }
  100% {
    background-color: transparent;
  }
}
@-webkit-keyframes noJSCarouselDot2 {
  0% {
    background-color: transparent;
  }
  22.5% {
    background-color: transparent;
  }
  27.5% {
    background-color: black;
  }
  72.5% {
    background-color: black;
  }
  77.5% {
    background-color: transparent;
  }
  100% {
    background-color: transparent;
  }
}
@keyframes noJSCarouselDot2 {
  0% {
    background-color: transparent;
  }
  22.5% {
    background-color: transparent;
  }
  27.5% {
    background-color: black;
  }
  72.5% {
    background-color: black;
  }
  77.5% {
    background-color: transparent;
  }
  100% {
    background-color: transparent;
  }
}
@-webkit-keyframes noJSCarouselDot3 {
  0% {
    background-color: transparent;
  }
  72.5% {
    background-color: transparent;
  }
  77.5% {
    background-color: black;
  }
  100% {
    background-color: black;
  }
}
@keyframes noJSCarouselDot3 {
  0% {
    background-color: transparent;
  }
  72.5% {
    background-color: transparent;
  }
  77.5% {
    background-color: black;
  }
  100% {
    background-color: black;
  }
}
body.no-js #homeTopImages {
  -webkit-animation: noJSCarousel 10s ease infinite alternate;
          animation: noJSCarousel 10s ease infinite alternate;
}
body.no-js #carousel-dots .dot:first-child {
  -webkit-animation: noJSCarouselDot2 10s ease infinite alternate;
          animation: noJSCarouselDot1 10s ease infinite alternate;
}
body.no-js #carousel-dots .dot:nth-child(2) {
  -webkit-animation: noJSCarouselDot2 10s ease infinite alternate;
          animation: noJSCarouselDot2 10s ease infinite alternate;
}
body.no-js #carousel-dots .dot:nth-child(3) {
  -webkit-animation: noJSCarouselDot3 10s ease infinite alternate;
          animation: noJSCarouselDot3 10s ease infinite alternate;
}

/*person descriptions*/
#homeImages {
  margin-top: 2em;
  padding: 0 2em;
  background: rgb(250, 250, 250);
  width: 100%;
}
div.three-column-cont > .person {
  position: relative;
  text-align: center;
  padding: 4em 0;
  max-width: 25em;
  margin: 0 auto;
}
#homeImages .person::after {
  position: absolute;
  content: "";
  display: block;
  width: 2px;
  height: 4em;
  bottom: 0;
  left: 50%;
  -webkit-transform: translate(-50%, 50%);
      -ms-transform: translate(-50%, 50%);
          transform: translate(-50%, 50%); 
  background-color: rgba(0, 0, 0, 0.5);
}
#homeImages .person:last-child::after {
  display: none;
}
#homeImages .person .img-container {
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
     -moz-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
      -ms-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
  text-align: center;
  display: block;
}
#homeImages .person .img-container img {
  transition: all 0.3s ease;
}
#homeImages .person .img-container:hover img { /*zoom in on hover*/
  -webkit-transform: scale(1.05);
      -ms-transform: scale(1.05);
          transform: scale(1.05);
}
#homeImages .person h2 {
  margin-bottom: 0;
}
#homeImages .person p {
  color: gray;
}
#homeImages .person p.date {
  margin-top: 0.15em;
  margin-bottom: 0;
  font-style: italic;
}
#homeImages .person :last-child {
  margin-bottom: 0;
}
#homeImages .person a.styled-link {
  display: inline-block;
  margin-top: 1em;
}

/*full-page, flex styling*/
@media (min-width: 40em){
  /*home title*/
  #homeTitle {
    margin-top: 6.5em;
    margin-bottom: 1em;
    padding: 0 1em;
  }
  #homeTitle h1 {
    font-size: 2.85em;
  }
  #homeTitle p { 
    padding: 0 1em;
  }
  #homeTitle p::before, #homeTitle p::after {
    width: 3em;
  }

  /*showing background svg*/
  #topBackground {
    display: block;
  }

  /*general three-column container (flex layout)*/
  div.three-column-cont {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
       -ms-flex-pack: center;
     justify-content: center;
  }
  div.three-column-cont > * {
    padding: 0;
    margin: 0 1em;
    -webkit-box-flex: 1;
            -ms-flex: 1 1 0px;
                flex: 1 1 0px;
    max-width: 100%;
    min-width: 1px;
  }

  /*top images*/
  #homepage-top #homeTopImages-container { /*center the three images if height is capped*/
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
           align-items: center;
    padding-bottom: 4.5em;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    width: 100%;
  }
  #homepage-top #carousel-overflow-container {
    overflow: initial;
    height: 100%;
  }
  #homepage-top #homeTopImages-container .carousel-arrows { /*hide carousel arrows*/
    display: none;
  }
  #homeTopImages {
    position: relative;
    width: 100%;
    -webkit-box-align: start;
        -ms-flex-align: start;
           align-items: flex-start;
  }
  #homeTopImages .img-container {
    position: relative;
    text-align: center;
    z-index: 1;
  }
  #homeTopImages .img-container:nth-of-type(2) { /*center one is near the bottom*/
    -ms-flex-item-align: end;
             align-self: flex-end;
  }
  #homeTopImages .img-container::before { /*extra styling on images NOTE: doesn't work if image doesn't fit container exactly*/
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
  }
  #homeTopImages .img-container .background-dots {
    z-index: 0;
    width: 100%;
    position: absolute;
    left: -50%;
    bottom: -20%;
    box-shadow: none;
  }
  #homeTopImages .img-container .background-dots.top {
    left: 50%;
    bottom: 70%;
    transform: scaleX(-1);
  }
  #homeTopImages .img-container .placeholder-img img {
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 10px 1em rgba(0, 0, 0, 0.1);
    z-index: 1;
  }

  /*hiding carousel*/
  #carousel-dots {
    display: none;
  }
  body.no-js #homeTopImages {
    animation: none;
  }

  /*down arrow*/
  #homepage-top #downarrow {
    position: absolute;
    display: block;
    width: 100%;
    left: 0;
    bottom: 0.125em;
    line-height: 1;
    text-align: center;
    font-size: 3em;
    z-index: 3;
    color: rgba(0, 0, 0, 0.3);
  }

  /*person descriptions*/
  #homeImages {
    margin-top: 0;
    padding: 0 1em;
  }
  div.three-column-cont > .person {
    margin: 0 1em;
    text-align: center;
    max-width: none;
  }
  #homeImages .person .img-container {
    max-width: 100%;
    width: auto;
  }
  #homeImages .person p {
    margin-bottom: initial;
  }
  #homeImages .person::after {
    display: none;
  }
}
@media (min-width: 40em) and (max-width: 60em) { /*updating calculations for homeTopImages height based on margins*/
  #homeTopImages {
    height: 19em; /*fallbacks (calculated averages)*/
    height: 38vw;
    height: calc((80vw - 4em)/3*1.6);
  }
}
@media (min-width: 60em) and (max-width: 85em) {
  #homeTopImages {
    height: 21.3em;
    height: 34vw;
    height: calc((70vw - 4em)/3*1.6);
  }
}
@media (min-width: 85em) {
  #homeTopImages {
    height: calc((80vw - 4em)/3 * 1.6);
  }
  #homeTitle { /*hijacking this media query to update font styling for title*/
    padding: 0;
  }
  #homeTitle h1 {
    font-size: 3.25em;
  }
}
@media (min-width: 50em) and (min-height: 45em) { /*left/right padding on larger screens around images*/
  div.three-column-cont > *:first-child {
    margin-left: 10%;
  }
  div.three-column-cont > *:last-child {
    margin-right: 10%;
  }
}
@media (min-width: 60em) and (min-height: 45em) {
  div.three-column-cont > *:first-child {
    margin-left: 15%;
  }
  div.three-column-cont > *:last-child {
    margin-right: 15%;
  }
}
@media (min-width: 65em) and (min-height: 45em) { /*full viewport for the top part styling*/
  /*homepage top part*/
  #homepage-top {
    height: 100vh;
    position: relative;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
       -ms-flex-direction: column;
           flex-direction: column;
    -webkit-box-align: center;
       -ms-flex-align: center;
          align-items: center;
  }
  #homepage-top #homeTopImages-container { /*part that grows/shrinks depending on height*/
    -webkit-box-flex: 1;
            -ms-flex: 1 1 0px;
                flex: 1 1 0px;
    min-height: 1px;
  }
  #homeTitle { /*title shouldn't shrink or grow*/
    -webkit-box-flex: 0;
            -ms-flex: 0 0 auto;
                flex: 0 0 auto;
  }

  /*top images, staggered styling*/
  #homeTopImages {
    min-height: 1px;
    max-height: 33vw;
    height: 100%; /*grow to fit available height, but limit it to a certain amount*/
  }
}
@media (min-width: 85em) and (min-height: 45em) { /*adjusting margins for larger screens*/
  div.three-column-cont > *:first-child {
    margin-left: 20%;
  }
  div.three-column-cont > *:last-child {
    margin-right: 20%;
  }
}