.tui-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	padding: 0.5rem 0;
	width: 100%;
}

.tui-card-grid.inline {
	display: inline-flex;
	flex-wrap: wrap;
	width: auto;
	gap: 0.5rem;
	vertical-align: top;
	padding: 0;
	margin: 0 0.5rem 0 0;
}

.tui-card {
	background: var(--terminal-bg);
	border: 1px solid var(--terminal-border);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: all 0.2s ease;
	font-family: 'JetBrains Mono', monospace;
}

.tui-card:hover {
	border-color: var(--terminal-primary);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tui-card.featured {
	border-color: var(--terminal-accent);
}

.card-image {
	position: relative;
	width: 100%;
	height: 140px;
	overflow: hidden;
	background: var(--terminal-bg-light);
}

.card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.tui-card:hover .card-image img {
	transform: scale(1.05);
}

.card-header-badge {
	padding: 0.5rem 0.75rem 0;
}

.featured-badge {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	background: rgba(0, 0, 0, 0.75);
	color: var(--terminal-accent);
	padding: 0.15rem 0.4rem;
	border-radius: 3px;
	font-size: 0.65rem;
	font-weight: 600;
	backdrop-filter: blur(4px);
}

.card-header-badge .featured-badge {
	position: static;
	display: inline-block;
}

.card-body {
	padding: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1;
}

.card-title {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--terminal-text);
	line-height: 1.3;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.7rem;
	color: var(--terminal-primary);
}

.meta-icon {
	font-size: 0.75rem;
}

.hackathon-name {
	font-weight: 500;
}

.year {
	color: var(--terminal-muted);
}

.card-location {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.65rem;
	color: var(--terminal-muted);
}

.awards {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin: 0.25rem 0;
}

.award {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.7rem;
}

.award-icon {
	font-size: 0.75rem;
}

.award-text {
	color: #a6e3a1;
	font-weight: 500;
}

.card-desc {
	margin: 0;
	font-size: 0.7rem;
	color: var(--terminal-muted);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: auto;
}

.tag {
	background: color-mix(in srgb, var(--terminal-primary) 15%, transparent);
	color: var(--terminal-primary);
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
	font-size: 0.55rem;
	font-weight: 500;
	text-transform: lowercase;
}

.tui-card-grid .warning {
	font-size: 0.6rem;
	color: #f9e2af;
	padding: 0.2rem 0.35rem;
	background: rgba(249, 226, 175, 0.1);
	border-radius: 3px;
	width: fit-content;
}

.card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--terminal-border);
}

.action-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
	background: transparent;
	border: 1px solid var(--terminal-border);
	border-radius: 4px;
	color: var(--terminal-text);
	font-size: 0.65rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.15s ease;
	font-family: inherit;
}

.action-btn:hover {
	background: var(--terminal-primary);
	border-color: var(--terminal-primary);
	color: var(--terminal-bg);
}

.action-btn.primary {
	background: var(--terminal-primary);
	border-color: var(--terminal-primary);
	color: var(--terminal-bg);
}

.action-btn.primary:hover {
	background: var(--terminal-accent);
	border-color: var(--terminal-accent);
}

@media (max-width: 600px) {
	.tui-card-grid {
		grid-template-columns: 1fr;
	}
}