/* ── Reset & tokens ──────────────────────────────────────────── */
:root {
	--bg:        #0d1117;
	--surface:   #161b22;
	--border:    #30363d;
	--accent:    #58a6ff;
	--accent2:   #3fb950;
	--text:      #e6edf3;
	--muted:     #8b949e;
	--radius:    10px;
	--font:      'Inter', system-ui, -apple-system, sans-serif;
	--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.7;
	margin: 0;
	padding: 0 1rem 3rem;
}

main {
	max-width: 760px;
	margin: 0 auto;
	padding-top: 2.5rem;
}

/* ── Photo ───────────────────────────────────────────────────── */
img[center="t"] {
	display: block;
	margin: 0 auto 2rem;
	border-radius: 50%;
	width: 160px;
	height: 160px;
	object-fit: cover;
	border: 3px solid var(--border);
	box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--border);
}

/* ── Typography ──────────────────────────────────────────────── */
header h1 {
	font-size: 1.9rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text);
	margin-bottom: 0.25rem;
}

h2 {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 2.5rem 0 1rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--border);
}

p {
	color: var(--muted);
	margin-top: 0;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.15s;
}

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

strong {
	color: var(--accent2);
	font-weight: 600;
}

/* ── Publication list ────────────────────────────────────────── */
article ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

article ul li {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	padding: 1rem 1.2rem;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--muted);
	transition: border-color 0.15s, background 0.15s;
}

article ul li:hover {
	background: #1c2230;
	border-left-color: var(--text);
}

article ul li a {
	display: block;
	font-weight: 600;
	font-size: 1rem;
	color: var(--text);
	margin-bottom: 0.25rem;
}

article ul li a:hover {
	color: var(--accent);
	text-decoration: none;
}

/* ── Date + section list (homepage index) ────────────────────── */
article > ul li time {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--muted);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.1em 0.45em;
	margin-right: 0.4em;
}

/* ── Tags ────────────────────────────────────────────────────── */
.taglist {
	margin-top: 2.5rem;
	font-size: 0.85rem;
	color: var(--muted);
}

.taglist a {
	display: inline-block;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 99px;
	padding: 0.2em 0.8em;
	font-size: 0.8rem;
	color: var(--muted);
	margin: 0.2em;
	transition: border-color 0.15s, color 0.15s;
}

.taglist a:hover {
	border-color: var(--accent);
	color: var(--accent);
	text-decoration: none;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	text-align: center;
	font-size: 0.85rem;
	color: var(--muted);
}

footer a {
	color: var(--muted);
}

footer a:hover {
	color: var(--text);
}

/* ── Nav bar ─────────────────────────────────────────────────── */
nav ul {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0.75rem 0;
	margin: 0;
	list-style: none;
	border-bottom: 1px solid var(--border);
	margin-bottom: 1.5rem;
}

nav ul li {
	display: flex;
	align-items: center;
}

/* slash separator before every item except the first */
nav ul li:not(:first-child)::before {
	content: '/';
	color: var(--border);
	padding: 0 0.25rem;
	font-size: 0.95rem;
	user-select: none;
}

nav a {
	color: var(--muted);
	font-size: 0.9rem;
	padding: 0.3em 0.5em;
	border-radius: 6px;
	text-decoration: none;
	transition: color 0.15s;
}

nav a:hover,
nav a.menuactive {
	color: var(--text);
	text-decoration: none;
}

/* Julien's Blog always blue and bold, overrides everything */
nav ul li:first-child a,
nav a[href="/"] {
	color: var(--accent) !important;
	font-weight: 700;
	font-size: 0.95rem;
}

/* ── Section cards (homepage) ────────────────────────────────── */
.sections-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	margin: 2rem 0;
}

.section-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	transition: border-color 0.2s, transform 0.15s;
}

.section-card:hover {
	border-color: var(--accent);
	transform: translateY(-3px);
	text-decoration: none;
}

.section-thumb {
	height: 90px;
}

.research-thumb {
	background: linear-gradient(135deg, #1a3a5c 0%, #0d47a1 100%);
}

.projects-thumb {
	background: linear-gradient(135deg, #1a3a2a 0%, #1b5e20 100%);
}

.personal-thumb {
	background: linear-gradient(135deg, #3a1a3a 0%, #6a1b9a 100%);
}

.section-label {
	padding: 0.75rem 1rem;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}

@media (max-width: 500px) {
	.sections-grid { grid-template-columns: 1fr; }
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }