:root {
	--bg: #ffffff;
	--text: #1b1b1b;
	--muted: #666666;
	--accent: #1f4f8f;
	--underline: rgba(31, 79, 143, 0.3);
	--rule: #dcdcdc;
	--tag-bg: #eef2f8;
	--tag-text: #2d4a73;
	--html-bg: #eeeeee;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141414;
		--text: #e6e4e0;
		--muted: #9b9b9b;
		--accent: #8fb5ec;
		--underline: rgba(143, 181, 236, 0.35);
		--rule: #353535;
		--tag-bg: #1f2733;
		--tag-text: #b4c8e6;
		--html-bg: #1a1a1a;
	}
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

html {
	background: var(--html-bg);
}

body {
	max-width: 960px;
	margin: 0 auto;
	padding: 3rem 1.5rem 2.5rem;
	background: var(--bg);
	color: var(--text);
	font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

/* Typography */
p {
	margin: 0 0 0.75em;
}

h1 {
	margin: 0 0 0.3rem;
	font-size: 2rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h2 {
	margin: 2.25rem 0 0.75rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--rule);
	font-size: 1.45rem;
	line-height: 1.3;
	scroll-margin-top: 1rem;
}

h3 {
	margin: 0.75rem 0 0.2rem;
	color: var(--muted);
	font-size: 1rem;
	font-style: italic;
	font-weight: normal;
}

sup {
	font-size: 0.7em;
	line-height: 0;
}

/* Links: subtle underline in prose, color only in lists */
a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: var(--underline);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

li a {
	text-decoration-color: transparent;
}

a:hover {
	text-decoration-color: currentColor;
}

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Lists */
ul, ol {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
}

li {
	margin-bottom: 0.25rem;
}

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

/* Header */
.intro {
	display: flex;
	align-items: center;
	gap: 1.75rem;
}

.intro p {
	margin: 0;
}

.intro h1 {
	margin-bottom: 0.35rem;
}

.portrait {
	flex-shrink: 0;
	width: 8rem;
	height: 8rem;
	border-radius: 8px;
	object-fit: cover;
}

.pronouns {
	color: var(--muted);
	font-size: 1rem;
	font-weight: normal;
	letter-spacing: 0;
}

.small {
	color: var(--muted);
}

.intro .email {
	margin-top: 0.1rem;
}

/* Footnote-style asterisk linking the name and the pronunciation note */
.note-link {
	text-decoration: none;
}

/* Land mid-screen and briefly highlight the note when jumped to */
#pronunciation {
	scroll-margin-top: 40vh;
}

#pronunciation:target {
	animation: note-flash 2s ease-out;
}

@keyframes note-flash {
	from {
		background: var(--tag-bg);
	}
	to {
		background: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	#pronunciation:target {
		animation: none;
	}
}

/* Section jump links */
.jump {
	margin-top: 1.75rem;
}

/* News */
.news {
	padding: 0;
	list-style: none;
}

.news li {
	display: grid;
	grid-template-columns: 5.25rem 1fr;
	gap: 0 0.75rem;
}

.news .date {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* Publications */
.pubs {
	padding-left: 0;
	list-style: none;
}

.pubs li {
	margin-bottom: 0.8rem;
}

.pubs .authors,
.pubs .venue,
.pubs .award {
	display: block;
}

.pubs .tag {
	display: inline-block;
	margin-right: 0.3em;
	padding: 0 0.45em;
	border-radius: 4px;
	background: var(--tag-bg);
	color: var(--tag-text);
	font-size: 0.8125rem;
	font-weight: bold;
	line-height: 1.6;
	white-space: nowrap;
	vertical-align: 0.1em;
}

.pubs .me {
	font-weight: bold;
}

.pubs .venue {
	color: var(--muted);
	font-style: italic;
}

.pubs .award {
	font-weight: bold;
}

.meta {
	margin-left: 0.35em;
	color: var(--muted);
}

/* Footer */
footer {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: 0.875rem;
}

footer p {
	margin: 0;
}

/* Phones */
@media (max-width: 34rem) {
	body {
		padding-top: 2rem;
		font-size: 1rem;
	}

	h1 {
		font-size: 1.75rem;
	}

	.intro {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.25rem;
	}

	.portrait {
		width: 7rem;
		height: 7rem;
	}

	h2 {
		font-size: 1.3rem;
	}

	.news li {
		grid-template-columns: 4.75rem 1fr;
	}
}

@media print {
	body {
		max-width: none;
		padding: 0;
	}

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

	.portrait {
		width: 6rem;
		height: 6rem;
	}
}
