/**
 * Biography, Internships, Employment, Education and PhD graduates lists on
 * the About page.
 */

.am-about-bio {
	color: #2B2B2B;
	font-size: 17px;
}

.am-about-bio p {
	margin: 0 0 1em;
	line-height: 1.6;
}

.am-about-bio p:last-child {
	margin-bottom: 0;
}

.am-employment,
.am-education {
	font-size: 17px;
}

/* Oś czasu biografii: rok po lewej, wydarzenie obok. Wpisów jest ~60, więc
   wiersze są ciaśniejsze niż w Employment, a przegrody subtelniejsze. */
.am-bio,
.am-internships {
	font-size: 16px;
}

.am-bio__item,
.am-internships__item {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	column-gap: 20px;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid rgba(31, 42, 68, 0.1);
}

.am-internships__item.has-image {
	grid-template-columns: 100px 120px minmax(0, 1fr);
	align-items: start;
}

.am-bio__item:last-child,
.am-internships__item:last-child {
	border-bottom: none;
}

.am-bio__year,
.am-internships__year {
	color: #7D2935;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.am-bio__text,
.am-internships__text {
	color: #2B2B2B;
	line-height: 1.5;
}

/* Wypromowani doktorzy: dwie kolumny „rok + imię i nazwisko" – ten sam układ,
   który wcześniej był wpisany na sztywno w szablonie strony About. */
.am-phd-list {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 48px;
}

.am-phd-list li {
	display: flex;
	gap: 14px;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid rgba(31, 42, 68, 0.12);
	font-size: 16px;
	color: #2B2B2B;
	break-inside: avoid;
}

.am-phd-list li span {
	flex: 0 0 44px;
	font-weight: 700;
	color: #7D2935;
	font-variant-numeric: tabular-nums;
}

.am-employment__item {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 4px 20px;
	align-items: start;
	padding: 14px 0;
	border-bottom: 1px solid #D8D2C4;
}

.am-employment__item.has-logo {
	grid-template-columns: 100px 120px minmax(0, 1fr);
}

.am-employment__item:last-child,
.am-education__item:last-child {
	border-bottom: none;
}

.am-employment__period {
	color: #7D2935;
	font-weight: 700;
}

/* Wiersz wiodący wpisu: rola w Employment, stopień w Education, instytucja
   w Internships. Wszędzie ten sam zabieg – pogrubienie i granat w rozmiarze
   bazowym sekcji, bez powiększania stopnia pisma. */
.am-employment__role,
.am-education__degree,
.am-internships__institution {
	color: #1F2A44;
	font-weight: 700;
}

/* Linia pod wierszem wiodącym dostaje ten sam odstęp co organizacja
   i odnośnik w Employment. */
.am-employment__organization,
.am-employment__link,
.am-internships__institution + .am-internships__text {
	margin-top: 2px;
}

.am-employment__link a {
	color: #7D2935;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.am-employment__link a:hover {
	text-decoration: none;
}

.am-education__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	padding: 14px 0;
	border-bottom: 1px solid #D8D2C4;
}

.am-education__item.has-logo {
	grid-template-columns: 100px minmax(0, 1fr);
	gap: 20px;
}

.am-education__item.has-year {
	grid-template-columns: 120px minmax(0, 1fr);
	column-gap: 20px;
}

.am-education__item.has-year.has-logo {
	grid-template-columns: 100px 120px minmax(0, 1fr);
}

/* Rok wiedzie prym: duży, bordowy, wyrównany do góry wpisu. */
.am-education__year {
	color: #7D2935;
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.am-education__item.has-period .am-education__year {
	font-size: 17px;
	line-height: 1.35;
	white-space: nowrap;
}

.am-record-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 90px;
	height: 72px;
}

/* Puste miejsce po logo trzyma szerokość kolumny, nic nie rysując. */
.am-record-logo--empty {
	flex: none;
}

.am-record-logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 90px;
	max-height: 72px;
	object-fit: contain;
}

.am-education__supervisor {
	color: #666;
}

.am-profile-empty {
	color: #777;
	font-style: italic;
}

/* Bio + „At a glance” follows the homepage bio card proportions. Elementor
   does not ship width rules for arbitrary 62/38 column classes, so the
   section uses its native 60/40 pair and stacks at the same breakpoint as
   the homepage card. */
@media ( max-width: 900px ) {
	.elementor-section.am-about-bio-section > .elementor-container > .elementor-column {
		width: 100%;
	}
}

@media ( max-width: 600px ) {
	.am-employment__item {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}

	.am-employment__item.has-logo,
	.am-education__item.has-logo,
	.am-education__item.has-year.has-logo {
		grid-template-columns: 72px minmax(0, 1fr);
		column-gap: 14px;
	}

	/* Na wąskim ekranie rok staje nad wpisem, żeby tekst nie zwężał się do słupka. */
	.am-education__item.has-year {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2px;
	}

	.am-education__item.has-year.has-logo .am-record-logo {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.am-education__item.has-year.has-logo .am-education__year,
	.am-education__item.has-year.has-logo .am-education__body {
		grid-column: 2;
	}

	.am-education__year {
		font-size: 26px;
	}

	.am-education__item.has-period .am-education__year {
		font-size: 17px;
	}

	.am-employment__item.has-logo .am-record-logo {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.am-employment__item.has-logo .am-employment__period,
	.am-employment__item.has-logo .am-employment__body {
		grid-column: 2;
	}

	.am-record-logo {
		width: 68px;
		height: 58px;
	}

	.am-record-logo img {
		max-width: 68px;
		max-height: 58px;
	}

	/* Rok nad wydarzeniem – jak w pozostałych listach na wąskim ekranie. */
	.am-bio__item,
	.am-internships__item {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2px;
	}

	.am-internships__item.has-image {
		grid-template-columns: 72px minmax(0, 1fr);
		column-gap: 14px;
	}

	.am-internships__item.has-image .am-record-logo {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.am-internships__item.has-image .am-internships__year,
	.am-internships__item.has-image .am-internships__body {
		grid-column: 2;
	}

	.am-phd-list {
		columns: 1;
	}
}
