@font-face {
	font-family: 'Terminus';
	src: url('/assets/fonts/terminus-webfont.woff2') format('woff2');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Theme colors */
	/* Only used as fallback, will be overwritten (consider editing these values in /src/js/modules/theme.js) */
	--main-color: #72b6ff;
	--main-color-40: #72b6ff80;
	--main-color-20: #72b6ff33;
	--bg-color: 15, 129, 236; /* example: rgba(var(--bg-color), 0.5) to use the background-color with 50% opacity */
	--bg-opacity: 0.15;
	--selection: #3b6d8b;

	/* other */
	--warning-color: rgb(240, 86, 86);
	--info-color: #ffffff;

	--noise-opacity: 0.65;
	--background-video-opacity: 0.275;
	--grunge-overlay-opacity: 0.9;

	--tab-background-blur: 4px;

	font-size: 10px;
}

html {
	background: black;
	overflow-x: hidden;
}

body {
	color: var(--main-color);
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 50%, rgba(var(--bg-color), 0.2) 250%),
		rgba(var(--bg-color), var(--bg-opacity));

	margin: 0;
	height: 100vh;
	width: 100vw;

	overflow-y: auto;
	scroll-behavior: smooth;

	font-family: 'Terminus', 'Courier New', monospace;
}

/* BACKGROUND AND OVERLAYS */
#rain-vid,
#noise-overlay,
#grunge-overlay {
	position: fixed;
	overflow: hidden;

	top: 0;
	left: 0;
	bottom: 0;
	right: 0;

	height: 100vh;
	width: 100vw;

	pointer-events: none;

	z-index: 10;

	display: none; /* Hide background videos by default, will be overwritten in effects.css if effects are not disabled */
}

#rain-vid {
	opacity: var(--background-video-opacity);
	object-fit: cover;
	z-index: -1;
}

#grunge-overlay {
	background: url('/assets/images/grunge.jpg');
	background-size: cover;
	mix-blend-mode: color-dodge;
	opacity: var(--grunge-overlay-opacity);
}

@keyframes noise {
	0% {
		background: url('/assets/images/noise-textures/noisy-texture-200x200-1.png');
	}
	25% {
		background: url('/assets/images/noise-textures/noisy-texture-200x200-2.png');
	}
	50% {
		background: url('/assets/images/noise-textures/noisy-texture-200x200-3.png');
	}
	75% {
		background: url('/assets/images/noise-textures/noisy-texture-200x200-4.png');
	}
}

#noise-overlay {
	background-blend-mode: multiply;
	background: url('/assets/images/noise-textures/noisy-texture-200x200-1.png');
	filter: contrast(1.5) brightness(0.4) hue-rotate(90deg);
	opacity: var(--noise-opacity);

	mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 150%);
	mask-size: cover;
	mask-position: center;

	animation: noise 0.3s steps(4) infinite;
}

.snowflake {
	position: fixed;
	animation-timing-function: linear;
	z-index: -1;
	background: white;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(1px);
}

@keyframes snowflake-fall {
	0% {
		transform: translateY(-15vh);
	}
	100% {
		transform: translateY(125vh);
	}
}

@keyframes snowflake-fall-horizontal-1 {
	0% {
		transform: translateX(0) translateY(-15vh);
	}
	100% {
		transform: translateX(20vw) translateY(125vh);
	}
}

@keyframes snowflake-fall-horizontal-2 {
	0% {
		transform: translateX(0) translateY(-15vh);
	}
	100% {
		transform: translateX(-20vw) translateY(125vh);
	}
}

/* global styles | general */

::selection {
	background-color: var(--selection);
}

a {
	color: var(--main-color);
	text-decoration: underline;
}

a:hover {
	background-color: var(--main-color);
	cursor: pointer;
	color: rgba(24, 45, 75, 0.616);

	transition: box-shadow 0.1s, background-color 0s, color 0s;

	text-decoration: none;
}

pre,
p,
li,
h1,
h2,
h3,
h4,
td {
	margin: 0;
	font-weight: normal;
}

h4 {
	font-size: 1em;
}

p em {
	opacity: 0.7;
}

i {
	margin-right: 0.75em;
	vertical-align: middle;
}

summary {
	-webkit-user-select: none; /* Safari */
	user-select: none;
	outline: 1px solid var(--main-color);
	padding-left: 0.5em;
}

summary h2 {
	display: inline;
}

summary::marker {
	font-size: 1.5em;
}

summary:hover {
	cursor: pointer;
	background-color: var(--main-color);
	color: rgba(24, 45, 75, 0.616);
}

details[open] summary {
	margin-bottom: 0.5em;
}

details[open] summary:not(:hover) {
	background: linear-gradient(90deg, transparent -15%, rgba(var(--bg-color), 0.3) 65%);
}

#canvas {
	font-size: 1.75em;
	padding: 1.8em;
}

.tag-list {
	display: flex;
	gap: 0.5em;
	margin: 0.5em 0;
}

