:root {
	--extra-dark: #1d1c1c;
	--darker: #2b2a2a;
	--dark: #403f3f;
	--medium: #a5a5a5;
	--light: #cccccc;
	--lighter: #f2f2f2;
	--font-size: 22px;
	--border-radius: 0.15rem;
}

html,
body {
	background-color: var(--darker);
	color: var(--light);
	font-size: var(--font-size);
	line-height: 1.4;
	padding: 0;
	margin: 0;
	font-family: "Inter", system-ui, sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 340px;
}

html {
	scroll-padding-top: 3rem;
}

* {
	box-sizing: border-box;
}

::-moz-selection {
	background: var(--medium);
	text-shadow: none;
}

::selection {
	background: var(--medium);
	text-shadow: none;
	color: var(--extra-dark);
}

hr {
	display: block;
	height: 1px;
	padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
	vertical-align: middle;
}

fieldset {
	border: 0;
	margin: 0;
	padding: 0;
}

textarea {
	resize: vertical;
}

a {
	color: var(--light);
	transition: color 0.1s ease;
}

a:hover {
	color: var(--lighter);
}

a.second {
	color: var(--dark);
	text-decoration: none;
	margin-right: 0.5ch;
}

a.second:target {
	color: var(--medium);
	scroll-margin-top: 2.5rem;
}

a.second:hover {
	color: var(--medium);
	text-decoration: underline;
}

a.second:focus {
	outline: none;
}

#content,
#footer {
	display: flex;
	justify-content: center;
}

#content {
	flex-direction: column;
	align-items: center;
}

.grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, 1fr);
	width: 100%;
}

.column {
	padding: 1rem;
}

.img {
	background-repeat: no-repeat;
	background-size: cover;
	background-position: 50%;
	width: 100%;
	overflow: hidden;
	border-radius: var(--border-radius);
}

.card {
	background-color: var(--darker);
	border: none;
}

.card img {
	margin-bottom: 1rem;
	aspect-ratio: 16/9;
	width: 100%;
	border-radius: var(--border-radius);
}

.card .card-body>h3,
.card .card-body>p {
	padding: 0 1rem;
}

.card h3 {
	margin: 0;
	font-size: 1.2em;
}

.card h3 a {
	text-decoration: none;
}

.card:hover h3 a {
	color: var(--lighter);
}

.with-icon {
	align-items: center;
	gap: 0.5rem;
}

.with-icon svg {
	width: 1rem;
	height: 1rem;
}

.icon {
	width: 100%;
	fill: var(--light);
	transition: fill 0.1s ease;
}

*:hover>.icon {
	fill: var(--lighter);
}

.container {
	display: flex;
	flex-direction: column;
}

.nav {
	margin: 0.5rem 0;
	padding: 0.5rem 1rem;
	text-transform: uppercase;
	position: sticky;
	top: 0;
	background-color: var(--darker);
	opacity: 0.97;
	z-index: 999;
	flex-direction: row;
}

.nav a {
	text-decoration: none;
}

.nav a:first-of-type {
	font-weight: bold;
}

.nav a:not(:first-of-type) {
	background: var(--medium);
	text-shadow: none;
	color: var(--extra-dark);
	padding: 0 1ch;
}

.nav a:not(:first-of-type):hover {
	background: var(--light);
	text-shadow: none;
	color: var(--extra-dark);
}

.tags {
	display: flex;
	gap: 1ch;
	flex-wrap: wrap;
}

.tags a {
	background: var(--medium);
	text-shadow: none;
	color: var(--extra-dark);
	padding: 0 1ch;
	text-decoration: none;
	height: min-content;
}

.tags a:hover {
	background: var(--light);
	text-shadow: none;
	color: var(--extra-dark);
}

.post>*,
.collapsible>.body>* {
	margin: 0 0 1rem 0;
}

.post picture img {
	width: 100%;
	border-radius: var(--border-radius);
	aspect-ratio: 16/9;
}

.post picture {
	width: 100%;
	aspect-ratio: 16/9;
	display: block;
}

.image {
	position: relative;
	width: 100%;
	margin: 1rem 0;
}

.image img {
	width: 100%;
	border-radius: var(--border-radius);
	aspect-ratio: 16/9;
	display: block;
}

