:root {
	--background: #07050d;
	--panel: rgba(16, 12, 27, 0.76);
	--panel-solid: #100c1b;
	--panel-soft: rgba(255, 255, 255, 0.055);
	--border: rgba(255, 255, 255, 0.12);
	--border-strong: rgba(198, 134, 255, 0.42);
	--text: #f7f3fb;
	--muted: #aaa2b5;
	--purple: #c084fc;
	--purple-light: #d9b5ff;
	--purple-dark: #6d28a8;
	--green: #58d68d;
	--radius: 22px;
}

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--background);
}

body {
	min-height: 100vh;
	margin: 0;
	background: var(--background);
	color: var(--text);
	font-family: 'Manrope', system-ui, sans-serif;
	line-height: 1.55;
	overflow-x: hidden;
}

button,
input,
a {
	font: inherit;
	-webkit-tap-highlight-color: transparent;
}

a {
	color: inherit;
}

button {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--purple);
	outline-offset: 3px;
}

.background,
.background > * {
	position: fixed;
	inset: 0;
}

.background {
	z-index: 0;
	overflow: hidden;
}

#background-video,
#background-gif {
	z-index: 1;
	display: none;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.background-fallback {
	z-index: 0;
	background:
		radial-gradient(circle at 18% 15%, rgba(192, 132, 252, 0.22), transparent 30rem),
		radial-gradient(circle at 85% 82%, rgba(91, 33, 182, 0.2), transparent 34rem),
		linear-gradient(145deg, #0d0815 0%, #08060d 50%, #130b20 100%);
}

.background-fallback::after {
	content: '';
	position: absolute;
	inset: 0;
	opacity: 0.24;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.background-shade {
	z-index: 2;
	background: linear-gradient(to bottom, rgba(5, 3, 9, 0.42), rgba(5, 3, 9, 0.76));
	backdrop-filter: blur(2px);
}

#enter-screen {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	width: 100%;
	border: 0;
	background: rgba(7, 5, 13, 0.42);
	backdrop-filter: blur(18px) saturate(110%);
	-webkit-backdrop-filter: blur(18px) saturate(110%);
	cursor: pointer;
	transition: opacity 420ms ease, visibility 420ms ease, backdrop-filter 420ms ease;
}

#enter-screen.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.enter-text {
	color: var(--text);
	font-family: 'DM Mono', monospace;
	font-size: clamp(0.78rem, 2vw, 0.95rem);
	letter-spacing: 0.16em;
	text-shadow: 0 0 28px rgba(192, 132, 252, 0.55);
	text-transform: lowercase;
}

.page {
	position: relative;
	z-index: 5;
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 38px 20px 135px;
}

.profile-card {
	--tilt-x: 0deg;
	--tilt-y: 0deg;
	--pointer-x: 50%;
	--pointer-y: 50%;
	position: relative;
	width: min(680px, 100%);
	padding: clamp(25px, 4vw, 32px);
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--panel);
	box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(22px) saturate(125%);
	-webkit-backdrop-filter: blur(22px) saturate(125%);
	transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
	transform-style: preserve-3d;
	transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms ease;
	will-change: transform;
}

.profile-card::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(216, 181, 255, 0.1), transparent 34%);
	pointer-events: none;
}

.profile-header {
	display: flex;
	align-items: center;
	gap: 17px;
}

.avatar-wrap {
	position: relative;
	flex: 0 0 auto;
}

.avatar {
	display: block;
	width: 76px;
	height: 76px;
	border: 2px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	background: var(--panel-solid);
	object-fit: cover;
}

.identity h1 {
	margin: 0;
	font-size: clamp(2.45rem, 7vw, 3.8rem);
	font-weight: 800;
	letter-spacing: -0.065em;
	line-height: 0.95;
}

.identity-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 7px;
	color: #766e80;
	font-family: 'DM Mono', monospace;
	font-size: 0.66rem;
}

.handle {
	color: var(--purple-light);
	text-decoration: none;
}

.handle:hover {
	color: #ffffff;
}

.bio {
	max-width: 530px;
	margin: 20px 0 16px;
	color: #d6d0dc;
	font-size: 0.9rem;
}

