/* ============================================
   futureplease.com — Gattaca-Inspired Design System
   Deep navy + warm gold/amber + cream text
   ============================================ */

/* --- Fonts (Google Fonts) --- */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
	/* Backgrounds — deep navy (Gattaca's "blue" = the engineered future) */
	--bg-primary: #0a1220;
	--bg-secondary: #0f1a2e;
	--bg-tertiary: #162036;

	/* Text — warm cream */
	--text-primary: #ede8d0;
	--text-secondary: #9a9485;
	--text-muted: #6b6560;

	/* Accent — amber/gold (Gattaca's "yellow" = humanity, aspiration) */
	--accent: #c9a84c;
	--accent-dim: rgba(201, 168, 76, 0.2);
	--accent-hover: #d4b85c;

	/* Secondary — muted teal (Gattaca's "green" = transition) */
	--accent-secondary: #4a7c72;

	/* Functional */
	--border-subtle: rgba(201, 168, 76, 0.08);
	--border-visible: rgba(201, 168, 76, 0.15);
	--code-bg: #0c1625;
	--code-border: rgba(201, 168, 76, 0.12);
	--header-bg: rgba(10, 18, 32, 0.85);

	/* Layout */
	--content-width: 680px;
	--wide-width: 960px;
}

/* --- Light Mode --- */
[data-theme="light"] {
	--bg-primary: #f5f2ea;
	--bg-secondary: #ebe7dd;
	--bg-tertiary: #e0dbd0;
	--text-primary: #1a1a1a;
	--text-secondary: #4a4540;
	--text-muted: #6b665e;
	--accent: #7a5f18;
	--accent-dim: rgba(122, 95, 24, 0.12);
	--accent-hover: #936e10;
	--accent-secondary: #3a6a60;
	--border-subtle: rgba(122, 95, 24, 0.1);
	--border-visible: rgba(122, 95, 24, 0.2);
	--code-bg: #ede9df;
	--code-border: rgba(122, 95, 24, 0.18);
	--header-bg: rgba(245, 242, 234, 0.85);
}

[data-theme="light"] .noise-overlay {
	opacity: 0.035;
}

/* --- Reset & Base --- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 400;
	line-height: 1.7;
	color: var(--text-primary);
	background-color: var(--bg-primary);
	min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
	font-family: 'Libre Baskerville', serif;
	font-weight: 700;
	line-height: 1.2;
	color: var(--text-primary);
	letter-spacing: 0.035em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; }

.font-heading { font-family: 'Libre Baskerville', serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

.label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--text-muted);
}

/* --- Links --- */
a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--accent-hover);
}

/* --- Layout --- */
.container {
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.container-wide {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	padding: 1.25rem 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--header-bg);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-subtle);
}

.site-logo {
	font-family: 'Libre Baskerville', serif;
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--accent);
	text-decoration: none;
	letter-spacing: -0.02em;
}

.comma,
.punct {
	color: rgba(201, 168, 76, 0.3);
}

[data-theme="light"] .comma,
[data-theme="light"] .punct {
	color: rgba(0, 0, 0, 0.15);
}

.site-logo:hover {
	color: var(--accent-hover);
}

.site-nav {
	display: flex;
	gap: 2rem;
	align-items: center;
}

.site-nav a {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--text-secondary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.site-nav a:hover {
	color: var(--accent);
}

.theme-toggle {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-secondary);
	padding: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
	line-height: 1;
}

.theme-toggle:hover {
	color: var(--accent);
}

/* --- Footer --- */
.site-footer {
	margin-top: 6rem;
	padding: 2.5rem 2rem;
	border-top: 1px solid var(--border-subtle);
	text-align: center;
}

.site-footer .footer-links {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 1rem;
}

.site-footer .footer-links a {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-muted);
}

.site-footer .footer-links a:hover {
	color: var(--accent);
}

.site-footer .copyright {
	font-size: 0.75rem;
	color: var(--text-muted);
}

/* --- Homepage Hero --- */
.hero {
	padding: 10rem 0 4rem;
	text-align: left;
}

.hero-title {
	font-family: 'Libre Baskerville', serif;
	font-weight: 700;
	font-size: 3.5rem;
	color: var(--text-primary);
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin-bottom: 0.75rem;
}

.hero-tagline {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-muted);
}

/* --- Post List (Homepage + /blog) --- */
.post-list {
	list-style: none;
	padding: 0;
}

.post-list-item {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--border-subtle);
	transition: border-color 0.2s ease;
}

.post-list-item:first-child {
	border-top: 1px solid var(--border-subtle);
}

.post-list-item:hover {
	border-color: var(--border-visible);
}

.post-list-item a {
	text-decoration: none;
	display: block;
}

.post-meta {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-muted);
	margin-bottom: 0.25rem;
}

.post-title {
	font-family: 'Libre Baskerville', serif;
	font-weight: 500;
	font-size: 1.2rem;
	color: var(--text-primary);
	transition: color 0.2s ease;
	line-height: 1.3;
}

.post-list-item a:hover .post-title {
	color: var(--accent);
}

