/* Mirrors thegreatanvil.com. */
:root {
	color-scheme: light dark;
	--bg: #ffffff;
	--fg: #1a1a1a;
	--muted: #666;
	--faint: #999;
	--logo-filter: none;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0d0d0d;
	--fg: #e0e0e0;
	--muted: #9a9a9a;
	--faint: #8a8a8a;
	--logo-filter: invert(1);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0d0d0d;
		--fg: #e0e0e0;
		--muted: #9a9a9a;
		--faint: #8a8a8a;
		--logo-filter: invert(1);
	}
}
* { box-sizing: border-box; }
body {
	font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo,
		"Cascadia Code", "Cascadia Mono", Consolas,
		"Liberation Mono", "DejaVu Sans Mono", monospace;
	max-width: 68ch;
	margin: 0 auto;
	padding: 5rem 1.5rem;
	background: var(--bg);
	color: var(--fg);
	line-height: 1.7;
	font-size: 16px;
}
#theme-toggle {
	position: fixed;
	top: 1rem;
	right: 1rem;
	font: inherit;
	font-size: 0.8rem;
	background: transparent;
	color: var(--muted);
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 0.3rem 0.6rem;
	cursor: pointer;
}
#theme-toggle:hover { color: var(--fg); }
header {
	text-align: center;
	margin-bottom: 4.5rem;
}
.logo {
	height: 5em;
	width: auto;
	display: block;
	margin: 0 auto 1.75rem;
	filter: var(--logo-filter);
}
header h1 {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	letter-spacing: 0.03em;
}
header h1 a { text-decoration: none; }
header h2 {
	font-weight: 400;
	font-size: 1rem;
	color: var(--muted);
	margin: 0.6rem 0 0;
}
header nav {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: var(--faint);
}
main h1 {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	letter-spacing: 0.02em;
}
main h2 {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 3rem 0 1rem;
	letter-spacing: 0.02em;
}
article > time {
	display: block;
	margin-bottom: 2rem;
}
time { color: var(--muted); }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: 0.65rem 0; }
ul.posts { list-style: none; padding: 0; }
ul.posts time { margin-right: 1rem; }
a {
	color: var(--fg);
	text-decoration: underline;
	text-underline-offset: 2px;
}
a:hover { color: var(--muted); }
img { max-width: 100%; height: auto; }
pre {
	padding: 1rem;
	overflow-x: auto;
	border: 1px solid color-mix(in srgb, var(--faint) 35%, transparent);
	border-radius: 4px;
	font-size: 0.875rem;
	tab-size: 4;
	line-height: 1.5;
}
pre, code { font-family: inherit; }
/* The highlighter sets color-scheme inline; make code blocks follow the toggle. */
:root[data-theme="light"] pre.giallo { color-scheme: light !important; }
:root[data-theme="dark"] pre.giallo { color-scheme: dark !important; }
footer {
	margin-top: 4.5rem;
	text-align: center;
	color: var(--faint);
	font-size: 0.85rem;
}
