/* Modal overlay for enlarged gallery image */
.image-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.image-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.85);
	z-index: 0;
}

.image-modal-img {
	position: relative;
	z-index: 1;
	max-width: 90vw;
	max-height: 90vh;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
	border-radius: 12px;
	background: #222;
	object-fit: contain;
}

.image-modal-exit {
	position: absolute;
	top: 24px;
	left: 24px;
	z-index: 2;
	background-color: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: none;
	font-size: 2.5rem;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: ease-in background-color 0.2s;
}
.image-modal-exit:hover {
	background: rgba(0, 0, 0, 0.95);
}
/* Global CSS Variables */
:root {
	--picker-border-radius: 2rem;
	--picker-padding: 1rem;
	--picker-item-active-bg: rgba(255, 255, 255, 0.09);
	--picker-item-active-border: rgba(255, 255, 255, 0.16);
	--picker-item-active-border-radius: calc(
		var(--picker-border-radius) - var(--picker-padding)
	);
	--picker-item-padding: 0.5rem;
	--safe-left: 0px;
	--safe-right: 0px;
	--safe-bottom: 0px;
	--safe-top: 0px;
	--content-inline: 1.5rem;
}

/* Font */
.silkscreen-regular {
	font-family: "Silkscreen", sans-serif;
	font-weight: 400;
	font-style: normal;
}

.silkscreen-bold {
	font-family: "Silkscreen", sans-serif;
	font-weight: 700;
	font-style: normal;
}

.svg {
	width: 1.5em;
	margin-top: -0.25em;
	vertical-align: middle;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
	width: 16px;
	background: transparent;
}

::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 10px;
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	border: 2px solid transparent;
	background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
	background-clip: content-box;
}

::-webkit-scrollbar-thumb:active {
	background: rgba(255, 255, 255, 0.4);
	background-clip: content-box;
}