.tag {
	padding: 0.1em 0.3em;
	background: linear-gradient(90deg, transparent -5%, rgba(var(--bg-color), 0.3) 75%);
	border: 1px solid var(--main-color);
}

.tag[class*='active'] {
	--tag-color: rgb(183, 241, 95);
	--bg-alpha: rgba(0, 255, 0, 0.3);
}

.tag[class*='inactive'] {
	--tag-color: rgb(230, 114, 37);
	--bg-alpha: rgba(255, 0, 0, 0.3);
}

.tag[class*='open-source'] {
	--tag-color: rgb(179, 138, 245);
	--bg-alpha: rgba(200, 95, 241, 0.3);
}

.tag[class*='active'],
.tag[class*='inactive'],
.tag[class*='open-source'] {
	border-color: var(--tag-color);
	color: var(--tag-color);
	background: linear-gradient(90deg, transparent -5%, var(--bg-alpha) 120%);
}

hr.dotted {
	border: none;
	border-top: 1px dotted var(--main-color);
	height: 1px;
	width: 100%;
}

.tooltip {
	position: absolute;
	background-color: rgba(var(--bg-color), 0.45);
	color: var(--main-color);
	padding: 5px 10px;
	border: 1px solid var(--main-color);
	font-size: 14px;
	pointer-events: none;
	white-space: nowrap;
}

/* ASCII AND INTRODUCTION */
#title {
	font-size: 1.3em;
	font-family: 'Courier New', Courier, monospace;
	-webkit-user-select: none; /* Safari */
	user-select: none;
	margin-bottom: 1em;
}

#sub-title {
	font-size: 1em;
}

/* NAV BAR USED FOR TAB PAGES */
nav ul {
	list-style-type: none;
	display: flex;
	padding: 0;
	gap: 2.5em;
}

nav ul li a {
	padding: 0.2em 0.3em;
}

.tab-active {
	background-color: var(--main-color);
	color: rgba(24, 45, 75, 0.616);
	text-decoration: none;
}

/* PRINT ANIMATION WHEN CHANGING TABS AND ON PAGE LOAD */
.fade-in {
	opacity: 0;
}

.fade-in.visible:not(em) {
	opacity: 1;
	transform: translateY(0);
}

.fade-in.visible em {
	opacity: 0.7;
	transform: translateY(0);
}

@keyframes fade-in-anim {
	0% {
		opacity: 0.75;
		transform: scale(0.985) rotateX(-15deg);
	}
	35% {
		opacity: 0.8;
	}

	100% {
		opacity: 1;
		transform: scale(1) rotateX(0);
	}
}

.fade-in-anim:not(em) {
	animation: fade-in-anim 0.5s ease-out;
}

/* TABS */
.tabs:not(:target) {
	display: none;
}

.tabs {
	border: solid var(--main-color);
	padding: 1.5em;
	backdrop-filter: blur(var(--tab-background-blur));
	background: linear-gradient(45deg, rgba(var(--bg-color), 0.05) 70%, rgba(var(--bg-color), 0.2) 110%);
}

/* GRID-SYSTEM FOR CONTENT OF TABS */
.grid-row,
.grid {
	display: flex;
	gap: 1em;
}

.grid {
	flex-direction: column;
}

.grid-row-box {
	padding: 0.5em;
	width: 100%;
	border: 1px dotted var(--main-color);
}

.grid-row-box-shrink {
	flex-shrink: 5;
}

/* HOME TAB */
#welcome-title {
	background: linear-gradient(90deg, transparent -15%, rgba(var(--bg-color), 0.3) 65%);
	outline: 1px solid var(--main-color);
	margin-bottom: 0.5em;
	padding-left: 0.25em;
}

#update-list em::after {
	content: '\A';
	white-space: pre;
}

#update-list p:not(:last-child) {
	margin-bottom: 0.75em;
}

#theme-list p:not(:last-child) {
	margin-bottom: 0.5em;
}

/* PROJECTS TAB */
#pr-list {
	padding-left: 0;
}

#pr-list li {
	list-style: none;
	border: solid var(--main-color);
	border-width: 1px;
	background: linear-gradient(45deg, rgba(var(--bg-color), 0.05) 70%, rgba(var(--bg-color), 0.2) 110%);
	padding-bottom: 0.5em;
}

#pr-list li > *:not(:first-child) {
	padding: 0 0.5em;
}

#pr-list li:not(:last-child) {
	margin-bottom: 1.5em;
}

#pr-list li a {
	padding: 0.1em 0;
}

.pr-title {
	background-color: var(--main-color);
	color: black;
	margin-bottom: 0.5em;
	padding: 0.25em;
}

.pr-warning,
.pr-warning em {
	color: var(--warning-color);
}

.pr-info,
.pr-info em {
	color: var(--info-color);
}

/* PICTURES TAB */
.row,
.img-container {
	margin-top: 1.5em;
	margin-bottom: 1.5em;
	width: 100%;
	display: flex;
	justify-content: space-between;
	gap: 1.5em;
}

