* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 24px;
	font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
	background: #0b0b10;
	overflow-x: hidden;
}

body::before {
	content: '';
	position: fixed;
	inset: -10%;
	z-index: -1;
	background:
		radial-gradient(at 20% 15%, rgba(255, 106, 61, 0.35), transparent 45%),
		radial-gradient(at 85% 5%, rgba(255, 45, 85, 0.3), transparent 50%),
		radial-gradient(at 50% 100%, rgba(124, 58, 237, 0.3), transparent 55%),
		#0b0b10;
	background-size: 200% 200%;
	background-position: 50% 50%; /* variant D from dev/gradient-picker.html */
	filter: blur(40px);
}

/* Gated behind the ANIMATED_BACKGROUND feature flag (see src/index.ts) */
body.bg-animated::before {
	animation: mesh-drift 24s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
	0% {
		background-position: 0% 40%;
	}
	100% {
		background-position: 100% 60%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.bg-animated::before {
		animation: none;
	}
}

.card {
	width: 100%;
	max-width: 480px;
	border-radius: 32px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		0 30px 60px rgba(0, 0, 0, 0.45),
		0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.banner {
	position: relative;
	aspect-ratio: 1400 / 350;
}

.banner img:first-child {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.avatar {
	position: absolute;
	z-index: 2;
	left: 24px;
	bottom: -27px;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.panel {
	position: relative;
	z-index: 1;
	padding: 35px 28px 20px;
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(30px) saturate(180%);
	-webkit-backdrop-filter: blur(30px) saturate(180%);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.name {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.01em;
}

.title {
	margin: 6px 0 0;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.78);
}

.tagline {
	margin: 10px 0 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.55);
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	color: #fff;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.16) inset,
		0 8px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, background 0.2s ease;
}

.pill svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	flex-shrink: 0;
}

.pill:hover {
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-2px);
}

.pill:active {
	background: rgba(255, 255, 255, 0.22);
	transform: translateY(0) scale(0.97);
}

.pill:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 420px) {
	.avatar {
		width: 76px;
		height: 76px;
		bottom: -21px;
		left: 20px;
	}

	.panel {
		padding-top: 29px;
	}
}

.qr-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	width: 100%;
	max-width: 420px;
}

.qr-page {
	width: 100%;
	padding: 32px 28px;
	border-radius: 32px;
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(30px) saturate(180%);
	-webkit-backdrop-filter: blur(30px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		0 30px 60px rgba(0, 0, 0, 0.45),
		0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

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

.segmented {
	position: relative;
	z-index: 3;
	display: flex;
	flex-shrink: 0;
	gap: 2px;
	padding: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-shadow:
		0 12px 28px rgba(0, 0, 0, 0.45),
		0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.segmented-thumb {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.2) inset,
		0 4px 10px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#tab-instagram:checked ~ .segmented .segmented-thumb {
	transform: translateX(100%);
}

.segmented-option {
	position: relative;
	z-index: 1;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
	cursor: pointer;
	user-select: none;
	transition: color 0.2s ease;
}

#tab-linkedin:checked ~ .segmented label[for='tab-linkedin'],
#tab-instagram:checked ~ .segmented label[for='tab-instagram'] {
	color: #fff;
}

.segmented-input:focus-visible ~ .segmented {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.qr-page h1 {
	margin: 0 0 24px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
}

#tab-linkedin:checked ~ .qr-page .qr-list .qr-item[data-provider='instagram'],
#tab-instagram:checked ~ .qr-page .qr-list .qr-item[data-provider='linkedin'] {
	display: none;
}

.qr-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qr-item {
	padding: 16px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.qr-item img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	background: #fff;
	padding: 6px;
	display: block;
}
