:root {
	--border-style: solid;
	--border-radius: 5px;
	--border-width: 1px;

	/* --color-vibrant-green: #3CB371; */
	/* --color-lush-grass: #32CD32; */

	/* --color-soft-lime: #ADFF2F; */
	/* --color-emerald-teal: #20B2AA; */
	/* --color-sky-blue: #87CEEB; */

	/* --color-pearl-white: #F8F8FF; */
	/* --color-charcoal-gray: #2F4F4F; */
	/* --color-warm-beige: #FAFAD2; */

	--glass-border: 1px solid #ffffff59;
	--glass-radius: 15px;
}

@property --font-color {
	inherits: false;
	initial-value: #151515;
	syntax: "<color>";
}

@property --glass-color {
	inherits: false;
	initial-value: #FFFFFF80;
	syntax: "<color>";
}

@property --gradient-color-1 {
	inherits: false;
	initial-value: #49AD49;
	syntax: "<color>";
}

@property --gradient-color-2 {
	inherits: false;
	initial-value: #3CB371;
	syntax: "<color>";
}

@property --gradient-deg {
	inherits: false;
	initial-value: 90deg;
	syntax: "<angle>";
}

@property --gradient-stop {
	inherits: false;
	initial-value: 50%;
	syntax: "<percentage>";
}

@property --star-center-color {
	inherits: false;
	initial-value: #FAFAD2;
	syntax: "<color>";
}

@property --star-normal-color {
	inherits: false;
	initial-value: #ADFF2F;
	syntax: "<color>";
}

@font-face {
	font-family: "Lexend";
	font-style: normal;
	font-weight: 100 900;
	src: url("./static/Lexend-VariableFont_wght.ttf") format("truetype");
}

@font-face {
	font-family: "Lexend Exa";
	font-style: normal;
	font-weight: 100 900;
	src: url("./static/LexendExa-VariableFont_wght.ttf") format("truetype");
}

@keyframes breathe {
	0%, 100% {
		box-shadow: 0 0 5px -3px #00000099;
	}
	25% {
		box-shadow: 0 0 8px 0px #00000099;
	}
	60% {
		box-shadow: 0 0 10px 5px #00000099;
	}
}

@keyframes pointer-move {
	0%, 100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(25px);
	}
}

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

h1, h2, h3, h4, h5, h6, p {
	margin: 10px 0;
	padding: 0;
}

li {
	margin: 5px 0;
	padding: 0;
}

ul, ol {
	margin-bottom: 0;
	margin-top: 0;
}

html {
	color: var(--font-color);
	cursor: default;
	font-family: "Lexend", Fallback, serif;
	min-height: 100%;
	scroll-behavior: smooth;
	scroll-snap-type: y mandatory;
	scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

html.inspecting {
	cursor: grabbing;
	user-select: none;
}

html.flying,
html.flying body {
	scroll-behavior: auto;
	scroll-snap-type: none;
}

/* Page content waits in the dark while the serpent wakes. */
article,
header {
	transition: opacity 900ms ease;
}

html.awakening article,
html.awakening header {
	opacity: 0;
	pointer-events: none;
}

html.noscroll {
	overflow-y: clip;
	scrollbar-gutter: stable;
}

html.loaded {
	transition:
		--font-color 500ms ease,
		--glass-color 500ms ease,
		--gradient-color-1 1s ease-in-out,
		--gradient-color-2 1s ease-in-out,
		--gradient-deg 500ms ease-in,
		--gradient-stop 500ms ease-out;
}

html.dark {
	color-scheme: dark;
	--font-color: #E0E0E0;
}

html.dark #background {
	--gradient-color-1: #111414;
	--gradient-color-2: #47636E;
	--gradient-deg: 195deg;
	--gradient-stop: 90%;
}

html.dark .glass {
	--glass-color: #101214CC;
}

html.dark #parallax span {
	--star-normal-color: #F8F8FF;
	--star-center-color: #87CEEB;
	height: 10px;
	width: 10px;
}

html.dark #toggle img:first-child {
	opacity: 0;
}

html.dark #toggle img:last-child {
	opacity: 1;
}

article {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
	position: relative;
	z-index: 3;
}

.aspect-ratio {
	content: "";
	display: block;
	left: 0;
	height: 100%;
	overflow: hidden;
	position: fixed;
	top: 0;
	width: 100%;
}

#background {
	background: linear-gradient(var(--gradient-deg), var(--gradient-color-1), var(--gradient-stop), var(--gradient-color-2));
	height: 100%;
	position: fixed;
	width: 100%;
}

body {
	display: block;
	margin: 0;
	overflow-x: hidden;
	padding: 0;
	position: relative;
	scroll-snap-type: y mandatory;
}

button {
	border: var(--glass-border);
	border-radius: var(--glass-radius);
	cursor: pointer;
	display: block;
	padding: 5px 15px;
}

button:hover {
	border-style: inset;
}

/**canvas {
	display: block;
	margin: auto;
	min-height: 600px;
	min-width: 800px;
}**/

#content {
	display: flex;
	flex-direction: column;
	gap: 150px;
	opacity: 1;
	transform: none;
	transition: all 300ms ease-in-out;
}

#content.htmx-swapping {
	opacity: 0;
	transform: rotateY(-60deg) rotateZ(-5deg) translateX(-1000px) translateY(100px) translateZ(-1000px);
}

[data-shift-value] {
	transition: transform 200ms linear;
}

.glass {
	background: #f4f4f2f2;
	backdrop-filter: blur(14px);
	border: var(--glass-border);
	border-radius: var(--glass-radius);
	display: block;
	padding: 15px;
	transition: background 500ms ease-in-out;
	width: 100%;
}

.heading {
	font-family: "Lexend Exa";
	font-size: 1.5em;
	font-weight: 900;
}

header .side {
	position: fixed;
	right: 30px;
	top: 50%;
	transform: translate3d(0, -50%, 10px);
	user-select: none;
	z-index: 4;
}

header .inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
}

header .nav {
	color: #F8F8FF;
	cursor: pointer;
	font-family: "Lexend Exa";
	padding: 2px;
	position: relative;
	text-align: right;
	text-decoration: none;
	text-shadow: 0 0 6px #000, 0 1px 2px #000;
	transition: transform 350ms cubic-bezier(.50,-0.06,.50,-1.05);
}

header .nav.active {
	transform: translateX(-30px);
}

hr {
	color: var(--glass-color);
	border-style: inset;
	border-width: 1px 0 2px;
}

#mobile {
	bottom: 0;
	display: none;
	left: 0;
	margin: 2px;
	padding: 5px;
	position: fixed;
	width: calc(100% - 4px);
	z-index: 3;
}

#mobile span {
	margin-left: 2px;
}

#parallax {
	height: 150vh;
	left: 0;
	position: absolute;
	top: 0;
	transform: translateY(-10%);
	width: 100%;
	z-index: 2;
}

#parallax span {
	background: var(--star-normal-color);
	border-radius: 100%;
	filter: blur(2px);
	height: 20px;
	opacity: 0.5;
	position: absolute;
	transition: --star-normal-color 2s ease-in-out,
		--star-center-color 2s ease-in-out,
		height 1s ease-in-out,
		width 1s ease-in-out;
	width: 20px;
	z-index: 1;
}

#parallax span.central {
	background: var(--star-center-color);
}

#pointer {
	height: 26px;
	right: 60px;
	opacity: 0;
	position: absolute;
	top: -26px;
	transition: opacity 200ms ease-in-out,
		top 500ms cubic-bezier(.75,-0.05,.35,1.55);
}

#pointer.moving {
	/* animation: pointer-move 500ms linear 0s 1 normal none; */
	opacity: 0;
}

#pointer.visible:not(.moving) {
	opacity: 1;
}

#popup {
	background: #141414;
	border: 1px solid #ffffff2e;
	border-radius: 16px;
	box-shadow: 0 24px 80px #000000b8;
	display: flex;
	flex-direction: column;
	height: calc(100vh - 48px);
	left: 50%;
	opacity: 0;
	overflow: hidden;
	padding: 0;
	pointer-events: none;
	position: fixed;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: opacity 240ms ease;
	width: calc(100vw - 48px);
	z-index: 7;
}

#popup-bar {
	align-items: center;
	background: #141414;
	border-bottom: 1px solid #ffffff1a;
	display: flex;
	flex: none;
	height: 44px;
	justify-content: flex-end;
	padding: 0 8px;
}

#popup-toggle {
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: #f4f4f2;
	font-family: "Lexend", Fallback, serif;
	padding: 6px 12px;
}

#popup-toggle:hover {
	background: #ffffff18;
	border-style: solid;
}

#popup-background {
	background: #070707cc;
	cursor: zoom-out;
	height: 100vh;
	left: 0;
	opacity: 0;
	position: fixed;
	pointer-events: none;
	top: 0;
	transition: opacity 200ms ease;
	width: 100vw;
	z-index: 6;
}

#popup-background.visible {
	opacity: 1;
	pointer-events: auto;
	transition-delay: 0ms;
}

#popup.visible {
	opacity: 1;
	pointer-events: auto;
	user-select: auto;
}

#popup-inner {
	background: #fff;
	flex: 1;
	min-height: 0;
}

#popup-inner iframe {
	background: #fff;
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

