:root {
	--black: #111;
	--black-gray: #222;
	--white-gray: #eee;
	--white: #fff;
}

:root[theme="light"] {
	--bg: var(--white);
	--fg: var(--black);
	--gray: var(--black-gray);
}

:root[theme="dark"] {
	--bg: var(--black);
	--fg: var(--white);
	--gray: var(--white-gray);
}

#lightswitch {
	position: absolute;
	top: 0.25rem;
	right: 0;
	color: var(--fg);
	background: none;
	border: 2px solid var(--gray);
	border-right: none;
	cursor: pointer;
	padding: 0.5rem;
	-webkit-appearance: none;
	appearance: none;
	font-family: "Open Sans", sans-serif;
}

#lightswitch svg {
	display: none;
}

:root[theme="light"] #lightswitch svg.icon-tabler-moon {
	display: block;
}

:root[theme="dark"] #lightswitch svg.icon-tabler-sun {
	display: block;
}

body {
	font-family: "Open Sans", sans-serif;
	color: var(--fg);
	background-color: var(--bg);
	line-height: 1.4;
	min-height: 100%;
	padding-bottom: 2rem;
	position: relative;
	margin: 0;
}

main {
	margin: 1rem;
	clear: both;
}

header h1 {
	text-align: center;
}

section,
header {
	margin: 2rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
}
h1 {
	line-height: 1.2;
	font-size: 3rem;
}
h2 {
	font-size: 1.75rem;
}

p {
	margin: 1rem 0;
}

footer {
	padding: 0.75rem;
	background: var(--gray);
	text-align: center;
	display: flex;
	justify-content: center;
	position: fixed;
	width: 100%;
	bottom: 0;
}

footer a {
	color: var(--bg);
}

@media screen and (min-width: 680px) {
	main {
		margin: 0 100px 0 170px;
		max-width: 680px;
	}
}
@media screen and (min-width: 1020px) {
	main {
		margin: 0 auto;
	}
}

.anchor {
	color: var(--gray);
	text-decoration: none;
}
.anchor:hover,
.anchor:focus {
	text-decoration: underline;
}
