/**
 * Person public profile (/people/{slug}/).
 *
 * Editorial identity hero (breadcrumb, circular portrait, name, designation,
 * profile icons), a Profile panel beside the full biography, and a soft
 * organic wave into the global footer. Icons reuse the Executive Body
 * `.bnf-eb-links` system from internal.css; portrait framing reuses its
 * --bnf-eb-photo-* custom properties. Height is always content-driven.
 *
 * @package BNF
 * @since 1.45.0
 */

.bnf-person-profile-page {
	--bnf-person-container: min(100% - 2.5rem, 1240px);
	--bnf-person-ring: color-mix(in srgb, var(--wp--preset--color--bnf-green) 18%, var(--wp--preset--color--bnf-surface));
	--bnf-person-icon-border: color-mix(in srgb, var(--wp--preset--color--bnf-green) 24%, var(--wp--preset--color--bnf-surface));
	overflow-x: clip;
}

/* The hero starts directly under the header, without the site-blocks gap. */
.wp-site-blocks > main.bnf-person-profile-page {
	margin-block-start: 0;
}

.bnf-person-profile {
	margin: 0;
}

/* ——— Hero ——— */
.bnf-person-hero {
	position: relative;
	isolation: isolate;
	background:
		linear-gradient(
			90deg,
			var(--wp--preset--color--bnf-mint) 0%,
			var(--wp--preset--color--bnf-surface-soft) 38%,
			var(--wp--preset--color--bnf-surface-soft) 62%,
			var(--wp--preset--color--bnf-mint) 100%
		);
}

.bnf-person-hero__decor {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	background:
		radial-gradient(ellipse 42% 72% at 44% 56%, rgb(255 255 255 / 0.7), rgb(255 255 255 / 0) 72%),
		url("../images/decor/person-hero-organic.svg") center / cover no-repeat;
}

/* Leaf sprigs: the theme leaf silhouette, tinted with the brand green. */
.bnf-person-hero__decor::before,
.bnf-person-hero__decor::after {
	content: "";
	position: absolute;
	background-color: var(--wp--preset--color--bnf-green);
	-webkit-mask: url("../images/decor/leaf-sprig.svg") center / contain no-repeat;
	mask: url("../images/decor/leaf-sprig.svg") center / contain no-repeat;
}

.bnf-person-hero__decor::before {
	left: -2.5rem;
	top: 1.25rem;
	width: 12.5rem;
	height: 21rem;
	opacity: 0.14;
	transform: rotate(-12deg);
}

.bnf-person-hero__decor::after {
	right: -2rem;
	bottom: -3.25rem;
	width: 20rem;
	height: 27rem;
	opacity: 0.15;
	transform: scaleX(-1) rotate(-6deg);
}

.bnf-person-hero__inner {
	width: var(--bnf-person-container);
	margin-inline: auto;
	padding-top: 1.375rem;
}

.bnf-person-hero__breadcrumb {
	margin: 0;
	padding-inline-start: clamp(0rem, 3.4vw, 3rem);
}

.bnf-person-hero__breadcrumb .bnf-internal-breadcrumb__list {
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--wp--preset--color--bnf-muted);
}

.bnf-person-hero__breadcrumb [aria-current="page"] {
	font-weight: 600;
	color: var(--wp--preset--color--bnf-navy);
}

.bnf-person-hero__breadcrumb a {
	border-radius: 2px;
}

.bnf-person-hero__breadcrumb a:focus-visible {
	outline: 2px solid var(--wp--preset--color--bnf-forest);
	outline-offset: 2px;
}

.bnf-person-hero__layout {
	display: flex;
	align-items: center;
	gap: clamp(2rem, 3.9vw, 3.5rem);
	margin-top: 1.25rem;
	padding-inline-start: clamp(0rem, 6.4vw, 5.75rem);
}