/* Reset and Base Styles */
* {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	font-family: "Roboto Mono", monospace;
	font-optical-sizing: auto;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	overflow-y: scroll;
	scrollbar-gutter: auto;
	scroll-behavior: smooth;
	background-color: #18181b;
	--pattern-max: 640px;
	background-image:
		url("/SomeProot/Assets/Images/Background/Pattern_L.png"),
		url("/SomeProot/Assets/Images/Background/Pattern_R.png"),
		linear-gradient(180deg, #232344 0%, #18181b 90%);
	background-position:
		left top,
		right top,
		center;
	background-repeat: repeat-y, repeat-y, no-repeat;
	background-size:
		min(50vw, var(--pattern-max)) auto,
		min(50vw, var(--pattern-max)) auto,
		100% 100%;
}

body {
	overflow-x: hidden;
	display: flex;
	color: #f3f3f3;
	line-height: 1.6;
	min-height: 100vh;
	min-height: 100svh;
	min-height: 100dvh;
	padding-bottom: var(--safe-bottom);
	flex-direction: column;
}

.img-placeholder {
	display: flex;
	justify-content: center;
	align-items: center;
	background: rgba(255, 255, 255, 0.06);
	color: var(--muted);
	text-align: center;
	padding: 1rem;
}

/* Header and Navigation */
header {
	min-height: 44px;
	padding: 0.5rem 0;
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	line-height: 1;
	background-color: #1a1a3290;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
	z-index: 100;
}

header.nav-hidden {
	transform: translateY(-100%);
}

nav {
	max-width: 1200px;
	margin: auto;
	width: 100%;
	padding: 0 calc(var(--content-inline) + var(--safe-right)) 0
		calc(var(--content-inline) + var(--safe-left));
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: nowrap;
	gap: 1rem;
}

nav h1 {
	font-size: 1.5rem;
	font-family: "Silkscreen", sans-serif;
}

nav ul {
	list-style: none;
	display: flex;
	gap: 2rem;
}

nav a {
	color: #c2c2c2;
	text-decoration: none;
	transition: opacity 0.3s;
}

nav a:hover {
	opacity: 0.8;
}

/* Main Content */
main {
	flex: 1;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 calc(var(--content-inline) + var(--safe-right)) 0
		calc(var(--content-inline) + var(--safe-left));
}

.hero {
	width: 100vw;
	height: auto;
	min-height: clamp(360px, 45vh, 560px);
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 2rem 0;
	text-align: center;
	background-color: #18181b;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
}

.hero [section="Hero"] {
	/* Keep text pinned to the bottom of the hero */
	margin-top: auto;
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 calc(var(--content-inline) + var(--safe-right)) 1rem
		calc(var(--content-inline) + var(--safe-left));
	z-index: 2;
}

.hero h1 {
	font-size: 2.5rem;
	transition: ease font-size 0.5s;
}

.hero h3 {
	font-size: 1.2rem;
	transition: ease font-size 0.5s;
}

.banner {
	width: 100%;
	height: 100%;
	min-height: clamp(320px, 18vw, 360px);
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	z-index: 0;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: pan-y;
	transition:
		ease height 0.5s,
		ease margin 0.5s,
		ease padding 0.5s;
}

.face {
	display: flex;
	gap: clamp(128px, 20vw, 220px);
	position: relative;
	will-change: transform;
	user-select: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	touch-action: pan-y;
}

.banner img {
	user-select: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
}

.eye-container {
	position: relative;
	will-change: transform;
}

.eye {
	width: clamp(96px, 12vw, 128px);
	height: auto;
	display: block;
	transform-origin: center center;
	animation: blink 4s infinite;
}

.mouth {
	width: clamp(192px, 20vw, 220px);
	height: auto;
	position: absolute;
	top: 100%;
	margin-top: clamp(24px, 4vw, 48px);
	left: 50%;
	margin-left: calc(clamp(192px, 20vw, 220px) / -2);
	will-change: transform;
}

.blush {
	width: clamp(8px, 8vw, 32px);
	height: auto;
	position: absolute;
	transform: translateY(64px);
	top: 30%;
	opacity: 0;
	transition: opacity 0.3s ease;
	will-change: opacity;
	pointer-events: none;
}

.blush.visible {
	opacity: 1;
}

.blur {
	--blur_amount: 4px;
	position: absolute;
	inset: 0; /* fill the section */
	width: 100%;
	height: 100%;
	backdrop-filter: blur(var(--blur_amount));
	-webkit-backdrop-filter: blur(var(--blur_amount)); /* Safari support */
	display: flex;
	justify-content: center;
	align-items: center;
	pointer-events: none;
	z-index: 1;
	transition: opacity 0.8s ease;
}

.content {
	margin: 2rem;
	text-align: left;
}

.content h3 {
	font-size: 1.8rem;
	margin-bottom: 1rem;
}

.content p {
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
}

.content a {
	color: #8292da;
	text-decoration: underline;
}

body[data-page="404"] main {
	flex-wrap: nowrap;
	max-width: none;
	padding: 0;
}

body[data-page="404"] .error404__hero {
	min-height: calc(100vh - var(--header-height, 0px));
	padding: 0;
	display: grid;
	place-items: center;
	margin-bottom: 0;
}

body[data-page="404"] .error404__banner {
	position: absolute;
	inset: 0;
	min-height: 100%;
	z-index: 0;
}

body[data-page="404"] .face {
	transform-origin: center;
	opacity: 0.7;
}

body[data-page="404"] .blur {
	--blur_amount: 10px;
	background: linear-gradient(
		180deg,
		rgba(24, 24, 27, 0.25) 0%,
		rgba(24, 24, 27, 0.75) 100%
	);
	opacity: 1;
	z-index: 1;
}

body[data-page="404"] .error404__content {
	position: relative;
	z-index: 2;
	max-width: 760px;
	margin: 2rem;
	text-align: center;
	padding: 2rem;
	border-radius: 1rem;
	background: rgba(24, 24, 27, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Footer */
footer {
	color: #f3f3f3;
	background-image: linear-gradient(180deg, #23234400 0%, rgb(24, 24, 27) 90%);
	text-align: center;
	padding: 1rem calc(var(--content-inline) + var(--safe-right)) 1rem
		calc(var(--content-inline) + var(--safe-left));
	font-size: 0.9rem;
}

footer a {
	color: #c2c2c2;
	text-decoration: underline;
}

/* Picker */
.picker {
	width: 100%;
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--picker-border-radius);
	padding: var(--picker-padding);
	gap: 1rem;
	display: flex;
	justify-content: center;
}

.picker form {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: var(--picker-padding);
}

.picker select {
	position: absolute;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	height: 0;
	width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
}

.picker__content {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
	gap: 2rem;
	position: relative;
	isolation: isolate;
}

.picker__item {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	padding: var(--picker-item-padding);
	position: relative;
	z-index: 1;
	cursor: pointer;
}

.picker__item img {
	height: clamp(32px, 8vw, 96px);
	cursor: pointer;
	background-color: transparent;
}

.picker__item .img-placeholder {
	font-size: 1vw;
	height: clamp(32px, 8vw, 96px);
	width: 100%;
	aspect-ratio: 3 / 2;
	cursor: pointer;
	border-radius: calc(
		var(--picker-item-active-border-radius) - var(--picker-item-padding)
	);
}

.picker__active-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
	border-radius: var(--picker-item-active-border-radius);
	background: var(--picker-item-active-bg);
	border: 1px solid var(--picker-item-active-border);
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, 0, 0) scale(1);
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.2s ease;
	z-index: 0;
}

.picker__active-bg--visible {
	opacity: 1;
}

.picker__active-bg--select-first {
	animation: picker-select-first 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.picker__active-bg--deselect {
	animation: picker-deselect-pop 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes picker-deselect-pop {
	0% {
		opacity: 1;
		transform: var(--picker-active-transform, translate3d(0, 0, 0)) scale(1);
	}
	100% {
		opacity: 0;
		transform: var(--picker-active-transform, translate3d(0, 0, 0)) scale(0);
	}
}

@keyframes picker-select-first {
	0% {
		opacity: 0;
		transform: var(--picker-active-transform, translate3d(0, 0, 0)) scale(0);
	}
	100% {
		opacity: 1;
		transform: var(--picker-active-transform, translate3d(0, 0, 0)) scale(1);
	}
}

/* Responsive Design */
@media (orientation: landscape) {
	:root {
		--safe-left: env(safe-area-inset-left);
		--safe-right: env(safe-area-inset-right);
		--safe-bottom: env(safe-area-inset-bottom);
		--safe-top: env(safe-area-inset-top);
	}
}

@media (min-width: 1024px) {
	:root {
		--content-inline: 2rem;
	}
}

@media (max-aspect-ratio: 3/4) {
	:root {
		--content-inline: 0;
	}

	.hero {
		height: auto;
		min-height: calc(100vh - var(--header-height, 0px));
		display: flex;
		flex-direction: column;
		padding-top: 3rem;
		padding-bottom: 3rem;
	}

	.face {
		scale: 0.9;
	}

	.blur {
		opacity: 0;
	}

	nav {
		flex-direction: column;
		align-items: center;
	}

	nav ul {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		padding: 0 0.5rem;
		gap: 0.5rem;
		font-size: 1.15rem;
	}

	nav a {
		font-size: 1.2rem;
		margin: 0.25rem;
	}
	nav h1 {
		font-size: 1.5rem;
	}

	.hero h2 {
		font-size: 2rem;
	}
}

@keyframes blink {
	0%,
	90%,
	100% {
		transform: scaleY(1);
	}
	95% {
		transform: scaleY(0);
	}
}
