html {
	background: #fdfdfd;
}

body {
	margin: 0; padding: 0;
	font: 115% sans-serif; color: #111;
}

h1, h2, h3, p, ul {
	margin: 0 0 1rem;
}

h1 {
	font-size: 50%;
	letter-spacing: .25em;
	margin-bottom: 2rem;
	text-transform: uppercase;
	color: #111;
	overflow: hidden;
}

h1:after {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	content: "";
	background: #ededed;
	width: 100%;
	height: 1px;
}

h1:after {
	left: .75em;
	margin-right: -100%;
}

a {
	color: #111;
}

nav, #Main {
	padding: 2.5rem;
}

nav {
	position: fixed; top: 0;
	padding-left: 0;
	padding-right: 0;
	width: 13rem;
}

.NavList {
	position: relative;
	margin: 0; padding: 140px 0 0;
	list-style: none;
}

.NavList:before {
	position: absolute; left: 2.5rem; top: 0;
	content: '';
	background: 0 0 url(logo.svg) no-repeat;
	width: 72px; height: 80px;
}

.NavList .NavList {
	padding: 0;
}

.NavList .NavList:before {
	display: none;
}

.NavListItem {
	margin: 0; padding: 0;
}

.NavLink, .ProjectLinks a {
	font-weight: normal;
	font-size: 80%;
	text-decoration: none;
}

.NavLink {
	display: block;
	padding: .5em 0;
	margin-bottom: .3em;
}

.NavList a {
	padding-left: 2.5rem;
}

.NavList .NavList a {
	padding-left: 3.5rem;
}

a.Active {
	background: #ededed;
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
	font-weight: bold;
}

a[href].Active {
	background: #111; color: #fff;
}

#Main {
	margin-left: 13rem;
	max-width: 40em;
}

#Main a h2 {
	margin-bottom: .1em;
}

#Main p a {
	text-decoration: underline;
	text-underline-offset: .1em;
}

#Main p, #Main li {
	line-height: 1.5;
}

.Excerpt {
	font-size: 90%;
	font-style: italic;
}

.Stats,
.TL time {
	font-size: 70%;
	text-transform: uppercase;
}

.ScreenshotLink img, .IconLink img {
	float: right;
	margin: 0 0 1em 1em;
}

.IconLink img {
	float: left;
	margin: 0 .75em .75em 0;
	width: 48px;
}

.ScreenshotLink img {
	width: 128px;
	border: 1px solid #ededed;
	border-radius: 4px;
}

iframe {
	aspect-ratio: 16 / 9;
	width: 100%;
	height: 100%;
	margin-bottom: 1em;
}

.ProjectLinks {
	padding: 0;
	list-style: none;
}

.ProjectLinks li {
	display: inline;
}

.ProjectLinks a {
	transition: border-color 0.3s ease;
	display: inline-block;
	margin: 0 .2em .5em 0; padding: .25em .75em;
	border: 1px solid #ededed;
	border-radius: 4px;
}

.ProjectLinks a.Primary {
	background: #111;
	border-color: #111;
	color: #fdfdfd;
	font-weight: bold;
}

.ProjectLinks a:hover {
	border-color: #111;
}

.Separator {
	margin-bottom: 4rem;
}

.TL {
	position: relative;
	margin: 0 0 4rem; padding: 0;
	list-style: none;
}

.TL:after {
	content: ' ';
	position: absolute; left: 50%; top: 0;
	width: 1px; height: 100%;
	background: #ededed;
}

.TL li {
	position: relative;
	margin: 0 50% 0 0; padding: .5em 1em .5em 0;
	text-align: right;
}

.TL li:after {
	content: ' ';
	position: absolute; right: 0; top: 1.25em;
	width: .8em; height: 1px;
	background: #ededed;
}

.TL li:nth-child(even) {
	margin: 0 0 0 50%; padding: .5em 0 .5em 1em;
	text-align: left;
}

.TL li:nth-child(even):after {
	left: 0;
}

.TL time {
	display: block;
}

@media screen and (max-height: 480px) {
	nav {
		position: absolute;
	}
}

@media screen and (max-width: 640px) {
	body {
		font-size: 105%;
	}

	h1 {
		font-size: 60%;
		text-align: center;
		overflow: hidden;
	}

	h1:before,
	h1:after {
		position: relative;
		display: inline-block;
		vertical-align: middle;
		content: "";
		background: #ededed;
		width: 50%;
		height: 1px;
	}

	h1:before {
		right: 1em;
		margin-left: -50%;
	}

	h1:after {
		left: .75em;
		margin-right: -50%;
	}

	nav, #Main {
		padding: 1rem;
		max-width: none;
	}

	nav {
		position: static;
		width: auto;
		text-align: left;
		padding-top: 1.5rem;
		padding-bottom: .5rem;
		padding-left: 0;
		-webkit-tap-highlight-color: transparent;
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		-khtml-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
	}

	.NavList:before {
		left: auto; right: 0; top: 0;
	}

	.NavList {
		padding: 0 130px 0 0;
	}

	.NavList a {
		padding-left: 1rem;
	}

	.NavList .NavList a {
		padding-left: 2rem;
	}

	.NavLink {
		padding: .7em 0;
	}

	.ProjectLinks a {
		padding-top: .5em;
		padding-bottom: .5em;
	}

	#Main {
		margin-left: 0;
	}
}

@media screen and (max-width: 320px) {
	body {
		font-size: 95%;
	}

	.NavList:before {
		background-image: none;
	}

	.NavList {
		padding: 0;
	}

	.ScreenshotLink img {
		width: 100%;
		margin: 0 0 1em;
	}
}

@media (prefers-color-scheme: dark) {
	html {
		background: #181818;
	}

	body {
		color: #ccc;
	}

	h1 {
		color: #fff;
	}

	h1:before,
	h1:after {
		background-color: #333;
	}

	.NavList:before {
		filter: invert(100%);
	}

	a {
		color: #fff;
	}

	a.Active {
		background: #333;
	}

	a[href].Active {
		background: #fff;
		color: #111;
	}

	.ProjectLinks a,
	.ScreenshotLink img {
		border-color: #333;
	}

	.ProjectLinks a.Primary {
		background: #fff;
		border-color: #fff;
		color: #111;
	}

	.ProjectLinks a:hover {
		border-color: #fff;
	}

	.TL:after,
	.TL li:after {
		background: #333;
	}
}
