/* Person pages, which are also author pages (AU1; the M4 mockup "Person and author page"). Loads on a person page,
   and on the Team page once a name there links to one (functions.php, atotb_person_styles). */

/* The head: a round photo beside the name on wide screens, above it on phones. */
.atotb-person-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	align-items: center;
}
.atotb-person-head > * { margin: 0 !important; }
.atotb-person-head__photo { width: 9rem; margin: 0; }
.atotb-person-head__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	object-position: 50% 20%;
	border-radius: 50%;
	box-shadow: 0 24px 40px -26px rgba(18, 35, 29, 0.6);
}
.atotb-person-head__text > * { margin-block: 0; }
.atotb-person-head__text > * + * { margin-block-start: var(--wp--preset--spacing--30); }
.atotb-person-head__text > .atotb-page-title { max-width: none; overflow-wrap: break-word; }
.atotb-person-head__role {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	color: var(--wp--preset--color--green);
}
.atotb-person-head__text > .atotb-person-head__background { margin-block-start: 0.25rem; max-width: 56ch; }

/* Two columns only with a photo: without one, the text takes the whole width. */
@media (min-width: 641px) {
	.atotb-person-head:has(> .atotb-person-head__photo) { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 2.5rem; }
	.atotb-person-head__photo { width: 100%; }
}

/* The member's own text, then their posts. */
.atotb-person-body { margin-block-start: var(--wp--preset--spacing--50) !important; }
.atotb-person-posts { margin-block-start: var(--wp--preset--spacing--70) !important; }

/* On the Team page, a name that links to a person page keeps the label's colour, underlined so it reads as a link
   (post titles' links are otherwise plain). */
.atotb-team__row .atotb-team__name a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.atotb-team__row .atotb-team__name a:hover { text-decoration-thickness: 2px; }