.post-description {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-top: 0.25rem;
	line-height: 1.5;
}

/* --- Section Labels --- */
.section-label {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.65rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--border-subtle);
}

/* --- Tags --- */
.tag {
	display: inline-block;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.6rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--accent);
	border: 1px solid var(--accent-dim);
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
	transition: background-color 0.2s ease;
}

.tag:hover {
	background-color: var(--accent-dim);
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.5rem;
}

/* --- Blog Post Article --- */
.post-header {
	padding: 8rem 0 2rem;
}

.post-header .post-meta {
	margin-bottom: 0.75rem;
}

.post-header h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	letter-spacing: -0.02em;
}

.reading-time {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* --- Prose (Blog Post Body) --- */
.prose {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--text-primary);
}

.prose p {
	margin-bottom: 1.5rem;
}

.prose h2 {
	font-family: 'Libre Baskerville', serif;
	font-weight: 700;
	font-size: 1.6rem;
	margin-top: 3rem;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.prose h3 {
	font-family: 'Libre Baskerville', serif;
	font-weight: 700;
	font-size: 1.25rem;
	margin-top: 2.5rem;
	margin-bottom: 0.75rem;
	color: var(--text-primary);
}

.prose a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: var(--accent-dim);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

.prose a:hover {
	text-decoration-color: var(--accent);
}

.prose strong {
	font-weight: 600;
	color: var(--text-primary);
}

.prose em {
	font-style: italic;
}

.prose ul, .prose ol {
	margin-bottom: 1.5rem;
	padding-left: 1.5rem;
}

.prose li {
	margin-bottom: 0.4rem;
}

.prose li::marker {
	color: var(--text-muted);
}

.prose blockquote {
	border-left: 3px solid var(--accent-dim);
	padding-left: 1.25rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: var(--text-secondary);
}

.prose img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 2rem 0;
}

.post-figure {
	margin: 2rem 0;
}

.post-figure img {
	margin: 0;
}

.post-figure figcaption {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.8rem;
	color: var(--text-muted);
	text-align: center;
	margin-top: 0.75rem;
}

.prose hr {
	border: none;
	border-top: 1px solid var(--border-subtle);
	margin: 2.5rem 0;
}

/* --- Code --- */
.prose code {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.85em;
	background: var(--bg-secondary);
	color: var(--accent);
	padding: 0.15em 0.4em;
	border-radius: 3px;
}

.prose pre {
	background: var(--code-bg);
	border-left: 3px solid var(--code-border);
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
	overflow-x: auto;
	font-size: 0.85rem;
	line-height: 1.6;
}

.prose pre code {
	background: none;
	color: var(--text-primary);
	padding: 0;
	font-size: inherit;
}

/* --- Post Navigation (prev/next) --- */
.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-subtle);
}

.post-nav a {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--text-secondary);
}

.post-nav a:hover {
	color: var(--accent);
}

.post-nav .nav-title {
	display: block;
	font-family: 'Libre Baskerville', serif;
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: none;
	letter-spacing: -0.01em;
	color: var(--text-primary);
	margin-top: 0.25rem;
}

/* --- About Page --- */
.about-content {
	padding-top: 8rem;
}

.about-content h1 {
	margin-bottom: 2rem;
}

.about-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 2rem;
}

.about-links a {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-secondary);
	border: 1px solid var(--border-visible);
	padding: 0.4rem 0.8rem;
	border-radius: 3px;
	transition: all 0.2s ease;
}

.about-links a:hover {
	color: var(--accent);
	border-color: var(--accent-dim);
	background: var(--accent-dim);
}

/* --- 404 --- */
.not-found {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 80vh;
	text-align: center;
}

.not-found h1 {
	font-family: 'Libre Baskerville', serif;
	font-size: 4rem;
	font-weight: 300;
	letter-spacing: 0.1em;
	color: var(--text-primary);
	margin-bottom: 1rem;
}

.not-found p {
	font-size: 0.95rem;
	color: var(--text-secondary);
	margin-bottom: 2rem;
}

/* --- Noise Overlay --- */
.noise-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
	opacity: 0.025;
	background-image: url('assets/noise.png');
	background-repeat: repeat;
}

/* --- Subtle top-of-page gold line --- */
.gold-line {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		var(--accent-dim) 20%,
		var(--accent) 50%,
		var(--accent-dim) 80%,
		transparent 100%
	);
	z-index: 100;
	opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 640px) {
	.hero-title {
		font-size: 2.25rem;
	}

	.post-header h1 {
		font-size: 1.75rem;
	}

	h1 { font-size: 1.75rem; }
	h2 { font-size: 1.35rem; }

	.site-header {
		padding: 1rem 1.25rem;
	}

	.site-nav {
		gap: 1.25rem;
	}

	.site-nav a {
		font-size: 0.65rem;
	}

	.post-nav {
		flex-direction: column;
	}
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
	background: var(--bg-tertiary);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--accent-dim);
}

/* --- Selection --- */
::selection {
	background: var(--accent-dim);
	color: var(--text-primary);
}
