@import url('https://fonts.googleapis.com/css2?family=Protest+Guerrilla&display=swap');

:root {
	--main-fg: #ccc;
	--main-bg: #111;
	--main-accent: #bd8724;
	--font-monospace: monospace;
	--header-height: 4em;
	--footer-height: 8em;
	--debug-mode: 0;
	--debug-outline: calc(2px * var(--debug-mode)) solid red;
	--dark-mode-enabled: 1;
	--dark-mode-switcher-bg: #222;
	--dark-mode-bmlb: none;
	--dark-mode-bmlw: block;
}

:root:has(#theme-switcher-button:checked) {
	--main-bg: #fff;
	--main-fg: #000;
	--main-accent: #b14800;
	--dark-mode-enabled: 0;
	--dark-mode-switcher-bg: #666;
	--dark-mode-bmlb: block;
	--dark-mode-bmlw: none;

}

/* --- Global --- */

body {
	background: var(--main-bg);
	font-size: 22px;
	margin: 0;
	overflow-x: hidden;
	min-height: calc(99vh - var(--header-height));
	margin-top: var(--header-height);
	/* margin-top: calc(var(--header-height) + 1em); */
	display: flex;
	flex-direction: column;
	align-items: center;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);

	color: var(--main-fg);
}

a {
	opacity: 0.8;
	color: var(--main-accent);
	text-decoration: none;
}

a:hover {
	opacity: 1;
}



/* --- Header --- */

header {
	outline: var(--debug-outline);

	position: fixed;
	top: 0;
	z-index: 10;

	width: 100%;
	height: var(--header-height);

	background: var(--main-bg);

	padding-left: 2em;
	border-bottom: 1px solid #333;
	font-family: var(font-monospace);

	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;

}

nav {
	padding-right: 1.7em;
}

header img {
	width: 1.7em;
}

nav ul {
	height: 100%;

	padding: 0;

	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

nav li {
	list-style-type: none;
	padding: 0;
	margin: 0.3em;
	margin-left: 0.5em;
	margin-right: 0.5em;

}



/* --- Main --- */

main {
	outline: var(--debug-outline);

	min-height: calc(99vh - var(--header-height) - var(--footer-height));
	min-width: 60%;
	max-width: 80%;

	/* background-color: #222; */

	display: flex;
	flex-direction: column;
	align-items: center;

}

main h1 {
	width: 100%;
	text-align: center;
}

#theme-switcher {
	outline: var(--debug-outline);

	position: fixed;
	top: calc(var(--header-height) + 1em);
	left: 0;
	background: var(--main-bg);

	height: 1.4em;
	width: 2.4em;

	display: flex;
	overflow: hidden;
	align-items: center;
	justify-content: center;
	border: 2px solid #333;
	border-left: none;
	--border-radius: 25px;
	padding-right: 0.1em;
	border-top-right-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
	box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.6);

	transform: translate(-1.8em);
	transition: transform 250ms ease-in-out;
	z-index: 3;

}

#theme-switcher:hover {
	transform: translate(0);

	transition: transform 250ms ease-in-out;
}

#theme-switcher input {
	width: 100%;
	height: 100%;
	margin: 0;
	position: absolute;
	opacity: 0;
	z-index: 10;
}

#theme-switcher #slider {
	outline: var(--debug-outline);
	background-color: var(--dark-mode-switcher-bg);
	width: 1.6em;
	height: 0.8em;
	border: 0.1em solid #444;
	border-radius: 100px;
}

#theme-switcher #knob {
	width: 50%;
	height: 100%;
	margin-left: calc(var(--dark-mode-enabled) * 50%);
	background-color: #444;
	border-radius: 100%;
	outline: 0.15em solid #444;

	transition: margin 100ms ease-in-out;
}

/* --- Footer --- */

footer {
	outline: var(--debug-outline);

	bottom: 0;

	width: 100%;
	height: var(--footer-height);

	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
}

footer>* {
	outline: var(--debug-outline);
	width: 4em;
	text-align: center;
}

#brainmade-logo-black {
	display: var(--dark-mode-bmlb);
}

#brainmade-logo-white {
	display: var(--dark-mode-bmlw);
}



/* --- home --- */

#home-logo {
	outline: var(--debug-outline);
	max-width: 60%;
	margin-top: 2em;
}



/* --- gallery --- */

#gallery {
	outline: var(--debug-outline);
	display: flex;
	gap: 1.2em 1.2em;
	flex-wrap: wrap;
	width: auto;
	justify-content: center;
	margin-top: 3em;
	margin-bottom: 3em;
}

#gallery img {

	opacity: 0.9;
	width: 10em;
	height: auto;
	overflow: hidden;

	object-fit: cover;
	aspect-ratio: 1 / 1;

	border-radius: 6px;
	transition: 250ms ease-in-out;
}

#gallery img:hover {
	transform: scale(1.1);
	transition: transform 250ms ease-in-out;
	z-index: 3;
	opacity: 1;
}



/* --- articles --- */


#article-header {
	display: flex;
	flex-direction: column;
	align-items: space-around;
	justify-content: space-around;
	/* height: 5em; */
	overflow: hidden;
	margin-bottom: 1.5em;
}

#article-header h1 {
	outline: var(--debug-outline);
	font-family: "Protest Guerrilla", sans-serif;
	font-size: 1.2em;
	text-align: left;
	margin: 0.4em;

}

#article-header #author {
	outline: var(--debug-outline);
	display: flex;
	flex-direction: row;
	/* background-color: #444; */
}


#article-header #author img {
	outline: var(--debug-outline);

	margin: 0.5em;
	margin-left: 1.5em;

	border-radius: 100%;

	width: 2em;
	height: 2em;
	/* height: auto; */

	object-fit: cover;
	aspect-ratio: 1 / 1;
}

#article-header #author #author-data {
	outline: var(--debug-outline);
	font-weight: 800;
	margin: 0.5em;
}

#article-header #author #author-data #author-description {
	margin-top: 0.2em;
	font-size: 0.8em;
	font-weight: 400;
}

article p {
	/* width: 90%; */
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-size: 18px;
}

#article-sep {
	color: #333;
	background-color: #333;
	height: 1px;
	width: 70%;
	margin: 1.5em;
	border-radius: 100%;
}



/* --- Responsive --- */

@media only screen and (max-width: 600px) {
	body {
		font-size: 16px;
	}
}

@media only screen and (max-width: 350px) {
	header img {
		display: none;
	}
}

@media only screen and (max-width: 200px) {
	:root {
		--header-height: 10em;
	}

}
