@font-face {
	font-family: "Monospace Krypton";
	src: url("../Monaspace%20Krypton%20Var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #05070a;
	--accent: #ff1f3d;
	--accent-glow: rgba(255, 31, 61, 0.55);
	--ink: #e8f6ef;
	--ink-dim: #0a8f5a;
	--glass: rgba(10, 14, 18, 0.72);
	--glass-brdr: rgba(255, 31, 61, 0.28);
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--font: "Monospace Krypton", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html,
body {
	margin: 0;
	height: 100%;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-optical-sizing: auto;
	overflow: hidden;
}

#matrix {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 0;
}

.field {
	position: fixed;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	padding: 1.5rem;
	pointer-events: none;
	transition: transform 0.25s var(--ease);
}

.modal {
	position: relative;
	width: min(560px, 100%);
	padding: 2.6rem 2.4rem 2.2rem;
	background: var(--glass);
	border: 1px solid var(--glass-brdr);
	border-radius: 14px;
	backdrop-filter: blur(8px) saturate(140%);
	-webkit-backdrop-filter: blur(8px) saturate(140%);
	box-shadow:
		0 0 0 1px rgba(255, 31, 61, 0.06) inset,
		0 24px 60px -20px rgba(0, 0, 0, 0.9),
		0 0 80px -20px var(--accent-glow);
	text-align: center;
	pointer-events: auto;
	transform: translateZ(0);
	animation: rise 0.8s var(--ease) both;
}

@keyframes rise {
	from { opacity: 0; transform: translateY(24px) translateZ(0); }
	to   { opacity: 1; transform: translateY(0) translateZ(0); }
}

.modal__scan {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	overflow: hidden;
	pointer-events: none;
}
.modal__scan::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 40%;
	background: linear-gradient(
		180deg,
		rgba(255, 31, 61, 0.0) 0%,
		rgba(255, 31, 61, 0.06) 50%,
		rgba(255, 31, 61, 0.0) 100%
	);
	transform: translateY(-100%);
	animation: scan 6s linear infinite;
}
@keyframes scan {
	0%   { transform: translateY(-100%); }
	100% { transform: translateY(300%); }
}

.modal__eyebrow {
	margin: 0 0 1.1rem;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	color: var(--ink-dim);
}

.modal__title {
	margin: 0 0 1rem;
	font-size: clamp(1.9rem, 6vw, 2.8rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.highlight {
	color: var(--accent);
	text-shadow: 0 0 18px var(--accent-glow);
}

.modal__bio {
	margin: 0 auto 1.8rem;
	max-width: 42ch;
	font-weight: 500;
	line-height: 1.6;
	color: rgba(232, 246, 239, 0.82);
}

.modal__tagline {
	font-weight: 900;
}

.links {
	list-style: none;
	margin: 0 0 1.6rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1.1rem;
	color: var(--ink);
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.02);
	transition: transform 0.18s ease, border-color 0.18s ease,
							background 0.18s ease, box-shadow 0.18s ease;
}

.link:hover,
.link:focus-visible {
	transform: translateY(-2px);
	border-color: var(--accent);
	background: rgba(255, 31, 61, 0.08);
	box-shadow: 0 0 24px -6px var(--accent-glow);
	outline: none;
}

.link__icon {
	font-size: 1.25rem;
	color: var(--accent);
	flex: 0 0 auto;
}

.link__label {
	flex: 1 1 auto;
	text-align: left;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.link__arrow {
	flex: 0 0 auto;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease;
	color: var(--accent);
}
.link:hover .link__arrow,
.link:focus-visible .link__arrow {
	opacity: 1;
	transform: translateX(0);
}

.modal__status {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-dim);
}
.dot {
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: green;
	box-shadow: 0 0 12px lime;
	animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.35;
	}
}

.motion-toggle {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 30;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.85rem;
	font-family: var(--font);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--glass);
	border: 1px solid var(--glass-brdr);
	border-radius: 999px;
	backdrop-filter: blur(8px) saturate(140%);
	-webkit-backdrop-filter: blur(8px) saturate(140%);
	cursor: pointer;
	user-select: none;
	transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
		box-shadow 0.2s var(--ease);
}
.motion-toggle:hover,
.motion-toggle:focus-visible {
	border-color: var(--accent);
	box-shadow: 0 0 16px -2px var(--accent-glow);
	outline: none;
}
.motion-toggle:active {
	background: rgba(255, 31, 61, 0.14);
}
.motion-toggle__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--ink-dim);
	box-shadow: 0 0 8px var(--ink-dim);
	transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.motion-toggle__mode {
	opacity: 0.55;
}
.motion-toggle[data-state="off"] .motion-toggle__dot {
	background: #0a8f5a;
	box-shadow: 0 0 8px rgba(10, 143, 90, 0.7);
}
.motion-toggle[data-state="auto"] .motion-toggle__dot {
	background: #6b7680;
	box-shadow: 0 0 8px rgba(107, 118, 128, 0.6);
}
.motion-toggle[data-state="on"] .motion-toggle__dot {
	background: #e0952f;
	box-shadow: 0 0 8px rgba(224, 149, 47, 0.7);
}

@media (prefers-reduced-motion: reduce) {
	.field { transition: none; }
	.modal,
	.modal__scan::after,
	.dot { animation: none; }
}

@media (max-width: 480px) {
	.modal {
		padding: 2rem 1.4rem;
	}
	.motion-toggle {
		right: 12px;
		bottom: 12px;
	}
}
