.e54-portfolio {
	--e54-columns: 4;
	--e54-gap: 10px;
}

.e54-grid {
	display: grid;
	grid-template-columns: repeat(var(--e54-columns), minmax(0, 1fr));
	gap: var(--e54-gap);
}

@media (max-width: 1199px) {
	.e54-portfolio { --e54-columns: 3; }
}

@media (max-width: 899px) {
	.e54-portfolio { --e54-columns: 2; }
}

@media (max-width: 599px) {
	.e54-portfolio { --e54-columns: 1; }
}

.e54-tile {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
	text-decoration: none;
	background: #eee;
}

/* Pin every tile to the Behance cover ratio so rows never go ragged, even if a
   cached file is a slightly different size. */
.e54-tile__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 808 / 632;
	object-fit: cover;
}

.e54-tile__label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 14px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 60%);
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

/* Touch devices cannot hover, so the label stays on rather than being
   unreachable. Pointer devices get the fade. */
@media (hover: hover) {
	.e54-tile__label {
		opacity: 0;
		transition: opacity 0.25s ease;
	}

	.e54-tile:hover .e54-tile__label,
	.e54-tile:focus-visible .e54-tile__label {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.e54-tile__label { transition: none; }
}

.e54-status {
	margin: 18px 0 0;
	text-align: center;
	font-size: 14px;
	opacity: 0.65;
}

.e54-sentinel {
	height: 1px;
}
