@charset "UTF-8";

/* -----  Global  --------------------------------------------------------- */
html {
  background: #000 url('../../images/background@3x.jpg');
  background-attachment: fixed;
  background-size: cover;
}
body {
  overflow: hidden;
  background: url('../../images/projects/hex.png');
  background-position: bottom right;
  background-size: 50%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.main {
  padding-top: 200px;
  opacity: 1;
    -webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */ /* Firefox < 16 */ /* Internet Explorer */ /* Opera < 12.1 */
            animation: fadein 2s;
}

/* Portfolio */
.portfolio-item {
  position: relative;
  width: 55%;
  max-width: 600px;
  background: #2c2c2c;
  box-shadow: 15px 2px 4px 0 rgba(0, 0, 0, 0.5);
  margin-left: 45%;
  padding: 100px 50px 100px 10%;
  margin-bottom: 200px;
}
.portfolio-item .cover-image {
  position: absolute;
  width: 90%;
  max-width: 500px;
  height: 500px;
  overflow: hidden;
  right: 90%;
  top: 50px;
  box-shadow: 15px 2px 4px 0 rgba(0, 0, 0, 0.5);
  -webkit-transform-origin: left;
          transform-origin: left;
  transition: opacity 1s, -webkit-transform 1s;
  transition: transform 1s, opacity 1s;
  transition: transform 1s, opacity 1s, -webkit-transform 1s;
  transition-delay: 1s;
  background-size: cover;
  background-position: center;
}
.portfolio-item .cover-image-inner, .portfolio-item .heading-inner {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition-delay: 0s;
}
.portfolio-item .heading {
  background: #ffffff;
  display: inline-block;
  padding: 20px;
  text-align: center;
  width: 400px;
  margin-left: -25%;
  position: relative;
  z-index: 10;
  box-shadow: 5px 2px 4px 0 rgba(0, 0, 0, 0.5);
  margin-bottom: 50px;
  -webkit-transform-origin: right;
          transform-origin: right;
  transition: opacity 1s, -webkit-transform 1s;
  transition: transform 1s, opacity 1s;
  transition: transform 1s, opacity 1s, -webkit-transform 1s;
  transition-delay: 1s;
}
.portfolio-item .heading h2 {
  color: #1e1e1e;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 24px;
  max-width: 300px;
  margin: auto;
  line-height: 1.4em;
}
.portfolio-item .description {
  max-width: 400px;
}
.portfolio-item .description p {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  line-height: 1.4em;
}

.portfolio-item a {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  float: right;
}

.portfolio-item .inside {
  max-height: 1px;
  overflow: hidden;
  opacity: 0;
}
.portfolio-item ul {
  line-height: 1.5em;
}
.portfolio-item .inside .more-details {
  position: absolute;
  top: 0;
  right: 0;
}

/* Open */
.portfolio-item * {
  transition: .5s;
}

.portfolio-item-wrapper {
  min-height: 650px;
}
.portfolio-item.open .outside .heading {
  -webkit-transform: rotateY(-180deg) scale(2);
          transform: rotateY(-180deg) scale(2);
  opacity: 0;
  transition: opacity .5s, -webkit-transform 1s;
  transition: transform 1s, opacity .5s;
  transition: transform 1s, opacity .5s, -webkit-transform 1s;
  transition-delay: 0s;
}
.portfolio-item.open .outside .cover-image {
  -webkit-transform: rotateY(-180deg) scale(2);
          transform: rotateY(-180deg) scale(2);
  opacity: 0;
  transition: opacity .5s, -webkit-transform 1s;
  transition: transform 1s, opacity .5s;
  transition: transform 1s, opacity .5s, -webkit-transform 1s;
  transition-delay: 0s;
}
.portfolio-item.open .outside .more-details {
  display: none;
}

.portfolio-item {
  transition: 1s;
  transition-delay: 0s;
  min-height: 550px;
  max-height: 600px;
  left: -2%;
}
.portfolio-item.open {
  background: transparent;
  min-height: 1000px;
  max-height: 10000px;
  width: 100%;
  max-width: 100vw;
  margin-left: 0;
  margin-bottom: 100px;
  box-shadow: none;
  transition-delay: .5s;
  padding: 100px 50px;
}

.portfolio-item .cover-image-inner {

}
.portfolio-item.open .cover-image-inner {
  opacity: 1;
  max-height: 100%;
  width: 50%;
  float: left;
  transition-delay: .5s, 1s;
  transition-property: all, opacity;
}
.portfolio-item .outside .content {
  transition-delay: 0s;
  left: 0;
}
.portfolio-item .outside .content .description {
  left: 0;
  width: 400px;
}
.portfolio-item.open .outside .content .description {
  -webkit-animation: position .5s forwards;
          animation: position .5s forwards;
  -webkit-animation-delay: .3s;
          animation-delay: .3s;
  transition: 1s;
  transition-delay: .4s;
  top: 256px;
  left: calc(50% + 100px);
  width: 400px;
}
@-webkit-keyframes position {
  from {
  }
  to {
    position: absolute;
  }
}
@keyframes position {
  from {
  }
  to {
    position: absolute;
  }
}
@-webkit-keyframes positionSmall {
  from {
  }
  to {
    position: relative;
  }
}
@keyframes positionSmall {
  from {
  }
  to {
    position: relative;
  }
}
.portfolio-item .outside .content .description p {
  transition-delay: 0s;
}
.portfolio-item.open .outside .content .description p {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 200;
  transition-delay: .5s;
}

.portfolio-item .heading-inner h2 {
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-weight: 200;
  text-align: left;
}
.portfolio-item .heading-inner {
  left: calc(50% + 100px);
  position: absolute;
  top: 160px;
  max-width: calc(50% - 150px);
  display: flex;
  align-items: flex-end;
}
.portfolio-item.open .heading-inner {
  opacity: 1;
  max-height: 200px;
  top: 120px;
  transition-delay: .8s, 1.2s, 1.2s;
  transition-property: opacity, max-height, top;
}

.portfolio-item.open .inside {
  max-height: none;
  overflow: visible;
  opacity: 1;
  transition-delay: .5s;
  clear: both;
}
.portfolio-item.open .tab-header {
  display: flex;
  align-items: stretch;
  margin: 40px 0 30px;
  border-bottom: 1px solid #8f8f8f;
}
.portfolio-item.open .tab-header .tab-head {
  flex-grow: 1;
}
.portfolio-item.open .tab-header .tab-head.current {
  border-bottom: 1px solid #d6d6d6;
}
.portfolio-item.open .tab-header .tab-head h5 {
  color: #8f8f8f;
  text-align: center;
  font-weight: 200;
}
.portfolio-item.open .tab-header .tab-head.current h5 {
  color: #d6d6d6;
}

.portfolio-item.open .tabs {
  display: flex;
  overflow: hidden;
}
.portfolio-item.open .tabs .tab {
  width: 0;
  overflow: hidden;
  opacity: 0;
}
.portfolio-item.open .tabs .current {
  width: 100%;
  opacity: 1;
}

.portfolio-item .tab.images ul {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 1fr 1fr 1fr;
      grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 20px;
}
.portfolio-item .images a {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 245px;
  height: 180px;
  overflow: hidden;
}
.portfolio-item .images a img {
  min-height: 100%;
  max-width: none;
}

@media(max-width: 1200px) {
  .portfolio-item.open {
    padding: 100px 50px;
  }
  .portfolio-item.open .heading-inner, .portfolio-item.open .outside .content .description {
    left: calc(50% + 50px);
  }
  .portfolio-item .inside .more-details {
    right: 40px;
  }
  .portfolio-item .tab.images ul {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media(max-width: 920px) {
  .portfolio-item {
    width: 100%;
    margin: 350px auto 200px;
  }
  .portfolio-item .cover-image {
    top: -300px;
    left: calc(80% - 500px);
  }
  .portfolio-item .heading {
    margin-top: 50px;
    margin-left: -15%;
  }
  .portfolio-item.open .cover-image {
    /*display: none;*/
    height: 0;
  }

  .portfolio-item.open .cover-image-inner {
    float: none;
    width: 100%;
  }
  .portfolio-item.open .outside .heading {
    position: absolute;
    top: 0;
    left: 100vw;
  }
  .portfolio-item.open .heading-inner {
    position: relative;
    top: 0;
    left: 0;

    width: auto;
    max-width: none;
    max-height: none;
    height: auto;
    margin-top: 20px;
  }
  .portfolio-item.open .outside .content .description {
    -webkit-animation: positionSmall .5s forwards;
            animation: positionSmall .5s forwards;
    width: auto;
    height: auto;
    top: 0;
    left: 0;

    width: auto;
    max-width: none;
    max-height: none;
    height: auto;
  }
  .portfolio-item .images a {
    width: calc(50vw - 100px);
    height: calc(50vw - 200px);
  }
  .portfolio-item .tab.images ul {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width: 660px) {
  .portfolio-item {
    padding: 0;
    margin-top: 0;
    max-height: none;
  }
  .portfolio-item .cover-image {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: calc(100vw - 20px);
  }
  .portfolio-item .content {
    padding: 20px;
    padding-bottom: 50px;
  }
  .portfolio-item .heading {
    margin-left: 0;
    position: absolute;
    width: 100%;
    top: calc(100vw - 70px);
    left: 0;
  }
  .portfolio-item .outside .content .description {
    max-width: none;
    width: calc(100vw - 100px);
    margin-top: 100px;
  }
  .portfolio-item.open .content {
    padding-bottom: 0;
  }
  .portfolio-item.open .outside .content .description{
    margin-top: 30px;
  }
  .portfolio-item.open .tab-header .tab-head h5 {
    font-size: 14px;
    font-weight: 800;
    padding: 0 10px;
  }
  .portfolio-item .tab.images ul {
    grid-template-columns: 1fr;
  }
  .portfolio-item .images a {
    width: calc(100vw - 100px);
    height: calc(100vw - 200px);
  }
}

@media  screen\0 {
  .wrapper {
    margin: auto;
  }
  .portfolio-item .inside .more-details {
    opacity: 0;
  }
  .portfolio-item.open .inside .more-details {
    opacity: 1;
  }
  .open.portfolio-item .outside .content .description {
    float: left;
    margin-left: 100px;
  }
  .portfolio-item .images.tab ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .portfolio-item .images.tab ul li {
    margin: 5px;
  }
}
