.top {
  position: relative;
}

.photos {
  position: relative;
  margin: auto;
  width: 1300px;
  height: 800px;
  max-height: calc(100vh - 170px);
  max-width: calc(100% - 80px * 2);
}

.viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.viewport-img {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  -moz-transition: opacity 1s, clip 1s;
  -o-transition: opacity 1s, clip 1s;
  -webkit-transition: opacity 1s, clip 1s;
  transition: opacity 1s, clip 1s;
}

.show-img {
  opacity: 1;
}

.control-bg {
  position: absolute;
  width: 50vw;
  height: 100vh;
  left: -50vw;
  bottom: 170px;
  background: #f7f4f0;
  z-index: 8;
}
.control-btn {
  position: absolute;
  right: -59px;
  top: 50%;
  -moz-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}
.control-btn li {
  position: relative;
  padding: 8px;
  margin: 8px;
  cursor: pointer;
}
.control-btn li:before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: #333;
  border-radius: 50%;
  opacity: 0;
  -moz-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
}
.control-btn li:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: #cfbda8 solid 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -moz-transition: width 0.3s, height 0.3s;
  -o-transition: width 0.3s, height 0.3s;
  -webkit-transition: width 0.3s, height 0.3s;
  transition: width 0.3s, height 0.3s;
}
.control-btn li.active:before {
  opacity: 1;
}
.control-btn li.active:after {
  width: 100%;
  height: 100%;
}
.control-btn li:hover:before {
  opacity: 1;
}
.control-line {
  position: absolute;
  right: -40px;
  background: #cfbda8;
  width: 1px;
  height: calc(50% - 80px);
}
.control-lineT {
  top: 0;
}
.control-lineB {
  top: 50%;
  margin-top: 80px;
}

.slogan-text {
  position: absolute;
  left: 200px;
  bottom: 200px;
  color: #FFF;
  font-size: 0.75em;
  text-shadow: 0 0 5px #000;
  letter-spacing: 5px;
  line-height: 24px;
  z-index: 9;
  opacity: 0;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  -webkit-transition: opacity 0.6s;
  transition: opacity 0.6s;
}
.slogan-text.show-slogan {
  opacity: 1;
  -moz-transition-delay: 1s;
  -o-transition-delay: 1s;
  -webkit-transition-delay: 1s;
  transition-delay: 1s;
}
.slogan-line {
  position: absolute;
  margin-right: 40px;
  top: 12px;
  right: 100%;
  height: 1px;
  width: 0;
  background: #cfbda8;
  -moz-transition: width 0.6s;
  -o-transition: width 0.6s;
  -webkit-transition: width 0.6s;
  transition: width 0.6s;
}
.show-slogan .slogan-line {
  width: calc((100vw - 1300px) / 2 + 200px - 80px);
  -moz-transition-delay: 1.3s;
  -o-transition-delay: 1.3s;
  -webkit-transition-delay: 1.3s;
  transition-delay: 1.3s;
}
.slogan-line:before {
  content: "";
  width: 8px;
  height: 8px;
  border: #cfbda8 solid 1px;
  border-radius: 50%;
  position: absolute;
  right: -10px;
  top: -5px;
}

.portfolio {
  position: relative;
  margin-top: 100px;
}
.portfolio-content {
  position: relative;
  display: flex;
  width: 1300px;
  max-width: calc(100% - 80px * 2);
  margin: auto;
}
.portfolio-inner {
  margin: 150px auto;
}
.portfolio-sort {
  text-align: center;
  font-size: 0.875em;
  margin: 40px 0;
}
.portfolio-sort a {
  display: inline-block;
  position: relative;
  margin: 0 20px;
  color: #000;
  line-height: 20px;
}
.portfolio-sort a:hover .tw {
  opacity: 0;
}
.portfolio-sort a:hover .en {
  opacity: 1;
}
.portfolio-sort a.active {
  color: #999;
  text-decoration: underline;
}
.portfolio-sort .en {
  position: absolute;
  top: 0;
  left: 50%;
  white-space: nowrap;
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  opacity: 0;
  font-size: 0.75rem;
}
.portfolio-list {
  max-width: 800px;
  margin: auto;
}
.portfolio-sizer, .portfolio-item {
  width: calc(50% - 40px);
}
.portfolio-item {
  position: relative;
  margin: 20px;
  float: left;
}
.portfolio-item img {
  width: 100%;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  -webkit-transition: opacity 0.6s;
  transition: opacity 0.6s;
}
.portfolio-item:nth-last-child(2) {
  float: right;
}
.portfolio-item:hover img {
  opacity: 0.6;
}
.portfolio-item:hover .portfolio-view {
  color: #cfbda8;
}
.portfolio-info {
  padding: 10px 0 0 30px;
}
.portfolio-name {
  position: relative;
  margin-bottom: 5px;
  color: #000;
  font-size: 1.0625rem;
}
.portfolio-view {
  position: relative;
  font-size: 0.75em;
  color: #999;
}
.portfolio-view:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: #cfbda8 solid 1px;
  position: absolute;
  top: 0.75em;
  left: -20px;
  margin-top: -5px;
}
.portfolio-view:after {
  content: "";
  height: 80px;
  width: 1px;
  background: #cfbda8;
  position: absolute;
  top: 0.75em;
  left: -16px;
  margin-top: -84px;
}

