:root {
	--fg: #1a1a1a;
	--fg-muted: #555;
	--bg: #fafafa;
	--bg-elev: #fff;
	--border: #e5e5e5;
	--accent: #0066cc;
	--accent-soft: #e6f0fb;
}

@media (prefers-color-scheme: dark) {
	:root {
		--fg: #eaeaea;
		--fg-muted: #9a9a9a;
		--bg: #0e0e10;
		--bg-elev: #18181b;
		--border: #27272a;
		--accent: #6aa9ff;
		--accent-soft: #1a2740;
	}
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--fg);
	background: var(--bg);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

main {
	max-width: 44rem;
	margin: 0 auto;
	padding: 3rem 1.5rem 4rem;
}

/* Header */
.site-header {
	max-width: 44rem;
	margin: 0 auto;
	padding: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--border);
}

.site-header .brand {
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--fg);
	text-decoration: none;
	letter-spacing: -0.01em;
}

.site-header nav {
	display: flex;
	gap: 1.25rem;
	font-size: 0.95rem;
}

.site-header nav a {
	color: var(--fg-muted);
	text-decoration: none;
	transition: color 0.15s;
}

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

/* Footer */
.site-footer {
	max-width: 44rem;
	margin: 0 auto;
	padding: 1.5rem;
	border-top: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	color: var(--fg-muted);
	font-size: 0.85rem;
}

/* Sections */
section { margin-bottom: 2.75rem; }
section:last-child { margin-bottom: 0; }

.hero { margin-bottom: 3rem; }
.hero h1 {
	font-size: clamp(2rem, 5vw, 2.75rem);
	margin: 0 0 0.75rem;
	letter-spacing: -0.02em;
}
.lede {
	font-size: 1.125rem;
	color: var(--fg-muted);
	margin: 0;
}

h2 {
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--fg-muted);
	margin: 0 0 1rem;
	font-weight: 600;
}

p { margin: 0 0 1rem; }

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

ul { padding-left: 1.25rem; margin: 0; }
ul.links, ul.projects { list-style: none; padding: 0; }
ul.links li { margin-bottom: 0.5rem; }

/* Projects */
.project {
	padding: 1rem;
	border: 1px solid var(--border);
	border-radius: 0.5rem;
	margin-bottom: 0.75rem;
	background: var(--bg-elev);
}

.project-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.25rem;
}

.project-name {
	font-weight: 600;
	text-decoration: none;
}

.project-desc {
	color: var(--fg-muted);
	margin: 0;
	font-size: 0.95rem;
}

.status {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 600;
}

.meta {
	color: var(--fg-muted);
	font-size: 0.85rem;
	border-top: 1px solid var(--border);
	padding-top: 1.5rem;
}

/* Writing index */
ul.posts {
	list-style: none;
	padding: 0;
	margin: 0;
}

.post {
	padding: 1rem 0;
	border-bottom: 1px solid var(--border);
}

.post:last-child { border-bottom: none; }

.post-meta {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	color: var(--fg-muted);
	font-size: 0.8rem;
	margin-bottom: 0.35rem;
	font-variant-numeric: tabular-nums;
}

.post-source {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.7rem;
}

.post-title {
	font-weight: 500;
	font-size: 1.05rem;
	text-decoration: none;
	color: var(--fg);
	line-height: 1.35;
	display: inline-block;
}

.post-title:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* Videos */
ul.videos {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.video-link {
	display: block;
	text-decoration: none;
	color: var(--fg);
}

.video-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 0.5rem;
	background: var(--bg-elev);
	border: 1px solid var(--border);
}

.video-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.video-link:hover .video-thumb img { transform: scale(1.03); }

.video-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	color: #fff;
	background: rgba(0, 0, 0, 0.25);
	opacity: 0.85;
	transition: opacity 0.15s;
	pointer-events: none;
}

.video-link:hover .video-play { opacity: 1; }

.video-title {
	display: block;
	margin-top: 0.6rem;
	font-size: 0.9rem;
	line-height: 1.35;
	color: var(--fg-muted);
}

.video-link:hover .video-title { color: var(--accent); }
