.egru-team {
	padding-block: clamp(3.5rem, 7vw, 7rem);
}

.egru-team__header {
	max-width: 760px;
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.egru-team__header h2 {
	margin: 0 0 1rem;
}

.egru-team__introduction > :first-child,
.egru-team-modal__biography > :first-child {
	margin-top: 0;
}

.egru-team__introduction > :last-child,
.egru-team-modal__biography > :last-child {
	margin-bottom: 0;
}

.egru-team__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.egru-team__item {
	min-width: 0;
}

.egru-team-card {
	display: flex;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	appearance: none;
	flex-direction: row;
	overflow: hidden;
}

button.egru-team-card {
	cursor: pointer;
}

button.egru-team-card:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 4px;
}

.egru-team-card__image-wrap {
	position: relative;
	display: block;
	width: auto;
	min-height: 230px;
	flex: 0 0 36%;
	background: #e7e7e7;
	overflow: hidden;
}

.egru-team-card__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

button.egru-team-card:hover .egru-team-card__image,
button.egru-team-card:focus-visible .egru-team-card__image {
	transform: scale(1.025);
}

.egru-team-card__content {
	display: flex;
	padding: clamp(1.25rem, 2vw, 1.75rem);
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
}

.egru-team-card__name {
	display: block;
	margin-bottom: 0.35rem;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(1.45rem, 2vw, 1.9rem);
	font-weight: 400;
	line-height: 1.15;
}

.egru-team-card__position {
	display: block;
	font-weight: 700;
	line-height: 1.4;
}

.egru-team-card__summary {
	display: -webkit-box;
	margin-top: 1rem;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.egru-team-card__link {
	display: inline-block;
	margin-top: auto;
	padding-top: 1.5rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.egru-team-modal {
	width: min(920px, calc(100vw - 2rem));
	max-width: 920px;
	max-height: min(720px, calc(100vh - 3rem));
	padding: 0 !important;
	background: #fff;
	color: #111;
	overflow: hidden;
}

.egru-team-modal__layout {
	display: grid;
	max-height: min(720px, calc(100vh - 3rem));
	grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
}

.egru-team-modal__image-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 360px;
	background: #e7e7e7;
	overflow: hidden;
}

.egru-team-modal__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
}

.egru-team-modal__content {
	padding: clamp(2rem, 5vw, 4rem);
	min-width: 0;
	overflow: auto;
}

.egru-team-modal__content h3 {
	margin: 0 0 0.5rem;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(2rem, 4vw, 3.25rem);
	font-weight: 400;
	line-height: 1.1;
}

.egru-team-modal__position {
	margin: 0 0 1.75rem;
	font-weight: 700;
}

.egru-team-modal__contact {
	display: flex;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
}

.egru-team-modal__contact a {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
	.egru-team__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 620px) {
	.egru-team__grid,
	.egru-team-modal__layout {
		grid-template-columns: 1fr;
	}

	.egru-team-card {
		flex-direction: column;
	}

	.egru-team-card__image-wrap {
		width: 100%;
		min-height: 0;
		aspect-ratio: 5 / 3;
		flex: none;
	}

	.egru-team-card__image {
		object-position: center 25%;
	}

	.egru-team-modal {
		max-height: calc(100vh - 2rem);
	}

	.egru-team-modal__image-wrap {
		height: min(58vw, 260px);
		min-height: 0;
	}

	.egru-team-modal__image {
		object-position: center 25%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.egru-team-card__image {
		transition: none;
	}
}
