@import url('https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap');

/*#region Splash*/

#MainHero div {
	display: block;
	text-align: center;
}

#MainHeroWrap {
	width: 100%;
	height: 100vh;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;

	background: url("/home/bg_low.jpg") fixed center;
	background-size: cover;

	z-index: 1;
}

#MainHero {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	clip: rect(0, auto, auto, 0);
}

#MainHero h1 {
	color: white;
	display: inline-block;
	font-size: 10vw;
	font-family: 'Roboto Mono', monospace;
	position: relative;
	text-decoration: none;
	margin: 0;
}

#MainHero h1 span:last-child {
	animation: blink 1.9s infinite;
}

@keyframes blink {
	0% {
		opacity: 0;
	}
	30% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

#heroCard {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	user-select: none;

	background: rgba(33, 33, 33, 0.8);
	padding: 1vw 5vw;

	box-shadow: 10px 10px 10px 5px rgba(0, 0, 0, 0.5);

	will-change: transform;

	overflow: hidden;
}

#heroCard::before {
	content: 'X';
	font-family: 'cooper-black-std', serif;
	position: absolute;
	bottom: -12vw;
	left: -4vw;
	font-size: 40vw;
	margin: 0;
	padding: 0;

	color: black;
	opacity: 0.5;

	z-index: -1;
	pointer-events: none;
}


.ml4 {
	display: inline-block;
	min-width: 200px;
	position: relative;
	text-align: center;
	vertical-align: top;
}

.ml4 .letters {
	position: absolute;
	margin: auto;
	left: 0;
	top: 0;
	right: 0;
	opacity: 0;
}

header {
	position: sticky;
	top: 0;
	box-shadow: 0 -10px 10px 0 black;
}

footer {
	position: relative;
	z-index: 2;
}

/*#endregion*/


.MainContent {
	position: relative;
	z-index: 3;
	padding-top: 180vh;
}

/*#region Pictures*/

#projPics {
	position: fixed;
	top: calc(50% - 10vw * 3 * 9 / 16 + 50px);
	left: 0;
	height: calc(20vw * 3 * 9 / 16);
	text-align: center;
	width: 100%;
	z-index: 0;
	pointer-events: none;
	transform-origin: center;
	opacity: 0;
	will-change: transform, opacity;
}

#projPics > div {
	width: 100%;
	/*margin: 0 0 calc((100vh - 107px - (3 * 20 / 16 * 9vw)) / 3) 0;*/
	margin: 0 0 -5px 0;
	padding: 0;
	will-change: transform;
}

#projPics img {
	width: 20%;
	/*height: 20 / 16 * 9 vw*/
}


/*#endregion*/

#heroSub {
	margin: 50vh 0;
	text-align: center;
	position: sticky;
	top: calc(50vh + 50px);
	transform: translateY(-50%);
	font-size: 10vw;

	text-shadow: -2px -2px 10px black, 2px 2px 10px black, -2px 2px 10px black, 2px -2px 10px black;
}

.MainContent > section {
	background: #212121;
	position: relative;
	z-index: 3;

	max-width: 800px;
	margin: 0 auto;
	padding: 50px 80px;

	box-shadow: 2px -5px 15px black;
}

/*#region Big Links*/
#bigLinks {
	display: grid;
	grid-template-columns: 2fr 4fr 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
	grid-template-areas: "resume proj git" "resume proj git" "resume proj in" "info proj in" "info proj contact" "info proj contact";
	width: 100%;
	height: 300px;

	perspective: 500px;
}

#bigLinks a {
	position: relative;

	transform: scale(1);
	transition: transform 0.3s ease-in-out;
}

#bigLinks a::before {
	content: '';
	position: absolute;
	display: block;
	background-size: cover;
	background-position: center;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;

	filter: blur(0);
	transition: filter 0.3s ease-in-out;
}

#bigLinks a:hover, #bigLinks a:focus {
	transform: scale(1.05) rotateX(-1deg);
	z-index: 2;
}

#bigLinks a:hover::before, #bigLinks a:focus::before {
	filter: blur(1px);
}

#bigLinks a:active {
	transform: scale(1.05) rotateX(3deg);
	transition: transform 0.1s ease-in-out;
}

#bigLinks a span {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
	color: white;
	display: flex;
	width: 100%;
	position: absolute;
	bottom: 0;

	height: 30px;
	justify-content: center;
	align-items: center;

	transition: height 0.3s ease-in-out;
	text-shadow: 0 0 5px black;
}

