/*
	Custom stylesheet for rdc49.github.io.
	Plain CSS, no build step — edit this file directly.
*/

:root {
	--bg: #14171a;
	--bg-alt: #1b1f22;
	--fg: #f5f5f6;
	--fg-muted: rgba(245, 245, 246, 0.65);
	--accent: #e8734a;
	--accent-light: #ee9677;
	--border: rgba(255, 255, 255, 0.12);
	--max-width: 1000px;
	--header-height: 4rem;
	--radius: 6px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 300;
	font-size: 1.3rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 1rem;
}

strong, b {
	font-weight: 600;
}

.pub-title {
	color: var(--accent-light);
}

h1 {
	font-size: 3.25rem;
}

h2 {
	font-size: 2.4rem;
	letter-spacing: 0.15rem;
	text-transform: uppercase;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.75rem;
	margin-bottom: 2rem;
}

h3 {
	font-size: 1.65rem;
	color: var(--fg);
}

p {
	margin: 0 0 1rem;
}

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

a:hover,
a:focus {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

ul {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

li {
	margin-bottom: 0.75rem;
}

/* Header */

#site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(20, 23, 26, 0.9);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--border);
	height: var(--header-height);
}

.header-inner {
	max-width: var(--max-width);
	height: 100%;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.site-title {
	color: var(--fg);
	font-weight: 600;
	font-size: 1.35rem;
	letter-spacing: 0.1rem;
}

.site-title:hover {
	text-decoration: none;
	color: var(--accent);
}

#site-nav {
	display: flex;
	gap: 2rem;
}

#site-nav a {
	color: var(--fg-muted);
	font-size: 1.15rem;
	letter-spacing: 0.05rem;
	text-transform: uppercase;
}

#site-nav a:hover,
#site-nav a.is-active {
	color: var(--fg);
	text-decoration: none;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.25rem;
	height: 2.25rem;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0;
}

.nav-toggle span {
	display: block;
	height: 2px;
	background: var(--fg);
	border-radius: 1px;
}

/* Main / sections */

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

.section {
	padding: 4rem 0;
	border-bottom: 1px solid var(--border);
	scroll-margin-top: var(--header-height);
}

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

.section-inner {
	width: 100%;
}

.about-layout {
	display: flex;
	gap: 2.5rem;
	align-items: center;
}

.portrait-frame {
	display: block;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
}

.portrait {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 10%;
	transform: scale(1.15);
	transform-origin: 50% 18%;
}

.subtitle {
	color: var(--fg-muted);
	margin-bottom: 1.5rem;
}

.profile-links {
	display: flex;
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.research-item {
	margin-bottom: 3rem;
}

.research-item:last-child {
	margin-bottom: 0;
}

.research-item img {
	margin-top: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--accent);
	color: #14171a;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	border-radius: var(--radius);
	margin-bottom: 1.5rem;
}

.button:hover {
	text-decoration: none;
	filter: brightness(1.1);
}

.cv-embed {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	display: block;
}

/* Footer */

#site-footer {
	text-align: center;
	padding: 2rem 1.5rem;
	color: var(--fg-muted);
	font-size: 0.9rem;
}

#site-footer p {
	margin: 0;
}

/* Responsive */

@media (max-width: 700px) {
	.nav-toggle {
		display: flex;
	}

	#site-nav {
		display: none;
		position: absolute;
		top: var(--header-height);
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		background: var(--bg-alt);
		border-bottom: 1px solid var(--border);
	}

	#site-nav.is-open {
		display: flex;
	}

	#site-nav a {
		padding: 1rem 1.5rem;
		border-top: 1px solid var(--border);
	}

	.about-layout {
		flex-direction: column;
		text-align: center;
	}

	.portrait-frame {
		width: 160px;
		height: 160px;
		margin: 0 auto;
	}

	h1 {
		font-size: 2.4rem;
	}

	.cv-embed {
		height: 500px;
	}
}
