/* Global */

#work,
#about,
#contact,
.project {
  width: 75vw;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 100vh;
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: block;
}

body {
  margin: 0;
  padding: 0;
}

h1 {
  font-family: "Open Sans", sans-serif;
  font-weight: 800;
  line-height: 1;
}

span {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  font-size: 16px;
}

.clear {
  clear: both;
}

html,
#background {
  background-color: #f8f8f8;
}

.item {
  margin: 200px 0;
}

.item > .image {
  height: 300px;
  width: 85vw;
  max-width: 533.33px;
  border-radius: 8px;
  box-shadow: 5px 5px 25px 0px rgba(46, 61, 73, 0.2);
  pointer-events: all;
  transition: 0.3s all ease-in-out;
}

.item:not(.no-link) > .image:hover {
  box-shadow: 2px 4px 8px 0px rgba(46, 61, 73, 0.2) !important;
}

.item > .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
}

.item > .title {
  height: auto;
  position: absolute;
  z-index: 3;

  /* Vertically centers `h1` */
  display: flex;
  align-items: center;
}

.item > .title h1 {
  font-size: 72px;
  width: 100%;
  color: transparent;
  -webkit-text-stroke-color: black;
  transition: 0.3s all ease-in-out;
}

.item > .title > a {
  pointer-events: all;
  text-decoration: none;
}

.item > .title > a > h1:hover {
  color: black !important;
}

.item.left {
  margin-left: 100px;
}

.item.left > .image {
  float: left;
}

.item.right {
  margin-right: 100px;
}

.item.right > .image {
  float: right;
}

.item.full {
  height: auto;
  margin-left: 0;
  margin-right: 0;
}

.item.full > .title {
  height: auto;
}

.item.full.left > .title {
  left: 0;
  margin-left: -100px;
}

.item.full.right > .title {
  right: 0;
  margin-right: -100px;
}

.item.full > .content {
  border-radius: 8px;
  background-color: white;
  box-shadow: 5px 5px 25px 0px rgba(46, 61, 73, 0.2);
  pointer-events: all;
  transition: 0.3s all ease-in-out;
}

@media (max-width: 900px) {
  #work,
  #about,
  #contact,
  .project {
    width: 85vw;
  }

  .item.full > .title {
    width: 100%;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .item.full > .title > h1 {
    text-align: center;
  }
}

@media (min-width: 551px) and (max-width: 900px) {
  /* 36px = 72px / 2 */
  .item.full > .title {
    margin: -36px 0 0 0;
  }
}

@media (min-width: 451px) and (max-width: 550px) {
  /* 30px = 60px / 2 */
  .item.full > .title {
    margin: -30px 0 0 0;
  }

  .item.full > .title > h1 {
    font-size: 60px;
    -webkit-text-stroke-width: 2px;
  }
}

@media (max-width: 450px) {
  /* 24px = 48px / 2 */
  .item.full > .title {
    margin: -24px 0 0 0;
  }

  .item.full > .title > h1 {
    font-size: 48px;
    -webkit-text-stroke-width: 1.5px;
  }
}

@media (min-width: 901px) {
  /* 180px = (72px * 0.75) + 72px + (72px * 0.75) */
  .item.full > .title {
    height: 180px;
  }

  .item.full > .content {
    padding: 180px 75px 75px 75px;
  }
}

@media (min-width: 551px) and (max-width: 900px) {
  /* 90px = (72px * 0.5) + (72px * 0.75) */
  .item.full > .content {
    padding: 90px 75px 75px 75px;
  }
}

@media (min-width: 451px) and (max-width: 550px) {
  /* 75px = (60px * 0.5) + (60px * 0.75) */
  .item.full > .content {
    padding: 75px 50px 50px 50px;
  }
}

@media (min-width: 401px) and (max-width: 450px) {
  /* 60px = (48px * 0.5) + (48px * 0.75) */
  .item.full > .content {
    padding: 60px 50px 50px 50px;
  }
}

@media (max-width: 400px) {
  /* 60px = (48px * 0.5) + (48px * 0.75) */
  .item.full > .content {
    padding: 60px 25px 25px 25px;
  }
}

@media (max-width: 549px) {
  .item {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .item > .title {
    left: auto;
    right: auto;
    text-align: center;
    height: auto;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    display: block;
  }

  .item > .title h1 {
    margin: 0;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .item.left:not(.full) > .title {
    left: 150px;
  }

  .item.right:not(.full) > .title {
    right: 150px;
  }
}

@media (min-width: 476px) {
  .item > .title h1 {
    margin: 0;
    -webkit-text-stroke-width: 1.5px;
  }
}

@media (min-width: 550px) {
  .item:not(.full),
  .item:not(.full) > .title,
  .item:not(.full) > .image {
    height: 300px;
  }

  .item.right:not(.full) > .title {
    text-align: right;
  }

  .item.left:not(.full) > .title {
    text-align: left;
  }
}

@media (min-width: 1200px) {
  .item.left:not(.full) > .title {
    left: 100px;
  }

  .item.right:not(.full) > .title {
    right: 100px;
  }
}

@media (max-width: 750px) {
  .item:not(.full) > .image {
    width: 100%;
  }
}

@media (min-width: 550px) and (max-width: 899px) {
  .item:not(.full) > .title h1 {
    font-size: 60px;
  }

  .item.left:not(.full) > .title {
    left: 150px;
  }

  .item.right:not(.full) > .title {
    right: 150px;
  }
}

@media (min-width: 476px) and (max-width: 549px) {
  .item:not(.full) > .title {
    margin-top: -24px;
  }

  .item:not(.full) > .title h1 {
    font-size: 48px;
  }
}

@media (max-width: 475px) {
  .item:not(.full) > .title {
    margin-top: -18px;
  }

  .item:not(.full) > .title h1 {
    font-size: 36px;
    -webkit-text-stroke-width: 1.5px;
  }
}

@media (min-width: 1000px) and (max-width: 1150px) {
  .item.full.left > .title {
    margin-left: -75px;
  }

  .item.full.right > .title {
    margin-right: -75px;
  }
}

@media (min-width: 901px) and (max-width: 999px) {
  .item.full.left > .title {
    margin-left: -50px;
  }

  .item.full.right > .title {
    margin-right: -50px;
  }
}

@media (min-width: 751px) {
  #oscar-health.item > .image > a > img,
  #oscar-health > .item:nth-child(2) > .image > img {
    object-position: 0px -115px !important;
  }
}

@media (min-width: 641px) and (max-width: 750px) {
  #oscar-health.item > .image > a > img,
  #oscar-health > .item:nth-child(2) > .image > img {
    object-position: 0px -100px !important;
  }
}

@media (min-width: 351px) and (max-width: 640px) {
  #oscar-health.item > .image > a > img,
  #oscar-health > .item:nth-child(2) > .image > img {
    object-position: 0px -50px !important;
  }
}

