:root {
	color-scheme: light dark;
}

@media (prefers-color-scheme: light) {
	:root {
		--background: #faefe0;
		--foreground: black;
		--section-background: #fac98b;
		--section-border: #c34f30;
		--section-foreground: black;
		--link-color: #343158;
		--article-background: white;
		--article-foreground: black;
		--btn-background: #a12f16;
		--btn-foreground: white;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--background: #3d3d35;
		--foreground: white;
		--section-background: #584731;
		--section-border: #a12f16;
		--section-foreground: white;
		--link-color: #988fff;
		--article-background: black;
		--article-foreground: white;
		--btn-background: #a12f16;
		--btn-foreground: white;
	}
}

html, body {
	background-color: var(--background);
	color: var(--foreground)
	font-family: Gentium, serif;
}

body {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
	margin: 0;
	padding: 0;
	font-family: serif;
	background-color: var(--background);
	color: var(--foreground);
}

main {
	flex: 2;
	display: flex;
	padding: 0 20px;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}

article {
	max-width: min(80ch, 100vw);
	padding: 1em 2em;
	background-color: var(--article-background);
	color: var(--article-foreground);
	border-radius: 0.25em;
}

article h1 {
	background-color: var(--section-background);
	color: var(--section-foreground);
	width: min(calc(100% + 8em), 100vw);
	margin-left: -4em;
	border-radius: 1em;
	margin-bottom: 1em;
	font-size: 1.4rem;
	font-weight: 600;
}

@media (max-width: 80ch) {
	article h1 {
		width: calc(100% + 4em);
		margin-left: -2em;
	}
}

article h2 {
	text-align: center;
	font-size: 1.2rem;
	font-family: Georgia;
	font-weight: 300;
}

dl dt {
	font-weight: bolder;
}

dl dd {
	margin-left: 1em;
}

dl dd ul {
	list-style-type: none;
	padding-left: 0;
}

header {
}

h1 {
	text-align: center;
	margin: auto;
	border-top-style: solid;
	border-bottom-style: solid;
	border-top-width: 2px;
	border-bottom-width: 2px;
	border-image: linear-gradient(90deg, var(--background) 0%, var(--section-border) 30%, var(--section-border) 70%, var(--background) 100%) 1;
	color: color-mix(in lch, var(--section-border) 35%, black);
}

h1, h3 {
	font-family: Fontin, serif;
}

p {
	font-family: Gentium, serif;
}

.intro {
	margin: 0.5em;
	background-color: var(--section-background);
	margin: 0.5em;
	box-shadow: 0 0 5px var(--section-border);
	color: var(--section-foreground);
	padding: 1em;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;
}

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

.intro p {
	flex-shrink: 3;
}

.linkboxes {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	width: 100%;
	min-height: 10em;
	justify-content: space-between;
}

.linkbox {
	text-align: center;
	max-width: 500px;
	min-width: 300px;
	background-color: var(--section-background);
	margin: 0.5em;
	box-shadow: 0 0 5px var(--section-border);
	color: var(--section-foreground);
	padding: 1em;
	box-sizing: border-box;
}

.linkbox > img {
	max-width: 100%;
	max-height: 30vh;
	border: 0;
	margin: 0.5em 0;
	box-shadow: 0 0 5px rgba(0 0 0 / 50%);
	border-radius: 0.25em;
}

.linkbox ul {
	list-style-type: none;
	padding: 0;
	box-sizing: border-box;
}

.linkbox ul li a,
.linkbox ul li a:visited {
	font-family: -apple-system, Helvetica, Arial, sans-serif;
	font-weight: bold;
	display: inline-block;
	width: 100%;
	padding: 1em;
	margin: 0.5em 0;
	background-color: var(--btn-background);
	color: var(--btn-foreground);
	text-decoration: none;
	border: 2px outset red;
	box-sizing: border-box;
	border-radius: 0.5em;
	transition: all 0.2s linear;
	text-align: center;
}

.linkbox ul li a:hover {
	background-color: #691f0e;
	border: 2px inset red;
}

footer {
	font-size: 6pt;
	text-align: right;
	padding-right: 4em;
}

@media (max-width: 979px) {
	.linkbox {
		max-width: 100%;
	}

	.linkbox > img {
		max-width: 50vw;
		max-height: 50vh;
	}
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.gallery {
	margin: 2em 0;
	width: 100%;
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 1em 4em;
	padding: 0;
}

.gallery img {
	max-width: min(300px, 100%);
	max-height: min(300px, 50vh);
	box-shadow: 0 0 5px rgba(0 0 0 / 50%);
	border-radius: 0.25em;
	border: 0;
}

@media (max-width: 80ch) {
	.gallery img {
		max-width: 100%;
	}
}

.btn {
	padding: 0.5em;
	border-radius: 0.5em;
	text-decoration: none;
	font-weight: bold;
	font-size: 1.2rem;
	transition: all 0.2s linear;
	text-align: center;
	margin: 0.2rem;
}

a.btn-primary,
a.btn-primary:visited,
.btn-primary {
	background-color: var(--btn-background);
	color: var(--btn-foreground);
	border: 2px outset red;
}

.btn-primary:hover {
	background-color: #691f0e;
	border: 2px inset red;
}

.btn-block {
	display: block;
	margin: 0.5rem 0;
}
