/* Profilo Castalia — sistema visivo isolato dalla struttura legacy. */

.profile-page {
	margin: 0;
	background: #f3f5f6;
	color: #17212b;
}

.profile-page .corpo {
	width: 100%;
	max-width: 1180px;
	background: #fff;
	box-shadow: 0 26px 70px rgba(15, 38, 60, 0.12);
}

.profile-page .profile-content-cell {
	width: auto;
	min-width: 0;
	padding: 0;
	vertical-align: top;
}

.profile-main {
	--profile-ink: #10273a;
	--profile-ink-soft: #405260;
	--profile-blue: #0f263c;
	--profile-blue-light: #183d5b;
	--profile-accent: #a8442c;
	--profile-accent-dark: #84331f;
	--profile-paper: #f4f6f6;
	--profile-line: #dbe2e5;
	overflow: hidden;
	color: var(--profile-ink);
	font-family: "Armata", Arial, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.72;
}

.profile-main h1,
.profile-main h2,
.profile-main h3,
.profile-main p {
	margin-top: 0;
}

.profile-main h1,
.profile-main h2,
.profile-main h3 {
	color: var(--profile-blue);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.18;
}

.profile-main h1 {
	max-width: 840px;
	margin-bottom: 1.3rem;
	color: #fff;
	font-size: clamp(2.3rem, 5.2vw, 4.65rem);
}

.profile-main h2 {
	max-width: 720px;
	margin-bottom: 0;
	font-size: clamp(1.65rem, 3vw, 2.65rem);
}

.profile-main h3 {
	margin-bottom: 0.8rem;
	font-size: 1.2rem;
}

.profile-main a {
	font: inherit;
}

.profile-main a:focus-visible,
.profile-page .nav-toggle:focus-visible {
	outline: 3px solid #f1b24a;
	outline-offset: 3px;
}

.profile-kicker {
	margin-bottom: 0.75rem;
	color: var(--profile-accent);
	font-size: 0.71rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.4;
	text-transform: uppercase;
}

.profile-hero {
	position: relative;
	isolation: isolate;
	padding: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 6vw, 5.5rem) 3rem;
	overflow: hidden;
	background: linear-gradient(105deg, #081b2b 0%, #0f263c 60%, #183d5b 100%);
	color: #fff;
}

.profile-hero::before,
.profile-hero::after {
	position: absolute;
	z-index: -1;
	content: "";
	pointer-events: none;
}

.profile-hero::before {
	inset: 0;
	opacity: 0.2;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
	background-size: 52px 52px;
	-webkit-mask-image: linear-gradient(110deg, transparent 18%, #000 100%);
	mask-image: linear-gradient(110deg, transparent 18%, #000 100%);
}

.profile-hero::after {
	top: -170px;
	right: -130px;
	width: 470px;
	height: 470px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	box-shadow:
		0 0 0 45px rgba(255, 255, 255, 0.025),
		0 0 0 95px rgba(255, 255, 255, 0.02);
}

.profile-hero .profile-kicker {
	color: #ef9b82;
}

.profile-lead {
	max-width: 760px;
	margin-bottom: 2rem;
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(1rem, 1.6vw, 1.18rem);
	line-height: 1.8;
}

.profile-actions,
.profile-contact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.profile-actions {
	margin-bottom: clamp(3rem, 7vw, 5.2rem);
}

.profile-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.8rem 1.25rem;
	border: 1px solid transparent;
	border-radius: 3px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.profile-button:hover {
	transform: translateY(-2px);
	text-decoration: none;
}

.profile-button-primary {
	background: var(--profile-accent);
	color: #fff !important;
}

.profile-button-primary:hover {
	background: #bd5238;
}

.profile-button-secondary {
	border-color: rgba(255, 255, 255, 0.45);
	color: #fff !important;
}

.profile-button-secondary:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.profile-proof {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 850px;
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	list-style: none;
}

.profile-proof li {
	padding: 1.25rem 1.25rem 0 0;
}

.profile-proof strong,
.profile-proof span {
	display: block;
}

.profile-proof strong {
	margin-bottom: 0.25rem;
	color: #fff;
	font-size: 0.9rem;
}

.profile-proof span {
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.74rem;
	line-height: 1.45;
}

.profile-section {
	padding: clamp(3.5rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5.5rem);
	border-bottom: 1px solid var(--profile-line);
}

.profile-heading {
	margin-bottom: 2.25rem;
}

.profile-section-lead {
	max-width: 760px;
	margin: 1rem 0 0;
	color: var(--profile-ink-soft);
	font-size: 0.9rem;
}

.profile-intro {
	display: grid;
	grid-template-columns: minmax(260px, 0.9fr) minmax(310px, 1.1fr);
	gap: clamp(2rem, 7vw, 5.5rem);
}

.profile-intro-copy {
	color: var(--profile-ink-soft);
}

.profile-intro-copy p:last-child {
	margin-bottom: 0;
}

.profile-intro-copy a,
.profile-publishing-grid a,
.profile-history-grid a {
	color: var(--profile-accent-dark);
	font-weight: 700;
	text-decoration-color: rgba(168, 68, 44, 0.45);
	text-underline-offset: 3px;
}

.profile-work {
	background: var(--profile-paper);
}

.profile-work-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-top: 1px solid var(--profile-line);
	border-left: 1px solid var(--profile-line);
}

.profile-work-grid article {
	min-height: 270px;
	padding: clamp(1.4rem, 4vw, 2.2rem);
	border-right: 1px solid var(--profile-line);
	border-bottom: 1px solid var(--profile-line);
	background: #fff;
}

.profile-index {
	display: block;
	margin-bottom: 2rem;
	color: var(--profile-accent);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.15em;
}

.profile-work-grid p {
	color: var(--profile-ink-soft);
	font-size: 0.82rem;
}

.profile-work-grid a,
.profile-text-link {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	color: var(--profile-accent-dark);
	font-size: 0.76rem;
	font-weight: 700;
	text-decoration: none;
}

.profile-work-grid a:hover,
.profile-text-link:hover {
	gap: 0.75rem;
	color: var(--profile-accent);
	text-decoration: none;
}

.profile-evidence {
	display: grid;
	grid-template-columns: minmax(260px, 0.9fr) minmax(310px, 1.1fr);
	gap: clamp(2rem, 7vw, 5.5rem);
	background: var(--profile-blue);
	color: rgba(255, 255, 255, 0.74);
}

.profile-evidence h2,
.profile-evidence strong {
	color: #fff;
}

.profile-evidence-copy {
	padding-left: clamp(1.5rem, 4vw, 3.5rem);
	border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.profile-evidence-copy p {
	color: rgba(255, 255, 255, 0.74);
	font-size: 0.86rem;
}

.profile-evidence .profile-text-link {
	color: #ef9b82;
}

.profile-evidence-figure {
	margin: 2rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.profile-evidence-figure img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 340px;
	border: 8px solid rgba(255, 255, 255, 0.95);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.profile-evidence-figure figcaption,
.profile-project-gallery figcaption,
.profile-book-gallery figcaption,
.profile-colombo-figure figcaption {
	margin-top: 0.7rem;
	color: inherit;
	font-size: 0.67rem;
	line-height: 1.5;
}

.profile-evidence-figure figcaption {
	color: rgba(255, 255, 255, 0.62);
}

.profile-project-gallery {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}

.profile-project-gallery figure {
	position: relative;
	margin: 0;
	padding: clamp(2.35rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(145deg, #0a1e30 0%, var(--profile-blue) 64%, #183d5b 100%);
	color: rgba(255, 255, 255, 0.72);
}

.profile-project-gallery figure::before {
	position: absolute;
	top: 1rem;
	left: 1.25rem;
	color: #ef9b82;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.16em;
}

.profile-project-gallery figure:first-child::before {
	content: "CASO 01 · MODELLO GLOBALE";
}

.profile-project-gallery figure:last-child::before {
	content: "CASO 02 · DETTAGLIO FEM";
}

.profile-project-gallery img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 253px;
	margin: 0 auto;
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.profile-product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.profile-product-grid article {
	position: relative;
	min-height: 325px;
	padding: clamp(1.5rem, 4vw, 2.6rem);
	border: 1px solid var(--profile-line);
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(15, 38, 60, 0.08);
}

.profile-product-grid article::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 5px;
	background: var(--profile-accent);
	content: "";
}

.profile-product-grid article:last-child {
	background: var(--profile-blue);
	color: rgba(255, 255, 255, 0.75);
}

.profile-product-grid article:last-child h3,
.profile-product-grid article:last-child a {
	color: #fff;
}

.profile-product-grid article > p:not(.profile-product-label) {
	color: var(--profile-ink-soft);
	font-size: 0.85rem;
}

.profile-product-grid article:last-child > p:not(.profile-product-label) {
	color: rgba(255, 255, 255, 0.7);
}

.profile-product-grid article > p > a {
	color: inherit;
	font-weight: 700;
}

.profile-product-label {
	margin-bottom: 2.8rem;
	color: var(--profile-accent);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.profile-publishing {
	background: var(--profile-paper);
}

.profile-publishing-grid {
	display: grid;
	grid-template-columns: minmax(300px, 1.2fr) minmax(260px, 0.8fr);
	gap: clamp(2rem, 7vw, 5rem);
}

.profile-publishing-grid > div > p {
	color: var(--profile-ink-soft);
	font-size: 0.86rem;
}

.profile-legacy-citation {
	font-size: 0.72rem !important;
}

.profile-book-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: flex-end;
	margin-top: 2rem;
}

.profile-book-gallery figure {
	margin: 0;
	padding: 0.75rem 0.75rem 0.9rem;
	border: 1px solid var(--profile-line);
	background: #fff;
	box-shadow: 0 14px 30px rgba(15, 38, 60, 0.1);
}

.profile-book-gallery img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 220px;
}

.profile-book-gallery figcaption,
.profile-colombo-figure figcaption {
	max-width: 190px;
	color: var(--profile-ink-soft);
}

.profile-resource-list {
	border-top: 1px solid var(--profile-line);
}

.profile-resource-list a {
	display: block;
	padding: 1rem 0;
	border-bottom: 1px solid var(--profile-line);
	color: var(--profile-ink);
	text-decoration: none;
}

.profile-resource-list strong,
.profile-resource-list span {
	display: block;
}

.profile-resource-list strong {
	color: var(--profile-blue);
	font-size: 0.84rem;
}

.profile-resource-list span {
	margin-top: 0.15rem;
	color: var(--profile-ink-soft);
	font-size: 0.7rem;
}

.profile-resource-list a:hover strong {
	color: var(--profile-accent);
}

.profile-history-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 6vw, 5rem);
}

.profile-history-grid article + article {
	padding-left: clamp(2rem, 6vw, 5rem);
	border-left: 1px solid var(--profile-line);
}

.profile-history-grid p {
	margin-bottom: 0;
	color: var(--profile-ink-soft);
	font-size: 0.84rem;
}

.profile-colombo-figure {
	margin: 1.5rem 0 0;
}

.profile-colombo-figure img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 260px;
	border: 1px solid var(--profile-line);
	border-radius: 50%;
	box-shadow: 0 14px 32px rgba(15, 38, 60, 0.14);
}