.inner {
  padding: 0;
}

.gutter-sizer {
  width: 40px;
}

.title, .portfolio-sort {
  opacity: 0;
  -moz-transition: opacity 0.6s;
  -o-transition: opacity 0.6s;
  -webkit-transition: opacity 0.6s;
  transition: opacity 0.6s;
}
.title.show, .portfolio-sort.show {
  opacity: 1;
}

.portfolio-item {
  opacity: 0;
  -moz-transform: translateY(40px);
  -ms-transform: translateY(40px);
  -webkit-transform: translateY(40px);
  transform: translateY(40px);
  -moz-transition: opacity 0.6s, -moz-transform 0.6s;
  -o-transition: opacity 0.6s, -o-transform 0.6s;
  -webkit-transition: opacity 0.6s, -webkit-transform 0.6s;
  transition: opacity 0.6s, transform 0.6s;
}
.portfolio-item.show {
  opacity: 1;
  -moz-transform: translateY(0px);
  -ms-transform: translateY(0px);
  -webkit-transform: translateY(0px);
  transform: translateY(0px);
}

@media screen and (min-width: 1101px) {
  .header {
    background: none;
  }
  .header:before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1300px;
    max-width: calc(100% - 80px * 2);
    height: 100%;
    background: #FFF;
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }

  .control-bg {
    height: 0;
    min-height: 0;
    -moz-transition: height 1s, min-height 1s;
    -o-transition: height 1s, min-height 1s;
    -webkit-transition: height 1s, min-height 1s;
    transition: height 1s, min-height 1s;
  }
  .control-bg.show {
    height: 100vh;
  }
  .control-btn {
    right: -109px;
    opacity: 0;
    -moz-transition: opacity 0.6s, right 0.6s;
    -o-transition: opacity 0.6s, right 0.6s;
    -webkit-transition: opacity 0.6s, right 0.6s;
    transition: opacity 0.6s, right 0.6s;
  }
  .control-btn.show {
    right: -59px;
    opacity: 1;
  }
  .control-line {
    right: -90px;
    opacity: 0;
    -moz-transition: opacity 0.6s, right 0.6s;
    -o-transition: opacity 0.6s, right 0.6s;
    -webkit-transition: opacity 0.6s, right 0.6s;
    transition: opacity 0.6s, right 0.6s;
  }
  .control-line.show {
    right: -40px;
    opacity: 1;
  }
}
@media screen and (max-width: 1100px) {
  .photos {
    min-width: 0;
    min-height: 0;
    max-height: none;
    max-width: none;
    width: auto;
    height: auto;
  }

  .viewport {
    height: calc(100vh - 60px - 78px);
  }

  .control {
    position: relative;
  }
  .control-bg {
    width: 100%;
    height: 78px;
    min-height: 0;
    left: 0;
    bottom: auto;
    z-index: auto;
    opacity: 0;
    -moz-transition: opacity 0.6s;
    -o-transition: opacity 0.6s;
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
  }
  .control-bg.show {
    opacity: 1;
  }
  .control-btn {
    padding: 20px;
    position: static;
    -moz-transform: none;
    -ms-transform: none;
    -webkit-transform: none;
    transform: none;
    text-align: center;
    opacity: 0;
    -moz-transition: opacity 0.6s;
    -o-transition: opacity 0.6s;
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
  }
  .control-btn.show {
    opacity: 1;
  }
  .control-btn li {
    display: inline-block;
  }
  .control-line {
    right: auto;
    height: 1px;
    width: calc(50% - 70px);
    top: 39px;
    margin: 0;
    opacity: 0;
    -moz-transition: opacity 0.6s;
    -o-transition: opacity 0.6s;
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
  }
  .control-line.show {
    opacity: 1;
  }
  .control-lineB {
    right: 0;
  }

  .slogan-text {
    z-index: 5;
  }
  .slogan-line {
    max-width: none;
  }
  .show-slogan .slogan-line {
    width: 160px;
    min-width: 0;
  }

  .portfolio-sizer, .portfolio-item {
    width: calc(50% - 40px);
  }
}
@media screen and (max-width: 640px) {
  .slogan-text {
    left: 60px;
  }
  .slogan-line {
    margin-right: 30px;
  }

  .control-btn {
    padding: 10px 20px;
  }
  .control-bg {
    height: 58px;
  }
  .control-line {
    top: 29px;
  }

  .viewport {
    height: calc(100vh - 60px - 58px);
  }

  .portfolio-sizer, .portfolio-item {
    width: calc(100% - 40px);
  }
  .portfolio-content {
    max-width: calc(100%);
  }

  .portfolio-sort a {
    font-size: 0.75em;
  }
}
