body {
	position: relative;
	background:
		radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 224, 138, 0.06), transparent 70%),
		radial-gradient(ellipse at 50% 40%, #3a3a3a 0%, #333333 55%, #242424 100%);
	background-attachment: fixed;
	font-size: 1.6em;
	font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
	margin: 0;
	padding: 0;
}

/* faint continuation of the header grid, fading out down the page */
body::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 150vh;
	max-height: 100%;
	z-index: -2;
	pointer-events: none;
	background:
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 32px),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 32px);
	-webkit-mask-image: linear-gradient(to bottom, #000 0, #000 35vh, transparent 150vh);
	mask-image: linear-gradient(to bottom, #000 0, #000 35vh, transparent 150vh);
}

canvas#matrix {
	display: block;
	position: fixed;
	left: 0;
	top: 0;
	z-index: -1;
}

div.container {
	position: relative;
	max-width: 100rem;
	margin: 0 auto;
	min-height: 100vh;
	border-bottom: 1px solid black;
	}

header {
	min-height: 120px;
	padding: 0 80px;
	border-radius: 0 0 200px 200px;
	background:
		linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.35)),
		url('images/header_bg.gif') #050d1a;
	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.55),
		0 2px 18px rgba(255, 224, 138, 0.12),
		inset 0 -12px 30px rgba(255, 224, 138, 0.05);
	position: relative;
	z-index: 1;
	zbackground: #050d1a;
	color: #DDD;
	border: 2px solid #ffe08a;
	border-top: 0;
	ztext-align: right;	
	font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", sans-serif; /* Yes, I actually do like Comic Sans. */
	ztext-shadow: 4px 4px #050d1a;
	zfont-family: Arial;
}

header h1 {
	margin: 8px 0 0 5px;
	padding: 0 0;
		
	float: right;
	font-size: 3.2em;
	font-weight: 900;
	line-height: 1.15;
	text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8);
}

header h1 .logo-nick {
	color: #ffe08a;
	background: linear-gradient(to bottom, #fff6d6 15%, #ffe08a 55%, #f6cd6a 90%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: none;
	filter: drop-shadow(0 0 12px rgba(255, 224, 138, 0.35));
}

header h1 .logo-tld {
	color: gray;
	font-size: .4em;
}

header ul {
	margin: 0;
	padding: 60px 0 0 0;
	list-style: none;
	font-variant: small-caps;
	}

header ul li {
	display: inline;
	margin: 20px;
	zpadding: 20px;
	}

header a {
	color: #DDD;
	text-decoration: none;
	transition: color 0.2s, text-shadow 0.2s;
}

header nav a:hover {
	text-shadow: 0 0 10px rgba(255, 224, 138, 0.5);
}

header nav a {
	position: relative;
	padding-bottom: 4px;
}

header nav a::after {
	content: "";
	position: absolute;
	left: 50%;
	right: 50%;
	bottom: -2px;
	height: 2px;
	border-radius: 2px;
	background: #ffe08a;
	box-shadow: 0 0 8px rgba(255, 224, 138, 0.7);
	transition: left 0.25s ease-out, right 0.25s ease-out;
}

header nav a:hover::after, header nav a.selected::after {
	left: 0;
	right: 0;
}

header nav a:hover {
	color: #ffe08a;
}

header nav a.selected {
	color: #fff;
}

footer {
	background: linear-gradient(to bottom, #ffe9a8, #ffe08a 40%, #f3cf6c);
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45), 0 -2px 16px rgba(255, 224, 138, 0.15);
	color: #333333;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0 auto;
	border-radius: 200px 200px 0 0;
	text-align: center;
	}

footer h1 {
	margin: 8px;
	margin-bottom: 0;
	font-size: 60%;
	font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", sans-serif;
	font-variant: small-caps;
}

footer .footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 8px;
	padding: 4px 60px 8px 60px;
}

footer a {
	font-size: 60%;
	text-decoration: none;
	color: #3d3220;
	font-weight: bold;
	padding: 1px 12px;
	border-radius: 999px;
	background: rgba(61, 50, 32, 0.08);
	transition: color 0.2s, background 0.2s;
}

footer a:hover {
	color: #ffe08a;
	background: #050d1a;
}

main {
	margin: 80px;
	border-bottom: 1px solid #333333;
		color: #DDD;
	line-height: 150%;
}

