* {
	-webkit-text-size-adjust: none;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	-webkit-touch-callout: none;
	box-sizing: border-box;
}

:root {
	--color-background: #FFFFFF;
	--color-font: #111111;
	--color-link: #0099FF;
	--color-cerulean: #2A52BE;
	--shadow: 0 1px 5px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.1);
	--highlight: inset 0 0 0 1px rgba(255,255,255,0.1);
	--highlight-bottom: inset 0 -1px 0 rgba(255,255,255,0.2);
}

html {
	position: relative;
	height: 100%;

	font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;

	font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
	
	-webkit-font-smoothing: antialiased;

	background-color: var(--color-background);
	color: var(--color-font);

	min-height: 100vh;

	scroll-behavior: smooth;

	scroll-padding: calc(85px + env(safe-area-inset-top));
}

html.dark-mode {
	--color-background: #111111;
	--color-font: #FFFFFF;
	--color-link: #00CCFF;
	--color-cerulean: #2A52BE;
	--shadow: 0 1px 5px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.2);
	--highlight: inset 0 0 0 1px rgba(255,255,255,0.1);
	--highlight-bottom: inset 0 -1px 0 rgba(255,255,255,0.2);
}

body {
	margin: 0;
	padding: 0;
	padding-top: 0;

	min-height: 100vh;

	padding-bottom: calc(20px + env(safe-area-inset-bottom));

	-webkit-user-select: text;
	user-select: text;

	touch-action: pan-x pan-y;
}

header {
	position: sticky;
	top: 0;
	background-image: linear-gradient(180deg, var(--color-background), color-mix(in srgb, var(--color-background) 80%, transparent));
	text-align: center;
	z-index: 10;
	backdrop-filter: blur(10px);
	padding: 5px;
	padding-bottom: 10px;
	padding-top: calc(5px + env(safe-area-inset-top));
}

header::after {
	content: "";

	position: absolute;
	inset: 0;
	box-shadow: var(--shadow), var(--highlight-bottom);

	opacity: 0;
	transition: opacity 0.1s linear;

	pointer-events: none;
}

footer {
	position: relative;
	text-align: center;
}

footer .copyright {
	opacity: 0.5;
}

html[data-is-scrolled="true"] header::after {
	opacity: 0.5;
}

nav {
	position: relative;
	display: flex;
	justify-content: center;
	line-height: 20px;
}

header a {
	font-size: 16px;
}

article {
	padding: 0 20px;
}

section {
	position: relative;
	padding: 0;
	max-width: 800px;
	margin: 0 auto;
}

article > section {
	position: relative;
	padding-bottom: 40px;
}

section section {
	padding-bottom: 20px;
}

section section:last-child {
	padding-bottom: 0;
}

p {
	margin: 0;
	padding: 0;
	margin-bottom: 10px;
}

p:last-child {
	margin-bottom: 0;
}

h1,
h2,
h3 {
	margin: 0;
	padding: 0;
	
	line-height: 1.25;
}

h1 {
	font-size: 32px;
	font-weight: 600;
}

h2 {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 10px;
}

h3 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 5px;
}

h2.name {
	text-align: center;
	/* font-weight: 400; */
	margin-top: 20px;
	color: var(--color-cerulean);
}

a {
	/* color: var(--color-link); */
	color: inherit;
	text-decoration: underline;
	font-weight: 500;

	transition: opacity 0.1s linear;
	
	cursor: pointer;

	-webkit-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
	user-drag: none;
}

a:active {
	opacity: 0.5;
}

header a {
	color: inherit;
	opacity: 0.5;
	text-decoration: none;

	transition: opacity 0.1s linear;
}

header a:active {
	opacity: 1;
}

h1 a {
	opacity: 1;
	font-size: inherit;
	font-weight: inherit;
}

h3 a {
	opacity: 1;
	font-size: inherit;
	font-weight: inherit;
	text-decoration: none;
}

hr {
	display: block;
	padding: 0;
	margin: 0 auto;

	margin-bottom: 25px;

	width: 5px;
	height: 5px;

	/* height: 2px; */
	border-radius: 5px;
	border: none;

	background-color: var(--color-font);
	opacity: 0.5;
}

.spacer {
	height: 20px;
}

.grid {
	position: relative;
	display: grid;

	grid-template-columns: auto auto;

	gap: 10px;

	margin-top: 10px;
}

.image {
	position: relative;
	display: block;

	width: 100%;

	border-radius: 10px;

	background-color: color-mix(in srgb, var(--color-font) 20%, transparent);

	box-shadow: var(--shadow);

	overflow: hidden;
}

.image::after {
	content: '';

	position: absolute;

	inset: 0;

	border-radius: inherit;

	box-shadow: var(--highlight);

	pointer-events: none;
}

.image img {
	position: relative;
	display: block;
	width: 100%;
	transition: opacity 0.2s linear;
	opacity: 0;

	-webkit-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
	user-drag: none;
}

.image img.loaded {
	opacity: 1;
}

.grid .image,
.carousel .image,
.image.me {
	position: relative;
	display: block;

	width: 100%;
}

.image.qr {
	width: 100px;
	margin: 0 auto;
	margin-top: 50px;
}

.grid img:not([src]),
.carousel img:not([src]) {
	padding-top: 100%;
}

.grid a {
	transition: transform 0.1s ease-out;
}

.grid a:active {
	transform: scale(0.95);
}

.carousel .image {
	width: min(calc(100vw - 40px - 40px), 800px);
	flex-shrink: 0;
	scroll-snap-align: center;
}

.carousel,
.carousel-body {
	position: relative;
	display: flex;
	gap: 10px;
	width: auto;
	
	padding: 20px;
	margin: -20px;

	padding-top: 10px;
	margin-top: -10px;
	margin-bottom: -10px;
}

.carousel-body {
	scroll-behavior: smooth;
	overflow-x: scroll;
	scroll-snap-type: x mandatory;

	-ms-overflow-style: none;  /* IE and Edge */
	scrollbar-width: none;  /* Firefox */
}

.carousel-body::-webkit-scrollbar {
	display: none;
}

.carousel button {
	display: none;
}

@media only screen and (min-width: 840px) {
	.carousel,
	.carousel-body {
		width: auto;
    padding-left: calc(50vw - 400px);
    padding-right: calc(50vw - 400px);
    margin-left: calc(-50vw + 400px);
    margin-right: calc(-50vw + 400px);
	}

	.carousel::before,
	.carousel::after {
		content: '';

		display: block;

		position: absolute;

		top: 0;

		width: calc(50vw - 400px - 10px);
		height: 100%;

		background-color: var(--color-background);

		z-index: 1;

		pointer-events: none;
	}

	.carousel::before {
		left: 0;
		
		mask-image: linear-gradient(-90deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.02) 5%, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.18) 15%, rgba(0, 0, 0, 0.32) 20%, rgba(0, 0, 0, 0.50) 25%, rgba(0, 0, 0, 0.68) 30%, rgba(0, 0, 0, 0.82) 35%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.98) 45%, rgba(0, 0, 0, 1.00) 50%);
	}

	.carousel::after {
		right: 0;

		mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.02) 5%, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.18) 15%, rgba(0, 0, 0, 0.32) 20%, rgba(0, 0, 0, 0.50) 25%, rgba(0, 0, 0, 0.68) 30%, rgba(0, 0, 0, 0.82) 35%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.98) 45%, rgba(0, 0, 0, 1.00) 50%);
	}

	.carousel button {
		display: block;
		appearance: none;
		border: none;
		outline: none;
		opacity: 0;

		position: absolute;

		padding: 0;
		margin: 0;

		width: calc(50vw - 400px - 10px);
		height: 100%;

		top: 0;

		cursor: pointer;
	}

	.carousel button.left {
		left: 0;
	}

	.carousel button.right {
		right: 0;
	}
}

form {
	position: relative;
	width: 100%;
	padding-top: 10px;
}

input,
select,
textarea {
	display: block;
	appearance: none;

	width: 100%;
	height: 40px;

	font-family: "Montserrat", sans-serif;
	font-size: 16px;
	line-height: 20px;

	padding: 10px;
	margin: 0;

	border: none;
	outline: none;

	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-font) 50%, transparent);
	border-radius: 5px;

	margin-bottom: 10px;

	transition: box-shadow 0.1s linear;

	color: var(--color-font);
	background-color: var(--color-background);
}

input::placeholder,
textarea::placeholder {
	color: var(--color-font);
	opacity: 0.5;
}

input:focus,
select:focus,
textarea:focus {
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-font) 100%, transparent), 0 0 0 1px color-mix(in srgb, var(--color-font) 100%, transparent);;
}

textarea {
	height: 160px;
	resize: none;
}

.select-container svg {
	position: absolute;

	right: 0;
	top: 0;

	pointer-events: none;
}

.select-container {
	position: relative;

	width: 100%;
	height: 40px;

	margin-bottom: 10px;
}

form button {
	position: relative;

	border: none;
	outline: none;
	padding: 0;
	margin: 0;

	appearance: none;
	width: 100%;
	height: 40px;

	background-color: var(--color-font);
	color: var(--color-background);

	font-family: "Montserrat", sans-serif;
	font-size: 16px;
	font-weight: 600;

	border-radius: 100px;

	transition: transform 0.1s ease-out;

	cursor: pointer;
}

form button:active {
	transform: scale3d(0.975, 0.95, 1);
}

.image-viewer {
	position: fixed;

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

	width: 100dvw;
	height: 100dvh;

	background-color: var(--color-background);

	z-index: 10;

	transition: opacity 0.2s linear, transform 0.2s ease-in-out;

	visibility: hidden;

	opacity: 0;
	transform: scale(0.5);
	pointer-events: none;
}

.image-viewer.on {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
	visibility: visible;
}

.close {
	position: absolute;

	top: 0;
	right: 0;

	width: 40px;
	height: 40px;
}

.image-viewer iframe {
	width: 100%;
	height: 100%;

	border: none;
}

.dark-mode-toggle {
	position: relative;

	width: 20px;
	height: 20px;

	margin: 0 auto;
	margin-top: 10px;
	
	border-radius: 10px;

	border: 2px solid var(--color-font);

	transition: opacity 0.1s linear, transform 0.1s ease-out;

	opacity: 0.2;

	cursor: pointer;
}

.dark-mode-toggle::before {
	content: '';

	position: absolute;

	inset: 2px;

	border-radius: inherit;

	background-color: var(--color-font);
}

.dark-mode-toggle:active {
	opacity: 1;
	transform: scale(0.8);
}