/* Theme tokens */
:root {
	color-scheme: dark;
	--bg-0: #03101f;
	--bg-1: #07192d;
	--bg-2: #0b2340;
	--panel: rgba(8, 23, 40, 0.78);
	--panel-strong: rgba(12, 31, 54, 0.92);
	--panel-soft: rgba(14, 37, 63, 0.55);
	--text: #eaf4ff;
	--muted: #9fb7d3;
	--faint: #6f88a8;
	--line: rgba(164, 202, 255, 0.14);
	--line-strong: rgba(164, 202, 255, 0.24);
	--accent: #4da3ff;
	--accent-2: #78c0ff;
	--accent-glow: rgba(77, 163, 255, 0.28);
	--shadow: 0 24px 60px rgba(0, 5, 12, 0.46);
	--radius: 20px;
	--radius-sm: 14px;
	--content-width: min(1120px, calc(100vw - 2rem));
}

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

html {
	min-height: 100%;
	scroll-behavior: smooth;
	background:
		radial-gradient(circle at top, rgba(77, 163, 255, 0.16), transparent 34%),
		radial-gradient(circle at 80% 20%, rgba(120, 192, 255, 0.08), transparent 30%),
		linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
	background-attachment: fixed;
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	background:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
	background-size: 72px 72px, 72px 72px, cover;
	background-position: center;
	background-attachment: fixed;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at 50% 0%, rgba(77, 163, 255, 0.16), transparent 32%),
		radial-gradient(circle at 100% 100%, rgba(24, 84, 155, 0.12), transparent 28%);
	mix-blend-mode: screen;
	opacity: 0.65;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

h1,
h2,
h3,
h4 {
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--text);
}

h1 {
	font-size: clamp(2.5rem, 5vw, 4.8rem);
}

h2 {
	font-size: clamp(1.9rem, 3vw, 3rem);
}

h3 {
	font-size: clamp(1.3rem, 2vw, 1.8rem);
}

p,
li,
dt,
dd {
	color: var(--muted);
}

a {
	color: var(--accent-2);
	text-decoration: none;
	transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

a:hover {
	color: #b7ddff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid rgba(120, 192, 255, 0.92);
	outline-offset: 3px;
}

::selection {
	background: rgba(77, 163, 255, 0.32);
	color: var(--text);
}

/* Layout helpers */
img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
	border-radius: var(--radius-sm);
}

main,
section,
article,
aside,
nav,
header,
footer {
	position: relative;
}

main {
	width: var(--content-width);
	margin: 0 auto;
	padding: clamp(1.25rem, 2vw, 2rem) 0 4rem;
}

