:root {
	--bg: #fbfaf7;
	--fg: #1d1d1f;
	--muted: #6b6b70;
	--accent: #2f6f5e;
	--rule: #e4e1da;
	--max: 42rem;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #141416;
	--fg: #ececec;
	--muted: #9a9aa0;
	--accent: #7cc4ad;
	--rule: #2a2a2e;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #141416;
		--fg: #ececec;
		--muted: #9a9aa0;
		--accent: #7cc4ad;
		--rule: #2a2a2e;
		color-scheme: dark;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 1.0625rem/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 1rem;
}

header.site {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
}

.brand {
	font-weight: 700;
	color: var(--fg);
	text-decoration: none;
}

nav ul {
	display: flex;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

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

nav a:hover,
nav a[aria-current="page"] {
	color: var(--fg);
}

.theme-toggle {
	border: 1px solid var(--rule);
	background: transparent;
	color: var(--muted);
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

main {
	padding: 2.5rem 0 3rem;
}

h1,
h2,
h3 {
	line-height: 1.25;
}

h1 {
	font-size: 2rem;
	margin: 0 0 1rem;
}

h2 {
	font-size: 1.25rem;
	margin: 2.5rem 0 0.75rem;
}

a {
	color: var(--accent);
}

.muted {
	color: var(--muted);
}

.entry {
	margin: 0 0 1.5rem;
}

.entry h3 {
	margin: 0;
	font-size: 1.05rem;
}

.entry .meta {
	color: var(--muted);
	font-size: 0.9rem;
}

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

ul.posts li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--rule);
}

ul.posts time {
	color: var(--muted);
	font-size: 0.9rem;
	white-space: nowrap;
}

footer.site {
	padding: 1.5rem 0 3rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: 0.9rem;
}

@media (max-width: 30rem) {
	header.site {
		flex-wrap: wrap;
	}
	ul.posts li {
		flex-direction: column;
		gap: 0;
	}
}

@media print {
	header.site,
	footer.site,
	.theme-toggle {
		display: none;
	}
	body {
		background: #fff;
		color: #000;
	}
}