@media (min-width: 271px) and (max-width: 350px) {
  #oscar-health.item > .image > a > img,
  #oscar-health > .item:nth-child(2) > .image > img {
    object-position: top center !important;
  }
}

@media (max-width: 270px) {
  #oscar-health.item > .image > a > img,
  #oscar-health > .item > .image > img {
    object-position: center center !important;
  }
}

/* Fix Oscar Health image cropping */
#oscar-health.item > .image > a > img {
  object-fit: cover;
  object-position: center center !important;
}

/* Background */

#background {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 1;

  /* Horizontally centers `container` */
  text-align: center;

  /* Vertically centers `container` */
  display: flex;
  align-items: center;
  justify-content: center;
}

#background > .container,
nav,
nav > .link {
  display: inline-block;
}

#logo {
  width: 350px;
  margin: 0 auto 15px auto;
}

#logo > img {
  width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

nav {
  width: 100%;
}

nav > .link {
  padding-left: 15px;
  padding-right: 15px;
}

nav > .link > a {
  position: relative;
  color: black;
  text-decoration: none;
  transition: 0.3s ease-in-out;
}

nav > .link > a:before {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 1px;
  left: 0;
  background-color: black;
  visibility: hidden;
  transition: 0.3s all ease-in-out;
}

nav > .link.active > a:before,
nav > .link > a:hover:before {
  visibility: visible;
  width: 100%;
  z-index: 0;
}

nav > .link > a:hover {
  color: #555;
}

nav > .link > a:hover:before {
  background-color: #555;
}

nav > .link > a > span {
  position: relative;
  z-index: 1;
}

@media (max-width: 400px) {
  #logo {
    width: 80vw;
  }

  nav > .link {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Footer */

footer {
  max-width: 900px;
  margin: 20px auto;
  height: auto;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

#copyright,
#copyright > div {
  float: left;
}

#copyright > div > span {
  line-height: 24px;
  white-space: pre;
}

#copyright > div:nth-child(1) {
  width: 136.45px;
}

#copyright > div:nth-child(2) {
  width: 24px;
  text-align: center;
}

#copyright > div:nth-child(3) {
  width: 124.34px;
}

#social-links {
  float: right;
}

footer > #social-links > a {
  float: left;
  margin-left: 10px;
  font-size: 24px;
  height: 24px;
  color: black;
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s all ease-in-out;
}

footer > #social-links > a:nth-child(1) {
  margin-left: 0 !important;
}

footer > #social-links > a:hover {
  color: #888;
}

#heart {
  animation: heartbeat 1.4s infinite;
  color: #888;
}

@keyframes heartbeat {
  0% {
    font-size: 16px;
  }
  12.5% {
    font-size: 16px;
  }
  25% {
    font-size: 16px;
  }
  37.5% {
    font-size: 18px;
  }
  50% {
    font-size: 16px;
  }
  62.5% {
    font-size: 18px;
  }
  75% {
    font-size: 16px;
  }
  87.5% {
    font-size: 16px;
  }
  100% {
    font-size: 16px;
  }
}

@media (min-width: 901px) {
  footer {
    width: 75vw;
  }
}

@media (max-width: 900px) {
  footer {
    width: 85vw;
  }
}

@media (max-width: 500px) {
  footer {
    margin: 0 auto;
    width: 100vw;
  }

  #social-links,
  #copyright {
    float: none;
    width: 100%;
    clear: both;
    height: 24px;
    margin-left: auto;
    margin-right: auto;
  }

  #social-links {
    width: 83px;
    margin-bottom: 15px;
  }

  #copyright {
    width: 285px;
    margin-bottom: 20px;
  }
}
