/* structure */

body {
	margin: 0;
	color: white;
	font: 20px monospace;
}
main {
	--margin: 25px;
	--border: 5px;
	--padding: 15px;
	position: absolute;
	top: 0;
	left: 50vw;
	transform: translate(-50%, 0%);
	background-color: black;
	margin: var(--margin) auto;
	border: var(--border) solid white;
	border-radius: 10px;
	padding: var(--padding);
	min-height: calc(100vh - 2*var(--margin) - 2*var(--border) - 2*var(--padding));
	width: calc(100vw - 2*var(--margin) - 2*var(--border) - 2*var(--padding));
	max-width: 100vh;
}
nav {
	padding-bottom: 15px;
	border-bottom: 2px solid white;
	margin-bottom: 20px;
}
nav a {
	background-color: gray;
	padding: 0 20px;
	border-radius: 10px;
	color: black;
	text-decoration: none;
}
nav a.this {
	background-color: white;
	font-weight: bold;
}

.project {
	display: flex;
	flex-wrap: wrap;
}
.project p {
	display: flex;
	flex-grow: 1;
	flex-shrink: 1;
	width: 0;
	flex-direction: column;
}
.project a {
	font-weight: bold;
	font-size: 25px;
}
.project img {
	height: 50px;
	margin-right: 10px;
}

/* general styling */
p {
	margin: 0;
}
a {
	color: white;
}

/* deltarune dark fountain background,
 * adapted from the actual game code for drawing dark fountains. */

#background {
	position: fixed;
	background-color: black;
	width: 100vw;
	height: 100vh;
}
@property --hue-siner {
	initial-value: 0;
	inherits: false;
	syntax: "<number>";
}
@keyframes fountain-hue {
	from {
		--hue-siner: 0;
	}
	to {
		--hue-siner: 1;
	}
}
@property --saturation-siner {
	initial-value: 0;
	inherits: false;
	syntax: "<number>";
}
@keyframes fountain-saturation {
	from {
		--saturation-siner: 0;
	}
	to {
		--saturation-siner: 6.283185;
	}
}
@property --siner {
	initial-value: 0;
	inherits: false;
	syntax: "<number>";
}
@keyframes fountain-scroll {
	from {
		--siner: 0;
	}
	to {
		--siner: 480;
	}
}

.fountain {
	position: fixed;
	width: 100%;
	height: 100%;
	background-image: url("/assets/depth.png");
	background-size: 480px;
	image-rendering: pixelated;
	filter: hue-rotate(calc(var(--hue-siner) * 360deg)) saturate(calc(0.627451 + 0.235294 * sin(var(--saturation-siner))));

	/* nice defaults for no animation */
	--hue-siner: 0.8;
	--siner: 42;
}
@media (prefers-reduced-motion: no-preference) {
	.fountain {
		animation: 34.133333s linear infinite fountain-hue,
			6.702064s linear infinite fountain-saturation,
			8s linear infinite fountain-scroll;
	}
}
.fountain.a {
	background-position: calc(-1px * var(--siner)) calc(-1px * var(--siner));
}
/* in deltarune's code the x-value here instead uses a `hscroll` value that
 * as far as i can tell does the exact same thing as siner since it's tiled... */
.fountain.b {
	background-position: calc(1px * var(--siner)) calc(1px * var(--siner));
}

.frosted-glass {
	position: fixed;
	width: 100%;
	height: 100%;
	backdrop-filter: blur(8px);
	transition: backdrop-filter 0.5s;
}
.frosted-glass:hover {
	backdrop-filter: none;
}