section {
	align-items: flex-start;
	box-sizing: border-box;
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-start;
	min-height: 100vh;
	padding: 12vh max(18vw, 170px) 12vh 8vw;
	scroll-snap-align: start;
	scroll-snap-stop: normal;
}

section .glass {
	max-width: 40rem;
	width: min(40rem, 100%);
}

#intro {
	align-items: center;
	justify-content: flex-start;
}

#intro .heading {
	margin-top: 8vh;
	text-align: center;
}

#intro .glass {
	max-width: 100%;
	min-width: 0;
	width: auto;
}

#intro .role {
	font-family: "Lexend", Fallback, serif;
	font-size: 1rem;
	margin: 8px 0 0;
	text-align: center;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 14px 0 0;
}

.actions a {
	border: var(--glass-border);
	border-radius: var(--glass-radius);
	color: inherit;
	padding: 5px 15px;
	text-decoration: none;
}

.actions a:hover {
	border-style: inset;
}

.roles {
	list-style: none;
	margin: 0;
	padding: 0;
}

.roles li {
	margin-top: 16px;
}

.roles p {
	margin: 4px 0;
}

.roles .when {
	font-size: 0.85rem;
	opacity: 0.72;
}

.skills {
	display: grid;
	gap: 14px 24px;
	grid-template-columns: 1fr 1fr;
}

.skills h3 {
	font-family: "Lexend Exa", Fallback, serif;
	font-size: 0.82rem;
	font-weight: 500;
	margin: 0 0 4px;
}

.skills p {
	margin: 0;
}

.contact {
	margin: 8px 0 0;
	padding-left: 1.1rem;
}

.contact li {
	margin: 6px 0;
}

@media (pointer: fine) {
	section {
		cursor: grab;
	}

	.glass,
	header {
		cursor: auto;
	}
}

.scroll-space {
	content: "";
	display: block;
	height: 60px;
}

#three-wrapper {
	inset: 0;
	pointer-events: none;
	position: fixed;
	user-select: none;
	z-index: 0;
}

#three-wrapper canvas {
	display: block;
}

#three-wrapper #ascii-effect {
	left: 0;
	pointer-events: none;
	position: fixed;
	top: 0;
	user-select: none;
}

#toggle {
	cursor: pointer;
	height: 25px;
	margin: 10px;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 4;
	width: 25px;
}

#toggle img {
	left: 0;
	opacity: 1;
	position: absolute;
	top: 0;
	transition: opacity 200ms ease;
	width: 100%;
}

#toggle img:last-child {
	opacity: 0;
}

@media (max-width: 1200px) {
	#parallax {
		transform: translateY(0);
	}
}

@media (max-width: 980px) {
	section {
		padding: 10vh max(12vw, 150px) 10vh 6vw;
	}

	.scroll-space {
		height: 30px;
	}
}

@media (max-width: 700px) {
	section {
		padding: 16px 12px 96px;
	}

	section .glass,
	#intro .glass {
		max-width: none;
		width: 100%;
	}

	header .side {
		background: #121212cc;
		bottom: 0;
		left: 0;
		margin: 0;
		padding: 8px 12px;
		right: 0;
		top: unset;
		transform: none;
	}

	header .inner {
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 14px;
		justify-content: flex-start;
		overflow-x: auto;
	}

	header .nav {
		flex: none;
		font-size: 0.78rem;
		white-space: nowrap;
	}

	.skills {
		grid-template-columns: 1fr;
	}

	#intro h1 {
		font-size: clamp(1.45rem, 7vw, 2.4rem);
		line-height: 1.1;
		margin: 0;
	}

	#popup {
		height: calc(100vh - 24px);
		width: calc(100vw - 16px);
	}

	header .side.closed {
		transform: translate3d(0, 100%, 10px);
	}

	header .nav {
		text-align: left;
	}

	header .nav.active {
		transform: none;
	}

	#mobile {
		display: flex;
	}

	#pointer {
		display: none;
	}

	.scroll-space {
		display: none;
	}

	#toggle {
		bottom: 0;
		margin: 5px;
		top: unset;
	}
}


/* Blocks sit on the side opposite where the camera frames the ring. */
@media (min-width: 761px) {
	section[data-place="right"] {
		align-items: flex-end;
	}

	#intro[data-place="bottom"] {
		align-items: flex-start;
		justify-content: flex-end;
		padding-bottom: 14vh;
	}

	#intro[data-place="bottom"] .heading {
		margin-top: 0;
		text-align: left;
	}

	#intro[data-place="bottom"] .role {
		text-align: left;
	}
}

/* Each block rises in as its station arrives. */
html.staged section .glass {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 700ms ease, transform 900ms cubic-bezier(.2, .7, .2, 1);
}

html.staged section.seen .glass {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html.staged section .glass {
		transform: none;
		transition: none;
	}
}
