@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,700&Montserrat:400,500&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

/* TODO: Dark mode toggle */

/******************
 *  Base styling
 ******************/

body {
	display: flex; /* use flex-grow on body-content to push footer to bottom */
	flex-direction: column;
	min-height: 100vh;

	background-color: #EEE;

	font: -apple-system-body; /* Scaling on apple devices */
	font-size: 100%;
}

@supports (font: -apple-system-body) and (not (-webkit-touch-callout: default)) {
	:root {
		font-size: 100%;
	}
}

h1 {
	font-family: 'Roboto', sans-serif;
	font-weight: 100;
	font-size: 3em;

	color: #151515;
	position: relative;
}
h1:after {
	position: absolute;
	margin: 0;
	left: 0;
	bottom: 0;

	width: 100%;
	border-top: #CCC solid .4rem;

	content: '';
	z-index: -1;
}

h2 {
	font-family: 'Roboto', sans-serif;
	font-weight: 100;
	font-size: 2em;

	margin-bottom: .25em;

	color: #151515;
	position: relative;
}

p {
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
	font-size: 1em;
	line-height: 1.25em;

	color: #151515;
	position: relative;

	margin-bottom: 1em;
}
p a {
	font-weight: 700;
	color: #087dde;
}

.gallery-item img,
.project-content img {
	background-color: #AAA; /* Background color for prominent image elements during load */
}

img.no-background {
	background: none !important;
}

.centered {
	display: block;
	text-align: center;
	margin: auto;
}

.body-content {
	padding: 1em;
	flex-grow: 1;
}

.centered-max-width {
	max-width: 100rem;
	margin: auto;
}

.centered-80p-width {
	width: 80%;
	margin: auto;
}

.flex-column {
	display: flex;
	gap: 2em;
}
.flex-column * {
	flex: 1 1 100%; /* Ensures equal sizing of columns */
}

.wrap {
	flex-wrap: wrap !important;
}

@media screen and (max-width: 70rem),
	screen and (hover: none),
	screen and (orientation: portrait) {
	.flex-column {
		flex-wrap: wrap;
	}
	.flex-column div {
		width: 100%;
	}
}

/********************
 * Header + Nav Style 
 ********************/

.header {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;

	margin-bottom: 1em;
	font-size: 3rem;
}
.header * {
	align-self: baseline;
}

.page-title {
	flex-grow: 2;
	padding-right: 1em;
	font-size: 1em; /* Override the h1 size for the header, helps with rest of layout */
}

.header-spacer {
	flex-grow: 1;
}

.nav {
	display: inline-block;

	margin: auto;
	padding: 0 .15em;
}

.nav ul li {
	display: inline-block;
	margin: auto 2.5vw;

	font-size: .5em;
}

.nav a {
	font-family: 'Roboto', sans-serif;
	font-weight: 100;
	text-decoration: none;

	color: #151515;
	
	position: relative;
	bottom: 0;
	padding: 0 .1em;

	transition-property: border, font-size;
	transition-duration: .5s;
	transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
}
.nav a:after {
	position: absolute;
	margin: 0;
	left: 0em;
	bottom: 0;

	width: 100%;
	border-top: #CCC solid .4rem;

	content: '';
	z-index: -1;
}
.nav a:hover {
	/* bottom: .2em; */
	font-size: 1.1em;
}
.nav a:hover:after {
	border-color: #ff807c;
}

/* Header and Nav restyling for mobile */
@media screen and (orientation: portrait) and (hover: none) {
	.header {
		font-size: 6rem;
	}
	.nav {
		font-size: 1em;
	}
}

/******************
 *    Footer
 ******************/

footer {
	display: flex;
	padding: 1em;
	background-color: #CCC;
}

footer p {
	margin: 0;
}

#footer-left {
	width: 50%;
}

#footer-right {
	width: 50%;
}

#footer-contact h2 {
	display: inline-block;
	margin: 0;

	font-size: 1em;
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
}

#footer-contact ul {
	display: inline-block;
}

