* {
	box-sizing: border-box;
	margin: 0;
	user-select: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: geometricPrecision;
	text-wrap: pretty;
}

@font-face {
	font-family: 'EightiesComeback';
	src:
		url('assets/EightiesComeback-Regular.woff2') format('woff2'),
		url('assets/EightiesComeback-Regular.otf') format('opentype');
	font-style: normal;
	font-weight: normal;
	text-rendering: optimizeLegibility;
}

@font-face {
	font-family: 'EightiesComeback';
	src:
		url('assets/EightiesComeback-Bold.woff2') format('woff2'),
		url('assets/EightiesComeback-Bold.otf') format('opentype');
	font-style: normal;
	font-weight: bold;
	text-rendering: optimizeLegibility;
}

html {
	font-size: calc(var(--projects-width) / 1000);
	--max-width: 1200px;
	--fg: #fff;

	--padding: 12.5rem 25rem;
	--gap: 36rem 30rem;

	--projects-min-height: 550px;
	--project-height: 200rem;
	--title-padding-top: 25rem;
	--bottom-padding-top: 12px;

	--peek-height: 90px;
	--peek-vertical-padding: 20px;

	--title-font: bold 50rem/1 EightiesComeback, serif;
	--title-letter-spacing: 0;
	--more-font: 40rem/1.2 EightiesComeback, serif;
	--more-letter-spacing: 0;

	--mono-font: 11px/1.45 Menlo, sans-serif;

	--outline: none;
}

body {
	background: #000;
	color: var(--fg);
}

a {
	color: var(--fg);
}

@media (hover: hover) {
	a:hover,
	a:hover * {
		animation: rainbow 1s linear alternate infinite;
	}
}

#video {
	position: fixed;
	inset: 0;
	z-index: -1;
	video {
		width: 100%;
		height: 100%;
		object-fit: cover;
		opacity: 0.4;
	}
	&::after {
		content: ' ';
		display: block;
		position: absolute;
		inset: 0;
		background: url(assets/checker.png);
	}
}

#projects, #bottom, #video * {
	transition: 0.25s opacity linear;
	will-change: opacity;
	.idle & {
		transition-duration: 0.75s;
	}
}

.idle {
	#video video {
		opacity: 1;
	}
	#video::after {
		opacity: 0;
	}
	#projects, #bottom {
		opacity: 0;
	}
}


.content {
	padding: var(--padding);
	max-width: var(--max-width);
	outline: var(--outline, 1px solid lime);
	margin: 0 auto;
}

.thirds {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gap);
	outline: var(--outline, 1px solid magenta);
	> * {
		outline: var(--outline, 1px solid cyan);
	}
}

#peek, .bottom, .detail {
	font: var(--mono-font);
}

#projects {
	height: calc(100vh - var(--peek-height));
	min-height: var(--projects-min-height);
	width: 100%;
	display: flex;
	align-items: center;
}

.mast {
	position: relative;
}

.mast img {
	position: absolute;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.project {
	display: block;
	text-decoration: none;
	height: var(--project-height);
	padding-top: var(--title-padding-top);
	display: flex;
	flex-direction: column;
	border-top: 3px solid var(--fg);
	.title {
		height: 100%;
		font: var(--title-font);
		letter-spacing: var(--title-letter-spacing)
	}
	.bottom {
		display: flex;
		padding-top: var(--bottom-padding-top);
		border-top: 1px solid var(--fg);
		justify-content: space-between;
		white-space: nowrap;
	}
}

#bottom {
	position: absolute;
	width: 100%;
	top: max(var(--projects-min-height), calc(100% - var(--peek-height)));
}

.shade {
	background: #000c;
	border-bottom: 1px dotted #fff3;
}

#peek {
	height: var(--peek-height);
	padding-top: var(--peek-vertical-padding);
	padding-bottom: var(--peek-vertical-padding);
	* {
		color: #ddd;
	}
}

#more-link {
	font-weight: bold;
}

#more {
	min-height: 100vh;
	font: var(--more-font);
	padding-top: 2em;
	padding-left: 8.8em;
	p {
		margin-bottom: 1.5em;
		letter-spacing: var(--more-letter-spacing);
	}
	.header {
		font-size: 0.5em;
		margin-bottom: 1em;
	}
	.title {
		line-height: 1.3;
	}
}

#more {
	background: url(assets/logo.gif);
	background-size: 4.5em;
	background-repeat: no-repeat;
	background-position: calc(50% - 8.05em) 30%;
	background-attachment: fixed;
}

.detail {
	display: inline-block;
	width: 85%;
	line-height: 1.8;
	margin-top: 2em;
	max-width: 550px;
	min-width: 320px;
}

#more .email-link {
	font-weight: bold;
	text-decoration: none;
}

.email-link {
	user-select: text;
}
.email-link b {
	display: none;
}

@media screen and (max-width: 700px) {
	html {
		font-size: 0.6px;
		--padding: 4vw;
		--peek-height: 270px;
	}
	.mast {
		position: absolute;
		top: 35px;
		width: 165px;
		right: 22px;
		height: var(--peek-height);
	}
	#peek {
		/* don't change text wrapping as padding shrinks */
		box-sizing: content-box;
		position: absolute;
		top: 0;
		left: 0;
		width: 255px;
		height: var(--peek-height);
		line-height: 1.85;
	}
	.thirds {
		grid-template-columns: 1fr;

	}
	#projects {
		flex-direction: column;
		height: auto;
		min-height: none;
		padding-bottom: 60px;
		padding-top: calc(var(--peek-height) + 50px);
		.thirds {
			gap: 30px;
		}
	}
	.project {
		height: auto;
		border-top: 0;
		.title {
			font-size: 8.75vw;
			padding-bottom: 0.3em;
		}
		.bottom {
			border-width: 2px;
		}
	}
	#bottom {
		position: initial;
		.header {
			font-size: 0.65em;
		}
	}
	#more {
		padding: var(--padding);
		padding-top: 1em;
		min-height: auto;
		font-size: 7.5vw;
		background: none;
	}
	.detail {
		width: 87.5%;
	}
}

@keyframes rainbow {
	100% {
		color: #f0c;
		border-color: #f0c
	}
	50% {
		color: #ff0;
		border-color: #ff0
	}
	0% {
		color: #0af;
		border-color: #0af
	}
}

.novideo {
	#video {
		background: #999;
	}
	video {
		display: none;
	}
}
