/* ── GenieTrend design tokens ─────────────────────────────────────────── */

:root {
	--bg: #0E1116;
	--surface: #161B22;
	--text-primary: #E6EDF3;
	--text-muted: #8B949E;
	--accent-model-releases: #8B5CF6;
	--accent-tools-products: #22D3C7;
	--accent-funding-business: #F5A623;
	--accent-research-industry: #F0577A;
	--border: #21262D;

	--font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Page shell ───────────────────────────────────────────────────────── */

body {
	background: var(--bg);
	color: var(--text-primary);
	font-family: var(--font-body);
}

a {
	color: inherit;
}

/* GeneratePress's Customizer color settings emit their own background-color
 * rules scoped directly to these structural wrappers (site header, #page,
 * #content, etc.), attached to the parent theme's own stylesheet handle —
 * not ours — so load order between the two isn't guaranteed. Pinning the
 * dark background explicitly here, rather than relying on the plain `body`
 * rule above to cascade down, is what actually makes it stick. */

html,
body,
#page,
.site,
#content,
.site-content,
.content-area,
.site-main,
#masthead,
.site-header,
.inside-header,
.top-bar,
.grid-container {
	background-color: var(--bg) !important;
}

.site-title,
.site-title a,
.site-description,
.main-navigation,
.main-navigation a {
	color: var(--text-primary) !important;
}

.main-navigation {
	background-color: var(--bg) !important;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.gt-hero {
	margin: 40px 0 24px;
}

.gt-page-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(28px, 4vw, 40px);
	color: var(--text-primary);
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}

.gt-hero__subtext {
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--text-muted);
	max-width: 640px;
	margin: 0;
}

/* ── Filter pills ─────────────────────────────────────────────────────── */

.gt-pills {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 24px 0 32px;
}

.gt-pill {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.gt-pill:hover {
	color: var(--text-primary);
	border-color: var(--gt-accent, var(--text-muted));
}

.gt-pill.is-active {
	color: var(--bg);
	background: var(--gt-accent, var(--text-primary));
	border-color: var(--gt-accent, var(--text-primary));
}

.gt-pill:focus-visible {
	outline: 2px solid var(--gt-accent, var(--text-primary));
	outline-offset: 2px;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */

.gt-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	margin: 0 0 40px;
}

@media (min-width: 600px) {
	.gt-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1000px) {
	.gt-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1440px) {
	.gt-hero,
	.gt-pills,
	.gt-grid,
	.gt-pagination {
		max-width: 1360px;
		margin-left: auto;
		margin-right: auto;
	}

	.gt-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.gt-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--gt-accent, var(--border));
	border-radius: 8px;
	padding: 14px 16px 16px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.gt-card:hover {
	transform: translateY(-2px);
	border-color: var(--gt-accent, var(--border));
	color: inherit;
}

.gt-card:focus-visible {
	outline: 2px solid var(--gt-accent, var(--text-primary));
	outline-offset: 2px;
}

.gt-card__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.gt-card__badges {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 0;
}

.gt-badge {
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 3px 7px;
	border-radius: 4px;
	line-height: 1.4;
	white-space: nowrap;
}

.gt-badge--source {
	background: rgba(230, 237, 243, 0.08);
	color: var(--text-muted);
}

.gt-badge--category {
	background: color-mix(in srgb, var(--gt-accent, var(--text-muted)) 18%, transparent);
	color: var(--gt-accent, var(--text-muted));
}

.gt-card__time {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-muted);
	white-space: nowrap;
}

.gt-card__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.4;
	color: var(--text-primary);
	margin: 0 0 8px;
}

.gt-card__desc {
	font-family: var(--font-body);
	font-size: 13px;
	line-height: 1.55;
	color: var(--text-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
	word-break: break-word;
	/* Belt-and-suspenders cap in em (line-height is unitless): scraped
	 * descriptions occasionally carry a long unbroken token (a stray URL,
	 * version string) that without word-break would overflow one line box
	 * un-wrapped and get silently clipped by `overflow: hidden`, eating a
	 * line from the clamp budget and leaving only 2 visible lines. */
	max-height: 4.65em;
}

/* ── Pagination ───────────────────────────────────────────────────────── */

.gt-pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.gt-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 40px;
}

.gt-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 500;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.gt-pagination a.page-numbers:hover {
	color: var(--text-primary);
	border-color: var(--text-primary);
}

.gt-pagination a.page-numbers:focus-visible {
	outline: 2px solid var(--text-primary);
	outline-offset: 2px;
}

.gt-pagination .page-numbers.current {
	color: var(--bg);
	background: var(--text-primary);
	border-color: var(--text-primary);
	font-weight: 700;
}

.gt-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.gt-pagination .prev.page-numbers,
.gt-pagination .next.page-numbers {
	padding: 0 16px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

@media (max-width: 480px) {
	.gt-pagination .page-numbers {
		min-width: 44px;
		height: 44px;
	}
}

.gt-empty {
	color: var(--text-muted);
	font-size: 14px;
	padding: 60px 0;
	text-align: center;
}

/* ── Signature element: the pulsing "live" dot ───────────────────────────
 * The one animated detail in the whole design — everything else stays
 * still on purpose so this reads as a signal, not decoration. */

.gt-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gt-accent, var(--accent-tools-products));
	flex-shrink: 0;
	animation: gt-pulse 1.8s ease-in-out infinite;
}

@keyframes gt-pulse {
	0%, 100% {
		opacity: 1;
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--gt-accent, var(--accent-tools-products)) 55%, transparent);
	}
	50% {
		opacity: 0.7;
		box-shadow: 0 0 0 4px color-mix(in srgb, var(--gt-accent, var(--accent-tools-products)) 0%, transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gt-dot {
		animation: none;
	}
}
