/**
 * Our People: listing page and profile. The introduction, filter chips,
 * person cards and pager are shared components in main.css.
 *
 * 1. Listing
 * 2. Profile
 * 3. Related people
 */

/* 1. Listing -------------------------------------------------------------- */

.people-directory {
	padding-bottom: var(--section-space);
}

.people-directory__empty {
	padding-top: 32px;
	border-top: 1px solid var(--c-line);
	color: var(--c-text);
	font-size: 15px;
	text-align: center;
}

.people-results {
	padding-top: clamp(40px, 5vw, 64px);
	border-top: 1px solid var(--c-line);
	outline: none;
	transition: opacity 0.3s ease;
}

.people-results[aria-busy="true"] {
	opacity: 0.45;
}

/* Results swapped in by people.js. */
.people-results.is-entering {
	animation: legart-fade 0.45s ease both;
}

.people-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(36px, 4.4vw, 60px) clamp(14px, 2vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Nine per page: three rows of three. */
@media (min-width: 768px) {
	.people-directory .filter-bar {
		justify-content: center;
	}

	.people-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: clamp(20px, 3vw, 40px);
	}
}

.people-results .person-card__link {
	gap: 22px;
}

.people-results .person-card__name {
	font-size: clamp(16px, 10px + 0.8vw, 21px);
}

@media (max-width: 479.98px) {
	.people-grid .person-card__link {
		gap: 14px;
	}

	.people-grid .person-card__role {
		font-size: 10px;
		letter-spacing: 0.12em;
	}

	.people-grid .person-card__education {
		font-size: 12.5px;
	}
}

/* 2. Profile -------------------------------------------------------------- */

/* The related section below brings its own spacing. */
.profile {
	padding-block: clamp(28px, 4vw, 56px) clamp(72px, 8vw, 112px);
}

.breadcrumb {
	margin-bottom: clamp(28px, 4vw, 56px);
}

.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin: 0;
	padding: 0;
	color: var(--c-text-soft);
	font: 500 11px var(--font-mono);
	letter-spacing: 0.08em;
	list-style: none;
	text-transform: uppercase;
}

.breadcrumb__list li {
	min-width: 0;
}

.breadcrumb__list li + li::before {
	margin: 0 10px;
	color: #a3a7b3;
	content: "/";
}

.breadcrumb__list a {
	color: var(--c-nav);
	transition: color 0.3s;
}

.breadcrumb__list a:hover {
	color: var(--c-gold-deep);
}

.profile__grid {
	display: grid;
	gap: clamp(32px, 5vw, 48px);
}

.profile__photo {
	position: relative;
	width: 100%;
	max-width: 480px;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #e4e1d9;
}

.profile__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.profile__placeholder {
	--ph-a: #e9e6df;
	--ph-b: #e0ddd4;

	position: absolute;
	inset: 0;
	color: #9a9eab;
	font: 400 clamp(56px, 8vw, 96px) var(--font-serif);
	letter-spacing: 0.04em;
}

.profile__header {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding-bottom: clamp(32px, 3.4vw, 44px);
}

.profile__header:last-child {
	padding-bottom: 0;
}

/* Long positions wrap onto a second line. */
.profile__position {
	line-height: 1.7;
}

