/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #202324;
  font-size: 1em;
  line-height: 1.4;
  max-width: 1970px;
  margin: 0 auto;
}

* {
  box-sizing: border-box;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

header {
  width: 100%;
  height: 90px;
}

header img {
  padding: 30px 10px 0;
}

.content {

}

.content-body {
  width: 100%;
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.content-inner {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 80px;
}

#ribbon-1 {
  background-image: url(/img/ribbon-1.svg);
  height: 760px;
}

#ribbon-2 {
  background-image: url(/img/ribbon-2.svg);
  background-size: 100% 915px;
  height: 754px;
}

#ribbon-3 {
  background-image: url(/img/ribbon-3.svg);
  background-size: 100% 730px;
  height: 888px;
}

#ribbon-4 {
  background-image: url(/img/ribbon-1.svg);
  background-size: 100% 747px;
  height: 454px;
}

#flasks {
  z-index: -1;
  position: absolute;
  top: calc(-15vw + 310px);
  left: 10%;
}

#microscope {
  z-index: -1;
  position: absolute;
  top: 170px;
  right: 300px;
}

#apple {
  z-index: -1;
  position: absolute;
  top: 115px;
  left: 30%;
}

#main-1 {
  padding-top: 65px;
  display: flex;
  justify-content: space-between;
}

#main-2 {
  padding-top: 250px;
  display: flex;
}

#main-3 {
  padding-top: 280px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#main-3 .text-box {
  max-width: 845px;
}

#main-2 .text-box {
  max-width: 626px;
}

#main-4 {
  padding-top: 135px;
}

.soft-background {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
}

.soft-background.blue {
  background-color: #ebf9fe;
  top: 443px;
  bottom: -406px;
}

.soft-background.green {
  background-color: #ecfaf4;
  top: 443px;
  bottom: -406px;
}

.soft-background.hard {
  background-color: #6fbdba;
  top: 433px;
  bottom: -45px;
}

#avatar {
  background-color: #ebebeb;
  border-radius: 50%;
  box-shadow: rgb(50 50 93 / 25%) 0 6px 12px -2px, rgb(0 0 0 / 30%) 0 3px 7px -3px;
  width: 600px;
  height: 600px;
  padding: 25px;
}

#avatar img {
  width: 100%;
  height: 100%;
}

#title {
  padding-top: 220px;
}

.text-box {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  width: auto;
}

.text-box .text {
  background-color: #FFF;
  position: relative;
  padding: 30px 30px 0 30px;
}

.text-box .top-text {
  margin-top: -100px;
  padding-bottom: 20px;
}

.text-box img {
  width: 100%;
  position: relative;
  bottom: 1px;
}

.text-box.top {
  border-radius: 0 0 30px 30px;
}

.text-box.top img {
  width: 100%;
  position: relative;
  top: 1px;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.big-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 72px;
  font-weight: bold;
  margin: 0;
}

.big-under-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 36px;
  font-weight: bold;
  margin: 0;
  position: relative;
  top: -10px;
}

.content-title {
  font-family: 'Roboto', sans-serif;
  font-size: 36px;
  margin: 0;
}

.content-text {
  font-family: 'Roboto', sans-serif;
  font-size: 24px;
  margin: 0;
}

.underline {
  position: relative;
}

.underline:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
}

.underline.blue:after {
  background-color: #00aeef;
}

.underline.green:after {
  background-color: #2bb673;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 1970px) {
  #flasks {
    top: 0;
  }
}

@media only screen and (max-width: 1770px) {
  #title {
    padding-top: 160px;
  }

  #main-2 {
    padding-top: 280px;
  }
}

@media only screen and (max-width: 1360px) {
  #main-1 {
    align-items: center;
    flex-direction: column-reverse;
  }

  #avatar {
    width: 400px;
    height: 400px;
    padding: 20px;
  }

  header {
    height: 0;
  }

  #title {
    padding-top: 115px;
  }

  #ribbon-1 {
    background-size: 100% 838px;
    height: 840px;
  }

  #main-2 {
    justify-content: space-around;
    padding-top: 170px;
  }

  .text-box:not(.top) {
    border-radius: 30px;
  }

  .text-box:not(.top) img {
    display: none;
  }

  .text-box:not(.top) .text {
    padding: 20px;
  }

  #microscope {
    display: none;
  }

  #flasks {
    top: -40px;
    left: calc(50% - (303px / 2));
  }

  #ribbon-2 {
    background-image: url(/img/ribbon-2-mobile.svg);
    background-size: 1400px 615px;
    height: 725px;
  }

  #ribbon-3 {
    background-image: url(/img/ribbon-3-mobile.svg);
    background-size: 1400px 615px;
    height: 1074px;
  }

  #ribbon-4 {
    background-size: 100% 519px;
    height: 509px;
  }

  .text-box .top-text {
    margin-top: -50px;
  }

  .soft-background.hard {
    top: 213px;
  }

  #main-3 {
    align-items: center;
    flex-direction: column-reverse;
    padding-top: 100px;
  }

  #main-3 img {
    margin-top: 40px;
    width: 300px;
  }

  #apple {
    top: -85px;
    left: calc(50% - (175px / 2));
  }
}

@media only screen and (max-width: 800px) {
  #avatar {
    width: 200px;
    height: 200px;
    padding: 10px;
  }

  header {
    height: 30px;
  }

  #title {
    padding-top: 115px;
  }

  #ribbon-1 {
    background-size: 100% 475px;
    height: 740px;
  }

  #ribbon-3 {
    background-image: url(/img/ribbon-3-mobile.svg);
    background-size: 1400px 615px;
    height: 1300px;
  }

  #ribbon-4 {
    height: 600px;
  }

  .big-title {
    font-size: 50px;
    line-height: 1;
    margin-bottom: 25px;
  }

  .big-under-title {
    font-size: 30px;
  }

  #main-3 img {
    margin-top: 40px;
    width: 50%;
  }

  #ribbon-4 {
    background-size: 100% 355px;
  }
}

@media only screen and (max-width: 600px) {
  header {
    height: 80px;
  }

  .content-inner {
    padding: 10px;
  }

  header {
    display: flex;
    justify-content: space-around;
  }

  header img {
    height: 85px;
  }

  #ribbon-3 {
    height: 1000px;
  }

  #ribbon-4 {
    height: 500px;
  }

  .content-title {
    font-size: 30px;
  }

  .content-text {
    font-size: 18px;
  }
}


@media only screen and (max-width: 420px) {
  .big-title {
    font-size: 50px;
  }

  .big-title .comma {
    display: none;
  }

  .big-under-title {
    font-size: 30px;
  }

  #title {
    padding-top: 80px;
  }

  #ribbon-1 {
    background-size: 555px 520px;
    height: 720px;
  }

  .text-box .top-text {
    margin-top: -35px;
  }

  #ribbon-4 {
    background-size: 100% 377px;
  }

  .content-title {
    font-size: 27px;
  }

  .content-text {
    font-size: 16px;
  }

  #apple {
    top: -28px;
    left: calc(50% - (100px / 2));
    width: 100px;
  }

  #flasks {
    top: 21px;
    left: calc(50% - (200px / 2));
    width: 200px;
  }
}