#footer-contact ul li {
	display: inline-block;
	width: auto;
	padding: 0 .5em;

	list-style: none;

	position: relative;
}

/* Specify the p sub-el to help this stick */
#footer-contact a,
#footer-contact a p {
	font-family: 'Montserrat', sans-serif;
	font-size: 1em;
	line-height: 1.25em;
	font-weight: 700;
	color: #087dde;
	text-decoration: none;
}
#footer-contact a {
	display: inline-block;
}
#footer-contact a p {
	display: inline;
	vertical-align: center;
}
#footer-contact a img {
	display: inline;
	vertical-align: center;
	width: 1em;
	background: none;
	filter: brightness(0) saturate(100%) invert(39%) sepia(57%) saturate(6079%) hue-rotate(191deg) brightness(98%) contrast(94%);
}

#asset-attr details {
	text-align: right;
	overflow: hidden;
}
#asset-attr summary p {
	display: inline;
}
#asset-attr details a {
	display: block;

	font-family: 'Montserrat', sans-serif;
	font-size: .75em;
	line-height: 1.25em;
	font-weight: 700;
	color: #087dde;
	text-wrap: nowrap;
}

@media screen and (max-width: 40em),
screen and (orientation: portrait) and (hover: none) {
	footer {
		flex-wrap: wrap;
	}
	#footer-left {
		width: 100%;
	}
	#footer-right {
		width: 100%;
		margin-top: 1em;
	}
	#asset-attr details {
		text-align: left;
	}
}

/******************
 *   About page 
 ******************/
.about-main {
	margin: 2em 2em;
	max-width: 100rem;
}
.about-main h2 {
	font-size: 2em;
}
.about-main p {
	font-size: 1em;
}


.about-mini {
	display: flex;
	flex-wrap: wrap;
	gap: 2em;
	justify-content: center;
}
.about-mini * {
	flex: 0 0 content;
}
.about-mini h2 {
	display: block;
	font-size: 2em;
	padding: .75em;
	height: 100%;

	text-align: center;
	align-content: center;

	/* background: white; */
	border: solid .5em #CCC;
	transition-duration: 1s;
	transition-property: border-color;
	transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);

	position: relative;
}
.about-mini h2:before {
	display: block;
	position: absolute;
	top: 0;
	left: 0;

	width: 100%;
	height: 100%;

	content: '';
}
.about-mini h2:hover {
	border-color: #ff807c;
}

.about-contact ul li {
	display: inline-block;
	width: auto;
	padding: 1em;

	list-style: none;

	position: relative;
}

/* Specify the p sub-el to help this stick */
.about-contact a,
.about-contact a p {
	font-family: 'Montserrat', sans-serif;
	font-size: 1em;
	line-height: 1.25em;
	font-weight: 700;
	color: #087dde;
	text-decoration: none;
}
.about-contact a {
	display: inline-block;

	position: relative;
	bottom: 0;
	transition: bottom .25s;
}
.about-contact a:hover {
	bottom: .25em;
}
.about-contact p {
	display: inline;
	vertical-align: center;
}
.about-contact img {
	display: inline;
	vertical-align: center;
	width: 2em;
	background: none;
	filter: brightness(0) saturate(100%) invert(39%) sepia(57%) saturate(6079%) hue-rotate(191deg) brightness(98%) contrast(94%);
}

/* Text styling for mobile */
@media screen and (orientation: portrait) and (hover: none) {
	.about-main {
		font-size: 2rem;
	}
}

/************************
 * Portfolio project grid 
 ************************/

.gallery-grid {
	display: grid;
	gap: .75rem;
	grid-auto-flow: dense;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	grid-template-rows: auto;

	font-size: 1rem;
}
.gallery-item {
	position: relative; /* For item label positioning */
	grid-column: auto;
	grid-row: auto;
	width: 100%;
	/* min-height: 20em;
	max-height: 50em; */
	justify-self: center;
	overflow: hidden;
}
.gallery-item.wide {
	grid-column-end: span 2;
}
.gallery-item.tall {
	grid-row-end: span 2;
}
.gallery-item.hero {
	grid-column-end: span 2;
	grid-row-end: span 2;
}
.gallery-item img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

