/* colors */
:root:has(#darklight:not(:checked)) {
	--bg: #000000;
	--fg: #ffffff;
	--red: #fa7883;
	--yellow: #ffc387;
	--orange: #ff9470;
	--green: #98c379;
	--cyan: #8af5ff;
	--blue: #6bb8ff;
	--purple: #e799ff;
}

:root:has(#darklight:checked) {
	--bg: #faf0dc;
	--fg: #000000;
	--red: #de5d6e;
	--orange: #ff9470;
	--yellow: #b3684f;
	--green: #76a85d;
	--cyan: #64b5a7;
	--blue: #5890f8;
	--purple: #c173d1;
}

html,
body {
	background: var(--bg);
	color: var(--fg);
	font-family: sans-serif;
}

/* global variables */
:root {
	--border-width: 1px;
}

/* useful definitions */
/* containers */
.vbox {
	display: flex;
	flex-flow: column;
}

.hbox {
	display: flex;
	flex-flow: row;
}

.boxstart {
	justify-content: start;
}

.boxcenter {
	justify-content: center;
}

.boxend {
	justify-content: end;
}

.boxcool {
	border: 2px #a0f5 solid;
	padding: 1rem;
	background: #a0f1;
}

.expand {
	flex: 1;
}

/* text flow */
.right {
	text-align: right;
}

.center {
	text-align: center;
}

.left {
	text-align: left;
}

/* animations */
@keyframes spin {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes expand {
	0% {
		height: 1px;
		width: 1px;
	}

	100% {
		height: 30rem;
		width: 30rem;
	}
}

@keyframes marquee {
	0% {
		transform: translate(0% 0);
	}

	100% {
		transform: translate(-100%, 0);
	}
}

/* more general styling */
/* not ugly link color */
a {
	color: var(--blue);
	text-decoration: none;
}

a:visited {
	color: var(--cyan);
	text-decoration: none;
}

/* restrict images to bounding box */
img {
	max-width: 100%;
	max-height: 100%;
	image-rendering: pixelated;
}

/* configure quotes */
blockquote {
	margin: 0;
	margin-left: 1rem;
	padding: 0.5rem 1rem;
	display: block;
	border-left: 0.4rem rgb(from var(--fg) r g b / 0.5) solid;
	border-radius: 0.2rem;
}
cite {
	margin-left: 2.5rem;
	margin-bottom: 1rem;
}

/* specific styling */
/* conditionals */
/* toggle borders around all boxes */
body:has(#show-borders:checked) .hbox,
body:has(#show-borders:checked) .vbox {
	border: var(--red) var(--border-width) dashed;
}

/* toggle visibility of toggler checkboxes */
body:has(#show-checkboxes:not(:checked)) .togglebutton {
	display: none;
}

/* toggle speed of quantenzitrone spin */
body:has(#speed:not(:checked)) .quantenzitrone {
	animation: spin 60s linear infinite;
}

body:has(#speed:checked) .quantenzitrone {
	animation: spin 1s linear infinite;
}

/* show light dark icon based on mode */
body:has(#darklight:not(:checked)) #dark {
	display: none;
}

body:has(#darklight:checked) #light {
	display: none;
}

/* invert some icons base on mode */
body:has(#darklight:not(:checked)) .invert {
	filter: invert(1);
}

/* stop the buttons from moving */
body:has(#static-buttons:checked) .buttons-wrapper {
	width: 100% !important;
	#buttons2 {
		display: none;
	}
	.buttons {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
	}
}

/* base element */
html,
body,
#body-box {
	overflow-x: hidden;
	margin: 0;
	padding: 0;
	border: none;
	background: var(--bg);
	color: var(--fg);
}

:root:has(#show-borders:checked) html,
:root:has(#show-borders:checked) body,
:root:has(#show-borders:checked) #body-box {
	height: calc(100vh - 2 * var(--border-width));
	width: calc(100vw - 2 * var(--border-width)) - 1px;
}

:root:has(#show-borders:not(:checked)) html,
:root:has(#show-borders:not(:checked)) body,
:root:has(#show-borders:not(:checked)) #body-box {
	height: 100vh;
	width: 100vw;
}

/* header */
.header {
	margin: 1rem 1rem 0 1rem;
}

.quantenzitrone {
	height: 7rem;
	margin: 0.5rem;
	width: 7rem;
	min-height: 7rem;
	min-width: 7rem;
	image-rendering: auto;
}

.title {
	font-size: 4rem;
}

.subtitle {
	font-size: 1rem;
}

.darklight-container {
	min-width: 1rem;
}

#dark,
#light {
	animation: spin 10s linear infinite;
}

/* main content */
.content {
	margin: 1rem;
	flex: 1;
	display: flex;
	flex-direction: row;
}
.maybeexpand {
	flex: 1;
}

@media (max-width: 1000px) {
	.content {
		flex-direction: column;
	}
	.maybeexpand {
		flex: 0;
	}
}

ul.aboutme {
	margin-top: 0;
	padding-left: 1rem;
	line-height: 3;
}
ul.aboutme li {
	padding-left: 2.5rem;
	list-style-type: none;
	background-image: url("../icons/planet.gif");
	background-position: 0 0.5rem;
	background-size: 2rem 2rem;
	background-repeat: no-repeat;
}
ul.aboutme li img {
	height: 2rem;
	vertical-align: bottom;
	padding-bottom: 0.5rem;
	line-height: 1;
	font-size: 2rem;
}

.secret {
	height: 1px;
	width: 1px;
}

.secret:hover {
	animation: expand 1s linear;
	height: 30rem;
	width: 30rem;
}

/* footer */
.footer {
	margin: 0 1rem;
	text-align: center;

	h3 {
		margin: 0.5rem 0rem;
	}
}

:root {
	--w: calc(100vw / 1px); /* screen width  */
	--h: calc(100vh / 1px); /* screen height */
	/*  The result is an integer without a unit! */
}

#screen-size::after {
	content: counter(w) "x" counter(h);
	counter-reset: h var(--h) w var(--w);
}

.buttons-wrapper {
	width: 200%;
	padding-top: 1rem;
}

.buttons {
	animation: marquee 60s linear infinite;
	width: 100%;
	height: 31px;
}

.button {
	width: 88px;
	height: 31px;
	min-width: 88px;
	min-height: 31px;
	max-width: 88px;
	max-height: 31px;
	padding: 1px;
}

.links {
	flex: 1;
	margin: 0 10%;
	flex-wrap: wrap;
	display: flex;
	flex-direction: row;
	align-content: center;
}

.link {
	margin: 0.5rem;
	display: flex;
	flex-direction: row;
	align-content: center;
}
.link img {
	height: 1rem;
}
