/* Projects page: a responsive grid of cards; the featured card spans the full width. */
.project-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
	margin-block: 2rem;
}

.project-card {
	display: flex;
	flex-direction: column;
	transition:
		transform var(--transition-longer),
		box-shadow var(--transition-longer),
		border-color var(--transition-longer);
	box-shadow: var(--edge-highlight), var(--shadow);
	border: 1px solid var(--fg-muted-2);
	border-radius: var(--rounded-corner);
	background-color: var(--fg-muted-1);
	overflow: hidden;
}

.project-card:hover,
.project-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 0 0 1px var(--accent-color), var(--shadow-raised);
	border-color: var(--accent-color);
}

.project-card--featured {
	grid-column: 1 / -1;
}

.project-card-media {
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

/* Reset the theme's image chrome: the card already provides the frame. */
.project-card-media img {
	transition: transform var(--transition-longer);
	margin: 0;
	box-shadow: none;
	border-radius: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-card:hover .project-card-media img {
	transform: scale(1.05);
}

.project-card-initials {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--accent-color-alpha);
	color: var(--accent-color);
	font-weight: 700;
	font-size: 2.5rem;
	letter-spacing: 0.05em;
}

.project-card--featured .project-card-media {
	aspect-ratio: 2 / 1;
}

.project-card--featured .project-card-initials {
	aspect-ratio: auto;
	min-height: 5rem;
}

/* Logos are shown whole on a light tile (they ship with white backgrounds). */
.project-card-media--contain {
	background-color: white;
}

.project-card-media--contain img {
	padding: 1.5rem;
	object-fit: contain;
}

.project-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.25rem 1.25rem;
}

.project-card-body p {
	margin: 0;
}

.project-card-title {
	margin: 0;
	font-size: 1.25rem;
}

.project-card-title a {
	color: var(--fg-color);
}

.project-card-title a:hover,
.project-card-title a:focus-visible {
	color: var(--accent-color);
}

.project-card-year {
	margin-inline-start: 0.5rem;
	color: var(--fg-muted-5);
	font-weight: 400;
	font-size: var(--font-size-small);
}

.project-card-summary {
	font-weight: 600;
}

.project-card-highlights {
	margin: 0;
	padding-inline-start: 1.25rem;
}

.project-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: auto 0 0;
	padding: 0;
	padding-block-start: 0.5rem;
	list-style: none;
}

.project-card-tags li {
	margin: 0;
	border-radius: 999px;
	background-color: var(--fg-muted-2);
	padding: 0.25rem 0.625rem;
	color: var(--fg-muted-5);
	font-size: var(--font-size-small);
	line-height: 1;
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.project-card,
	.project-card-media img {
		transition: none;
	}

	.project-card:hover,
	.project-card:focus-within,
	.project-card:hover .project-card-media img {
		transform: none;
	}
}
