@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

body {
	--text: hsl(40, 10%, 75%);
	--text-accent: hsl(40, 10%, 95%);
	--decoration: hsl(40, 10%, 50%);
	--background: hsl(40, 10%, 5%);
	--background-alt: hsl(40, 10%, 10%);

	background-color: var(--background);
	color: var(--text);
	display: flex;
	gap: 4rem;
	margin: 0;
	justify-content: center;
	flex-direction: row;
	font-family: 'Libre Baskerville';
	font-size: 16px;
	line-height: 1.6rem;
}

@media (max-width: 40rem) {
	body {
		font-size: 14px;
	}
}

@media (max-width: 60rem) {
	body {
		flex-direction: column;
	}
}

* {
	box-sizing: border-box;
}

nav {
	display: flex;
	flex-direction: column;
	height: fit-content;
	max-height: calc(100vh - 8rem);
	overflow-y: scroll;
	padding: 1rem 0;
	position: sticky;
	top: 8rem;
	width: 15rem;
}

nav a {
	text-decoration: none;
}

nav a:hover {
	text-decoration: underline;
}

nav hr {
	width: 100%;
}

nav .inverted a {
	background-color: var(--text);
	color: var(--background);
}

.nav-toggle {
	display: none;
}

main {
	display: flex;
	flex-direction: column;	
	width: 60vw;
	margin: 2rem;
	max-width: 80rem;
}

@media (max-width: 60rem) {
	.nav-toggle {
		appearance: none;
		background: linear-gradient(var(--text) 0 15%, var(--background) 15% 42.5%, var(--text) 42.5% 57.5%, var(--background) 57.5% 85%, var(--text) 85% 100%);
		border: 0.5rem solid var(--background);
		display: block;
		height: 3rem;
		position: fixed;
		right: 1rem;
		top: 1rem;
		width: 3rem;
		z-index: 1;
	}

	.nav-toggle:checked + nav {
		display: flex;
	}

	nav {
		background-color: var(--background-alt);
		display: none;
		max-height: calc(100vh);
		padding: 2rem;
		top: 0;
		width: 100%;
	}

	nav:before {
		content: 'Navigaatio';
		font-size: 150%;
		margin-bottom: 2rem;
	}

	main {
		margin: 1rem;
		width: auto;
	}
}

main > header {
	margin: 8rem 0;
	text-align: center;
}

h1 {
	font-size: 300%;
	line-height: 0.7em;
	text-transform: uppercase;
}

h1 + span {
	font-size: 150%;
	font-style: italic;
}

section {
	padding: 3rem 0;
	border-top: 1px solid var(--decoration);
}

h2 {
	font-size: 180%;
	line-height: 1.4em;
	margin: 3rem 0;
}

h2 > a { /* Anchor */
	color: var(--text);
	scroll-margin-top: 2rem;
}

@media (max-width: 60rem) {
	h2 {
		margin: 1rem 0 2rem 0;
	}
}

a {
	color: var(--text-accent);
}

p {
	hyphens: auto;
}

.gallery {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr 1fr 1fr; 
	grid-template-rows: auto;
	margin: 4rem 0 1rem;
}

.gallery img {
	aspect-ratio: 1 / 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery img:hover {
	filter: opacity(0.8);
}
