@import "variables";
@import "fonts";
@import "grid";
@import "personnel";

* {
	box-sizing: border-box;
}

html, body, h1, h2, h3, p, ul, li {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	font-size: 16px;
	color: $col-fg-0-light;
	background-color: $col-bg-0-light;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;

	&>* {
		width: 100%;
	}

	@media (prefers-color-scheme: dark) {
		color: $col-fg-0-dark;
		background-color: $col-bg-0-dark;
	}
}

.wrap {
	width: 100%;
	max-width: 80em;
	margin-left: auto;
	margin-right: auto;
}

nav {
	display: flex;
	align-items: center;
	border-bottom: 8px solid;
	border-image: linear-gradient(to right, $col-red-light 20%, $col-orange-light 20%, $col-orange-light 40%, $col-yellow-light 40%, $col-yellow-light 60%, $col-green-light 60%, $col-green-light 80%, $col-purple-light 80%) 5;

	.wrap {
		width: 100%;
		height: 100%;
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		padding: 2.5em 1em 1em 1em;

		.logo {
			height: 4em;
			display: block;

			@media (prefers-color-scheme: dark) {
				filter: contrast(80%) saturate(80%) brightness(180%);
			}
		}

		ul {
			list-style: none;
			display: flex;

			a {
				display: block;
				padding: 1em;
				color: inherit;
				font-weight: bold;

				&:hover {
					text-decoration: underline;
				}
			}
		}
	}

	@media (prefers-color-scheme: dark) {
		background-color: $col-bg-0-dark;
	}
}

a {
	text-decoration: none;
	color: $col-red-light;

	&:hover {
		text-decoration: underline;
	}

	&[rel~="noreferrer"]::after, &.external::after {
		content: "\ecaf";
		font-family: remixicon;
		font-size: .8em;
		font-weight: normal;
		margin-left: .2em;
	}
}

img {
	max-width: 100%;
	height: auto;
}

header {
	position: relative;
	min-height: 35em;
	color: $col-bg-0-light;
	overflow: hidden;

	.wrap {
		padding: 5em 1em;
	}

	h1 {
		font-size: 2.5em;
		margin-bottom: 1.5em;
	}

	&::before {
		content: "";
		position: absolute;
		z-index: -2;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-image:  url('img/panorama.jpg');
		background-size: cover;
		background-position: center center;
		background-repeat: no-repeat;
		filter: blur(4px);
		transform: scale(1.1); // Fix borders created by the blur
	}

	&::after {
		content: "";
		position: absolute;
		z-index: -1;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-image:  url('img/forest.svg');
		background-size: contain;
		background-position: center bottom -4px; // -4px fixes a visible line on some resolutions
		background-repeat: no-repeat;
		filter: invert(0%) contrast(94.5%);

		@media (prefers-color-scheme: dark) {
			filter: invert(100%) contrast(81%);
		}
	}
}

section {
	padding: 3em 1em;
}

footer {
	text-align: center;
	padding: 5em 1em 1em 1em;
	margin-top: auto;
}
