body {
	font-family: 'Open Sans', sans-serif;
	line-height: 2em;
	margin: 0;
}

nav {
	width: 100%;
	height: 3em;
	font-size: 1em;
	display: flex;
	justify-content: center;
	background-color: #000;
}

nav a {
	color: #fff;
	display: block;
	padding: 0 1em;
	line-height: 3em;
	text-decoration: none;
}

nav a:hover {
	color: #aaa;
	text-decoration: underline;
}

header {
	background-image: url('/images/header-farm.jpg');
	background-position: center;
	background-size: cover;
	width: 100%;
	height: 15em;
	text-align: center;
	position: relative;
}

header h1 {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -100%);
	display: inline-block;
	font-size: 2em;
	border: 0.1em solid;
	border-radius: 1em;
	text-transform: uppercase;
	padding: 0 .5em;
	line-height: 1.25em;
}

footer {
	width: 100%;
	padding: 0;
	margin-top: 4em;
}

h1.page-title {
	text-align: center;
}

div.project-list {
	display: flex;
	justify-content: space-around;
	align-content: space-around;
	flex-wrap: wrap;
}

article.project-thumbnail {
	flex: 0 0 auto;
	width: 20em;
	height: 17em;
	border: 1px solid #999;
	border-radius: 1em;
	margin-bottom: 4em;
	margin-left: 2em;
	margin-right: 2em;
	overflow: hidden;
}

article.project-thumbnail:hover {
	border-color: #000;
}

article.project-thumbnail div.project-image {
	height: 100%;
	overflow: hidden;
	background-size: cover;
	background-position: center top;
}

article.project-thumbnail div.project-image a {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
}
article.project-thumbnail div.project-image a {
    background:rgba(0,0,0,0.5);
	opacity: 1;
    transition: opacity 0.5s;
    -webkit-transition: opacity 0.5s;
   -moz-transition: opacity 0.5s;
}

article.project-thumbnail div.project-image:hover a {
	opacity: 0;
}

article.project-thumbnail div.project-image a div.project-title {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 0;
}


article.project-thumbnail div.project-image a div.project-title h2 {
	text-align: center;
	color: rgba(255, 255, 255, 1);
	text-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.62);
	font-size: 1.25em;
	font-weight: bold;
	width: 100%;
	margin-left: 1em;
	margin-right: 1em;
	line-height: 1.5em;
}

article.project-thumbnail div.project-image img.project-company {
	flex: 0 1 auto;
	width: 100%;
	border: none;
	border-top: 1px solid #999;
	border-radius: unset;
}

section.content {
	max-width: 50em;
	margin-left: auto;
	margin-right: auto;
	padding: 1em;
}

section.content a {
	text-decoration: none;
	color: #777;
}
section.content a:hover {
	text-decoration: underline;
	color: #000;
} 

.post-content {
	width: 85%;
	margin-left: auto;
	margin-right: auto;
}

/* figures */
figure img {
	display: block;
	border-radius: 1em;
	border: 1px solid #999;
	width: 90%;
	margin-left: auto;
	margin-right: auto;
}

figure figcaption {
	display: block;
	margin-left: auto;
	margin-right: auto;
	color: #777;
	font-size: .7em;
	text-align: center;
	width: 80%;
	line-height: normal;
}

figure.center {
	width: 100%;	
}

figure.inline {
	display: inline;
	width: 25%;
}
figure.left {
	float: left;
}

figure.right {
	float: right;	
}

img.project-company {
	display: block;
	border-radius: 1em;
	border: 1px solid #999;
	margin-left: auto;
	margin-right: auto;
}

/* gallery */

.image-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax( 12em, 1fr ));
	grid-auto-rows: 12em;
	grid-gap: 1em;
}

.image-gallery a {
	display: block;
	min-height: 12em;
	min-width: 12em;
	background-size: cover;
	background-position: center;
	grid-auto-flow: dense;
	border-radius: 1em;
	border: 1px solid #999;
	overflow: hidden;
	color: #000;
}

.image-gallery a:hover {
	border-color: #000;
}

.image-gallery a:nth-child(10n+1), .image-gallery a:nth-child(1) {
	grid-column: span 2;
	grid-row: span 2;
	background-color: #444 !important;
}

/** LIGHTBOX MARKUP **/

.image-gallery-lightboxes {
	width: 100%;
	height: 100%;
}
.lightbox {
	display: none;
	position: fixed;
	z-index: 999;
	width: 100%;
	height: 100%;
	text-align: center;
	top: 0;
	left: 0;
	background: rgba(64,64,64,1);
}

.lightbox img {
	max-width: 95%;
	max-height: 95%;
	position: relative;
	top: 50%;
	transform: translate(0, -50%);
	border-radius: 1em;
}

.lightbox:target {
	outline: none;
	display: block;
}

.project-navigator {
	margin-top: 2em;
	display: flex;
	justify-content: space-between;
}

.project-navigator article.project-thumbnail {
	width: 10em;
	height: 8em;
	font-size: .5em;
	line-height: 1.4em;
	margin: 0;
}


@media screen and (max-aspect-ratio: 1/1) {
	.image-gallery {
		grid-template-columns: repeat(3, 1fr);
	}

	.image-gallery a {
		min-height: 20vw;
		min-width: 20vw;
	}

	.image-gallery a:nth-child(10n+1), .image-gallery a:nth-child(1) {
		grid-column: unset;
		grid-row: unset;
	}
	
}

@media screen and (max-aspect-ratio: 2/3) {
	.image-gallery {
		grid-template-columns: 1fr;
		grid-auto-rows: 50vw;
	}

	.image-gallery a {
		min-height: 50vw;
		min-width: 50vw;
	}

	article.project-thumbnail {
		width: 90vw;
		height: 75vw;
	}
	
	article.project-thumbnail div.project-image a div.project-title h2 {
		font-size: 7.5vw;
	}
}

