:root {
	color-scheme: light dark;

	/* The whole chrome is one hue at several lightnesses.
	   Change --hue to reshade the masthead, nav band and links together. */
	--hue: 220;
	--text-color: rgba(0, 0, 0, 0.75);
	--link-color: hsl(var(--hue), 60%, 50%);
	--link-visited: #66648f;
	--header-background: hsl(var(--hue), 60%, 50%);
	--masthead-color: rgba(255, 255, 255, 0.85);
	--tagline-color: rgba(255, 255, 255, 0.90);
	--dateline-color: rgba(0, 0, 0, 0.55);
	--footer-background: #1b2430;
	--footer-text: rgba(255, 255, 255, 0.65);
	--footer-link: rgba(255, 255, 255, 0.85);
	--footer-link-hover: #fff;
	--body-background: #f4f6f7;
	--content-background: #f4f6f7;
	--content-width: 600px;
	--heading-color: rgba(0, 0, 0, 0.85);
	--blockquote-border: rgba(0, 0, 0, 0.2);
	--blockquote-color: rgba(0, 0, 0, 0.75);
	--header-background-bottom: hsl(var(--hue), 60%, 47%);
	--nav-background: hsl(var(--hue), 50%, 82%);
	--nav-background-bottom: hsl(var(--hue), 50%, 79%);
	--nav-link-color: hsl(var(--hue), 62%, 36%);
	--separator-color: #dce2e7;
	--highlight-shadow: rgba(255, 255, 255, 0.9);
	--body-font: Georgia, 'Times New Roman', serif;
	--heading-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Dark mode */

@media (prefers-color-scheme: dark) {
	:root {
		--text-color: rgba(255, 255, 255, 0.75);
		--body-background: #141a20;
		--content-background: #1a2028;
		--link-color: hsl(var(--hue), 90%, 70%);
		--link-visited: hsl(248, 28%, 68%);
		--header-background: hsl(var(--hue), 45%, 30%);
		--masthead-color: rgba(255, 255, 255, 0.82);
		--tagline-color: rgba(255, 255, 255, 0.62);
		--dateline-color: rgba(255, 255, 255, 0.55);
		--footer-background: #101720;
		--footer-text: rgba(255, 255, 255, 0.6);
		--footer-link: rgba(255, 255, 255, 0.82);
		--footer-link-hover: #fff;
		--heading-color: rgba(255, 255, 255, 0.85);
		--blockquote-border: rgba(255, 255, 255, 0.2);
		--blockquote-color: rgba(255, 255, 255, 0.75);
		--header-background-bottom: hsl(var(--hue), 45%, 27%);
		--nav-background: hsl(var(--hue), 40%, 44%);
		--nav-background-bottom: hsl(var(--hue), 40%, 41%);
		--nav-link-color: #fff;
		--separator-color: #333a42;
		--highlight-shadow: transparent;
	}
}

/* Base */

body {
	margin: 0;
	padding: 0;
	font-family: var(--body-font);
	font-size: 1.15em;
	line-height: 1.8;
	color: var(--text-color);
	background-color: var(--body-background);
}

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

a {
	color: var(--link-color);
	text-underline-offset: 3px;
}
a:visited {
	color: var(--link-visited);
}

/* Header */

#header-background {
	background: linear-gradient(to bottom, var(--header-background), var(--header-background-bottom));
}
header {
	font-family: var(--heading-font);
	padding: 40px 2px 22px 2px;
	max-width: var(--content-width);
	margin: 0 auto;
	display: flex;
	justify-content: flex-start;
	align-items: baseline;
	gap: 14px;
}
header .biglink {
	margin: 0;
	font-size: 52px;
	font-weight: bold;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
header .biglink a {
	color: var(--masthead-color);
	text-decoration: none;
}
header .biglink a:hover {
	text-decoration: underline;
	text-underline-offset: 6px;
	color: #fff;
}
header .biglink a:visited {
	color: var(--masthead-color);
}
header .tagline {
	margin: 0;
	font-size: 17px;
	color: var(--tagline-color);
}

/* Nav band */

#topnav-background {
	background: linear-gradient(to bottom, var(--nav-background), var(--nav-background-bottom));
}
#topnav {
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 8px 2px 9px 2px;
	text-align: right;
	font-family: var(--heading-font);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}
#topnav a {
	color: var(--nav-link-color);
	text-decoration: none;
	margin-left: 18px;
}
#topnav a:visited {
	color: var(--nav-link-color);
}
#topnav a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Content area */

