/* Alumni Profiles — cards, listing (bw/alumni-grid) and teaser.
 *
 * Shared with the profile pages ("More alumni profiles" uses the same card),
 * so it's enqueued there too (inc/bw-alumni.php).
 *
 * Built from the site's own vocabulary rather than new styling:
 *   • Brentwood row standard — white, 8px radius, 0 2px 4px rgba(0,0,0,.08);
 *   • the red corner badge from the Brentwood 100 tiles, here the class year;
 *   • portrait photo tiles like the faculty grid;
 *   • Oswald light headings in slate, Open Sans body, brand-red links. */

.bw-alg,
.bw-al {
	--bw-al-red: var( --global-palette1, #c8272c );
	--bw-al-red-dark: var( --global-palette2, #a32024 );
	--bw-al-ink: var( --global-palette3, #4b5563 );
	--bw-al-muted: var( --global-palette4, #707d8e );
	--bw-al-line: #e5e7eb;
	--bw-al-tint: var( --global-palette8, #f3f4f6 );
	--bw-al-head: var( --global-heading-font-family, "Oswald", "Open Sans", sans-serif );
	--bw-al-shadow: 0 2px 4px rgba( 0, 0, 0, 0.08 );
	--bw-al-shadow-hover: 0 12px 24px -8px rgba( 17, 24, 39, 0.22 ), 0 2px 4px rgba( 0, 0, 0, 0.06 );
	color: var( --bw-al-ink );
}
.bw-alg *,
.bw-al * {
	box-sizing: border-box;
}

.bw-al-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.bw-alc {
	height: 100%;
}
.bw-alc__link {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: var( --bw-al-shadow );
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
/* Brand-red rule that draws in along the bottom on hover. */
.bw-alc__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var( --bw-al-red );
	transform: scaleX( 0 );
	transform-origin: left;
	transition: transform 0.3s ease;
}
.bw-alc__link:hover,
.bw-alc__link:focus-visible {
	box-shadow: var( --bw-al-shadow-hover );
	transform: translateY( -2px );
}
.bw-alc__link:hover::after,
.bw-alc__link:focus-visible::after {
	transform: scaleX( 1 );
}
.bw-alc__link:focus-visible {
	outline: 2px solid var( --bw-al-red );
	outline-offset: 2px;
}

.bw-alc__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #d8dde4;
}
.bw-alc__img,
.bw-alc__noimg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 22%; /* keep faces in frame on tall photos */
	transition: transform 0.5s ease;
}
.bw-alc__link:hover .bw-alc__img {
	transform: scale( 1.04 );
}
.bw-alc__noimg {
	background: linear-gradient( 160deg, #dcf2fa, #b2bdce );
}

/* Class-year badge — the Brentwood 100 corner number, carrying ’02. */
.bw-alc__badge {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.1rem;
	height: 1.85rem;
	padding: 0 0.45rem;
	border-radius: 4px;
	background: var( --bw-al-red );
	color: #fff;
	font-family: "Open Sans", sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.25 );
}
.bw-alc__badge--lg {
	top: 1rem;
	left: 1rem;
	height: 2.25rem;
	min-width: 2.6rem;
	font-size: 0.95rem;
}

.bw-alc__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.9rem 1rem 1.15rem;
}
.bw-alc .bw-alc__name {
	margin: 0;
	font-family: var( --bw-al-head );
	font-size: 1.3rem;
	font-weight: 300;
	line-height: 1.2;
	color: var( --bw-al-ink );
	transition: color 0.2s ease;
}
.bw-alc__link:hover .bw-alc__name {
	color: var( --bw-al-red );
}
.bw-alc .bw-alc__role {
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.35;
	color: var( --bw-al-ink );
}
.bw-alc__place {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: auto;
	padding-top: 0.25rem;
	font-size: 0.78rem;
	line-height: 1.3;
	color: var( --bw-al-muted );
}
.bw-alc__place .bw-al-icon {
	color: var( --bw-al-red );
}

/* ── Grid ──────────────────────────────────────────────────────────────────── */
.bw-alg__grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
/* Beat the theme's `.entry-content ul` indent — reset only, never columns. */
.bw-alg ul.bw-alg__grid {
	margin: 0;
	padding: 0;
	list-style: none;
}
.bw-alg__grid > li {
	margin: 0;
}
.bw-alg__cell[hidden] {
	display: none;
}
@media ( min-width: 768px ) {
	.bw-alg__grid {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
		gap: 1.25rem;
	}
}
@media ( min-width: 1100px ) {
	.bw-alg--full .bw-alg__grid {
		grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	}
}
/* Rows of three (teaser, "More alumni profiles"): one column on small phones. */
@media ( max-width: 479px ) {
	.bw-alg__grid--row {
		grid-template-columns: minmax( 0, 1fr );
	}
	.bw-alg__grid--row .bw-alc__link {
		flex-direction: row;
	}
	.bw-alg__grid--row .bw-alc__media {
		flex: 0 0 38%;
		aspect-ratio: auto;
		min-height: 9.5rem;
	}
}

/* The featured profile's own card is hidden until a filter is active. */
.bw-alg--full:not( .is-filtering ) .bw-alg__cell.is-featured-dup {
	display: none;
}

/* ── Full listing ─────────────────────────────────────────────────────────── */
/* Side gutters match the site's Kadence rows (1rem in from the content edge). */
.bw-alg--full {
	margin: 2.5rem 1rem 3rem;
}

/* Featured (latest) profile */
.bw-alg__feature {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	overflow: hidden;
	margin: 0 0 2rem;
	border-radius: 8px;
	background: #fff;
	box-shadow: var( --bw-al-shadow );
}
.bw-alg.is-filtering .bw-alg__feature {
	display: none;
}
.bw-alg__feature-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #d8dde4;
}
.bw-alg__feature-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 22%;
	transition: transform 0.6s ease;
}
.bw-alg__feature:hover .bw-alg__feature-img {
	transform: scale( 1.03 );
}
.bw-alg__feature-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1.75rem 1.5rem 2rem;
}
.bw-alg .bw-alg__eyebrow,
.bw-al .bw-al__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.6rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --bw-al-red );
}
.bw-alg__eyebrow::before,
.bw-al__eyebrow::before {
	content: "";
	width: 1.75rem;
	height: 2px;
	background: currentColor;
}
.bw-alg .bw-alg__feature-name {
	margin: 0;
	font-family: var( --bw-al-head );
	font-size: clamp( 1.9rem, 3.2vw, 2.6rem );
	font-weight: 300;
	line-height: 1.12;
}
.bw-alg__feature-name a {
	color: var( --bw-al-ink );
	text-decoration: none;
}
.bw-alg__feature-name a:hover {
	color: var( --bw-al-red );
}
.bw-alg .bw-alg__feature-role {
	margin: 0.5rem 0 0;
	font-weight: 600;
	line-height: 1.4;
}
.bw-alg .bw-alg__feature-meta {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var( --bw-al-muted );
	white-space: pre-wrap;
}
.bw-alg .bw-alg__feature-quote {
	position: relative;
	margin: 1.4rem 0 0;
	padding: 0 0 0 1.25rem;
	border: 0;
	border-left: 3px solid var( --bw-al-red );
	background: none;
}
.bw-alg .bw-alg__feature-quote p {
	margin: 0;
	font-family: var( --bw-al-head );
	font-size: 1.25rem;
	font-weight: 300;
	line-height: 1.45;
	color: var( --bw-al-ink );
}
.bw-alg .bw-alg__feature-quote p::before { content: "\201C"; }
.bw-alg .bw-alg__feature-quote p::after { content: "\201D"; }
.bw-alg__feature-cta,
.bw-alg__teaser-link,
.bw-al__more-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	align-self: flex-start;
	margin-top: 1.5rem;
	font-weight: 600;
	color: var( --bw-al-red );
	text-decoration: none;
}
.bw-alg__feature-cta .bw-al-icon,
.bw-alg__teaser-link .bw-al-icon,
.bw-al__more-link .bw-al-icon {
	width: 0.85em;
	height: 0.85em;
	transition: transform 0.2s ease;
}
.bw-alg__feature-cta:hover,
.bw-alg__teaser-link:hover,
.bw-al__more-link:hover {
	color: var( --bw-al-red-dark );
}
.bw-alg__feature-cta:hover .bw-al-icon,
.bw-alg__teaser-link:hover .bw-al-icon,
.bw-al__more-link:hover .bw-al-icon {
	transform: translateX( 3px );
}
@media ( min-width: 768px ) {
	.bw-alg__feature {
		grid-template-columns: minmax( 0, 5fr ) minmax( 0, 7fr );
	}
	.bw-alg__feature-media {
		aspect-ratio: auto;
		min-height: 26rem;
	}
	.bw-alg__feature-body {
		padding: 2.5rem 3rem;
	}
}