.row img,
.img-container {
	flex: 1 1 auto;
	-webkit-user-select: none; /* Safari */
	user-select: none;
	transition: filter 0.3s ease-in-out;
	width: 0;
}

.img-desc {
	position: absolute;
	vertical-align: bottom;
	align-items: end;

	width: 100%;
	height: 100%;
	display: flex;
	filter: opacity(0%);
	transition: 0.3s;
}

.img-desc:hover {
	filter: opacity(100%);
	background: linear-gradient(transparent 50%, black);
}

.img-container {
	position: relative;
}

.row img:hover {
	filter: brightness(1.5);
	cursor: pointer;
}

#photography .row img:hover {
	filter: brightness(1.2);
	cursor: default;
}

.pic-coll:not(:first-of-type) {
	display: none;
}

.pic-coll div img {
	filter: brightness(1.2);
	border: 1px dotted var(--main-color);
}

#pictures-list nav ul li a {
	padding: 0.2em 0.3em;
	-webkit-user-select: none; /* Safari */
	user-select: none;
}

#pictures-list nav {
	margin-top: -0.5em;
}

/* BLOG TAB */
#blog.post-open {
	display: block;
}

#blog-window {
	display: flex;
	flex-direction: column;
	gap: 1em;
	margin: 0.5em 0;
}

.post {
	border: 1px solid var(--main-color);

	transition: filter 0.5s, background-position 0.75s;
	background: linear-gradient(45deg, rgba(var(--bg-color), 0.13) 70%, rgba(var(--bg-color), 0.2) 110%);
	background-size: 200% 200%;
	background-position: 50% 50%;
	filter: brightness(1);

	padding: 0.5em;
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.post:hover {
	background: linear-gradient(45deg, rgba(var(--bg-color), 0.13) 70%, rgba(var(--bg-color), 0.95) 110%);
	background-size: 200% 200%;
	background-position: 100% 100%;
	filter: brightness(1.3);
	cursor: pointer;
}

.post-header {
	display: flex;
	justify-content: space-between;
	gap: 0.5em;
}

.post-title {
	font-weight: bold;
	text-align: left;
	flex-grow: 1;
}

.post-time-to-read {
	text-align: right;
	padding: 0 0.75em;
	background: linear-gradient(90deg, transparent -15%, rgba(var(--bg-color), 0.45) 65%);
	border: 1px solid var(--main-color);
	color: white;
}

.post-content {
	border-left: 1px solid var(--main-color);
	padding-left: 0.5em;
}

#post-content-full {
	white-space: pre-line;
	text-align: justify;
	max-width: 1000px;
}

.post-actions {
	display: flex;
	justify-content: space-between;
	gap: 0.5em;
}

.post-action-btn {
	padding: 0.3em;
	background: linear-gradient(90deg, transparent -15%, rgba(var(--bg-color), 0.3) 65%);
	outline: 1px solid var(--main-color);
	width: max-content;

	text-decoration: none;
}

.post-action-btn:hover {
	color: rgba(0, 0, 0, 0.65);
}

/* ABOUT TAB */
.contact-link {
	margin-bottom: 0.25em;
}

/* RESPONSIVENESS */
@media screen and (max-width: 45em) {
	.no-mobile {
		display: none;
	}
	nav ul {
		gap: 0.25em;
		width: 100%;
		padding: 0.25em 0;
		display: flex;
		justify-content: space-between;
	}
	#rain-vid {
		object-fit: fill;
	}
	body {
		padding-bottom: env(safe-area-inset-bottom);
	}

	/* grid system */
	.row {
		display: block;
	}
	.row img {
		width: 100%;
	}
	.grid-row {
		flex-direction: column;
		margin-right: 1em;
	}

	/* pictures tab */
	.img-desc {
		filter: opacity(100%);
		left: 100%;
		padding: 0 0.5em;
		align-items: start;
	}
	.img-desc:hover {
		background: none;
	}
	.row-photography {
		flex-direction: column;
		display: flex;
		gap: 0;
	}
	.img-container {
		width: 50%;
	}

	/* about tab */
	.contact-link {
		margin-top: 0.5em;
	}
	.contact-link {
		margin-bottom: 0.75em;
	}
	.contact-link a {
		padding: 0.25em 0 0.25em 0;
	}
}

@media screen and (max-width: 1050px) {
	#title {
		font-size: 2.3vw;
		margin-bottom: 2em;
	}
	#canvas {
		padding: 0.5em;
	}
	.tabs {
		padding: 0.75em;
	}
}

@media screen and (min-width: 1600px) {
	/* Prevent the images from getting too big on wide screens */
	.row img {
		max-width: 800px;
	}
	.row {
		justify-content: left;
	}
}

@media (hover: none) {
	summary:hover {
		background-color: transparent;
		color: var(--main-color);
	}
}

/* To comply with outlinenone.com */
:focus {
	outline: 2px solid var(--main-color);
	color: var(--main-color);
	background: rgba(var(--bg-color), 0.3);

	text-decoration: none;
}