/* Portrait: white separation ring, thin pale-mint photo border, faint outer ring. */
.bnf-person-hero__portrait {
	flex: none;
	width: 18.75rem;
	margin-bottom: 0.375rem;
	padding: 0.375rem;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--wp--preset--color--bnf-surface);
	box-shadow:
		0 0 0 1px var(--bnf-person-ring),
		0 14px 32px -24px rgb(14 42 59 / 0.35);
}

.bnf-person-hero__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	box-sizing: border-box;
	overflow: hidden;
	border: 3px solid var(--bnf-person-ring);
	border-radius: 50%;
	background: var(--wp--preset--color--bnf-mint);
}

.bnf-person-hero__photo {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: var(--bnf-eb-photo-x, 50%) var(--bnf-eb-photo-y, 30%);
	transform: scale(var(--bnf-eb-photo-zoom, 1));
	transform-origin: var(--bnf-eb-photo-x, 50%) var(--bnf-eb-photo-y, 30%);
}

.bnf-person-hero__frame--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bnf-person-hero__initials {
	color: var(--wp--preset--color--bnf-forest);
	font-size: clamp(3rem, 6vw, 4.5rem);
	font-weight: 700;
	letter-spacing: 0.04em;
}

.bnf-person-hero__identity {
	flex: 1 1 auto;
	min-width: 0;
	padding-block: 1rem 0.25rem;
}

.bnf-person-hero__eyebrow,
.bnf-person-about__eyebrow {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.bnf-person-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin-bottom: 0.875rem;
	color: var(--wp--preset--color--bnf-forest);
}

.bnf-person-hero__eyebrow::before {
	content: "";
	flex: none;
	width: 3rem;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--bnf-green);
}

.bnf-person-hero__name {
	margin: 0;
	color: var(--wp--preset--color--bnf-navy);
	font-size: var(--wp--preset--font-size--heading-1);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
}

.bnf-person-hero__role {
	margin: 0.75rem 0 0;
	color: var(--wp--preset--color--bnf-forest);
	font-size: clamp(1.1875rem, 0.95rem + 0.75vw, 1.5625rem);
	font-weight: 500;
	line-height: 1.3;
}

/* ——— Profile icons (hero + panel share the .bnf-eb-links system) ——— */
.bnf-person-hero__links {
	margin-top: 1.5rem;
}

.bnf-person-hero__links[hidden],
.bnf-person-panel__section[hidden] {
	display: none !important;
}

.bnf-person-profile .bnf-eb-links {
	justify-content: flex-start;
	gap: 0.875rem;
}

.bnf-person-profile .bnf-eb-links__link {
	width: 3rem;
	height: 3rem;
	border-color: var(--bnf-person-icon-border);
	background: var(--wp--preset--color--bnf-surface);
	color: var(--wp--preset--color--bnf-forest);
}

.bnf-person-profile .bnf-eb-links__link:hover,
.bnf-person-profile .bnf-eb-links__link:focus-visible {
	border-color: var(--wp--preset--color--bnf-green);
	background: color-mix(in srgb, var(--wp--preset--color--bnf-green) 9%, var(--wp--preset--color--bnf-surface));
	color: var(--wp--preset--color--bnf-forest-dark);
}

.bnf-person-profile .bnf-eb-links__icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* ——— Main content ——— */
.bnf-person-profile__content {
	padding-block: 1.75rem clamp(3rem, 5vw, 4rem);
	background: var(--wp--preset--color--bnf-surface);
}

.bnf-person-profile__grid {
	display: grid;
	grid-template-columns: minmax(15rem, 32.7fr) minmax(0, 67.3fr);
	gap: clamp(2rem, 3.4vw, 2.625rem);
	align-items: start;
	width: var(--bnf-person-container);
	margin-inline: auto;
}

.bnf-person-profile__grid--single {
	grid-template-columns: minmax(0, 1fr);
}

