/* gallery css */
.gallery {
	-webkit-column-count: 1;
	-webkit-column-gap: 0;
	-moz-column-count: 1;
	-moz-column-gap: 0;
	column-count: 1;
	column-gap: 0;
	margin: 0;
}

.gallery > article {
	margin-bottom: 1em;
	position: relative;
}

@media screen and (min-width: 700px) {
	.gallery {
		-webkit-column-count: 2;
		-moz-column-count:    2;
		column-count:         2;
		column-gap: 2em;
		margin: 3em;
	}

	.gallery > article {
		margin-bottom: 1em;
	}
}

@media screen and (min-width: 1100px) {
	.gallery {
		-webkit-column-count: 3;
		-moz-column-count:    3;
		column-count:         3;
		column-gap: 2em;
		margin: 3em;
	}
	.gallery > article {
		margin-bottom: 2em;
	}
}

@media screen and (min-width: 1600px) {
	.gallery {
		-webkit-column-count: 4;
		-moz-column-count:    4;
		column-count:         4;
		column-gap: 2em;
		margin: 3em;
	}
	.gallery > article {
		margin-bottom: 2em;
	}
}

span.caption {
	position: absolute;
	bottom: 0;
	right: 0;
	margin-bottom: 0.6em;
	color: black;
	font-style: italic;
}

@media screen and (max-width: 700px) {
	img.portfolio {
		width: 98%;
	}

	span.caption {
		margin-right: 0.5em;
	}
}


/* lightbox, the thing that pops up when clicking an image in the gallery */

a.lightbox {
  visibility: hidden;
  opacity: 0;

  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100%;
  text-align: center;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.90);
  transition: visibility 0s, opacity 0.2s linear;
}
a.lightbox:target {
  outline: none;
  visibility: visible;
  opacity: 1;
}
div.lightbox {
  margin-top: 4em;
  display: inline-block;
  position: relative;
}
span.lightbox-close {
  z-index: 999;
  position: absolute;
  top: 0;
  right: -2.1em;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
}

article.frontpage {
	height: fit-content;
	position: relative;
}

.frontpage > a {
	z-index: 4;
}

.frontpage > h3 {
	background-color: rgba(0.2,0.2,0.2,0.5);
	color: #CCC;
	border: 0;
	right: 0;
	bottom: 0.3em;
	z-index: 4;
	position: absolute;
	text-align: right;
 	margin: 0.5em;
	padding: 0 0.5em 0 0.5em;
}

.frontpage > img {
	border: 0.3em solid rgba(0.5,0.5,0.5,0.5);
	opacity: 0;
	transition: opacity 0.5s ease 0s;
	width: 100%;
	height: auto;
}

.frontpage > img:hover {
	opacity: 1.0 !important;
	transition: opacity .15s ease-in-out;
	-moz-transition: opacity .15s ease-in-out;
	-webkit-transition: opacity .15s ease-in-out;
}

img.portfolio {
	opacity: 0;
	transition: opacity 0.5s ease 0s;
	width: 100%;
	height: auto;
	border: 5px solid #888;
	border-bottom: 2em solid #888;
}

img.portfolio:hover {
	opacity: 1.0 !important;
	transition: opacity .15s ease-in-out;
	-moz-transition: opacity .15s ease-in-out;
	-webkit-transition: opacity .15s ease-in-out;
}

