/* Fellow Grid — measured off Figma `05. Educação`, node 921:17395 ("Sec-04 People Grid").
 * No group headings in the design ("Current fellows" / "Alumni"); each card's
 * own role label carries that, so grouping survives as ordering. See render.php. */
:root {
	--move-fellow-bg: var(--move-color-bg, #faf7f0);
	--move-fellow-card-bg: var(--move-color-surface, #ffffff);
	--move-fellow-text: var(--move-color-text, #475c76);
	--move-fellow-text-muted: var(--move-color-text-muted, #627995);
	--move-fellow-title: var(--move-color-text-title, #061b33);

	/* Photo column is a 210px square in the design; the card is that tall. */
	--move-fellow-photo-size: 13.125rem;

	--move-fellow-font-heading: var(--move-font-size-4xl, 2.5rem);  /* 40px */
	--move-fellow-font-intro: var(--move-font-size-md, 1.125rem);   /* 18px */
	--move-fellow-font-role: var(--move-font-size-xs, 0.75rem);     /* 12px */
	--move-fellow-font-title: var(--move-font-size-md, 1.125rem);   /* 18px */
	--move-fellow-font-text: var(--move-font-size-sm, 0.875rem);    /* 14px */

	/* Bio is clamped visually, not truncated in the field — the full text
	   stays in the DOM and the accessibility tree. A placement can override
	   this; `display: none` would not be an acceptable substitute. */
	--move-fellow-card-text-lines: 4;
}

.move-fellow-grid {
	container-type: inline-size;
	container-name: move-fellow-grid;
	width: 100%;
	background: var(--move-fellow-bg);
	color: var(--move-fellow-text);
	font-family: var(--move-font-base);
	font-size: 1rem;
	font-weight: 400;
	--move-strong-weight: var(--move-font-weight-bold, 700);
	/* Clears the sticky sub-nav bar when a tab link jumps here. */
	scroll-margin-top: var(--move-subnav-sticky-height, 2.5rem);
}

.move-fellow-grid__container {
	max-width: var(--move-container-max, 1312px);
	margin-inline: auto;
	padding: 5rem var(--move-container-gutter, 2rem);
}

/* 40px Regular in brand-high-emphasis, -1.6px (-0.04em) at 1.2. */
.move-fellow-grid__heading {
	margin: 0 0 var(--move-space-xl, 4rem);
	font-size: var(--move-fellow-font-heading);
	font-weight: var(--move-font-weight-regular, 400);
	letter-spacing: var(--move-letter-spacing-tightest, -0.04em);
	line-height: var(--move-line-tight, 1.2);
	color: var(--move-color-dark, #0f2a4a);
	/* Rosario Medium italic against the Regular roman (921:17398). */
	--move-em-weight: var(--move-font-weight-medium, 500);
}
.move-fellow-grid__intro {
	margin: calc( var(--move-space-xl, 4rem) * -1 + var(--move-space-20, 1.25rem) ) 0 var(--move-space-xl, 4rem);
	font-size: var(--move-fellow-font-intro);
	font-weight: var(--move-font-weight-light, 300);
	line-height: var(--move-line-relaxed, 1.5);
	max-width: 48rem;
}

.move-fellow-grid__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--move-space-20, 1.25rem);
}

/* Mobile-first, stacked: the 210px photo column plus name/bio leaves under
   120px of text at 390px, so the row arrangement waits for the container query below. */
.move-fellow-card {
	display: flex;
	flex-direction: column;
	background: var(--move-fellow-card-bg);
	border-radius: var(--move-radius, 0.75rem);
	overflow: hidden;
	min-width: 0;
}

/* Mobile frame (921:17467): fixed 220px height on fluid width, not a ratio (not the 3:2 this shipped with).
   Reserved so a placeholder card (no <img>) matches a real one's height, no shift when the photo lands. */
.move-fellow-card__photo {
	flex: none;
	width: 100%;
	height: 13.75rem; /* 220px */
	background: var(--move-color-placeholder-photo, #f8fafd);
}
.move-fellow-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.move-fellow-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--move-space-xs, 0.5rem);
	padding: var(--move-space-md, 1.5rem);
	min-width: 0;
}

/* Tagline/tagline-12: uppercase, tracked, in the caption colour. */
.move-fellow-card__role {
	margin: 0;
	font-size: var(--move-fellow-font-role);
	text-transform: uppercase;
	font-weight: var(--move-font-weight-regular, 400);
	letter-spacing: var(--move-letter-spacing-loose, 0.05em);
	line-height: 1;
	color: var(--move-fellow-text-muted);
}

.move-fellow-card__title {
	margin: 0;
	font-size: var(--move-fellow-font-title);
	font-weight: var(--move-font-weight-regular, 400);
	line-height: var(--move-line-relaxed, 1.5);
	letter-spacing: var(--move-letter-spacing-tighter, -0.02em);
	color: var(--move-fellow-title);
}

.move-fellow-card__text {
	margin: 0;
	font-size: var(--move-fellow-font-text);
	font-weight: var(--move-font-weight-light, 300);
	line-height: var(--move-line-normal, 1.4);
	letter-spacing: var(--move-letter-spacing-tight, -0.01em);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--move-fellow-card-text-lines, 4);
	line-clamp: var(--move-fellow-card-text-lines, 4);
	overflow: hidden;
}

.move-fellow-grid__empty {
	color: var(--move-fellow-text-muted);
}

@container move-fellow-grid (min-width: 768px) {
	.move-fellow-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}
	/* Card is at least as tall as the 210px square photo (921:17400), not exactly:
	   align-self: flex-start below keeps the photo pinned square even when a long bio grows the card. */
	.move-fellow-card {
		flex-direction: row;
		min-height: var(--move-fellow-photo-size);
	}
	.move-fellow-card__photo {
		width: var(--move-fellow-photo-size);
		height: var(--move-fellow-photo-size);
		aspect-ratio: 1 / 1;
		align-self: flex-start;
	}
}
