* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

@font-face {
	font-family: 'Iosevka Term Slab';
	src: url('/fonts/IosevkaTermSlab-Regular.woff2') format('woff2');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Iosevka Term Slab';
	src: url('/fonts/IosevkaTermSlab-Bold.woff2') format('woff2');
	font-weight: bold;
	font-style: normal;
}

@font-face {
	font-family: 'Iosevka Term Slab';
	src: url('/fonts/IosevkaTermSlab-Italic.woff2') format('woff2');
	font-weight: normal;
	font-style: italic;
}

:root {
	--base: 16px;
	--h1: var(--base*2);
	--dark: #333333;
	--light: #D9D9D9;
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}
::-webkit-scrollbar-track {
	background: var(--dark);
}
::-webkit-scrollbar-thumb {
	background: var(--light);
	border-radius: 6px;
	border: 3px solid var(--dark);
}

html {
	font-size: var(--base);
	scroll-behavior: smooth;
}


body {
	background-color: var(--dark);
	color: var(--light);
	font-family: 'Iosevka Term Slab', monospace;
	font-size: 1rem;
	font-weight: 200;
	line-height: 1.5em;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 2rem 6ch;
}

/* ── HEADER ── */
header {
	max-height: 4rem;
	display: flex;
	align-items: center;
	gap: 2ch;
	/* padding: 0.5rem 3ch; */
}

.ident {
	display: flex;
	flex: 1;
}

.logo {
	/* flex-shrink: 0; */
	margin-right: 6ch;
}

.logo svg {
	display: block;
	height: 6rem;
	width: auto;
}

.site-title {
	/* flex: 1;
	line-height: 1.5rem; */
	align-content: center;
}

.site-title h1 {
	font-size: 2rem;
	line-height: 3rem;
	font-weight: normal;
	/* color: #D9D9D9; */
	white-space: nowrap;
}

.site-title p {
	font-size: 1rem;
	line-height: 1.5rem;
	/* color: #D9D9D9; */
}

nav {
	display: flex;
	flex: 1.618;
	gap: 2ch;
	/* flex-shrink: 0; */
	justify-content: space-around;
}

nav a {
	color: inherit;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	font-size: 1rem;
	white-space: nowrap;
	flex: 1;
}

nav a:hover {
	/* color: var(--light); */
	/* text-decoration: underline; */
	color: var(--dark);
	background-color: var(--light);
}

/* ── MAIN ── */
main {
	flex: 1;
	display: flex;
	min-height: 0;
}

main.index {
	flex-direction: column;
	justify-content: center;
	overflow: clip;
}

main.index img {
	min-height: 100%;
	object-fit: cover;
	image-rendering: pixelated;
	mix-blend-mode: lighten;
}

/* Two-column layout: 1 : 1.618 */
main.columns {
	display: grid;
	grid-template-columns: 1fr 1.618fr;
	grid-auto-flow: column;
}

/* main.index .left-column {
	align-items: center;
	justify-content: center;
} */

.left-column {
	padding-right: 6ch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border-right: 2px solid var(--light);
}

.left-column img {
	max-width: 100%;
	object-fit: contain;
}

.right-column {
	align-content: center	;
	padding-left: 6ch;
	padding-right: 2ch;
	overflow-y: auto;
}

/* Index page: photo + bio */

.photo-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
}

.photo-wrap img {
	width: 80%;
	display: block;
}

.divider {
	width: 1px;
	/* background-color: #D9D9D9; */
}

main.index .right-column {
	display: flex;
	align-items: stretch;
	padding: 3rem 4ch;
	overflow-y: auto;
}

/* ── BIO / CONTENT ── */
.bio,
.content {
	font-size: 1rem;
	line-height: 1.5rem;
	max-width: 100ch;
	height: 100%;
}

.content#intro {
	align-content: center;
}

.bio p,
.content p {
	margin-bottom: 1rem;
}

.bio p:last-child,
.content p:last-child {
	margin-bottom: 0;
}

.bio p:has(+ ul),
.content p:has(+ ul) {
	margin-bottom: 0;
}

.bio ul,
.content ul {
	list-style: none;
	margin-bottom: 1.5rem;
}

.bio > ul > li,
.content > ul > li {
	padding-left: 2ch;
	text-indent: -2ch;
}

.bio > ul > li::before,
.content > ul > li::before {
	content: '· ';
}

.bio > ul > li > ul,
.content > ul > li > ul {
	margin-left: 2ch;
}

.bio > ul > li > ul > li,
.content > ul > li > ul > li {
	padding-left: 2ch;
	text-indent: -2ch;
}

.bio > ul > li > ul > li::before,
.content > ul > li > ul > li::before {
	content: '· ';
}

/* Markdown content */
.content h1 {
	font-size: 2rem;
	line-height: 3rem;
	font-weight: normal;
	margin-bottom: 1rem;
}

.content h2 {
	font-size: 1.5rem;
	line-height: 2.25rem;
	font-weight: normal;
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.content h3 {
	font-size: 1.25rem;
	line-height: 1.875rem;
	font-weight: normal;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

.content h4 {
	font-size: inherit;
	font-weight: bold;
	text-align: right;
	margin-bottom: 1rem;
}

.content code {
	/* font-family: 'Iosevka Term Slab', monospace;
	background-color: #444444; */
	padding: 0.125rem 0.375rem;
}

.content pre {
	/* background-color: #2a2a2a; */
	padding: 1rem;
	margin-bottom: 1.5rem;
	overflow-x: auto;
}

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

.content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}

.content th,
.content td {
	text-align: left;
	padding: 0.5rem 1ch;
	/* border-bottom: 1px solid #555555; */
}

.content th {
	font-weight: normal;
	/* color: #AAAAAA; */
}

.content img {
	max-width: 100%;
	height: auto;
}

.content a {
	color: var(--light);
	text-decoration: underline;
}

/* ── SIDEBAR NAV ── */
.sidebar {
	list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.sidebar > li {
	margin-bottom: 0.5rem;
}

.sidebar > li > a {
	/* color: #D9D9D9; */
	text-decoration: none;
	text-transform: none;
	/* display: block; */
	/* padding: 0.25rem 0; */
}

.sidebar > li > a:hover {
	/* text-decoration: underline; */
}

.sidebar > li > a.current {
	/* color: #FFFFFF; */
	/* font-weight: bold; */
	margin-right: -2ch;
}

.sidebar > li > a.current::after {
	content: " >";
}

blockquote {
	font-style: italic;
	/* margin-left: 2ch; */
	margin: 2rem 0;
}

/* ── FOOTER ── */
footer {
	/* padding: 0.5rem 3ch; */
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	line-height: 1.5rem;
}

footer .quote {
	font-size: 1rem;
}

.footer-deco {
	text-align: right;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
	header {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	/* nav {
		gap: 2ch;
	} */

	main.columns,
	main.index {
		grid-template-columns: 1fr;
	}

	.left-column {
		border-bottom: 1px solid; /*#555555;*/
	}

	.right-column {
		padding: 1.5rem 2ch;
	}

	main.index .right-column {
		padding: 1.5rem 2ch;
	}
}