#content-background {
	background-color: var(--content-background);
}

/* Main content */

main {
	max-width: var(--content-width);
	margin: 0 auto;
	padding-top: 72px;
	padding-bottom: 72px;
}

/* Headings */

h1, h2, h3, h4 {
	font-family: var(--heading-font);
	color: var(--heading-color);
	line-height: 1.2em;
}

/* Blog posts */

.post {
	margin-bottom: 72px;
}
.post h1 {
	margin: 4px 0 14px 0;
	font-family: var(--heading-font);
	font-size: 28px;
	font-weight: bold;
	line-height: 1.2em;
	color: var(--heading-color);
}
.post h1 a {
	color: var(--heading-color);
	text-decoration: none;
}
.post h1 a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
}
.post h1 a:visited {
	color: var(--heading-color);
}
.post h3 {
	font-family: var(--heading-font);
	font-size: 20px;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	color: var(--heading-color);
}
.postBody {
	margin: 0;
	overflow-wrap: break-word;
}
.postBody p {
	margin: 0 0 14px 0;
}
.postBody a {
	text-decoration: underline;
}
.postDateline {
	font-family: var(--heading-font);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--dateline-color);
	margin-bottom: 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--separator-color);
	box-shadow: 0 1px 0 var(--highlight-shadow);
}
.postDateline a {
	color: var(--dateline-color);
	text-decoration: none;
}
.postDateline a:visited {
	color: var(--dateline-color);
}
.postDateline a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Quotes and code */

blockquote {
	color: var(--blockquote-color);
	border-left: 3px solid var(--blockquote-border);
	padding-left: 18px;
	margin-left: 0;
	font-style: normal;
}

code, pre {
	font-family: "SF Mono", Menlo, "Courier", monospace;
	font-size: 17px;
	white-space: pre-wrap;
}

/* Archive link */

#archiveLink a {
	font-family: var(--heading-font);
	font-size: 17px;
	font-weight: bold;
}
#archiveLink a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Centered images (used on post pages) */

.centeredImage {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* App names look weird in Georgia */
.appname {
	font-family: var(--heading-font);
	font-size: 0.95em;
}

/* Standalone pages — not blog posts, so .post rules don't reach them */

/* A page opens with a big title rather than a small dateline,
   so it needs less runway above than the blog does. */
main:has(> .page) {
	padding-top: 44px;
}

.page h1 {
	font-size: 34px;
	font-weight: bold;
	margin: 0 0 24px 0;
}
.page h2 {
	font-size: 22px;
	font-weight: bold;
	margin: 48px 0 16px 0;
}
.page h3 {
	font-size: 20px;
	font-weight: bold;
	margin: 32px 0 12px 0;
}
.page h4 {
	font-size: 18px;
	font-weight: bold;
	margin: 28px 0 10px 0;
}
.page p {
	margin: 0 0 20px 0;
}

.page p:last-child {
	margin-bottom: 0;
}

/* Footer */

#footer-background {
	background-color: var(--footer-background);
}
footer {
	max-width: var(--content-width);
	margin: 0 auto;
	font-family: var(--heading-font);
	padding: 32px 2px 36px 2px;
	font-size: 17px;
	color: var(--footer-text);
}
footer a {
	color: var(--footer-link);
	text-underline-offset: 3px;
}
footer a:visited {
	color: var(--footer-link);
}
footer a:hover {
	color: var(--footer-link-hover);
}
footer p {
	margin: 0;
	line-height: 1.6;
}
footer p + p {
	margin-top: 20px;
}

/* Responsive */

@media (max-width: 700px) {
	header {
		padding: 32px 20px 18px 20px;
	}
	#topnav {
		padding: 8px 20px 9px 20px;
	}
	main {
		padding: 72px 20px 72px 20px;
	}
	footer {
		padding: 28px 20px 32px 20px;
	}
}

@media (max-width: 480px) {
	#topnav {
		padding: 6px 20px 7px 20px;
		text-align: left;
	}
	#topnav a {
		margin-left: 0;
		margin-right: 14px;
	}
	header {
		padding: 24px 20px 14px 20px;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}
	header .biglink {
		font-size: 38px;
	}
	header .tagline {
		font-size: 17px;
	}
	main {
		padding-top: 36px;
		padding-bottom: 36px;
	}
	.post {
		margin-bottom: 36px;
	}
}
