@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed:700|Roboto:300,700');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
	overflow-x:hidden;
}

.button {
  display: inline-block;
  text-decoration: none;
  color: white;
  background: limegreen;
  padding: .5em 1.25em;
}

._top {
  position:fixed;
  z-index:9;
}

/* Menu */
body h1.title {
  position: fixed;
  top: 10px;
  left: 45%;
  z-index: 6;
  font-size: 20px;
  font-weight: 900;
  font-family: sans-serif;
  text-transform: uppercase;
}
body h1 > span {
  text-transform: none;
  opacity: .5;
  font-weight: 300;
  font-size: 12px;
}
body input + label {
  position: fixed;
  top: 40px;
  right: 40px;
  height: 20px;
  width: 15px;
  z-index: 5;
}
body input + label span {
  position: absolute;
  width: 100%;
  height: 2px;
  top: 50%;
  margin-top: -1px;
  left: 0;
  display: block;
  background: #020304;
  transition: .5s;
}
body input + label span:first-child {
  top: 3px;
}
body input + label span:last-child {
  top: 16px;
}
body label:hover {
  cursor: pointer;
}
body input:checked + label span {
  opacity: 0;
  top: 50%;
}
body input:checked + label span:first-child {
  opacity: 1;
  transform: rotate(405deg);
}
body input:checked + label span:last-child {
  opacity: 1;
  transform: rotate(-405deg);
}

body input ~ nav {
	display:none;
  background: white;
  position: fixed;
  top: 67px;
  right: 0;
  width: 10%;
  height: 0px;
  z-index: 3;
  transition: .5s;
  transition-delay: .5s;
  overflow: hidden;
  border-left: 1px solid #E11E1E;
}
body input ~ nav > ul {
  text-align: center;
  position: absolute;
  list-style-type: none;
  top: 35%;
  left: 15%;
  right: 15%;
}
body input ~ nav > ul > li {
  opacity: 0;
  transition: .5s;
  transition-delay: 0s;
}
body input ~ nav > ul > li > a {
  text-decoration: none;
  text-transform: uppercase;
  color: #020304;
  font-weight: 700;
  font-family: sans-serif;
  display: block;
  padding: 30px;
}
body input:checked ~ nav {
  height: 100%;
  transition-delay: 0s;
  display:block;
}
body input:checked ~ nav > ul > li {
  opacity: 1;
  transition-delay: .5s;
}


/* Portfolio */
.portfolio {
	display: grid;
  grid: auto / repeat(auto-fit, minmax(25em, 1fr));
  grid-gap: 3em;
  background: #333;
  padding: 7em 4em;
}

.portfolio__item {
  position: relative;
  flex-basis: 30%;
  margin: 0;
  padding: 0;
  background: white;
}

.portfolio__desc {
  padding: 1.5em;
}

.portfolio__title {
  font-family: 'Roboto Condensed', sans-srif;
  font-size: 1.5em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0;
  overflow-wrap: break-word;
}

.portfolio__image,
.portfolio-lightbox__image{
  width: 100%;
  display: block;
}

.portfolio-lightbox {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 1em;
  color: white;
  background: rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .25);
  align-items: center;
  justify-content: center;
  transform: scale(0,1); 
  transition: transform 250ms ease-in-out;
  transform-origin: right; 
  z-index: 10;
}

.portfolio-lightbox:target {
  transform: scale(1,1);
  transform-origin: left; 
}

.portfolio-lightbox__content {
  position: fixed;
 	width: 95%;
 	height: 95%;
	background: rgba(0,0,0, 0.9)
}

.portfolio-lightbox__image { 
	position:absolute;
  max-width: 100%;
  max-height: 100%;
	object-fit: scale-down;
}

.portfolio-lightbox__title {
	position:absolute;
  padding: 1em;
	top:1em;
}
.portfolio-lightbox__body {
	position:absolute;
	bottom:1em;
	left: 1em;
}

.close {
  position: absolute;
  right: -1em;
  top: -1em;
  border: white 2px solid;
  display: flex;
  width: 4em;
  height: 4em;
  background: red;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 99;
}

.close::after {
  font-weight: 700;
  font-size: 2em;
  content: 'X';
  color: white;
}

/* Pages */
/* http://jsbin.com/emahek/2/edit?html,js,output */
.pages {
	margin:0;
	width:100%;
	height:100%;
	position:relative;
}

.page {
	position:absolute;
	top: 2em;
	left: 2em;
	margin:0;
	width:100%;
	height:100%;
}

.pages > .page:target ~ .page:last-child, .pages > .page {
  display: none;
}

/* :last-child works, but for some reason .page:last-child will not */
.pages > :last-child, .pages > .page:target {
  display: block;
}

