/*
 * The page of a person (single-person.php), on top of single.css, and the linked names in the byline
 * and the person of contact on services and articles. Colours come from tokens.css through data-theme.
 */

/* ---------- Linked names ---------- */

.kl-single a.kl-person-link {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--rule);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
.kl-single a.kl-person-link:hover { color: inherit; text-decoration-color: currentColor; }

/* ---------- Hero ---------- */

.kl-hero-p { padding-block: var(--space-7); }
.kl-hero-p__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"crumbs photo"
		"text photo";
	column-gap: var(--space-7);
	max-width: var(--kl-wide);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.kl-hero-p__crumbs { grid-area: crumbs; }
.kl-hero-p__photo { grid-area: photo; align-self: end; }
.kl-hero-p__text { grid-area: text; align-self: end; }

.kl-portrait--hero {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	padding: var(--space-2);
}
.kl-portrait--hero .kl-portrait__shield { padding: 28%; }

.kl-single .kl-hero-p__role { margin: 0 0 var(--space-3); }
.kl-single .kl-hero-p__name {
	margin: 0;
	color: var(--heading);
	font-family: var(--font-serif);
}
.kl-hero-p__credentials {
	margin: var(--space-3) 0 0;
	font-size: var(--type-lead-size);
	line-height: var(--type-lead-line);
}
.kl-hero-p__ways {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-5);
	margin: var(--space-6) 0 0;
	padding: var(--space-4) 0 0;
	border-top: 1px solid var(--border);
	list-style: none;
}
.kl-hero-p__ways li { min-width: 0; overflow-wrap: anywhere; }
.kl-single .kl-hero-p__ways a {
	color: var(--fg);
	text-decoration: underline;
	text-decoration-color: var(--rule);
	text-underline-offset: 4px;
}
.kl-single .kl-hero-p__ways a:hover { color: var(--accent); text-decoration-color: currentColor; }
.kl-hero-p__actions { margin-top: var(--space-5); }

/* ---------- Biography and practice areas ---------- */

.kl-single .kl-bio__title {
	margin: 0 0 var(--space-4);
	color: var(--heading);
	font-family: var(--font-serif);
	scroll-margin-top: var(--kl-top);
}
.kl-bio + .kl-person-areas { margin-top: var(--space-7); }
.kl-person-areas { margin-bottom: 0; }

.kl-single .kl-colleagues .kl-area__link { display: block !important; padding-left: var(--space-3); }

/* ---------- Articles: equal cards, with space between them instead of the ruled grid ---------- */

.kl-journal .kl-person-articles__grid {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-4);
	padding: 0;
	background: none;
}
.kl-journal .kl-person-articles__grid .kl-journal__cell.kl-journal__cell:nth-child(n) {
	grid-column: auto;
	border: 1px solid var(--border);
}
@media (min-width: 768px) {
	.kl-journal .kl-person-articles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.kl-journal .kl-person-articles__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.kl-journal .kl-person-articles__grid .kl-journal__cell:nth-child(2) .kl-card__photo { flex: none; }
	.kl-journal .kl-person-articles__grid .kl-journal__cell:nth-child(2) .kl-card__body { flex: 1 1 auto; }
}

.kl-single .kl-person-articles__more {
	margin: var(--space-6) 0 var(--space-3);
	color: var(--heading);
	font-family: var(--font-serif);
}
.kl-person-articles__list {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--border);
	list-style: none;
}
.kl-person-articles__list li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-1) var(--space-4);
	padding: 14px 0;
	border-bottom: 1px solid var(--border);
}
.kl-single .kl-person-articles__list a { color: var(--heading); text-decoration: none; }
.kl-single .kl-person-articles__list a:hover { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.kl-person-articles__list time { color: var(--fg-muted); font-size: var(--type-caption-size); font-style: italic; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1023px) {
	.kl-hero-p__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
		column-gap: var(--space-5);
	}
}

@media (max-width: 767px) {
	.kl-hero-p { padding-block: var(--space-6); }
	.kl-hero-p__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-template-areas: "crumbs" "photo" "text";
	}
	.kl-hero-p__photo { width: 220px; margin-bottom: var(--space-5); }
	.kl-hero-p__ways { flex-direction: column; margin-top: var(--space-5); }
	.kl-hero-p__actions .btn { width: 100%; }
}
