@font-face {
	font-family: "Die Grotesk A";
	src: url('die_grotesk/die-grotesk-a-bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Die Grotesk B";
	src: url('die_grotesk/die-grotesk-b-bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Die Grotesk A";
	src: url('die_grotesk/die-grotesk-a-medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: block;
}
@font-face {
	font-family: "Die Grotesk A";
	src: url('die_grotesk/die-grotesk-a-medium-italic.woff2') format('woff2');
	font-weight: 500;
	font-style: italic;
	font-display: block;
}
@font-face {
	font-family: "Neue Rows Mono";
	src: url('neue_rows_mono/NeueRowsMono-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: block;
}

:root {
	--bg: #eaeaea;
	--fg: #000000;
	--gr: #505050;
	--hl: rgba(192, 192, 192, 0.80);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	scrollbar-color: var(--fg) transparent;
}

body {
	font-size: 17px;
	font-weight: 500;
	font-family: "Die Grotesk A", "Helvetica Neue", "Helvetica", "Neue Haas Grotesk Text Pro", system-ui, sans-serif;
	line-height: 1.5;
	color: var(--fg);
	background-color: var(--bg);
	display: grid;
	grid-template-columns: 1fr minmax(0, 560px) 1fr;
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
	font-feature-settings: "calt";
}

nav {
	grid-column: 1 / -1;
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--bg);
	padding: 0.6rem 0.8rem;
}

.nav-container {
	font-weight: 500;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	width: 100%;
}

.nav-left {
	grid-column: 1;
	justify-self: start;
}

.nav-right {
	grid-column: 3;
	justify-self: end;
	display: flex;
	gap: 1em;
}

.nav-container a {
	padding: 0.2rem;
	text-decoration: none;
	color: var(--fg);
	background-color: var(--bg);
}

.nav-container a:hover {
	color: var(--bg);
	background-color: var(--fg);
}

.nav-right a {
	margin-left: 0.5rem;
}

main {
	grid-column: 2;
	padding: 0 1rem;
}

footer {
	grid-column: 1 / -1;
	margin-top: 2rem;
	padding: 1rem 0;
	color: var(--gr);
	font-feature-settings: "tnum", "zero";
	text-align: center;
	font-weight: 500;
}

/* content */
.page-title {
	color: var(--fg);
	font-family: "Die Grotesk B";
	font-size: 200%;
	padding-top: 1rem;
	margin: 0;
}

.page-date {
	color: var(--gr);
	font-weight: 500;
	font-feature-settings: "case", "tnum", "zero";
	margin-bottom: 2rem;
}

a {
	text-decoration: underline;
	color: inherit;
}

a:hover {
	color: var(--bg);
	background-color: var(--fg);
}

h1, h2 {
	font-family: "Die Grotesk A";
	font-weight: 700;
	margin-top: 1rem;
}

h1 {
	font-size: 150%;
}

h2 {
	font-size: 125%;
}

p {
	margin-top: 1rem;
	hyphens: auto;
	hyphenate-limit-chars: 5 3 2;
	hyphenate-limit-lines: 2;
	hyphenate-limit-last: always;
}

code {
	font-family: "Neue Rows Mono", ui-monospace, monospace;
/*	font-feature-settings: "cv02", "cv03", "cv10", "cv11", "ss03"; */
	font-weight: 700;
	padding: 0 0.1rem;
	background-color: var(--hl);
}

pre code {
	padding: 0;
	background-color: transparent;
}

pre {
	overflow-x: auto;
	margin-top: 1rem;
	padding: 0.5rem;
	line-height: 1.4;
	background-color: var(--hl);
}

ul, ol {
	list-style-position: inside;
	margin-top: 0.25rem;
}

li { 
	margin-top: 0.25rem;
}

ul {
	list-style-type: "> ";
}

li::marker {
	color: var(--ui);
}

.section-list {
	list-style-position: inside;
	list-style-type: '→ ';
}

blockquote {
	border-left: 2px solid var(--ui);
	padding-left: 1rem;
	margin-left: 0;
	font-style: italic;
}

:is(h1, h2) + :is(h1, h2, p, ul, ol, pre, blockquote, table, figure) {
	margin-top: 1rem;
}

:is(.page-title,.page-date) + :is(h1, h2, p, ul, ol, pre, blockquote, table, figure) {
	margin-top: 1rem;
}
