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

:root {
	--bg: #0f1012;
	--text: #ecebe7;
	--muted: #8b8d93;
	--line: rgba(255, 255, 255, 0.12);
	--af: #ffc53d;
	--sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

body {
	margin: 0;
	background:
		radial-gradient(ellipse at 50% 40%, #1c1d21 0%, var(--bg) 70%);
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}

/* --- Cornice del mirino --- */

.frame {
	position: fixed;
	inset: 18px;
	pointer-events: none;
	z-index: 1;
}

.corner {
	position: absolute;
	width: 28px;
	height: 28px;
	border: 0 solid rgba(255, 255, 255, 0.55);
}

.tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.page {
	position: relative;
	max-width: 880px;
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 auto;
	padding: 44px 48px;
	display: flex;
	flex-direction: column;
}

/* --- HUD --- */

.hud {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	color: var(--muted);
}

.domain {
	color: var(--text);
	text-transform: uppercase;
	letter-spacing: 0.16em;
}

.bottom span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bottom .ic {
	width: 14px;
	height: 14px;
}

/* --- Soggetto --- */

.subject {
	margin: auto 0;
	padding: 56px 0;
}

.focus {
	position: relative;
	display: inline-block;
	padding: 18px 26px;
	margin: 0 0 40px -26px;
}

/* Riquadro dell'autofocus che "aggancia" il titolo */
.af,
.af::before {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.af {
	border: 1.5px solid var(--af);
	-webkit-mask:
		linear-gradient(#000 0 0) top left / 18px 18px,
		linear-gradient(#000 0 0) top right / 18px 18px,
		linear-gradient(#000 0 0) bottom left / 18px 18px,
		linear-gradient(#000 0 0) bottom right / 18px 18px;
	-webkit-mask-repeat: no-repeat;
	mask:
		linear-gradient(#000 0 0) top left / 18px 18px,
		linear-gradient(#000 0 0) top right / 18px 18px,
		linear-gradient(#000 0 0) bottom left / 18px 18px,
		linear-gradient(#000 0 0) bottom right / 18px 18px;
	mask-repeat: no-repeat;
	animation: lock 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

@keyframes lock {
	0% { transform: scale(1.25); opacity: 0; border-color: #fff; }
	55% { transform: scale(0.97); opacity: 1; border-color: #fff; }
	75% { transform: scale(1); border-color: var(--af); }
	100% { transform: scale(1); border-color: var(--af); }
}

.name {
	margin: 0 0 6px;
	font-size: clamp(1.35rem, 2.6vw, 1.75rem);
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--text);
}

h1 {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	font-size: clamp(1.7rem, 4.4vw, 2.7rem);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.role {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.role .ic {
	width: 0.85em;
	height: 0.85em;
	color: var(--af);
	stroke-width: 1.8;
}

.sep {
	color: var(--muted);
	font-weight: 300;
}

.bio {
	max-width: 60ch;
}

.bio p {
	margin: 0 0 16px;
	font-size: 1rem;
	line-height: 1.75;
	color: #b9bac0;
}

.bio a {
	color: var(--text);
	text-decoration: none;
	border-bottom: 1px solid var(--af);
	transition: color 0.2s;
}

.bio a:hover,
.bio a:focus-visible {
	color: var(--af);
}

.bio .lead {
	font-size: 1.18rem;
	line-height: 1.6;
	color: var(--text);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 36px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	text-decoration: none;
	font-size: 0.95rem;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn .ic {
	width: 18px;
	height: 18px;
}

.btn:hover,
.btn:focus-visible {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.05);
}

.btn.primary {
	background: var(--af);
	border-color: var(--af);
	color: #17130a;
	font-weight: 500;
}

.btn.primary:hover,
.btn.primary:focus-visible {
	background: #ffd66e;
	border-color: #ffd66e;
}

.social {
	display: flex;
	gap: 8px;
	margin-top: 28px;
}

.soc {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	color: var(--muted);
	transition: color 0.2s, background-color 0.2s;
}

.soc svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.soc:hover,
.soc:focus-visible {
	color: var(--text);
	background: rgba(255, 255, 255, 0.07);
}

a:focus-visible {
	outline: 2px solid var(--af);
	outline-offset: 3px;
}

.bio,
.actions,
.social {
	animation: rise 0.8s ease both;
}

.bio { animation-delay: 0.7s; }
.actions { animation-delay: 0.85s; }
.social { animation-delay: 1s; }

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 640px) {
	.frame {
		inset: 10px;
	}

	.corner {
		width: 20px;
		height: 20px;
	}

	.page {
		padding: 30px 24px;
	}

	.subject {
		padding: 48px 0 40px;
	}

	.focus {
		padding: 14px 16px;
		margin: 0 0 32px -16px;
	}

	h1 {
		flex-direction: column;
		align-items: flex-start;
	}

	.sep {
		display: none;
	}

	.btn {
		width: 100%;
	}

	.bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		font-size: 0.7rem;
		letter-spacing: 0;
	}
}
