/**
 * The portfolio page head and the portfolio cards.
 *
 * Classes and tokens carried over from the approved mockups
 * (threads/proto/portfolio, threads/proto/shop), renamed from the pf- and sh-port prefixes to
 * ibpf- for this plugin's own namespace.
 */

/* ----------------------------------------------------------------------
 * [ib_portfolio_page] — the hero on a portfolio's own page.
 * -------------------------------------------------------------------- */

.ibpf-hero {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1.25fr );
	gap: 48px;
	align-items: start;
	border: 1px solid rgba( 128, 128, 128, .25 );
	border-radius: 12px;
	padding: 40px;
	margin: 8px 0 56px;
	text-align: left;
	width: 100%;
	box-sizing: border-box;
}

.ibpf-hero.ibpf-hero--solo {
	grid-template-columns: 1fr;
}

.ibpf-id {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ibpf-avatar {
	width: 128px;
	height: 128px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid rgba( 128, 128, 128, .25 );
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

.ibpf-avatar img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 22px;
	box-sizing: border-box;
}

.ibpf-avatar--mono {
	background: rgb( 184, 0, 0 );
	color: #fff;
	font-family: 'ABeeZee', sans-serif;
	font-size: 56px;
	font-weight: 200;
	border: 0;
}

.ibpf-eyebrow {
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgb( 110, 110, 110 );
}

.ibpf-title {
	text-align: left;
	margin: 0;
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 39px;
	line-height: 1.15;
	color: inherit;
}

.ibpf-tagline {
	font-size: 17.64px;
	color: rgb( 64, 64, 64 );
	margin: 0;
}

.ibpf-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.ibpf-facts span {
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba( 128, 128, 128, .25 );
	color: rgb( 64, 64, 64 );
}

.ibpf-facts span:first-child {
	background: rgb( 54, 99, 54 );
	border-color: rgb( 54, 99, 54 );
	color: #fff;
}

.ibpf-about h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0 0 16px;
}

.ibpf-about p {
	font-size: 17.64px;
	line-height: 1.6;
	color: rgb( 64, 64, 64 );
	margin: 0 0 14px;
	max-width: 62ch;
}

.ibpf-list-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 24px;
	text-align: left;
	width: 100%;
}

.ibpf-list-head h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0;
}

.ibpf-list-head span {
	color: rgb( 110, 110, 110 );
	font-size: 15px;
}

/* ----------------------------------------------------------------------
 * [ib_portfolio_cards] — the portfolio cards on the Shop page.
 * -------------------------------------------------------------------- */

.ibpf-sec {
	display: flex;
	align-items: baseline;
	gap: 12px;
	width: 100%;
	margin: 0 0 20px;
	text-align: left;
}

.ibpf-sec h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0;
}

.ibpf-sec span {
	color: rgb( 110, 110, 110 );
	font-size: 15px;
}

.ibpf-cards {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 16px;
	width: 100%;
	margin: 0 0 56px;
}

.ibpf-card {
	display: flex;
	gap: 20px;
	align-items: center;
	border: 1px solid rgba( 128, 128, 128, .25 );
	border-radius: 12px;
	padding: 20px 24px;
	text-decoration: none;
	color: inherit;
	text-align: left;
}

.ibpf-card-body h3 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0 0 4px;
	color: rgb( 33, 33, 33 );
}

.ibpf-card-body p {
	margin: 0 0 8px;
	color: rgb( 64, 64, 64 );
	font-size: 15.5px;
}

.ibpf-card-body .ibpf-pill {
	font-size: 13px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgb( 54, 99, 54 );
	color: #fff;
}

.ibpf-avatar--sm {
	width: 84px;
	height: 84px;
	flex: 0 0 84px;
}

.ibpf-avatar--sm.ibpf-avatar--mono {
	font-size: 38px;
}

.ibpf-avatar--sm img {
	padding: 14px;
}