/* Tools: search, decade + sort, career-field chips */
.bw-alg__tools {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border-radius: 8px;
	background: #fff;
	box-shadow: var( --bw-al-shadow );
}
.bw-alg__tools[hidden] {
	display: none;
}
.bw-alg__toolrow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.bw-alg__search {
	position: relative;
	flex: 1 1 18rem;
}
.bw-alg__search svg {
	position: absolute;
	top: 50%;
	left: 0.85rem;
	width: 1.05rem;
	height: 1.05rem;
	transform: translateY( -50% );
	color: var( --bw-al-muted );
	pointer-events: none;
}
.bw-alg__search input[type="search"],
.bw-alg__select select {
	width: 100%;
	min-height: 2.75rem;
	margin: 0;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background-color: #fff;
	color: var( --bw-al-ink );
	font: inherit;
	font-size: 0.9375rem;
	box-shadow: none;
}
.bw-alg__search input[type="search"] {
	padding: 0.55rem 0.9rem 0.55rem 2.5rem;
}
.bw-alg__search input[type="search"]:focus,
.bw-alg__select select:focus {
	border-color: var( --bw-al-red );
	outline: 0;
	box-shadow: 0 0 0 3px rgba( 200, 39, 44, 0.15 );
}
.bw-alg__selects {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.bw-alg__select {
	flex: 1 1 12rem;
	margin: 0;
}
.bw-alg__select select {
	padding: 0.5rem 2.25rem 0.5rem 0.85rem;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23707d8e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1rem;
}
@media ( min-width: 900px ) {
	.bw-alg__selects {
		flex: 0 0 auto;
	}
	.bw-alg__select {
		flex: 0 0 13.5rem;
	}
}
.bw-alg__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}
/* Phones: one swipeable row of chips instead of a tall stack. */
@media ( max-width: 599px ) {
	.bw-alg__chips {
		flex-wrap: nowrap;
		margin-left: -1.25rem;
		margin-right: -1.25rem;
		padding: 0 1.25rem 0.25rem;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.bw-alg__chips::-webkit-scrollbar {
		display: none;
	}
	.bw-alg__chip {
		flex: 0 0 auto;
		white-space: nowrap;
	}
}
.bw-alg__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0.4rem 0.85rem;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	background: #fff;
	color: var( --bw-al-ink );
	font: inherit;
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bw-alg__chip:hover {
	border-color: var( --bw-al-red );
	background: #fff;
	color: var( --bw-al-red );
}
.bw-alg__chip.is-active,
.bw-alg__chip.is-active:hover {
	border-color: var( --bw-al-red );
	background: var( --bw-al-red );
	color: #fff;
}
.bw-alg__chip:focus-visible {
	outline: 2px solid var( --bw-al-red );
	outline-offset: 2px;
}
.bw-alg__chip-n {
	min-width: 1.35rem;
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	background: var( --bw-al-tint );
	color: var( --bw-al-muted );
	font-size: 0.72rem;
	text-align: center;
}
.bw-alg__chip.is-active .bw-alg__chip-n {
	background: rgba( 255, 255, 255, 0.22 );
	color: #fff;
}
.bw-alg .bw-alg__count {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var( --bw-al-muted );
}

.bw-alg .bw-alg__empty {
	padding: 3rem 1rem;
	text-align: center;
}
.bw-alg__empty[hidden] {
	display: none;
}
.bw-alg .bw-alg__empty p {
	margin: 0 0 0.75rem;
	font-family: var( --bw-al-head );
	font-size: 1.35rem;
	font-weight: 300;
}
.bw-alg__empty button {
	padding: 0;
	border: 0;
	background: none;
	color: var( --bw-al-red );
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
}

/* ── Teaser ───────────────────────────────────────────────────────────────── */
.bw-alg--teaser {
	margin: 2rem 1rem;
	padding: 1.75rem 1.25rem;
	border-radius: 8px;
	background: #fff;
	box-shadow: var( --bw-al-shadow );
}
.bw-alg__teaser-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-bottom: 1.5rem;
}
.bw-alg .bw-alg__teaser-title {
	margin: 0;
	font-family: var( --bw-al-head );
	font-size: 1.875rem;
	font-weight: 300;
	line-height: 1.2;
	color: var( --bw-al-ink );
}
.bw-alg .bw-alg__teaser-intro {
	max-width: 44rem;
	margin: 0.5rem 0 0;
}
.bw-alg__teaser-link {
	margin-top: 0;
}
.bw-alg--teaser .bw-alc__link {
	background: var( --bw-al-tint );
	box-shadow: none;
}
.bw-alg--teaser .bw-alc__link:hover {
	background: #fff;
	box-shadow: var( --bw-al-shadow-hover );
}
@media ( min-width: 480px ) {
	.bw-alg--teaser .bw-alc__media {
		aspect-ratio: 1 / 1; /* keeps a teaser row compact */
	}
}
@media ( min-width: 768px ) {
	.bw-alg--teaser {
		padding: 2.5rem 3rem 3rem;
	}
}
