:root {
	--bg: #0a0f1f;
	--bg-2: #0f172a;
	--card: rgba(15, 23, 42, 0.72);
	--muted: #94a3b8;
	--text: #e2e8f0;
	--accent: #38bdf8;
	--accent-2: #a855f7;
	--accent-3: #22c55e;
	--glow: 0 0 40px rgba(56, 189, 248, 0.35);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	background: radial-gradient(1200px 900px at 10% 10%, #111a3c 0%, var(--bg) 60%),
		radial-gradient(1000px 700px at 90% 10%, #1b0f2f 0%, var(--bg) 55%),
		var(--bg);
	color: var(--text);
	line-height: 1.6;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--accent);
}

.container {
	width: min(1200px, 92%);
	margin: 0 auto;
}

.container-narrow {
	width: min(800px, 92%);
	margin: 0 auto;
}

/* Header & Nav */
header {
	padding: 40px 0;
	margin-bottom: 40px;
	position: relative;
}

.home-header {
	padding: 56px 0 32px;
}

.logo {
	height: 32px;
	width: auto;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 24px;
}

.back-link:hover {
	color: var(--text);
}

/* Hero Section (Index) */
.hero {
	display: grid;
	gap: 40px;
	align-items: center;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border: 1px solid rgba(148, 163, 184, 0.4);
	border-radius: 999px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 12px;
	margin-bottom: 20px;
}

.hero h1 {
	font-size: clamp(2.5rem, 4.2vw, 4rem);
	line-height: 1.1;
	margin-bottom: 20px;
}

.hero p {
	color: var(--muted);
	font-size: 1.05rem;
	margin-bottom: 24px;
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* Buttons */
.btn {
	padding: 12px 20px;
	border-radius: 999px;
	font-weight: 600;
	border: 1px solid transparent;
	transition: all 0.2s ease;
	display: inline-block;
}

.btn-primary {
	background: linear-gradient(120deg, var(--accent), var(--accent-2));
	color: #0b1020;
	box-shadow: var(--glow);
}

.btn-secondary {
	border-color: rgba(148, 163, 184, 0.4);
	color: var(--text);
	background: rgba(15, 23, 42, 0.2);
}

.btn:hover {
	transform: translateY(-2px);
}

/* Sections */
section {
	padding: 48px 0;
}

.section-title {
	margin-bottom: 40px;
}

.section-title h2 {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	margin-bottom: 12px;
}

.section-title p {
	color: var(--muted);
	max-width: 600px;
}

/* Cards Grid */
.posts-grid {
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
	background: var(--card);
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 20px;
	overflow: hidden;
	backdrop-filter: blur(10px);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, border 0.2s ease;
	height: 100%;
}

.card:hover {
	transform: translateY(-6px);
	border-color: rgba(56, 189, 248, 0.4);
}

.card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 16px;
}

.card-meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	color: var(--muted);
	font-size: 0.85rem;
}

.chip {
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.3);
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 500;
}

.card h3 {
	font-size: 1.4rem;
	line-height: 1.3;
}

.card p {
	color: var(--muted);
	font-size: 1rem;
	margin-bottom: 16px;
}

.card-link {
	margin-top: auto;
	color: var(--accent);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.card-link:hover {
	color: var(--accent-2);
}

/* Post/Article Styles */
article {
	background: rgba(15, 23, 42, 0.3);
	border: 1px solid rgba(148, 163, 184, 0.1);
	border-radius: 24px;
	padding: 40px;
	backdrop-filter: blur(10px);
}

@media (max-width: 600px) {
	article {
		padding: 24px;
	}
}

.post-header {
	margin-bottom: 40px;
	text-align: center;
}

.post-meta {
	display: flex;
	justify-content: center;
	gap: 16px;
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Specific styling for post titles */
.post-header h1 {
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.1;
	margin-bottom: 24px;
	background: linear-gradient(120deg, var(--text), var(--muted));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.post-image {
	width: 100%;
	height: 420px;
	object-fit: cover;
	border-radius: 16px;
	margin-bottom: 40px;
	border: 1px solid rgba(148, 163, 184, 0.2);
	box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Prose (Post Content) */
.prose {
	font-size: 1.1rem;
	color: #cbd5e1;
}

.prose h2 {
	font-size: 1.8rem;
	color: var(--text);
	margin: 48px 0 24px;
}

.prose h3 {
	font-size: 1.4rem;
	color: var(--text);
	margin: 32px 0 16px;
}

.prose p {
	margin-bottom: 24px;
	line-height: 1.8;
}

.prose ul, .prose ol {
	margin-bottom: 24px;
	padding-left: 24px;
}

.prose li {
	margin-bottom: 12px;
}

.prose strong {
	color: var(--accent);
	font-weight: 600;
}

.prose blockquote {
	border-left: 4px solid var(--accent);
	padding-left: 24px;
	margin: 32px 0;
	font-style: italic;
	color: var(--muted);
	font-size: 1.2rem;
}

.prose code {
	background: rgba(15, 23, 42, 0.8);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: monospace;
	color: var(--accent);
	font-size: 0.9em;
}

/* Footer */
footer {
	padding: 60px 0;
	color: var(--muted);
	text-align: center;
	margin-top: 60px;
	border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Timeline Styles (for evol-vision-futuro.html) */
.timeline {
    position: relative;
    border-left: 2px solid rgba(56, 189, 248, 0.2);
    margin: 40px 0 40px 10px;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.timeline-year {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-content {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.4;
}

/* Audio Player Styles */
.audio-player-container {
    margin: 32px 0;
    padding: 24px;
    background: var(--card);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.audio-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

audio {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

/* Resources Section Styles */
.resource-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.3) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    max-width: 100%;
}

.resource-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.15);
}

.resource-icon {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
}

.resource-info h3 {
    color: var(--text) !important;
    font-size: 1.1rem !important; /* overrule prose h3 if needed */
    margin: 0 0 4px 0 !important;
    line-height: 1.2;
}

.resource-info p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 !important;
}

.download-icon {
    margin-left: auto;
    color: var(--accent);
    opacity: 0.8;
}

/* Floating Audio Player */
.floating-audio {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.92);
	border: 1px solid rgba(56, 189, 248, 0.25);
	border-radius: 14px;
	padding: 10px 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(8px);
}

.floating-audio audio {
	width: 260px;
	height: 36px;
}

@media (max-width: 600px) {
	.floating-audio {
		right: 16px;
		left: 16px;
		bottom: 16px;
		padding: 10px;
	}

	.floating-audio audio {
		width: 100%;
	}
}