.profile__name {
	color: var(--c-navy);
	font-size: clamp(34px, 4.2vw, 56px);
	font-weight: 300;
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.profile__social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.profile__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(23, 34, 63, 0.25);
	color: var(--c-navy);
	transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.profile__social-link:hover {
	border-color: var(--c-navy);
	background: var(--c-navy);
	color: var(--c-white);
}

.profile__social-icon {
	width: 16px;
	height: 16px;
}

/* Labelled rows: Profile, Education, Highlighted Experiences. The label moves beside the content once there is room. */
.profile__section {
	display: grid;
	gap: 16px;
	padding-block: clamp(28px, 3vw, 36px);
	border-top: 1px solid var(--c-line);
}

.profile__section:last-child {
	padding-bottom: 0;
}

.profile__label {
	color: var(--c-gold-deep);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.6;
	text-transform: uppercase;
}

.profile__detail {
	min-width: 0;
	max-width: 600px;
}

/* The first paragraph opens the profile as a lead. */
.profile__bio > :first-child {
	color: var(--c-navy);
	font-size: 18px;
	line-height: 1.7;
}

/* Descriptions pasted from a CV carry a line break at the end of every line;
 * the text flows instead. Blank lines still separate paragraphs. */
.profile__bio p br {
	display: none;
}

/* Folded until "Read more" (profile.js). Set before first paint, so the page
 * does not jump; without JavaScript the whole description shows. */
@media screen {
	.js .profile__bio:not(.is-expanded) > :nth-child(n + 2) {
		display: none;
	}
}

.profile__bio.is-expanded > :nth-child(n + 2) {
	animation: legart-fade 0.5s ease both;
}

.profile__more {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	margin-top: 26px;
	padding: 8px 0;
	border: 0;
	border-bottom: 1px solid var(--c-navy);
	background: none;
	color: var(--c-navy);
	font: 600 12.5px var(--font-sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.3s, border-color 0.3s;
}

.profile__more[hidden] {
	display: none;
}

.profile__more:hover {
	border-color: var(--c-gold);
	color: var(--c-gold-deep);
}

/* Plus that turns into a minus. */
.profile__more-icon {
	position: relative;
	width: 10px;
	height: 10px;
}

.profile__more-icon::before,
.profile__more-icon::after,
.experience__icon::before,
.experience__icon::after {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	content: "";
	transition: transform 0.35s var(--ease-out);
}

.profile__more-icon::after,
.experience__icon::after {
	transform: rotate(90deg);
}

.profile__more[aria-expanded="true"] .profile__more-icon::after,
.experience__segment[open] .experience__icon::after {
	transform: rotate(0deg);
}

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

.profile__list li {
	color: #2a3147;
	font-size: 16px;
	line-height: 1.6;
}

/* Highlighted Experiences: a fold per titled segment, the first one open. */
.experience__segment {
	border-bottom: 1px solid var(--c-line);
}

.experience__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 18px;
	color: var(--c-navy);
	list-style: none;
	cursor: pointer;
}

.experience__summary::-webkit-details-marker {
	display: none;
}

/* The first title sits on the line of the row label. */
.experience__segment:first-child > .experience__summary {
	padding-top: 0;
}

.experience__title {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
	transition: color 0.3s;
}

.experience__summary:hover .experience__title {
	color: var(--c-gold-deep);
}

.experience__icon {
	position: relative;
	flex: none;
	width: 12px;
	height: 12px;
}

.experience__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 2px 0 28px;
	list-style: none;
}

/* A segment without a title shows its points without a fold. */
.experience__segment--plain:not(:first-child) > .experience__list {
	padding-top: 20px;
}

.experience__segment[open] > .experience__list {
	animation: legart-fade 0.5s ease both;
}

/* Short gold rule on the first line of each point. The line height is a whole
 * number of pixels, so every rule sits on the same sub-pixel and looks alike. */
.experience__list li {
	position: relative;
	padding-left: 26px;
	color: #2a3147;
	font-size: 16px;
	line-height: 26px;
}

.experience__list li::before {
	position: absolute;
	top: 13px;
	left: 0;
	width: 12px;
	border-top: 1px solid var(--c-gold);
	content: "";
}

@media (min-width: 600px) {
	.profile__section {
		grid-template-columns: 128px minmax(0, 1fr);
		gap: 32px;
	}

	/* Sits on the first line of the content. */
	.profile__label {
		padding-top: 6px;
	}
}

@media (min-width: 960px) {
	.profile__grid {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: start;
		gap: clamp(48px, 6vw, 96px);
	}

	/* Stays in view below the sticky header while a long description scrolls. */
	.profile__photo {
		position: sticky;
		top: 100px;
		max-width: none;
	}

	.profile__body {
		padding-top: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.profile__bio.is-expanded > :nth-child(n + 2),
	.experience__segment[open] > .experience__list {
		animation: none;
	}
}

/* 3. Related people ------------------------------------------------------- */

.related-people {
	padding: var(--section-space) 0;
	background: var(--c-white);
}

.related-people__inner {
	display: flex;
	flex-direction: column;
	gap: clamp(32px, 4vw, 52px);
}

.related-people__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
}

.related-people__title {
	color: var(--c-navy);
	font-size: clamp(26px, 2.6vw, 36px);
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

/* Four people: two by two until all four fit in one row. */
@media (min-width: 768px) {
	.people-grid--related {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.people-grid--related {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