/* ----------------------------------------------------------------------
 * [ib_portfolio_latest] — «The latest flags added» on the Portfolio page.
 * -------------------------------------------------------------------- */

.ibpf-flags {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 24px;
	width: 100%;
	margin: 0 0 56px;
}

.ibpf-flag-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
}

.ibpf-flag-card-img {
	display: block;
	aspect-ratio: 1 / 1;
}

.ibpf-flag-card-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ibpf-flag-card-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 20px 20px;
	text-align: center;
}

.ibpf-flag-card-cat,
.ibpf-flag-card-title {
	/* Black, not the shop's red: Matteo, 2026-09-22, on the Portfolio page's cards. */
	color: rgb( 33, 33, 33 );
	text-decoration: none;
	font-size: 15.5px;
	line-height: 1.4;
}

.ibpf-flag-card-title {
	font-weight: 500;
}

/* ----------------------------------------------------------------------
 * [ib_portfolio_cta] — «Become a contributor too» on the Portfolio page.
 * -------------------------------------------------------------------- */

.ibpf-sec--cta {
	margin-top: 56px;
}

.ibpf-cta {
	display: grid;
	grid-template-columns: minmax( 0, 1.4fr ) minmax( 0, 1fr );
	gap: 40px;
	align-items: center;
	border: 1px solid rgba( 128, 128, 128, .25 );
	border-radius: 12px;
	padding: 36px 40px;
	margin: 8px 0 56px;
	text-align: left;
	background: #fff;
}

.ibpf-cta h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 28px;
	margin: 0 0 12px;
	color: rgb( 33, 33, 33 );
}

.ibpf-cta p {
	margin: 0 0 10px;
	font-size: 17.64px;
	line-height: 1.6;
	color: rgb( 64, 64, 64 );
}

.ibpf-btn {
	display: inline-block;
	background: rgb( 54, 99, 54 );
	color: #fff;
	border-radius: 8px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 15px 22px;
	text-decoration: none;
	margin-top: 8px;
}

.ibpf-uses {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ibpf-uses span {
	font-size: 15.5px;
	line-height: 1.45;
	color: rgb( 64, 64, 64 );
	padding: 12px 16px;
	border: 1px solid rgba( 128, 128, 128, .25 );
	border-radius: 10px;
	background: #fafafa;
}

/* ----------------------------------------------------------------------
 * Phones (≤900px) — the hero, the cards, the flag grid and the CTA stack
 * in one column.
 * -------------------------------------------------------------------- */

@media ( max-width: 900px ) {
	.ibpf-hero {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 24px;
	}

	.ibpf-avatar {
		width: 96px;
		height: 96px;
	}

	.ibpf-avatar--mono {
		font-size: 42px;
	}

	.ibpf-title {
		font-size: 32px;
	}

	.ibpf-cards {
		grid-template-columns: 1fr;
	}

	.ibpf-card {
		padding: 16px;
	}

	/* Two columns on phones, like the shop's own flag grid (`columns-2--on-m`). */
	.ibpf-flags {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 12px;
	}

	.ibpf-flag-card-body {
		padding: 12px 12px 16px;
	}

	.ibpf-flag-card-cat,
	.ibpf-flag-card-title {
		font-size: 14px;
	}

	.ibpf-cta {
		grid-template-columns: 1fr;
		gap: 22px;
		padding: 22px;
	}

	.ibpf-cta h2 {
		font-size: 24px;
	}
}

/* ----------------------------------------------------------------------
 * The flag cards of a portfolio's own page are drawn by the Oxygen template
 * shared with the product categories, where the two lines are red. On a
 * portfolio page they are black (Matteo, 2026-09-22); the category pages
 * keep their own colour.
 * -------------------------------------------------------------------- */

body.tax-ib_portfolio .card .ct-span a,
body.tax-ib_portfolio .card a.ct-link-text,
body.tax-ib_portfolio .card a.ct-link-text .ct-span {
	color: rgb( 33, 33, 33 );
}