#bigLinks a:hover span, #bigLinks a:focus span {
	height: 100% !important;
}

/*#region Big Project Link*/
#bigLinks a:first-child {
	grid-area: proj;
	background: black;
	overflow: hidden;
	font-size: 125%;
}

#bigLinks a:first-child::before {
	display: none;
}

#bigLinks a:first-child span {
	height: 50px;
	transition: height 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

#bigLinks a div {
	height: 50%;
	width: calc(150px * 5 * 16 / 9);
	/*pic height: 150px, *16/9 = pic width, *5 = all width*/
	white-space: nowrap;
	filter: blur(0);
	transition: filter 0.3s ease-in-out;
}

#bigLinks a:first-child:hover div, #bigLinks a:first-child:focus div {
	filter: blur(1px);
}

#bigLinks a:first-child:hover span, #bigLinks a:first-child:focus span {
	font-size: 200%;
}

#bigLinks a div img {
	height: 100%;
	display: inline;
	filter: brightness(70%);
}

#bigLinks #projLink1 {
	animation-name: scrollRight;
}

#bigLinks #projLink2 {
	animation-name: scrollLeft;
}

#bigLinks a:first-child div {
	animation-duration: 60s;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

@keyframes scrollRight {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(0);
	}
}

@keyframes scrollLeft {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-100%);
	}
}


/*#endregion*/

#bigLinks a:nth-child(2) {
	grid-area: resume;
	background-image: url("/home/linkpics/resume.png");
}

#bigLinks a:nth-child(2)::before {
	background-image: url("/home/linkpics/resume.png");
}

#bigLinks a:nth-child(3) {
	grid-area: contact;
}

#bigLinks a:nth-child(3)::before {
	background-image: url("/home/linkpics/email.png");
}

#bigLinks a:nth-child(4) {
	grid-area: git;
}

#bigLinks a:nth-child(4)::before {
	background-image: url("/home/linkpics/github.png");
}

#bigLinks a:nth-child(5) {
	grid-area: in;
}

#bigLinks a:nth-child(5)::before {
	background-image: url("/home/linkpics/linkedin.png");
}

#bigLinks a:last-child {
	grid-area: info;
}

#bigLinks a:last-child::before {
	background-image: url("/home/linkpics/about.png");
}

/*#endregion*/

#creditsFoot {
	font-size: 80%;
	margin-top: 100px;
}

@media (max-width: 768px) {

	/*#region Mobile Sticky Header*/
	html, body {
		overflow: visible;
	}

	header {
		height: 100vh;
		background: none;
		overflow: hidden;
		pointer-events: none;
	}

	header nav {
		background: #1a237e;
		pointer-events: all;
	}

	header h1 {
		position: relative;
	}

	header h1::after {
		display: block;
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: calc(100% + 2px);
		background: #1a237e;
		z-index: -3;
		pointer-events: all;
	}

	header nav ul li ul {
		max-height: calc(100vh - 170px);
		overflow-y: auto;
		overflow-x: hidden;
	}

	header nav ul li ul::before {
		display: none;
	}

	/*#endregion*/
	.MainContent > section {
		padding: 2vw 5vw;
	}

	#heroSub {
		margin-top: 80px;
	}


}

/*#region Big Links*/
@media (max-width: 900px) {
	#bigLinks {
		grid-template-columns: 3fr 2fr 2fr;
		grid-template-rows: 3fr 1fr 1fr;
		grid-template-areas: "proj proj proj" "resume git in" "resume info contact";
		height: 500px;
	}
}

@media (max-width: 500px) {
	#bigLinks {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 3fr 1fr 1fr 1fr;
		grid-template-areas: "proj proj" "resume git" "resume in" "contact info";
		height: 600px;
	}

	.MainContent {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/*#endregion*/

@media (max-width: 750px) {
	#heroCard::before {
		bottom: -25vw;
		font-size: 80vw;
	}
}

@media (max-width: 600px) {
	#MainHero h1 {
		font-size: 18vw;
	}
}

@media (min-aspect-ratio: 3 / 1) {
	#heroCard h1 {
		font-size: 20vh;
	}

	#heroCard h2 {
		font-size: 8vh;
	}

	#heroCard::before {
		bottom: -30vh;
		left: -10vh;
		font-size: 100vh;
	}
}
