/*
	J.S. Beckwith Lab site stylesheet
	Hand-written, dark/flat theme. Replaces the original Dimension
	(html5up.net) template CSS — see CLAUDE.md for background.
*/

/* Reset (minimal) */

*, *::before, *::after {
	box-sizing: border-box;
}

html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
	margin: 0;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

/* Tokens */

:root {
	--bg:            #14171a;
	--bg-elevated:   #1b1f22;
	--fg:            #f5f5f6;
	--fg-muted:      rgba(245, 245, 246, 0.62);
	--border:        rgba(255, 255, 255, 0.10);
	--accent:        #5ac8fa;
	--accent-fg:     #14171a;
	--radius:        8px;
	--max-width:     1100px;
	--font-sans:     'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Base */

html {
	-webkit-text-size-adjust: none;
}

body {
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-sans);
	font-weight: 300;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

h1, h2, h3 {
	font-weight: 600;
	line-height: 1.3;
}

h1 {
	font-size: 2.25rem;
	letter-spacing: 0.05rem;
}

h2 {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

p {
	margin-bottom: 1rem;
	color: var(--fg-muted);
}

a.text-link {
	color: var(--fg);
	border-bottom: 1px solid var(--border);
	transition: border-color 0.2s ease, color 0.2s ease;
}

a.text-link:hover {
	color: var(--accent);
	border-color: var(--accent);
}

/* Header / nav */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 1.5rem;
	background: rgba(20, 23, 26, 0.92);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--border);
}

.brand {
	display: block;
	flex: 0 0 auto;
}

.brand-logo {
	height: 2.25rem;
	width: auto;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.25rem;
	height: 2.25rem;
}

.nav-toggle span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--fg);
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
}

.site-nav a {
	font-size: 0.95rem;
	letter-spacing: 0.05rem;
	text-transform: uppercase;
	color: var(--fg-muted);
	padding: 0.35rem 0;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	color: var(--fg);
}

.site-nav a.is-active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

/* Main */

.site-main {
	flex: 1 0 auto;
	width: 100%;
}

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

.page-head {
	margin-bottom: 2.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.container section ul {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.page-head .lede {
	font-size: 1.1rem;
	max-width: 60ch;
}

/* Hero (index page) */

.hero {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 2rem;
	padding: 4rem 1.5rem;
}

.hero-logo {
	width: 100%;
	max-width: 460px;
}

.hero .lede {
	max-width: 50ch;
	font-size: 1.15rem;
}

.nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	width: 100%;
	max-width: 900px;
	margin-top: 1rem;
}

.nav-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1.25rem 1rem;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-card:hover,
.nav-card:focus-visible {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.nav-card .nav-card-title {
	font-weight: 600;
	letter-spacing: 0.03rem;
	color: var(--fg);
}

.nav-card .nav-card-desc {
	font-size: 0.85rem;
	color: var(--fg-muted);
}

/* Footer */

.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem;
	border-top: 1px solid var(--border);
	font-size: 0.85rem;
	color: var(--fg-muted);
}

.footer-icons {
	display: flex;
	gap: 1rem;
}

.footer-icons a {
	color: var(--fg-muted);
	transition: color 0.2s ease;
}

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

/* Team */

.person-card {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	margin-bottom: 1rem;
}

.person-photo {
	flex: 0 0 auto;
	width: 200px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.person-name {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--fg);
	margin-bottom: 0.15rem;
}

.person-title {
	font-size: 0.9rem;
	color: var(--accent);
	margin-bottom: 1rem;
}

.callout {
	margin-top: 1rem;
	padding: 1.25rem 1.5rem;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
}

.callout p:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.person-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.person-photo {
		width: 160px;
	}
}

/* Publications */

.pub-intro {
	margin-bottom: 2rem;
}

.pub-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.pub-entry {
	display: grid;
	grid-template-columns: 4rem 1fr;
	gap: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.pub-year {
	font-weight: 600;
	color: var(--fg-muted);
	letter-spacing: 0.05rem;
}

.pub-title {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--fg);
	margin-bottom: 0.35rem;
	display: inline-block;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.pub-title:hover,
.pub-title:focus-visible {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

.pub-authors {
	font-size: 0.92rem;
	color: var(--fg-muted);
	margin-bottom: 0.35rem;
}

.pub-authors strong {
	color: var(--fg);
	font-weight: 600;
}

.pub-cite {
	font-size: 0.85rem;
	font-style: italic;
	color: var(--fg-muted);
	margin-bottom: 0.6rem;
}

.pub-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.6rem;
}

.pub-badge {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04rem;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	color: var(--fg-muted);
}

.pub-badge.is-accent {
	border-color: var(--accent);
	color: var(--accent);
}

.pub-figure {
	margin-top: 0.75rem;
	max-width: 420px;
	aspect-ratio: 16 / 10;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
	background: var(--bg-elevated);
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	font-size: 0.8rem;
	color: var(--fg-muted);
}

.pub-footnote {
	margin-top: 2.5rem;
	font-size: 0.8rem;
	color: var(--fg-muted);
}

@media (max-width: 560px) {
	.pub-entry {
		grid-template-columns: 1fr;
		gap: 0.35rem;
	}
}

/* Responsive */

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

	.site-nav {
		display: none;
		flex-direction: column;
		width: 100%;
		gap: 1rem;
		position: absolute;
		top: 100%;
		left: 0;
		padding: 1.5rem;
		background: var(--bg-elevated);
		border-bottom: 1px solid var(--border);
	}

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

	.site-header {
		flex-wrap: wrap;
		position: relative;
	}

	h1 {
		font-size: 1.75rem;
	}
}