.profile-links {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.profile-links a {
	padding: 7px 10px;
	border: 1px solid var(--border);
	border-radius: 9px;
	background: var(--panel-soft);
	color: #d8d1df;
	font-family: 'DM Mono', monospace;
	font-size: 0.7rem;
	text-decoration: none;
	transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.profile-links a:hover {
	border-color: var(--border-strong);
	background: rgba(192, 132, 252, 0.1);
	color: #ffffff;
	transform: translateY(-1px);
}

.divider {
	height: 1px;
	margin: 20px 0;
	background: var(--border);
}

.profile-card section + section {
	margin-top: 20px;
}

.profile-card h2 {
	margin: 0 0 10px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.about p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.discord-status {
	display: block;
	width: max(430px, 100%);
	margin: 14px auto 0;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: 13px;
	background: var(--panel-solid);
	line-height: 0;
}

.discord-status img {
	display: block;
	width: 100%;
	height: auto;
}

.experience-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border: 1px solid var(--border);
	border-radius: 13px;
	overflow: hidden;
}

.experience-grid div {
	display: flex;
	min-height: 70px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 10px 8px;
	border-right: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.025);
	text-align: center;
}

.experience-grid div:last-child {
	border-right: 0;
}

.experience-grid strong {
	font-size: 0.88rem;
}

.experience-grid span {
	margin-top: 3px;
	color: var(--muted);
	font-family: 'DM Mono', monospace;
	font-size: 0.66rem;
}

.project-list {
	display: grid;
	gap: 7px;
}

.project {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 11px 13px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.025);
	text-decoration: none;
	transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.project:hover {
	border-color: var(--border-strong);
	background: rgba(192, 132, 252, 0.07);
	transform: translateX(3px);
}

.project strong,
.project small {
	display: block;
}

.project strong {
	font-size: 0.9rem;
}

.project small {
	margin-top: 3px;
	color: var(--muted);
	font-size: 0.75rem;
}

.project-host {
	flex: 0 0 auto;
	color: var(--purple-light);
	font-family: 'DM Mono', monospace;
	font-size: 0.65rem;
}

.player {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 20;
	display: grid;
	width: min(320px, calc(100% - 32px));
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 14px;
	padding: 12px 13px 10px;
	border: 1px solid var(--border);
	border-radius: 15px;
	background: rgba(12, 9, 20, 0.9);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.audio-visualizer {
	position: absolute;
	right: 0;
	bottom: calc(100% + 9px);
	width: 100%;
	height: 52px;
	padding: 8px 10px;
	border: 1px solid rgba(216, 181, 255, 0.2);
	border-radius: 12px;
	background: rgba(12, 9, 20, 0.55);
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	pointer-events: none;
}

#audio-spectrum {
	display: block;
	width: 100%;
	height: 100%;
}

.track-info {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.track-text {
	min-width: 0;
}

.album-art {
	flex: 0 0 auto;
	width: 31px;
	height: 31px;
	border-radius: 5px;
	object-fit: cover;
}

.player.track-changing .track-text {
	animation: track-text-change 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.player.track-changing .album-art:not([hidden]) {
	animation: album-art-change 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.player.track-changing .timeline-row {
	animation: timeline-change 360ms ease-out;
}

@keyframes track-text-change {
	0% {
		opacity: 0.35;
		transform: translateY(5px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes album-art-change {
	0% {
		opacity: 0.35;
		transform: scale(0.86) rotate(-5deg);
	}
	100% {
		opacity: 1;
		transform: scale(1) rotate(0);
	}
}

@keyframes timeline-change {
	0% {
		opacity: 0.45;
		transform: scaleX(0.97);
	}
	100% {
		opacity: 1;
		transform: scaleX(1);
	}
}

.track-label,
.track-info strong {
	display: block;
}

.track-label {
	color: var(--purple-light);
	font-family: 'DM Mono', monospace;
	font-size: 0.58rem;
	letter-spacing: 0.08em;
}

.track-info strong {
	margin-top: 2px;
	overflow: hidden;
	font-size: 0.76rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.player-controls {
	display: flex;
	align-items: center;
	gap: 5px;
}

.player button {
	display: grid;
	width: 28px;
	height: 28px;
	padding: 0;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transition: background 140ms ease, opacity 140ms ease;
}

.player button:hover {
	color: #ffffff;
}

.player .play-button {
	width: 32px;
	height: 32px;
	border-color: var(--border-strong);
	background: rgba(192, 132, 252, 0.1);
}

.player button i {
	display: block;
	color: #000000;
	font-size: 0.82rem;
	line-height: 1;
	filter: invert(1);
	opacity: 0.72;
}

.player button:hover i {
	opacity: 1;
}

.timeline-row,
.volume-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.timeline-row {
	grid-column: 1 / -1;
}

.volume-row {
	grid-column: 1 / -1;
}

.timeline-row span,
.volume-row span {
	flex: 0 0 auto;
	color: #756e7e;
	font-family: 'DM Mono', monospace;
	font-size: 0.55rem;
}

.timeline-row input,
.volume-row input {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 3px;
	border-radius: 999px;
	background: linear-gradient(to right, var(--purple) 0 var(--range-progress, 0%), rgba(255, 255, 255, 0.14) var(--range-progress, 0%) 100%);
	cursor: pointer;
}

.timeline-row input::-webkit-slider-thumb,
.volume-row input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	border: 0;
	border-radius: 50%;
	background: var(--purple-light);
}

.timeline-row input::-moz-range-thumb,
.volume-row input::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border: 0;
	border-radius: 50%;
	background: var(--purple-light);
}

.icon-credit {
	flex: 0 0 auto;
	color: #5f5868;
	font-family: 'DM Mono', monospace;
	font-size: 0.48rem;
	text-decoration: none;
}

.icon-credit:hover {
	color: var(--muted);
}

@media (max-width: 640px) {
	.page {
		align-items: start;
		padding: 16px 12px 165px;
	}

	.profile-card {
		padding: 22px 18px;
		border-radius: 18px;
	}

	.avatar {
		width: 66px;
		height: 66px;
	}

	.experience-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.experience-grid div:nth-child(2) {
		border-right: 0;
	}

	.experience-grid div:nth-child(-n + 2) {
		border-bottom: 1px solid var(--border);
	}

	.project {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}

	.player {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}

	.profile-card {
		transform: none !important;
	}
}