main h1, main h2 {
	font-weight: 900;
	text-shadow: 2px 2px 0 #050d1a, 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* flow-root keeps headings (and their underline) beside floated figures instead of under them */
main h1, main h2 {
	display: flow-root;
}

main h1::after, main h2::after {
	content: "";
	display: block;
	width: 3em;
	height: 3px;
	margin-top: 0.15em;
	border-radius: 3px;
	background: linear-gradient(to right, #ffe08a, transparent);
	box-shadow: 0 0 8px rgba(255, 224, 138, 0.35);
}

main h2::after {
	width: 2em;
	height: 2px;
}

div.project h2::after {
	display: none;
}

main .section-title {
	display: flex;
	align-items: center;
	gap: 0.6em;
	font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", sans-serif;
	font-size: 1.6em;
	color: #ffe08a;
	margin: 1.4em 0 0.6em 0;
}

main .section-title:first-child {
	margin-top: 0;
}

main .section-title::after {
	flex: 1;
	width: auto;
	height: 2px;
	margin: 0.2em 0 0 0;
	background: linear-gradient(to right, rgba(255, 224, 138, 0.6), transparent);
}

main a {
	color: #ffe08a;
	text-decoration: none;
	transition: color 0.2s;
}

main :is(p, li, dt, dd) a {
	text-decoration: underline;
	text-decoration-color: rgba(255, 224, 138, 0.5);
	text-underline-offset: 0.18em;
	transition: color 0.2s, text-decoration-color 0.2s;
}

main :is(p, li, dt, dd) a:hover {
	color: #fff2c8;
	text-decoration-color: #ffe08a;
}

main li::marker {
	color: #ffe08a;
}

main figcaption {
	color: #aaa;
}

::selection {
	background: #ffe08a;
	color: #050d1a;
}

html {
	scrollbar-color: #5a5040 #222;
}

main > * {
	animation: rise-in 0.6s cubic-bezier(.2,.7,.3,1) backwards;
}
main > *:nth-child(2) { animation-delay: 0.05s; }
main > *:nth-child(3) { animation-delay: 0.1s; }
main > *:nth-child(4) { animation-delay: 0.15s; }
main > *:nth-child(5) { animation-delay: 0.2s; }
main > *:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes rise-in {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}

.spacing li + li {
  margin-top: 1em;
}

dd + dt {
	  margin-top: 1em;
}

main img {
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
}

main figure a img {
	transition: transform 0.25s, box-shadow 0.25s;
}

main figure a:hover img {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 224, 138, 0.5);
}

main figure {
    margin: 30px;
    width: min-content;
    }

main figure.left {
	float: left;
	clear: left;
}

main figure.right {
	float: right;
	clear: right;
}


main figcaption {
    text-align: center;
    font-style: italic;
    font-size: 0.6em;
    line-height: 1em;
}

iframe.video {
    width: 560px;
    height: 315px;
    display: block;
    margin: 0 auto;
}

@media screen and (max-width: 600px) {
	main figure {
		width: auto;
	}
	main figure.left {
		float: unset;
		margin: 0;
	}
	main figure.right {
		float: unset;
		margin: 0;		
	}
	main figure img {
		max-width: 100% !important;
	}
	main figcaption {
		text-align: left;
	}	
	iframe.video {
        width: 100%;
        height: unset;
    }
}

hr {
	border: 0;
	height: 1px;
	margin: 1.8em 0;
	overflow: visible;
	display: flex;
	justify-content: center;
	align-items: center;
	background: linear-gradient(to right, transparent, #5a5a5a 15%, #5a5a5a 85%, transparent);
}

hr::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	background: #ffe08a;
	box-shadow: 0 0 8px rgba(255, 224, 138, 0.6), 0 0 0 4px #333333;
	transform: rotate(45deg);
}

@media screen and (max-width: 100rem) {

	body {
		font-size: 1.5em;
	}


	div.container {
		width: 100%;
	}

	header {
		min-height: unset;
		border-left: 0;
		border-right: 0;
		border-radius: 0;
		padding: 0 30px 10px 30px;
	}

	header ul {
		padding: 50px 0 0 0;
	}

	header ul li {
		margin: 10px;
	}

	main {
		margin: 40px;
		margin-bottom: 80px;
	}

	footer {
		border-radius: 0;
	}
}

@media screen and (max-width: 55rem) {
	body {
		font-size: 1.2em;
	}

	header h1 {
		float: none;
		margin: 0;
		font-size: 2.6em;
	}

	header ul {
		padding: 10px 0 0 0;
		display: flex;
		max-width: 350px;
		flex-flow: row wrap;
		justify-content: space-between;
	}

	header ul li {
		margin: 0 0 10px 0;
		padding: 0;
	}
	main {
		margin: 20px;
		margin-bottom: 80px;
	}
}

@media screen and (max-width: 420px) {
	header h1 {
		font-size: 2.2em;
	}
}

@media screen and (max-width: 350px) {
	header {
		padding: 0 10px;
		font-size: .8em;
	}
}


div.project-list {
    display: flex;
    flex-flow: row wrap;
    gap: 20px;
    margin: 0 0 1em 0;
    padding: 0;
    width: 100%;
}

div.project {
    flex-basis: calc(50% - 10px);
    box-sizing: border-box;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-flow: row nowrap;
    border-radius: 14px;
    transition: background 0.25s;
}

div.project:not(.disabled):hover {
    background: rgba(255, 255, 255, 0.035);
}

div.project img {
    transition: box-shadow 0.5s ease, transform 0.5s cubic-bezier(.4, 0, .2, 1);
}

div.project:not(.disabled):hover img {
    transform: rotate(-2deg) scale(1.04);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 224, 138, 0.5);
}

div.project-detail {
    zborder: 1px solid green;
    margin: 4px;
    padding: 4px;
}

div.project-detail:last-child {
    padding-right: 40px;
    zborder: 1px solid red;
}

div.project a {
	color: unset;
	text-decoration: none;
}

div.project:hover a {
	color: #ffe08a;
}

div.project p {
	margin-bottom: 0.4em;
}

div.project img {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 10px;
}

div.project h2 {
    margin: 0;
	font-weight: 700;
	text-shadow: none;
}

div.disabled h2 {
	color: grey;
}

div.disabled p {
	color: grey;
}

div.disabled img {
	filter: grayscale(1);
	opacity: .5;
}

@media screen and (max-width: 80rem) {
    div.project {
        flex-basis: 100%;
    }  
	div.project-detail:last-child {
    	padding-right: 0;
	}
}

@media screen and (max-width: 50rem) {
    div.project {
        min-height: 100px;
    }

    div.project img {
        width: 100px;
        height: 100px;
    }   
}

.pi {
	position: absolute;
	right: 0;
	bottom: 0;
	margin: 5px 30px;
}
.pi img {
	height: 20px;
	opacity: 0;
}
footer:hover .pi img {
	opacity: 0.2;
}
@media screen and (max-width: 100rem) {
	.pi {
		margin: 5px;
		bottom: 0;
	}
}