section,
article,
.card,
.panel,
.surface {
	background: linear-gradient(180deg, var(--panel), rgba(8, 23, 40, 0.62));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

section,
article,
.card,
.panel,
.surface,
header,
footer,
nav {
	overflow: clip;
}

section,
article,
.card,
.panel,
.surface {
	padding: clamp(1.1rem, 2vw, 1.75rem);
}

header,
footer,
nav {
	width: var(--content-width);
	margin: 0 auto;
}

header,
footer,
nav {
	padding: 1rem 0;
}

nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

nav a {
	color: var(--text);
	opacity: 0.88;
}

nav a:hover {
	opacity: 1;
}

/* Common content blocks */
ul,
ol {
	margin: 0;
	padding-left: 1.25rem;
	color: var(--muted);
}

li + li {
	margin-top: 0.35rem;
}

hr {
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
	margin: 1.5rem 0;
}

blockquote {
	margin: 0;
	padding: 1rem 1.15rem;
	border-left: 3px solid var(--accent);
	background: rgba(255, 255, 255, 0.03);
	color: #d5e8fb;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

code,
kbd,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

code,
kbd {
	padding: 0.18rem 0.42rem;
	border: 1px solid rgba(164, 202, 255, 0.14);
	border-radius: 10px;
	background: rgba(7, 20, 36, 0.72);
	color: #d3e8ff;
}

pre {
	overflow: auto;
	margin: 0;
	padding: 1rem 1.15rem;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(164, 202, 255, 0.16);
	background: rgba(5, 16, 29, 0.9);
	color: #d7e9ff;
}

pre code {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
}

/* Forms */
button,
input,
select,
textarea {
	font: inherit;
	color: var(--text);
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
	appearance: none;
	border: 1px solid rgba(120, 192, 255, 0.28);
	background: linear-gradient(180deg, rgba(77, 163, 255, 0.18), rgba(77, 163, 255, 0.08));
	color: var(--text);
	border-radius: 999px;
	padding: 0.82rem 1.15rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: 0 10px 30px rgba(2, 10, 18, 0.25);
	cursor: pointer;
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button:hover,
[type="button"]:hover,
[type="submit"]:hover,
[type="reset"]:hover {
	transform: translateY(-1px);
	border-color: rgba(120, 192, 255, 0.48);
	box-shadow: 0 16px 40px rgba(2, 10, 18, 0.32);
}

button:active,
[type="button"]:active,
[type="submit"]:active,
[type="reset"]:active {
	transform: translateY(0);
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid rgba(164, 202, 255, 0.16);
	border-radius: 14px;
	background: rgba(4, 15, 28, 0.72);
	padding: 0.88rem 1rem;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
	color: var(--faint);
}

textarea {
	min-height: 9rem;
	resize: vertical;
}

fieldset {
	margin: 0;
	padding: 1rem;
	border: 1px solid rgba(164, 202, 255, 0.16);
	border-radius: var(--radius-sm);
}

legend {
	padding: 0 0.45rem;
	color: #d7e9ff;
}

label {
	display: inline-block;
	margin-bottom: 0.45rem;
	color: #d2e4fb;
	font-weight: 500;
}

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	overflow: hidden;
	border: 1px solid rgba(164, 202, 255, 0.16);
	border-radius: var(--radius-sm);
	background: rgba(6, 18, 32, 0.72);
}

caption {
	padding: 0.9rem 0;
	color: var(--muted);
	caption-side: top;
}

th,
td {
	padding: 0.85rem 1rem;
	text-align: left;
	border-bottom: 1px solid rgba(164, 202, 255, 0.1);
}

th {
	color: #e5f2ff;
	background: rgba(120, 192, 255, 0.08);
	font-weight: 600;
}

tr:hover td {
	background: rgba(120, 192, 255, 0.04);
}

/* Utility classes */
.grid {
	display: grid;
	gap: 1rem;
}

.grid-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack {
	display: grid;
	gap: 0.75rem;
}

.cluster {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.center {
	display: grid;
	place-items: center;
}

.muted {
	color: var(--faint);
}

.accent {
	color: var(--accent-2);
}

.glow {
	box-shadow: 0 0 0 1px rgba(120, 192, 255, 0.14), 0 0 40px var(--accent-glow);
}

.bordered {
	border: 1px solid var(--line);
}

.rounded {
	border-radius: var(--radius);
}

.rounded-sm {
	border-radius: var(--radius-sm);
}

.full-width {
	width: 100%;
}

.full-height {
	height: 100%;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Responsiveness */
@media (max-width: 900px) {
	.grid-cols-2,
	.grid-cols-3 {
		grid-template-columns: 1fr;
	}

	nav,
	.cluster {
		align-items: stretch;
	}

	nav {
		flex-direction: column;
	}
}

@media (max-width: 640px) {
	:root {
		--radius: 18px;
	}

	body {
		background-size: 56px 56px, 56px 56px, cover;
	}

	main,
	header,
	footer,
	nav {
		width: min(100vw - 1rem, 1120px);
	}

	section,
	article,
	.card,
	.panel,
	.surface {
		padding: 1rem;
		border-radius: 16px;
	}

	th,
	td {
		padding: 0.75rem 0.85rem;
	}
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
	body::before {
		animation: ambient-float 18s ease-in-out infinite alternate;
	}

	.card,
	.panel,
	.surface,
	section,
	article {
		transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
	}

	.card:hover,
	.panel:hover,
	.surface:hover,
	section:hover,
	article:hover {
		transform: translateY(-2px);
		border-color: var(--line-strong);
	}
}

@keyframes ambient-float {
	from {
		transform: translate3d(-1.5%, -1%, 0) scale(1);
	}

	to {
		transform: translate3d(1.5%, 1%, 0) scale(1.02);
	}
}

/* Site shell */
.skip-link {
	position: absolute;
	left: 1rem;
	top: 1rem;
	z-index: 20;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	background: rgba(5, 16, 29, 0.96);
	border: 1px solid rgba(120, 192, 255, 0.24);
	transform: translateY(-180%);
	transition: transform 180ms ease;
}

.skip-link:focus {
	transform: translateY(0);
}

.site-shell {
	width: var(--content-width);
	margin: 0 auto;
	padding-bottom: 2rem;
}

.hero {
	display: grid;
	gap: 1rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	margin: 1rem 0 1.25rem;
	background:
		linear-gradient(180deg, rgba(9, 28, 49, 0.94), rgba(8, 21, 37, 0.82)),
		radial-gradient(circle at top right, rgba(77, 163, 255, 0.22), transparent 30%);
	border: 1px solid rgba(120, 192, 255, 0.16);
	border-radius: calc(var(--radius) + 6px);
	box-shadow: var(--shadow);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.profile-hero {
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.2rem, 3vw, 2rem);
}

.profile-photo-shell {
	aspect-ratio: 1;
	width: 100%;
	max-width: 280px;
	margin: 0 auto;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: hidden;
}

.profile-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	border: 0;
	box-shadow: none;
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	padding: 0.45rem 0.8rem;
	border: 1px solid rgba(120, 192, 255, 0.18);
	border-radius: 999px;
	background: rgba(77, 163, 255, 0.08);
	color: #cfe6ff;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hero-copy {
	max-width: 72ch;
	display: grid;
	gap: 0.9rem;
}

.profile-copy {
	max-width: 100%;
}

.hero-lead {
	max-width: 60ch;
	font-size: 1.03rem;
	color: #d9e9fb;
}

.hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
}

.contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	align-items: center;
}

.contact-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 0.95rem;
	border-radius: 999px;
	border: 1px solid rgba(120, 192, 255, 0.18);
	background: rgba(77, 163, 255, 0.08);
	color: var(--text);
	font-weight: 600;
	white-space: nowrap;
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.contact-link:hover {
	color: #f3f9ff;
	border-color: rgba(120, 192, 255, 0.34);
	background: rgba(77, 163, 255, 0.14);
	transform: translateY(-1px);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	align-items: center;
}

.hero-button {
	padding-inline: 1.2rem;
	background: linear-gradient(180deg, rgba(77, 163, 255, 0.24), rgba(77, 163, 255, 0.12));
}

.page-browser,
.page-browser section {
	margin-top: 1.25rem;
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.page-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
}

.page-card {
	display: grid;
	gap: 0.9rem;
	height: 100%;
	padding: 0.9rem;
	border: 1px solid rgba(164, 202, 255, 0.14);
	border-radius: calc(var(--radius) + 2px);
	background: linear-gradient(180deg, rgba(10, 27, 46, 0.86), rgba(6, 18, 32, 0.9));
	box-shadow: 0 18px 42px rgba(0, 5, 12, 0.34);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.page-card:hover {
	transform: translateY(-3px);
	border-color: rgba(120, 192, 255, 0.32);
	box-shadow: 0 24px 54px rgba(0, 5, 12, 0.42);
}

.page-thumb {
	aspect-ratio: 1;
	width: 100%;
	border-radius: 18px;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(15, 41, 71, 0.9), rgba(5, 16, 29, 0.96));
	border: 1px solid rgba(164, 202, 255, 0.14);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.page-card h3 {
	font-size: 1.06rem;
	line-height: 1.2;
	color: var(--text);
}

.page-card p {
	font-size: 0.95rem;
	color: var(--muted);
}

.page-card footer,
.page-card .card-footer {
	padding: 0;
	margin-top: auto;
	width: auto;
	background: transparent;
	border: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: fit-content;
	padding: 0.72rem 1rem;
	border-radius: 999px;
	font-weight: 600;
	background: linear-gradient(180deg, rgba(77, 163, 255, 0.18), rgba(77, 163, 255, 0.08));
	border: 1px solid rgba(120, 192, 255, 0.2);
}

.page-link::after {
	content: "→";
	font-size: 1rem;
	line-height: 1;
	transition: transform 180ms ease;
}

.page-link:hover::after {
	transform: translateX(3px);
}

.empty-state,
.content-panel {
	display: grid;
	gap: 0.75rem;
	align-content: start;
	padding: clamp(1rem, 2vw, 1.5rem);
	border-radius: var(--radius);
	background: rgba(8, 23, 40, 0.72);
	border: 1px solid rgba(164, 202, 255, 0.14);
	box-shadow: var(--shadow);
}

.empty-state {
	min-height: 240px;
	place-items: center;
	text-align: center;
	padding: 2rem;
}

.page-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	color: var(--faint);
	font-size: 0.92rem;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.42rem 0.72rem;
	border-radius: 999px;
	border: 1px solid rgba(164, 202, 255, 0.12);
	background: rgba(255, 255, 255, 0.02);
}

.site-footer {
	width: var(--content-width);
	margin: 2rem auto 1rem;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.site-footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.1rem;
	border-radius: var(--radius);
	background: rgba(5, 16, 29, 0.8);
	border: 1px solid rgba(164, 202, 255, 0.12);
	box-shadow: 0 16px 38px rgba(0, 5, 12, 0.26);
}

.site-footer a {
	color: var(--text);
	opacity: 0.88;
}

.site-footer a:hover {
	opacity: 1;
}

.page-404 {
	min-height: calc(100vh - 6rem);
	display: grid;
	place-items: center;
	padding: 2rem 0 3rem;
}

.page-404 .content-panel {
	max-width: 720px;
	text-align: center;
}

.page-404 .content-panel h1 {
	font-size: clamp(3rem, 8vw, 6rem);
}

.page-404 .content-panel p {
	max-width: 60ch;
	margin-inline: auto;
}

@media (max-width: 720px) {
	.profile-hero {
		grid-template-columns: 1fr;
	}

	.profile-photo-shell {
		max-width: 220px;
	}

	.site-footer-inner,
	.section-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.page-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}

	.hero-actions {
		width: 100%;
	}

	.hero-button,
	.page-link {
		width: 100%;
	}
}
