/* =============================================================================
   PROJECTS PAGE
   ============================================================================= */

.projects-page {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	padding: 0 0 4em;
	max-width: 720px;
	margin: 0 auto;
	box-sizing: border-box;
}

/* --- Intro: page title + editor content --- */

.projects-intro {
	/* max-width: 640px; */
	margin: 2.5em auto 3em;
}

.projects-page-title {
	font-size: clamp(26px, 5vw, 38px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 0.5em;
}

.projects-page-content p {
	font-size: 18px;
	line-height: 1.6;
	color: #333;
	border: 0;
	margin: 0 0 1em;
	padding: 0;
}

/* --- Section group --- */

.projects-group {
	margin-bottom: 3.5em;
}

.projects-group-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #888;
	margin: 0 0 1.25em;
	border-bottom: 1px solid #e8e8e8;
	padding-bottom: 0.75em;
}

/* --- Grid: 3 per row, 2 on mid, 1 on mobile --- */

.projects-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5em;
}

/* --- Card --- */

.project-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease;
}

.project-card:hover {
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

.project-card--inactive {
	/* opacity: 0.5; */
}

/* --- Card image --- */

.project-card-image {
	height: 160px;
	background-color: #f0f0f0;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

/* --- Card body --- */

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

.project-card-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	flex-wrap: wrap;
}

.project-card-title a {
	color: #000;
	text-decoration: none;
}

.project-card-title a:hover {
	text-decoration: underline;
}

.project-inactive-label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #aaa;
	border: 1px solid #ddd;
	border-radius: 100px;
	padding: 0.1em 0.5em;
	flex-shrink: 0;
}

.project-card-description {
	font-size: 13px;
	line-height: 1.5;
	color: black;
	overflow: hidden;
}

/* Featured cards show ~5 lines, others ~3 lines */
.projects-grid--featured .project-card-description {
	max-height: 7.5em;
}

.projects-grid--other .project-card-description {
	max-height: 4.5em;
}

.project-card-description p {
	margin: 0 0 0.4em;
	border: 0;
	font-size: inherit;
	color: inherit;
	line-height: inherit;
	padding: 0;
}

.project-card-description p:last-child {
	margin-bottom: 0;
}

.project-card-description p:empty {
	display: none;
}

/* --- Card footer: related + tags --- */

.project-card-footer {
	margin-top: auto;
	padding-top: 0.75em;
	border-top: 1px solid #f0f0f0;
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}

.project-card-related {
	font-size: 12px;
}

.project-card-related a {
	color: #555;
	text-decoration: none;
}

.project-card-related a:hover {
	text-decoration: underline;
}

.project-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em;
}

.project-tag {
	display: inline-block;
	padding: 0.15em 0.55em;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: #f0f0f0;
	color: #666;
	line-height: 1.6;
}

/* --- Responsive --- */

@media (max-width: 800px) {
	.projects-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1em;
	}
}

@media (max-width: 480px) {
	/* .projects-page {
		padding: 0 1em 2.5em;
	} */

	.projects-grid {
		grid-template-columns: 1fr;
	}
}