.image .fullscreen {
	position: absolute;
	bottom: 0.5rem;
	right: 0.5rem;
	cursor: pointer;
	text-decoration: none;
	font-size: 1.5rem;
	opacity: 0.7;
	color: #fff;
	text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

.image .fullscreen:hover {
	opacity: 1;
}

.post p {
	padding: 0 1rem;
}

.post ol,
.post ul {
	padding: 0 3rem;
}

.post pre:has(>code) {
	display: block;
	background-color: var(--extra-dark);
	padding: 1rem;
	overflow-x: scroll;
	font-size: 0.7rem;
	border-radius: var(--border-radius);
	font-weight: normal;
}

.post p code,
.post li code {
	color: var(--medium);
	background-color: var(--dark);
	padding: 0 0.3rem;
	font-size: 0.9rem;
	font-weight: bold;
}

.post iframe {
	width: 100%;
	height: 20rem;
	margin-bottom: 1rem;
}

.post .head {
	background-color: rgba(65, 65, 65, 0.5);
	text-align: center;
	padding: 0 1rem;
	box-sizing: unset;
	display: flex;
	justify-content: center;
	position: relative;
	margin-bottom: -5.5rem;
}

.post .title-image {
	width: 100%;
	border-radius: var(--border-radius);
	aspect-ratio: 16/9;
	object-fit: contain;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	padding: 0 1rem;
}

.post h2+h5 {
	margin-top: -1rem;
	font-weight: normal;
}

.post h1.title {
	font-size: 2.5em;
}

.post .metadata {
	padding: 1rem;
	border-top: 2px solid var(--dark);
	display: grid;
	grid-template-columns: 1fr 4fr;
	grid-template-rows: 1fr 1fr;
	gap: 1px 1px;
	grid-template-areas:
		". ."
		". .";
	font-size: 0.8em;
}

.post .metadata div:nth-child(odd) {
	font-weight: bold;
}

.post iframe {
	border-radius: var(--border-radius);
}

iframe.youtube {
	width: 100%;
	height: 400px;
}

iframe.komoot {
	width: 100%;
	aspect-ratio: 1/1;
	height: auto;
}

.collapsible+.collapsible {
	margin-top: -1rem;
}

.collapsible {
	border: 1px solid var(--dark);
	border-radius: var(--border-radius);
}

.collapsible label {
	padding: 1rem;
	background-color: var(--darker);
	align-items: center;
	gap: 1rem;
}

.collapsible label:hover {
	color: var(--lighter);
}

.collapsible input:checked~label svg {
	transform: rotate(90deg);
}

.collapsible label svg {
	width: 1rem;
	height: 1rem;
	display: inline-block;
	transform: rotate(0deg);
	transition: transform 0.2s ease;
}

.collapsible>.body {
	background-color: var(--darker);
	overflow: hidden;
}

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

.highlight {
	width: 100%;
	background-color: var(--medium);
	border-radius: 0.15rem;
}

.highlight .hicon {
	border-radius: var(--border-radius);
	font-size: xxx-large;
}

.highlight *::-moz-selection {
	background: var(--extra-dark);
	color: var(--medium);
	text-shadow: none;
}

.highlight *::selection {
	background: var(--extra-dark);
	text-shadow: none;
	color: var(--medium);
}

.highlight .icon {
	fill: var(--dark);
}

.highlight .hicon:hover .icon {
	fill: var(--darker);
}

.highlight * {
	color: var(--dark);
}

.highlight a:hover {
	color: var(--darker);
}

.pagination {
	display: flex;
	padding: 1rem;
	margin: 2rem;
	justify-content: center;
}

.pagination div {
	padding: 0.5rem 1rem;
	border-radius: var(--border-radius);
}

.pagination .current {
	background-color: var(--dark);
}

.pagination a {
	text-decoration: none;
}

.back {
	display: flex;
	align-items: center;
	margin: 0 2rem 2rem 1rem;
	gap: 1rem;
}

.back .icon {
	width: 3rem;
	fill: var(--dark);
}

.back .icon:has(~ a:hover) {
	fill: var(--medium);
}

.back a {
	text-decoration: none;
	font-size: 2rem;
	color: var(--dark);
	font-weight: bold;
}

.back a:hover {
	color: var(--medium);
}

.spacer {
	height: 2rem;
}

.not-found {
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#footer {
	background-color: var(--dark);
	color: var(--lighter);
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

@media only screen and (min-width: 1000px) {
	body {
		letter-spacing: 1.1px;
	}

	.container {
		width: 1000px;
	}
}

@media only screen and (max-width: 999px) {
	:root {
		--font-size: 18px;
	}

	.back .icon {
		width: 2rem;
	}

	.back a {
		font-size: 2rem;
	}

	.back .icon:has(~ a:hover) {
		fill: var(--medium);
	}

	.container {
		width: calc(100% - 2rem);
	}
}

@media only screen and (max-width: 700px) {
	.grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

@media only screen and (max-width: 700px) and (orientation: portrait) {
	:root {
		--font-size: 18px;
	}

	.back .icon {
		width: 2rem;
	}

	.back a {
		font-size: 1rem;
	}

	#footer {
		padding: 0;
	}

	.container {
		width: 100%;
	}


	.post .head {
		margin-bottom: -8.5rem;
	}

}

@media (pointer:none),
(pointer:coarse) {
	.fullscreen {
		display: none;
	}
}


@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {}

@media print {

	*,
	*::before,
	*::after {
		background: #fff !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
	}

	abbr[title]::after {
		content: " (" attr(title) ")";
	}

	a[href^="#"]::after,
	a[href^="javascript:"]::after {
		content: "";
	}

	pre {
		white-space: pre-wrap !important;
	}

	pre,
	blockquote {
		border: 1px solid #999;
		page-break-inside: avoid;
	}

	tr,
	img {
		page-break-inside: avoid;
	}

	p,
	h2,
	h3 {
		orphans: 3;
		widows: 3;
	}

	h2,
	h3 {
		page-break-after: avoid;
	}
}

.gpx-embed {
	font-size: 0.8rem;
	padding: 0 1rem;
	display: flex;
	justify-content: right;
}