/* Item Hover state */

.gallery-label {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 20;
	
	color: #efefef;
	font-weight: 700;
	font-size: 4em;

	margin: 0;
	padding: .2em .3em;

	opacity: 0;
}
.gallery-label.small {
	font-size: 2.75em;
}
.gallery-item:hover p {
	opacity: 1;
}
.gallery-item a:after {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	width: 100%;
	height: 100%;

	background-color: black;
	opacity: 0;
	content: "";

	transition: opacity .3s;
}
.gallery-item:hover a:after {
	opacity: .4;
}

/* Wide screen width, limit max number of columns */
@media screen and (min-width: 80rem) {
	.gallery-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Small screen width and mobile, go to double-column layout */
@media screen and (max-width: 40rem),
screen and (orientation: portrait) and (hover: none) {
	.gallery-grid {
		min-width: auto;
		grid-template-columns: auto;
	}
	.gallery-item {
		grid-column-end: span 1;
	}
	.gallery-item.wide {
		grid-column-end: span 2;
	}
	.gallery-item.tall {
		grid-column-end: span 1;
		grid-row-end: span 2;
	}
}
@media screen and (max-width: 40rem) and (hover: hover) {
	.gallery-grid {
		font-size: .75rem;
	}
}
@media screen and (orientation: portrait) and (hover: none) {
	.gallery-grid {
		font-size: 1.25rem;
	}
}

/******************
 *  Project pages 
 ******************/

.project-main {
	display: grid;
	grid-template-rows: 1fr;
	grid-template-columns: repeat(2, auto);
	width: 80%;
	max-width: 150rem;
	margin: 7rem auto;
}

.project-details {
	/* font-size: 1rem; */

	width: auto;
	margin: 0 3rem 3rem 0;

	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
	color: #151515;
}
.project-details table {
	display: block;
}
.project-details table th {
	text-align: left;
	min-width: 5em;
	width: 5em;
}
.project-details table td {
	text-align: left;
	width: auto;
	padding: .3em;
}

.project-breakdown {
	/* font-size: 1rem; */

	display: flex;
	flex-wrap: wrap;
	gap: 2em;
	margin: 2rem 0;
}
.project-breakdown h2 {
	margin-bottom: .25em;
	font-size: 2em;
}
.project-breakdown p {
	margin: 0;
	font-size: 1em;
}

.project-content {	
	max-width: 70rem;
}
.project-content .REDACTED {
	color: black;
	background-color: black;
	padding: 0 1em;
}

/* Project Video Embeds */
.video-link {
	position: relative;
	display: block;
}
.video-link:before {
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;

	content: "";

	background-image: url("../img/icons/video_play.svg");
	background-size: 7rem;
	background-repeat: no-repeat;
	background-position: center;

	background-color: rgba(0, 0, 0, 0);
	transition: background-color .3s;

	z-index: 20;
}
.video-link:hover:before {
	background-color: rgba(0, 0, 0, 0.5);
}

/* Allow click-through on this element, but not its children */
.passthrough {
	pointer-events: none;
}
.passthrough * {
	pointer-events: all;
}

/* Project Images */
.project-img.hero {
	display: block;
	width: 100%;
	height: auto;
	margin: auto;
}

.project-content br {
	display: block;
	content: "";
	margin-top: .5rem;
}

.img-bar {
	font-size: 1rem;
	max-width: 100%;
	margin: auto;
	display: flex;
	gap: .5rem;
	justify-content: center;
}
.img-bar img.project-img {
	display: block;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: 40em;
	width: auto;
	height: 100%;
	object-fit: cover;
}

/* img-grid is secretly a flexbox, don't tell anyone */
.img-grid {
	font-size: 1rem;
	max-width: 100%;
	margin: auto;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: center;
}
.img-grid img.project-img {
	flex: 1 1 15em;
	min-width: 0;
	max-width: 100%;
	min-height: 0;
	height: auto;
	object-fit: cover;
}

/* Small screen width, stack details and content */ 
@media screen and (max-width: 80rem) {
	.project-main {
		grid-template-rows: repeat(2, auto);
		grid-template-columns: 1fr;
		width: auto;
		max-width: 100%;
		margin: 2em 2em;
	}

	.project-details {
		display: flex;
		flex-wrap: wrap;
	}
	.project-details table {
		padding-right: 2em;
	}
	
	.project-content {
		max-width: 100%;
	}

	.img-grid img.project-img {
		flex: 1 1 10em;
	}
}

/* Smaller screen width, make img galleries more compact */
@media screen and (min-width: 60rem) and (orientation: portrait) {
	.img-grid img.project-img {
		flex: 1 1 20rem;
	}
}

/* Text styling for mobile */
@media screen and (orientation: portrait) and (hover: none) {
	.project-main {
		font-size: 2rem;
	}

	.project-breakdown {
		gap: 1.5em;
		margin: 3em 0;
	}
}

/*******************
 * Programming Pages
 *******************/

.prog-main {
	max-width: 80%;
	margin: auto;
	
	font-family: "Source Code Pro", monospace;
}

.prog-item {
	display: block;
	width: fit-content;
	margin: 1.5em 0;
	padding-right: 1em;

	font-size: 2em;
	text-decoration: none;
}
.prog-item img {
	display: inline-block;
	vertical-align: center;

	width: 1em;
	height: 1em;
}
.prog-item * {
	font-family: "Source Code Pro", monospace;
}
.prog-item h2 {
	display: inline;
	font-size: 1em;
	padding: 0;
	margin: 0;
}
.prog-item p {
	font-size: .5em;
	margin: 0 0 0 3em;
	padding: 0 0 0 3ch;
	text-indent: -3ch;
}


/****************************
 *NanoGallery2 Custom Styling
 ****************************/

/* Thumbnail Label */
.nGY2GThumbnailLabel {
	height: 100%;
}
.nGY2GThumbnailLabel .nGY2GThumbnailTitle {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 5rem;
	text-shadow: none;

	height: 100%;
	margin: 0;
	padding: 0 4px;
	vertical-align: top;
}

/* Make label text smaller at very low widths, as thumbnails scale down */

@media screen and (min-width: 701px) and (max-width: 800px) {
	.nGY2GThumbnailLabel .nGY2GThumbnailTitle {
		font-size: 4.25rem;
	}
}

@media screen and (max-width: 700px) {
	.nGY2GThumbnailLabel .nGY2GThumbnailTitle {
		font-size: 3.75rem;
	}
}

/* Lightbox Label */
div.nGY2Viewer {
	/* Fix icon scaling, as they're font-based */
	font-size: 1.5rem;
	z-index: 99;
}
.nGY2Viewer div.toolbarBackground {
	background: rgba(0,0,0,0.3);
}
.toolbarContainer div.title {
	display: none;
}
.toolbarContainer div.description {
	font-family: 'Montserrat', sans-serif;
	font-weight: 500;
	font-size: 1.2rem;

	padding: 5px;
}

.nGY2Viewer div.nGY2ViewerToolsTopLeft {
	top: 0;
	left: 0;

	background: rgba(0,0,0,0.3);
}
.nGY2ViewerToolsTopLeft div.title {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 4rem;

	padding: 2px 10px;
}
.nGY2ViewerToolsTopLeft div.description {
	display: none;
}

/* Lightbox Nav */
div.ngy2viewerToolAction {
	text-shadow: none;
}
div.nGY2ViewerAreaPrevious i:before {
	content: '\e82d'
}
div.nGY2ViewerAreaNext i:before {
	content: '\e812'
}
div.nGY2ViewerAreaPrevious i,
div.nGY2ViewerAreaNext i {
	background: none !important
}
