/* Global */
:root {
    --white: #fff;
    --gray: #616D7E;
    --black: #000;
    --red: #eb4747;
}

@font-face {
	font-family: "mad-sans-fill-bold";
	src: url("../fonts/mad-sans-fill-bold.eot");
	src: url("../fonts/mad-sans-fill-bold.eot?#iefix") format("embedded-opentype"),
		url("../fonts/mad-sans-fill-bold.woff2") format("woff2"),
		url("../fonts/mad-sans-fill-bold.woff") format("woff"),
		url("../fonts/mad-sans-fill-bold.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "mad-sans-fill-bold-italic";
	src: url("../fonts/mad-sans-fill-bold-italic.eot");
	src: url("../fonts/mad-sans-fill-bold-italic.eot?#iefix") format("embedded-opentype"),
		url("../fonts/mad-sans-fill-bold-italic.woff2") format("woff2"),
		url("../fonts/mad-sans-fill-bold-italic.woff") format("woff"),
		url("../fonts/mad-sans-fill-bold-italic.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "mad-sans-fill-bold";
    letter-spacing: 0.1px;
    width: 100vw;
    height: auto;
    font-size: 1em;
    line-height: 1.25;
}

main {
    /* border: 1px solid magenta; */
    margin: 21.5px 20px auto 20px;
    /* height: 800px; */
}

nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 20px;
    width: 100%;
    height: auto;
    margin-top: -4px;
    margin-bottom: 20px;
	/* border: 1px solid green; */
}

.project {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 20px;
    justify-content: space-between;
    width: 100%;
}

.project:not(:first-of-type) {
    margin-top: 92px;
}

.project:first-of-type {
    margin-top: 75px;
}

img {
    background: lightgray;
    width: 100%;
	justify-self: center;
	margin-bottom: 20px;
}

article img:last-of-type {
	margin-bottom: 0;
}

.caption {
    /* background: yellow; */
    position: fixed;
	width: auto;
    grid-column: 1 / span 2;
    padding-left: 40px;
    margin-right: 60px;
    color: #616D7E;
}

.mobile-caption {
	display: none;
}

.menu {
    /* background: yellow; */
    position: fixed;
    width: auto;
    text-align: right;
    right: 60px;
	z-index: 1;
}

.work-title {
    font-family: "mad-sans-fill-bold-italic";
    display: block;
    text-indent: 20px;
}

.port {
	width: 70%;
}

.land {
	width: 100%;
}

.slash {
	margin-left: 4px;
	margin-right: 4px;
}

.gray-slash {
	margin-right: 54px;
}

.back-to-top {
    position: fixed;
    bottom: 15px;
    right: 60px;
    color: #616D7E;
}

#info, #mail {
    margin-left: 20px;
}

/* Links */
a:link, a:visited {
    color: #616D7E;
    text-decoration: none;
}

a:hover {
	cursor: pointer;
}

a.active {
    color: #eb4747;
}

a:link.external {
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover.external {
	color: #616D7E;
	text-decoration: none;
}

a:hover.inactive {
	color: black;
}

.back-to-top:hover {
	cursor: pointer;
}

/* Media Queries */
@media (max-width: 900px) {
	.project {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 720px) {
	body {
		font-size: 1.125em;
		line-height: 1.375em;
	}
	nav {
		display: block;
		margin-bottom: 0;
	}
	.menu {
		display: block;
		position: initial;
		text-align: left;
	}
	.active,
	#info,
	#mail {
		margin: 0;
	}
	.caption {
		display: none;
	}
	.mobile-caption {
		display: block;
		/* margin-top: 10px; */
		position: initial;
		margin-bottom: 10px;
		color: var(--gray);
	}
	.project:first-of-type {
		margin-top: 0px;
	}
	.project {
		display: grid;
		grid-template-columns: 1fr;
		grid-column-gap: 20px;
		justify-content: space-between;
		width: 100%;
	}
	.project:not(:first-of-type) {
    	margin-top: 0px;
	}
	.port {
		width: 80%;
	}
	img:not(:last-child) {
		margin-bottom: 10px;
	}
	article {
		margin-bottom: 20px;
	}
	nav {
		margin-bottom: 20px;
	}

	.menu a {
		display: block;
		width: max-content;
		padding: 0;
	}
	.back-to-top {
		right: 40px;
	}
}

