@font-face {
	font-family: "Montserrat";
	src: url("/assets/montserrat-variable.woff2") format("woff2");
	font-weight: 100 900;
}

:root {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	--block-spacing-vertical: 1em;
	--font-color: rgba(255,255,255,0.85);
	--font-family: "Montserrat";
	--font-line-height: 1.5;
	--font-size: clamp(1rem, 1.45vw, 1.8rem);
	--header-background: rgba(0,0,0,0.5);
}

*, ::after, ::before {
	box-sizing: border-box;
}

html {
	scroll-padding-top: 6em;
}

body {
	background: var(--page-background);
	color: var(--font-color);
	font-family: var(--font-family);
	font-size: var(--font-size);
	line-height: var(--font-line-height);
	margin: 0;
	min-height: 100vh;
	overflow-wrap: break-word;
	text-rendering: optimizeLegibility;
	text-underline-offset: 0.15em;
	width: 100%;
}

/* === LAYOUT === */

header {
	position: sticky;
	top: 0;
	background-color: var(--header-background);
	backdrop-filter: blur(10px);
	isolation: isolate;
	padding-block: var(--block-spacing-vertical);
	z-index: 10;
}

footer {
	background-color: rgba(0,0,0,0.15);
	font-size: 90%;
	padding: 1em 0;
}

section {
	padding: 1.5em 0;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit,minmax(0%,1fr));
	column-gap: 2em;
	margin-top: 1em;
}

.grid.inset {
	max-width: 72vw;
	margin-left: auto;
	margin-right: auto;
}

.container {
	margin-left: auto;
	margin-right: auto;
	max-width: 90vw;
	width: 100%;
}

.left {
	text-align: left;
}

.center {
	text-align: center;
	text-wrap: balance;
}

/* === NAVIGATION === */

nav, nav ol {
	display: flex;
	align-items: center;
	gap: 1em;
	justify-content: space-between;
	overflow: visible;
	padding: 0;
}

nav ol {
	aling-items: center;

}

nav li {
	display: inline-block;
	list-style: none;
	margin: 0;
}

nav .active {
	font-weight: bold;
}

nav .navlinks svg {
	max-width: 0;
	overflow: hidden;
	transition: all 0.5s ease;
}

nav .navlinks svg:has(+.active) {
	max-width: 2em;
}

nav .hidden {
	display: none;
}

/* === HEADINGS === */

h1, h2, h3 {
	margin: 0;
}

h1 {
	font-size: calc(var(--font-size) * 2.5);
	font-weight: 200;
	line-height: 1.125;
	margin-bottom: 0.5em;
}

h1 b {
	font-weight: 800;
}

h3 {
	font-weight: 700;
	font-size: calc(var(--font-size) * 0.85);
	line-height: 1.175;
	margin-bottom: 1em;
	opacity: 0.65;
	text-transform: uppercase;
}

p + h3 {
	margin-top: 2em;
}

/* === COPY === */

p { margin: 0.25em 0 0 0; }
p + p { margin-top: 0.75em; }
.grid > p + p { margin-top: 0.25em; }
p + details { margin-top: 1em; }

p:has(.icon:last-child) {
	margin-bottom: 0.35em;
	margin-top: 0.5em;
}

.subtle { opacity: 0.75; }

/* === UI ELEMENTS === */

a {
	color: var(--link-color);
}

a:hover {
	color: var(--link-hover-color);
}

a img {
	border-radius: 0;
}

button {
	display: inline-block;
	background: var(--button-color);
	border: none;
	border-radius: 0.25em;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--font-size);
	line-height: 1;
	padding: 0.5lh 1em;
}

button:hover {
	background: var(--button-hover-color);
}

img {
	max-width: 100%;
}

hr {
	border: none;
	border-top: rgba(255,255,255,0.25) 1px solid;
}

:where(svg:not([fill])) {
	fill: white;
}

.icon {
	--size: 1.1em;
	display: inline-block;
	height: var(--size);
	width: var(--size);
	margin-bottom: -0.15em;
	transform: translateY(0.1em);
	vertical-align: baseline;
}

.large {
	--size: 2.5em;
}

dialog {
	position: absolute;
	left: 50%; top: 50%;
	background: rgba(0,0,0,0.65);
	border: none;
	border-radius: 1em;
	padding: 2em;
	transform: translateX(-50%) translateY(-50%);
}

/* === DETAIL ACCORDION == */

details summary {
	color: var(--link-color);
	cursor: pointer;
	list-style-type: none;
	margin-bottom: 0.5em;
}

details summary::after {
	display: inline-block;
	height: 1em; width: 1em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255,255,255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-position: right center;
	background-repeat: no-repeat;
	background-size: 1em;
	content: "";
	margin-bottom: -0.15em;
	opacity: 0.65;
	transform: rotate(-90deg);
	transition: transform .25s ease-in-out;
}

details[open] > summary::after {
	transform: rotate(0);
}

details p:last-child {
	margin-bottom: 0.5em;
}

/* === PHONE === */

@media (max-width: 576px) {

	.grid {
		grid-template-columns: 1fr;
		row-gap: 1em;
	}
}
