:root {
	--bg: #fbfaf7;
	--fg: #1d1c1a;
	--muted: #6b6862;
	--rule: #e4e1da;
	--link: #2f6b4f;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141413;
		--fg: #e9e7e2;
		--muted: #9c9890;
		--rule: #2c2b28;
		--link: #7fc4a0;
		color-scheme: dark;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding-block: 2rem 5rem;
	padding-inline: 1.25rem;
	background: var(--bg);
	color: var(--fg);
	font:
		1.0625rem/1.65 ui-sans-serif,
		system-ui,
		-apple-system,
		'Segoe UI',
		sans-serif;
}

a {
	color: var(--link);
	text-underline-offset: 0.15em;
}

.site,
.post {
	max-width: 40rem;
	margin-inline: auto;
}

.site {
	margin-bottom: 3rem;
	font-size: 0.95rem;
}

.site a {
	color: var(--muted);
	text-decoration: none;
}

h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(2rem, 6vw, 2.75rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

h2 {
	margin: 3rem 0 0.75rem;
	font-size: 1.35rem;
	line-height: 1.25;
}

.lede {
	margin-top: 0;
	color: var(--muted);
	font-size: 1.2rem;
}

/* Wider than the text column, since a canvas needs the room, but never wider than the screen */
.embed {
	width: min(64rem, 100vw - 2.5rem);
	margin: 2rem 0;
	margin-left: 50%;
	transform: translateX(-50%);
}

.embed iframe {
	display: block;
	width: 100%;
	height: min(80vh, 720px);
	border: 1px solid var(--rule);
	border-radius: 0.75rem;
	background: var(--bg);
}

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: 0.75rem 1rem;
	border: 1px solid var(--rule);
	border-radius: 0.5rem;
	line-height: 1.5;
	tab-size: 2;
}

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

.posts li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	align-items: baseline;
	padding-block: 0.75rem;
	border-bottom: 1px solid var(--rule);
}

.posts span {
	color: var(--muted);
	font-size: 0.95rem;
}
