/* program that goes through and finds all <a href="#cite-[...]">[ and inserts a number after it */

/* font */
@font-face {
  font-family: 'Geologica';
  src: url('Geologica-ExtraLight.ttf');
	font-weight: light;
}
@font-face {
  font-family: 'Geologica';
  src: url('Geologica-Bold.ttf');
	font-weight: bold;
}

/* theme */
:root {
	--font-primary: 'Geologica', 'Arial', 'Helvetica', sans-serif;
	--font-heading: 'Palatino', serif;
	color-scheme: light;
	--brand-theme: #af9ac3;
	--background: light-dark(#ede2f3, #2b2b2e);
	--text: light-dark(#45444b, #d3d0f4);
	--link: light-dark(#114887, #91e0f2);
	--shadow: light-dark(#9E90BE, #000000);
	--bold: light-dark(#633676, #e69af4);
	--highlight: light-dark(#e5c4e8, #5c226d);
	--nav: light-dark(#59484e, #343443);
}
body:has(#theme-toggle:checked) {
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
	}
	body:has(#theme-toggle:checked) {
		color-scheme: light;
	}
}

/* general */
html {
	scroll-behavior: smooth;
}
body {
	margin: 0;
	background: var(--background);
	font-family: var(--font-primary);
	font-size: 1.1rem;
	color: var(--text);
	animation: rin_normal 2s infinite;
}
h1, h2 {
	font-family: var(--font-heading);
}
p {
	line-height: 1.5em;
}
a {
	color: var(--link);
	animation: rin_link 2s infinite;
}
summary {
	animation: rin_link 2s infinite;
}
b {
	color: var(--bold);
}
sup {
	line-height: 0;
}
img {
	width: 100%;
}
header, main, footer {
	padding: 0 64px 0 192px;
}
section {
	margin-bottom: 48px;
}
footer {
	padding-bottom: 64px;
}
hr {
	margin: 48px 0;
	height: 1px;
	background: var(--text);
	border: none;
}
.row {
	display: flex;
	gap: 16px;
}
.expand {
	flex: 1;
}

/* navigation */
nav {
	position: fixed;
	z-index: 1;
	height: 100%;
	width: 110px;
	padding-right: 20px;
	background: var(--nav);
	box-shadow: 0 0 8px var(--shadow);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 32px;
	overflow-y: auto;
}
nav::after {
	content: '';
	position: fixed;
	top: 0;
  left: 110px;
	height: 100%;
	width: 10px;
	outline: 3px solid var(--brand-theme);
}
nav a {
	flex: none;
	position: relative;
	height: 64px;
	background: url('diamond.png') top center no-repeat;
	text-decoration: none;
	color: #af9ac3;
	display: flex;
	justify-content: center;
	align-items: end;
}
/* hover animation idea from https://codepen.io/luke-codewalker/pen/zJOjvN */
nav a::after {
	content: '';
	position: absolute;
	height: 64px;
	width: 100%;
	background: url('diamond_fill.png') top center no-repeat;
	opacity: 0;
	transition: opacity .15s linear;
}
nav a:hover::after {
	opacity: 1;
}

/* less generic elements */
.hatnote {
	font-style: italic;
}
.multiple-issues {
	padding: 16px;
	margin: 16px 10% 0 10%;
	background: color-mix(in srgb, var(--brand-theme) 10%, transparent);
	border: 1px solid var(--brand-theme);
	border-left: 10px solid var(--bold);
	display: flex;
	align-items: center;
}
.multiple-issues details {
	margin-right: 64px;
}
.multiple-issues ul {
	margin-bottom: 0;
}
.infobox {
	float: right;
	padding: 8px;
	margin: 0 0 8px 8px;
	max-width: 300px;
	border: 1px solid var(--brand-theme);
}
.infobox-above, .infobox-header {
	padding: 2px;
	margin-bottom: 4px;
	background: var(--bold);
	color: var(--background);
	text-align: center;
}
.infobox-above {
	padding: 4px;
}
.infobox-above b {
	color: var(--background);
}
.infobox .row {
	min-height: 1.5em;
}
.infobox hr {
	margin: 4px 0;
	background: var(--brand-theme);
}
.infobox-last-updated {
	font-size: .8em;
	text-align: center;
}
blockquote {
	display: flow-root;
	position: relative;
	padding: 0 2.5em;
	margin: 0;
	max-width: 492px;
}
figure {
	margin: 0;
}
figure img {
	display: block;
}
figcaption {
	margin-bottom: 4px;
	font-size: .9em;
	text-align: center;
}
#section-sources {
	font-size: .9em;
	line-height: 1.5rem;
}
#section-sources :target {
	background: var(--highlight);
}
.portrait-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.portrait-content {
	flex: 1 0 200px;
	display: flex;
	flex-direction: column;
}
.portrait-row img {
	height: 200px;
	width: 150px;
	object-fit: cover;
	object-position: 50% 0%;
	border-radius: 50%;
	align-self: center;
}

/* table */
table {
  border-collapse: collapse;
  border: 2px solid var(--bold);
}
caption {
	margin-bottom: 4px;
	font-weight: bold;
}
thead {
	background: var(--bold);
	color: var(--background);
}
th, td {
  border: 1px solid var(--brand-theme);
  padding: 8px 16px;
}
tbody > tr:nth-of-type(even) {
  background: color-mix(in srgb, var(--brand-theme) 40%, transparent);
}

/* graphic */
#theme-toggle {
	opacity: 0;
}
#theme-toggle-label {
	font-size: .8em;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	animation: rin_link 2s infinite;
}
#theme-toggle-icon {
	height: 28px;
	width: 28px;
	background: linear-gradient(to bottom right, #ede2f3 50%, #2b2b2e 50%);
	border-radius: 50%;
	border: 2px solid var(--brand-theme);
}
.warning-icon {
	flex: none;
	box-sizing: border-box;
	margin: 0 16px 0 8px;
	height: 40px;
	width: 40px;
	background: linear-gradient(to bottom, #9bbdeb, #5161b8);
	color: #ffffff;
	font-size: 1.5rem;
	font-weight: bold;
	border-radius: 50%;
	border: 2px solid #090252;
	box-shadow: 2px 2px 2px -2px var(--shadow);
	display: flex;
	justify-content: center;
	align-items: center;
}
blockquote::before, blockquote::after {
	position: absolute;
	font-family: var(--font-heading);
	font-size: 4em;
	opacity: .3;
}
blockquote::before {
	content: "“";
	left: 0;
	top: 0;
}
blockquote::after {
	content: "”";
	right: 0;
	bottom: -.5em;
}
.timeline .row {
	position: relative;
	padding: 32px 0;
	align-items: center;
}
.timeline .expand:first-child {
	text-align: right;
}
.flip {
	flex-direction: row-reverse;
}
.flip .expand:first-child {
	text-align: left;
}
.flip .expand:nth-child(n+2) {
	text-align: right;
}
.circle {
	height: 16px;
	width: 16px;
	border-radius: 50%;
	background: var(--text);
}
.circle-landmark {
	background: var(--bold);
	outline: 2px solid var(--bold);
	outline-offset: 2px;
}
.circle::before {
	content: '';
	position: absolute;
	top: 0;
	left: calc(50% - 1px);
	width: 2px;
	height: calc(50% - 16px);
	background: var(--text);
}
.circle::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: calc(50% - 1px);
	width: 2px;
	height: calc(50% - 16px);
	background: var(--text);
}
.circle-first::before, .circle-last::after {
	background: transparent;
}

/* animated mouse cursors */
@keyframes rin_normal {
	0%, 100% {
		cursor: url("Rin normal_0.png"), auto;
	}
	5% {
		cursor: url("Rin normal_0.png"), auto;
	}
	10% {
		cursor: url("Rin normal_1.png"), auto;
	}
	15% {
		cursor: url("Rin normal_2.png"), auto;
	}
	20% {
		cursor: url("Rin normal_3.png"), auto;
	}
	25% {
		cursor: url("Rin normal_0.png"), auto;
	}
	30% {
		cursor: url("Rin normal_0.png"), auto;
	}
	35% {
		cursor: url("Rin normal_0.png"), auto;
	}
	40% {
		cursor: url("Rin normal_0.png"), auto;
	}
	45% {
		cursor: url("Rin normal_0.png"), auto;
	}
	50% {
		cursor: url("Rin normal_0.png"), auto;
	}
	55% {
		cursor: url("Rin normal_0.png"), auto;
	}
	60% {
		cursor: url("Rin normal_4.png"), auto;
	}
	65% {
		cursor: url("Rin normal_5.png"), auto;
	}
	70% {
		cursor: url("Rin normal_6.png"), auto;
	}
	75% {
		cursor: url("Rin normal_7.png"), auto;
	}
	80% {
		cursor: url("Rin normal_8.png"), auto;
	}
	85% {
		cursor: url("Rin normal_9.png"), auto;
	}
	90% {
		cursor: url("Rin normal_0.png"), auto;
	}
	95% {
		cursor: url("Rin normal_0.png"), auto;
	}
}
@keyframes rin_link {
	0%, 100% {
		cursor: url("Rin link_0.png"), auto;
	}
	5% {
		cursor: url("Rin link_0.png"), auto;
	}
	10% {
		cursor: url("Rin link_1.png"), auto;
	}
	15% {
		cursor: url("Rin link_2.png"), auto;
	}
	20% {
		cursor: url("Rin link_3.png"), auto;
	}
	25% {
		cursor: url("Rin link_4.png"), auto;
	}
	30% {
		cursor: url("Rin link_5.png"), auto;
	}
	35% {
		cursor: url("Rin link_6.png"), auto;
	}
	40% {
		cursor: url("Rin link_7.png"), auto;
	}
	45% {
		cursor: url("Rin link_8.png"), auto;
	}
	50% {
		cursor: url("Rin link_8.png"), auto;
	}
	55% {
		cursor: url("Rin link_0.png"), auto;
	}
	60% {
		cursor: url("Rin link_9.png"), auto;
	}
	65% {
		cursor: url("Rin link_10.png"), auto;
	}
	70% {
		cursor: url("Rin link_3.png"), auto;
	}
	75% {
		cursor: url("Rin link_4.png"), auto;
	}
	80% {
		cursor: url("Rin link_11.png"), auto;
	}
	85% {
		cursor: url("Rin link_12.png"), auto;
	}
	90% {
		cursor: url("Rin link_13.png"), auto;
	}
	95% {
		cursor: url("Rin link_0.png"), auto;
	}
}

/* mobile */
@media screen and (max-width: 800px) {
	nav {
		display: none;
	}
	header, main, footer {
		padding: 0 16px;
	}
}
@media screen and (max-width: 600px) {
	main {
		font-size: 1rem;
	}
	.multiple-issues {
		margin: 16px 0 0 0;
		font-size: .9em;
	}
	.multiple-issues details {
		margin-right: 0;
	}
	.infobox {
		margin: 0 0 48px 0;
		max-width: none;
	}
	.portrait-row {
		flex-direction: column;
	}
	.portrait-content {
		flex-basis: auto;
	}
	.warning-icon {
		display: none;
	}
}