:root {
	--bg-color: rgb(240, 239, 235);
	/* Paper texture from https://inspirationhut.net/design-resources/20-high-quality-free-seamless-paper-patterns/ */
	--bg-image: url("/natural-paper-texture.jpg");
	--font-color: #212529;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-color: #1d1d1d;
		--bg-image: url("/natural-paper-texture-dark.jpg");
		--font-color: #d7e6f5;
	}
}

html {
	font-size: 16px;
}

@media (max-width: 400px) {
	html { font-size: 16px; }
}

body {
	background-color: var(--bg-color);
	color: var(--font-color);
	margin: 0;
	padding: 0;
	font-size: 1.125rem;
	font-family: 'Overpass', sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	overflow-y: scroll;
	overflow-x: hidden;
}

#sapper {
	background: var(--bg-image);
}

h1 {
	font-size: 3rem;
}

h2 {
	font-size: 2.5rem;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Permanent Marker', sans-serif;
}

a {
	/* color: inherit; */
}

code {
	font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
		monospace;
}

.centered-image {
	text-align: center;
}

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

.pic-grid {
	text-align: center;
	padding: 0 -.5rem;
}

.pic-grid > * {
	margin: 0 .5rem 1rem;
}

.pic-grid a {
	display: inline-block;
}

/* Material Design shadows */
.shadow-0 {
	box-shadow: none;
}

.shadow-1 {
	box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20);
}

.shadow-2 {
	box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20);
}

.shadow-3 {
	box-shadow: 0 3px 4px 0 rgba(0,0,0,0.14), 0 3px 3px -2px rgba(0,0,0,0.12), 0 1px 8px 0 rgba(0,0,0,0.20);
}

.shadow-4 {
	box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.20);
}

.shadow-6 {
	box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px -1px rgba(0,0,0,0.20);
}

.shadow-8 {
	box-shadow: 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.20);
}

.shadow-9 {
	box-shadow: 0 9px 12px 1px rgba(0,0,0,0.14), 0 3px 16px 2px rgba(0,0,0,0.12), 0 5px 6px -3px rgba(0,0,0,0.20);
}

.shadow-12 {
	box-shadow: 0 12px 17px 2px rgba(0,0,0,0.14), 0 5px 22px 4px rgba(0,0,0,0.12), 0 7px 8px -4px rgba(0,0,0,0.20);
}

.shadow-16 {
	box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.20);
}

.shadow-24 {
	box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.20);
}

.article-diagram, .article-photo {
	position: relative;
	display: inline-block;
	padding: 10px;
	background-color: white;
	/* shadow-4 */
	box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.20);
}

.article-diagram::before, .article-photo::before {
	content: "";
	position: absolute;
	width: 5rem;
	height: 2.4rem;
	top: -1.2rem;
	left: calc(50% - 2.5rem);
	background: url("/tape.png");
	background-size: cover;
	opacity: 0.3;
}

.article-photo {
	max-width: 100%;
	margin-top: 1rem;
	margin-bottom: 1rem;
}

.article-photo img {
	max-width: 100%;
}

article object {
	max-width: 100%;
}

.centered-image:nth-of-type(8n+1) .article-photo {
	transform: rotate(3deg);
}
.centered-image:nth-of-type(8n+2) .article-photo {
	transform: rotate(-2deg);
}
.centered-image:nth-of-type(8n+3) .article-photo {
	transform: rotate(1deg);
}
.centered-image:nth-of-type(8n+4) .article-photo {
	transform: rotate(-4deg);
}
.centered-image:nth-of-type(8n+5) .article-photo {
	transform: rotate(3deg);
}
.centered-image:nth-of-type(8n+6) .article-photo {
	transform: rotate(-2deg);
}
.centered-image:nth-of-type(8n+7) .article-photo {
	transform: rotate(1deg);
}
.centered-image:nth-of-type(8n+8) .article-photo {
	transform: rotate(-3.5deg);
}

.pic-grid .article-photo:nth-of-type(6n+1) {
	transform: rotate(2deg);
}
.pic-grid .article-photo:nth-of-type(6n+2) {
	transform: rotate(-0.5deg);
}
.pic-grid .article-photo:nth-of-type(6n+3) {
	transform: rotate(-1.5deg);
}
.pic-grid .article-photo:nth-of-type(6n+4) {
	transform: rotate(1.7deg);
}
.pic-grid .article-photo:nth-of-type(6n+5) {
	transform: rotate(0.5deg);
}
.pic-grid .article-photo:nth-of-type(6n+6) {
	transform: rotate(-2deg);
}