.profile-contact {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: clamp(2.8rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 5.5rem);
	background: var(--profile-accent);
	color: rgba(255, 255, 255, 0.8);
}

.profile-contact h2 {
	max-width: 620px;
	color: #fff;
}

.profile-contact p:last-child {
	max-width: 650px;
	margin: 0.9rem 0 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.82rem;
}

.profile-contact .profile-kicker {
	color: rgba(255, 255, 255, 0.7);
}

.profile-contact-actions {
	flex: 0 0 auto;
}

.profile-button-light {
	border-color: #fff;
	background: #fff;
	color: var(--profile-accent-dark) !important;
}

.profile-button-light:hover {
	background: transparent;
	color: #fff !important;
}

.profile-button-outline {
	border-color: rgba(255, 255, 255, 0.65);
	color: #fff !important;
}

.profile-button-outline:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.profile-editorial-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	background: var(--profile-blue);
}

.profile-editorial-links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 74px;
	padding: 1.2rem clamp(1.5rem, 4vw, 3rem);
	border-right: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
}

.profile-editorial-links a:hover {
	background: var(--profile-blue-light);
	text-decoration: none;
}

/* Quick links legacy: presenti e utilizzabili, con una rail coerente. */
.profile-page .corpo > tbody > tr > td[width="110"] {
	width: 120px;
	background: #edf1f2;
	border-left: 1px solid var(--profile-line, #dbe2e5);
}

.profile-page .corpo > tbody > tr > td[width="110"] > table {
	position: sticky;
	top: 0;
	width: 100%;
}

.profile-page .corpo > tbody > tr > td[width="110"] td {
	padding: 2rem 10px !important;
}

.profile-page .corpo > tbody > tr > td[width="110"] #titoli {
	color: var(--profile-blue, #0f263c);
	font-size: 0.65rem;
	letter-spacing: 0.08em;
}

@media (max-width: 900px) {
	.profile-page .corpo > tbody > tr > td[width="110"] {
		width: 100% !important;
		border-top: 1px solid #dbe2e5;
		border-left: 0;
	}

	.profile-page .corpo > tbody > tr > td[width="110"] > table {
		position: static;
	}

	.profile-page .corpo > tbody > tr > td[width="110"] td {
		padding: 1.2rem !important;
	}

	.profile-page .corpo > tbody > tr > td[width="110"] #titoli {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 0.75rem;
	}

	.profile-page .corpo > tbody > tr > td[width="110"] #titoli > b {
		flex: 0 0 100%;
	}

	.profile-page .corpo > tbody > tr > td[width="110"] #titoli p {
		margin: 0;
	}

	.profile-intro,
	.profile-work-grid,
	.profile-evidence,
	.profile-project-gallery,
	.profile-product-grid,
	.profile-publishing-grid,
	.profile-history-grid,
	.profile-editorial-links {
		grid-template-columns: 1fr;
	}

	.profile-evidence-copy {
		padding-top: 2rem;
		padding-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.17);
		border-left: 0;
	}

	.profile-history-grid article + article {
		padding-top: 2rem;
		padding-left: 0;
		border-top: 1px solid var(--profile-line);
		border-left: 0;
	}

	.profile-contact {
		align-items: flex-start;
		flex-direction: column;
	}

	.profile-contact-actions {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.profile-main {
		font-size: 14px;
	}

	.profile-hero {
		padding-top: 3.25rem;
	}

	.profile-proof {
		grid-template-columns: 1fr;
	}

	.profile-proof li {
		padding-top: 0.9rem;
	}

	.profile-actions .profile-button,
	.profile-contact-actions .profile-button {
		width: 100%;
	}

	.profile-work-grid article,
	.profile-product-grid article {
		min-height: 0;
	}

	.profile-book-gallery img {
		height: 190px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.profile-main *,
	.profile-main *::before,
	.profile-main *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