.bnf-person-panel {
	padding: 1.75rem 1.75rem 2rem;
	border: 1px solid var(--wp--preset--color--bnf-border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--bnf-surface-soft);
	box-shadow: 0 1px 2px rgb(14 42 59 / 0.04);
}

.bnf-person-panel__title,
.bnf-person-about__eyebrow {
	color: var(--wp--preset--color--bnf-navy);
}

.bnf-person-panel__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.bnf-person-panel__title::after,
.bnf-person-about__eyebrow::after {
	content: "";
	display: block;
	width: 2.75rem;
	height: 2px;
	margin-top: 0.75rem;
	border-radius: 2px;
	background: var(--wp--preset--color--bnf-green);
}

.bnf-person-panel__facts {
	margin: 1.5rem 0 0;
}

.bnf-person-panel__label {
	margin: 0;
	color: var(--wp--preset--color--bnf-navy);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

.bnf-person-panel__value {
	margin: 0.375rem 0 0;
	color: var(--wp--preset--color--bnf-text);
	font-size: 1.0625rem;
	line-height: 1.5;
}

.bnf-person-panel__section {
	margin-top: 1.5rem;
}

.bnf-person-panel__facts + .bnf-person-panel__section {
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--bnf-border);
}

.bnf-person-panel__section .bnf-eb-links {
	margin-top: 1rem;
}

/* Nudged down so ABOUT sits level with the panel's PROFILE title. */
.bnf-person-about {
	min-width: 0;
	padding-top: 0.75rem;
}

.bnf-person-about__eyebrow::after {
	width: 2.625rem;
	margin-top: 0.625rem;
}

.bnf-person-about__title {
	margin: 1.125rem 0 0;
	color: var(--wp--preset--color--bnf-navy);
	font-size: var(--wp--preset--font-size--heading-2);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.bnf-person-about__bio {
	max-width: 50rem;
	margin-top: 1.25rem;
	color: var(--wp--preset--color--bnf-text);
	font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
	line-height: 1.7;
	text-align: justify;
	overflow-wrap: break-word;
}

.bnf-person-about__bio > :first-child {
	margin-top: 0;
}

.bnf-person-about__bio > :last-child {
	margin-bottom: 0;
}

.bnf-person-about__bio p {
	margin: 0 0 0.9em;
}

.bnf-person-about__bio ul,
.bnf-person-about__bio ol {
	margin: 0 0 0.9em;
	padding-left: 1.35em;
}

.bnf-person-about__bio a {
	color: var(--wp--preset--color--bnf-forest);
	text-underline-offset: 0.15em;
}

.bnf-person-about__bio a:hover,
.bnf-person-about__bio a:focus-visible {
	color: var(--wp--preset--color--bnf-forest-dark);
}

.bnf-person-about__empty {
	max-width: 36rem;
	margin-top: 1.25rem;
	padding: var(--wp--preset--spacing--xl);
	border: 1px solid var(--wp--preset--color--bnf-border);
	border-left: 3px solid var(--wp--preset--color--bnf-forest);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--bnf-surface);
	color: var(--wp--preset--color--bnf-muted);
}

.bnf-person-about__empty p {
	margin: 0;
}

/*
 * Organic transition: a pale mint layer and a lighter surface-soft layer
 * whose base matches the footer wave's own background, so the dark
 * footer wave follows with no seam.
 */
.bnf-person-profile__wave {
	position: relative;
	height: clamp(2.25rem, 4vw, 3.5rem);
	margin-bottom: -1px;
	background: var(--wp--preset--color--bnf-surface);
	pointer-events: none;
}

