:root {
	color-scheme: light dark;
	--header-background: #3d1f3f;
	--nav-background: #a8402e;
	--body-background: #f4f3f6;
	--text-color: #2a2833;
	--link-color: #3446b8;
	--link-visited: #8a2f7a;
	--dateline-color: #0a7a85;
	--separator: #d9d6e0;
	--separator-shadow: 0 1px 0 var(--separator), 0 2px 0 rgba(255,255,255,0.8);
	--footer-background: #3d1f3f;
	--footer-text: #bdb6e0;
	--footer-link: #e2defa;
	--footer-link-hover: #fff;
	--tagline-color: #dcc8f0;
	--header-title: #fff;
	--nav-link: #fff4ee;
	--nav-link-hover: #fff;
	--blockquote-border: #e5a823;
	--blockquote-color: #5c5a66;
	--code-color: #4a4766;
	--content-width: 600px;
	--body-font: Georgia, 'Times New Roman', serif;
	--heading-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--mono-font: "SF Mono", Menlo, "Courier", monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--header-background: #3a1f40;
		--nav-background: #8a3322;
		--body-background: #1a1824;
		--text-color: #dcd9e6;
		--link-color: #9fb0ff;
		--link-visited: #f0a6e0;
		--dateline-color: #6fcfc8;
		--separator: #2c2940;
		--separator-shadow: 0 1px 0 var(--separator);
		--footer-background: #3a1f40;
		--footer-text: #9a93c8;
		--footer-link: #c4bdf0;
		--footer-link-hover: #fff;
		--tagline-color: #b9b0e8;
		--header-title: #fff;
		--nav-link: #fff;
		--nav-link-hover: #fff;
		--blockquote-border: #c99a2a;
		--blockquote-color: #a09cb0;
		--code-color: #b4b0cc;
	}
}

/* Reset */
body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure,
header, footer, main, nav, article, section {
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--body-font);
	font-size: 1.15em;
	line-height: 1.8;
	color: var(--text-color);
	background-color: var(--body-background);
	-webkit-text-size-adjust: 100%;
}

/* Header */
#header-background {
	background-color: var(--header-background);
	padding: 14px 0;
}

#header-background header {
	font-family: var(--heading-font);
	max-width: var(--content-width);
	margin: 0 auto;
	display: flex;
	align-items: baseline;
	gap: 12px;
}

#header-background h1 {
	font-size: 22px;
	font-weight: bold;
	line-height: 1.2;
}

#header-background h1 a {
	color: var(--header-title);
	text-decoration: none;
}

#header-background h1 a:hover {
	text-decoration: underline;
}

#header-background .tagline {
	font-size: 17px;
	color: var(--tagline-color);
}

/* Nav */
#topnav-background {
	background-color: var(--nav-background);
	padding: 6px 0;
}

nav#topnav {
	max-width: var(--content-width);
	margin: 0 auto;
	text-align: right;
	font-family: var(--heading-font);
	font-size: 17px;
	line-height: 1.4;
}

nav#topnav a {
	color: var(--nav-link);
	text-decoration: none;
	font-weight: bold;
	margin-left: 14px;
}

nav#topnav a:first-child {
	margin-left: 0;
}

nav#topnav a:hover {
	color: var(--nav-link-hover);
	text-decoration: underline;
}

/* Content */
main {
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 48px 0 48px 0;
}

/* Blog posts */
.blogpost {
	padding: 24px 0;
}

.blogpost:first-child {
	padding-top: 0;
}

.blogpost h1 {
	margin-top: 0.5em;
}

.post-dateline {
	font-family: var(--heading-font);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--dateline-color);
	padding-bottom: 8px;
	box-shadow: var(--separator-shadow);
}

.post-dateline a,
.post-dateline a:visited {
	color: var(--dateline-color);
	text-decoration: none;
}

.post-dateline a:hover {
	text-decoration: underline;
}

.post-body {
	padding-top: 8px;
	overflow-wrap: break-word;
}

.post-body p,
.post-body blockquote,
.post-body pre,
.post-body ul,
.post-body ol,
.post-body dl,
.post-body figure {
	margin-bottom: 16px;
}

.post-body > :last-child {
	margin-bottom: 0;
}

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

a:visited {
	color: var(--link-visited);
}

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

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

blockquote > :last-child {
	margin-bottom: 0;
}

/* Code */
pre, code {
	font-family: var(--mono-font);
	font-size: 17px;
	color: var(--code-color);
}

pre {
	padding: 8px 12px;
	overflow-x: auto;
}

/* Lists */
ul, ol {
	margin-left: 24px;
}

li > ul, li > ol {
	margin-bottom: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--heading-font);
	line-height: 1.2;
}

h1 {
	font-size: 24px;
	font-weight: bold;
}

h2 {
	font-size: 20px;
	font-weight: bold;
}

h3 {
	font-size: 18px;
	font-weight: bold;
}

/* Footer */
#footer-background {
	background-color: var(--footer-background);
	padding: 32px 0;
}

#footer-background footer {
	max-width: var(--content-width);
	margin: 0 auto;
	font-family: var(--heading-font);
	font-size: 17px;
	color: var(--footer-text);
}

#footer-background footer a {
	color: var(--footer-link);
	font-weight: bold;
}

#footer-background footer a:hover {
	color: var(--footer-link-hover);
}

.footer-links {
	margin-bottom: 18px;
	color: var(--footer-link);
}

.footer-links a {
	margin: 0 2px;
}

.footer-tagline {
	margin-top: 1px;
}

/* Video */
video {
	max-width: 100%;
}

/* Archive */
.archive-link {
	margin-top: 24px;
	font-family: var(--heading-font);
	font-size: 17px;
	font-weight: bold;
}

.archive-item {
	margin-bottom: 12px;
}

/* Tablet and smaller — add side padding */
@media screen and (max-width: 700px) {
	#header-background header,
	nav#topnav,
	main,
	#footer-background footer {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* Phone — left-align nav, tighten footer links */
@media screen and (max-width: 480px) {
	nav#topnav {
		text-align: left;
	}

	nav#topnav a {
		margin-left: 0;
		margin-right: 12px;
	}

	.footer-links a {
		margin: 0 1px;
	}
}