.bnf-person-profile__wave::before,
.bnf-person-profile__wave::after {
	content: "";
	position: absolute;
	inset: 0;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.bnf-person-profile__wave::before {
	background: var(--wp--preset--color--bnf-mint);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 46C230 12 430 4 650 26c230 23 430 40 610 20 80-9 140-21 180-30v64H0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 46C230 12 430 4 650 26c230 23 430 40 610 20 80-9 140-21 180-30v64H0Z'/%3E%3C/svg%3E");
}

.bnf-person-profile__wave::after {
	background: var(--wp--preset--color--bnf-surface-soft);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 64c200-20 390-28 600-16 220 13 430 22 630 8 90-6 160-16 210-24v48H0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 64c200-20 390-28 600-16 220 13 430 22 630 8 90-6 160-16 210-24v48H0Z'/%3E%3C/svg%3E");
}

/* ——— Small desktop / tablet ——— */
@media (max-width: 1199px) {
	.bnf-person-hero__portrait {
		width: 16.5rem;
	}

	.bnf-person-hero__decor::after {
		right: -3rem;
		width: 15rem;
		height: 21rem;
	}

	.bnf-person-panel .bnf-eb-links {
		gap: 0.75rem;
	}
}

@media (max-width: 1023px) {
	.bnf-person-hero__layout {
		padding-inline-start: 0;
	}

	.bnf-person-hero__portrait {
		width: 15rem;
	}

	.bnf-person-hero__decor::before {
		width: 10rem;
		height: 17rem;
	}

	.bnf-person-hero__decor::after {
		width: 12.5rem;
		height: 18rem;
		opacity: 0.12;
	}
}

/* Columns stack: the panel spans the width, Position beside Social & Academic. */
@media (max-width: 959px) {
	.bnf-person-profile__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.bnf-person-about__bio {
		max-width: none;
	}
}

@media (min-width: 600px) and (max-width: 959px) {
	.bnf-person-panel:has(.bnf-person-panel__facts + .bnf-person-panel__section:not([hidden])) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
		column-gap: 2rem;
	}

	.bnf-person-panel__title {
		grid-column: 1 / -1;
	}

	.bnf-person-panel__facts + .bnf-person-panel__section {
		padding-top: 0;
		padding-left: 2rem;
		border-top: 0;
		border-left: 1px solid var(--wp--preset--color--bnf-border);
	}
}

/* ——— Mobile ——— */
@media (max-width: 767px) {
	.bnf-person-hero__inner {
		padding-top: 1.25rem;
		padding-bottom: 2.25rem;
	}

	.bnf-person-hero__breadcrumb {
		padding-inline-start: 0;
	}

	.bnf-person-hero__layout {
		flex-direction: column;
		gap: 1.5rem;
		margin-top: 1.25rem;
		text-align: center;
	}

	.bnf-person-hero__portrait {
		width: min(13.75rem, 62vw);
		margin-bottom: 0;
	}

	.bnf-person-hero__identity {
		width: 100%;
		padding-block: 0;
	}

	.bnf-person-hero__eyebrow {
		justify-content: center;
		gap: 0.75rem;
		font-size: 0.8125rem;
		letter-spacing: 0.18em;
	}

	.bnf-person-hero__eyebrow::before {
		width: 2rem;
	}

	.bnf-person-hero__role {
		margin-top: 0.5rem;
	}

	.bnf-person-hero__links .bnf-eb-links {
		justify-content: center;
		gap: 0.625rem;
	}

	.bnf-person-hero__decor::before {
		left: -3.5rem;
		bottom: auto;
		top: 3rem;
		width: 8rem;
		height: 14rem;
		opacity: 0.1;
	}

	.bnf-person-hero__decor::after {
		right: -3rem;
		bottom: -2rem;
		width: 11rem;
		height: 16rem;
		opacity: 0.11;
	}

	.bnf-person-profile__content {
		padding-top: 1.75rem;
	}

	.bnf-person-panel {
		padding: 1.5rem 1.25rem 1.75rem;
	}

	.bnf-person-panel .bnf-eb-links {
		gap: 0.625rem;
	}
}

/* Phone columns are too narrow to justify without wide word gaps. */
@media (max-width: 599px) {
	.bnf-person-about__bio {
		text-align: start;
	}
}
