/* CAP Lab — University of Aberdeen
   Consciousness, Attention & Perception lab site
   Visual refresh: warm scholarly palette, all sans-serif type (Instrument Sans + Inter) */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Design tokens ----------
   Dark is the default look; light applies via the theme toggle. */
:root {
	/* surfaces */
	--paper:      #14181b;   /* page background */
	--paper-alt:  #191e22;   /* banded sections */
	--card:       #1c2227;
	--rule:       #2d353b;
	--rule-soft:  #262d33;

	/* text */
	--ink:        #e9e5dd;
	--ink-soft:   #b0b7bd;
	--ink-faint:  #8a9298;

	/* brand */
	--deep:       #101a1d;   /* header, footer, masthead */
	--deep-dark:  #0b1315;
	--heading:    #97c3c8;   /* pale teal headings */
	--accent:     #e39068;   /* warm terracotta: links, primary pills */
	--accent-dark:#f0a884;
	--accent-soft:#2a2320;
	--on-accent:  #14181b;   /* text sitting on an accent fill */

	/* effects */
	--shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow:     0 2px 4px rgba(0, 0, 0, 0.25), 0 10px 24px -10px rgba(0, 0, 0, 0.6);
	--shadow-lift:0 4px 10px rgba(0, 0, 0, 0.3), 0 20px 40px -16px rgba(0, 0, 0, 0.7);

	--radius:     10px;
	--radius-sm:  6px;
	--container:  1120px;
	--measure:    68ch;

	--display: 'Instrument Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	interpolate-size: allow-keywords;
}

:root[data-theme="light"] {
	--paper:      #faf8f4;   /* warm off-white */
	--paper-alt:  #f3efe7;
	--card:       #ffffff;
	--rule:       #e4ded3;
	--rule-soft:  #efe9e0;

	--ink:        #1c2226;
	--ink-soft:   #58616a;
	--ink-faint:  #666e75;

	--deep:       #1b3a40;   /* teal-slate */
	--deep-dark:  #12292e;
	--heading:    #22484f;
	--accent:     #9c4a2f;   /* terracotta */
	--accent-dark:#7e3821;
	--accent-soft:#f4e7e0;
	--on-accent:  #ffffff;

	--shadow-sm:  0 1px 2px rgba(28, 34, 38, 0.05);
	--shadow:     0 2px 4px rgba(28, 34, 38, 0.04), 0 8px 20px -8px rgba(28, 34, 38, 0.14);
	--shadow-lift:0 4px 8px rgba(28, 34, 38, 0.06), 0 18px 36px -14px rgba(28, 34, 38, 0.22);
}

body {
	font-family: var(--sans);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--on-accent); }

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

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
	font-family: var(--display);
	font-weight: 600;
	line-height: 1.18;
	color: var(--heading);
	letter-spacing: -0.018em;
}

h2 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.25rem); }

h3 { font-size: 1.2rem; }

/* short rule beneath top-level section headings */
.section > .container > h2 {
	margin-bottom: 1.75rem;
	padding-bottom: 0.75rem;
	position: relative;
}
.section > .container > h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 3rem;
	height: 3px;
	border-radius: 2px;
	background: var(--accent);
}
.section > .container > h2.text-center { text-align: center; }
.section > .container > h2.text-center::after {
	left: 50%;
	transform: translateX(-50%);
}

.eyebrow {
	font-family: var(--sans);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-faint);
}

/* ---------- Links ---------- */
a.text-link,
.prose a,
.person-bio a,
.pub-abstract a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
	text-underline-offset: 3px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a.text-link:hover,
.prose a:hover,
.person-bio a:hover,
.pub-abstract a:hover {
	color: var(--heading);
	text-decoration-color: currentColor;
}

.section-intro { max-width: var(--measure); }

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 1rem; top: -3rem;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	padding: 0.6rem 1rem;
	border-radius: var(--radius-sm);
	text-decoration: none;
	z-index: 200;
	transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / nav ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--deep) 92%, transparent);
	backdrop-filter: saturate(150%) blur(10px);
	-webkit-backdrop-filter: saturate(150%) blur(10px);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand {
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: -0.01em;
	text-decoration: none;
	color: #fff;
	line-height: 1.1;
}
.brand small {
	display: block;
	font-family: var(--sans);
	font-weight: 500;
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	color: rgba(255, 255, 255, 0.6);
	text-transform: uppercase;
	margin-top: 0.3rem;
}

.header-controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.5);
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--sans);
	font-size: 0.85rem;
	font-weight: 600;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius-sm);
	color: #fff;
	padding: 0.45rem 0.75rem;
	cursor: pointer;
}

.site-nav ul {
	display: flex;
	gap: 0.15rem;
}

.site-nav a {
	display: block;
	padding: 0.5rem 0.85rem;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: var(--radius-sm);
	color: rgba(255, 255, 255, 0.78);
	transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.site-nav a.is-active {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 760px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute;
		inset: 100% 0 auto 0;
		background: var(--deep-dark);
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		padding: 0.4rem;
		display: none;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav a { padding: 0.85rem 1rem; border-radius: 0; }
	.site-nav a.is-active { box-shadow: inset 3px 0 0 var(--accent); }
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: 66vh;
	display: flex;
	align-items: flex-end;
	color: #fff;
	overflow: hidden;
	background: var(--deep-dark);
}

.hero-bg {
	position: absolute;
	inset: 0;
	background-position: center 70%; /* fallback; main.js sets a per-photo focal point */
	background-size: cover;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 0.9s ease;
}
.hero-bg.is-loaded {
	opacity: 1;
	animation: heroDrift 28s ease-out forwards;
}

@keyframes heroDrift {
	from { transform: scale(1.04); }
	to   { transform: scale(1.11); }
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg,
			rgba(14, 26, 29, 0.42) 0%,
			rgba(14, 26, 29, 0.28) 32%,
			rgba(13, 24, 27, 0.72) 78%,
			rgba(11, 20, 23, 0.94) 100%);
}

.hero-content {
	position: relative;
	max-width: var(--container);
	margin: 0 auto;
	padding: 5rem 1.5rem 2.75rem;
	width: 100%;
}

.hero-content h1 {
	font-family: var(--sans);
	font-size: clamp(2.6rem, 1.9rem + 3.4vw, 4.5rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	color: #fff;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-content h1::after {
	content: "";
	display: block;
	width: 4rem;
	height: 3px;
	margin-top: 1.1rem;
	border-radius: 2px;
	background: var(--accent);
}

.hero-sub {
	font-family: var(--sans);
	font-size: clamp(1rem, 0.92rem + 0.4vw, 1.2rem);
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0.005em;
	margin-top: 1.1rem;
	color: rgba(255, 255, 255, 0.9);
	max-width: 44ch;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.hero-credit {
	position: absolute;
	right: 1.5rem;
	bottom: 1.1rem;
	margin: 0;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.72);
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(4px);
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
}

@media (max-width: 560px) {
	.hero { min-height: 60vh; }
	.hero-content { padding-top: 3.5rem; }
	.hero-credit { position: static; display: inline-block; margin-top: 1.75rem; }
}

/* ---------- Sections ---------- */
.section {
	padding: 4.5rem 0;
	scroll-margin-top: 4.5rem;
}

.section.alt {
	background: var(--paper-alt);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}

/* ---------- Prose ---------- */
.prose {
	font-family: var(--sans);
	font-size: 1.02rem;
	font-weight: 400;
	line-height: 1.75;
	max-width: var(--measure);
	color: var(--ink);
}

.prose p + p,
.prose ul { margin-top: 1.15rem; }

.prose h3 {
	font-size: 1.32rem;
	margin-top: 2.75rem;
	margin-bottom: 0.65rem;
	color: var(--heading);
}

.prose ul { padding-left: 1.35rem; list-style: disc; }
.prose ul li::marker { color: var(--accent); }
.prose ul li + li { margin-top: 0.45rem; }

.crowding-demo {
	margin: 2rem 0;
	max-width: var(--measure);
}
.crowding-demo img {
	margin: 0 auto;
	padding: 1.75rem 1.25rem;
	background: #fff;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.crowding-demo figcaption {
	font-family: var(--sans);
	margin-top: 0.85rem;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--ink-soft);
	text-align: left;
	padding-left: 1rem;
	border-left: 2px solid var(--accent);
}

/* ---------- Opportunities ---------- */
.opportunities-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	margin-top: 1.5rem;
}

.opp-card {
	background: var(--card);
	border: 1px solid var(--rule);
	border-top: 3px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.4rem;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.opp-card:hover {
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}
.opp-card h3 {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin-bottom: 0.8rem;
}
.opp-card ul { list-style: disc; padding-left: 1.15rem; font-size: 0.95rem; }
.opp-card li::marker { color: var(--ink-faint); }
.opp-card li + li { margin-top: 0.55rem; }
.opp-card p { font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	margin-top: 1.5rem;
	max-width: 900px;
}

.contact-grid h3 {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin-bottom: 0.9rem;
}

.contact-list li {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 0.45rem 0;
	font-size: 0.95rem;
}
.contact-list svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	color: var(--heading);
}
.contact-list img { width: 18px; height: 18px; opacity: 0.75; }

address {
	font-family: var(--sans);
	font-style: normal;
	font-size: 0.98rem;
	line-height: 1.8;
	color: var(--ink-soft);
}

/* ---------- People ---------- */
.people-group + .people-group { margin-top: 3.25rem; }
.people-group h3 {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.13em;
	color: var(--accent);
	margin-bottom: 1.25rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--rule);
}

/* Portraits are supplied at 200-300px square, so tracks are capped rather than
   stretched to 1fr — a wider card would upscale the photo and look pixelated. */
.people-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(160px, 205px));
	justify-content: start;
	align-items: start;
}

.person details {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.person details:hover {
	box-shadow: var(--shadow-lift);
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--rule));
}
.person details[open] {
	box-shadow: var(--shadow);
	transform: none;
	border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
}

.person summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	display: block;
}
.person summary::-webkit-details-marker { display: none; }

/* Square to match the source photos: no crop, no upscale, no resampling blur.
   Deliberately no transform or filter here — animating either inside an
   overflow-clipped container blanks the image in some WebKit builds (Orion). */
.person summary img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
	background: var(--paper-alt);
	border-bottom: 1px solid var(--rule-soft);
}

.person-name, .person-role {
	display: block;
	padding: 0 1rem;
}
.person-name {
	font-family: var(--display);
	font-weight: 600;
	font-size: 1.1rem;
	letter-spacing: -0.015em;
	line-height: 1.25;
	color: var(--heading);
	margin-top: 0.95rem;
}
.person-role {
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin-top: 0.35rem;
}

/* expand affordance */
.person summary::after {
	content: "Read bio";
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0.9rem 1rem 1.05rem;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent);
	transition: color 0.15s ease;
}
.person details[open] summary::after { content: "Hide bio"; }
.person details:hover summary::after { color: var(--accent-dark); }

.person-bio {
	padding: 1rem 1rem 1.25rem;
	font-family: var(--sans);
	font-size: 0.92rem;
	line-height: 1.68;
	color: var(--ink-soft);
	border-top: 1px solid var(--rule-soft);
	background: color-mix(in srgb, var(--paper-alt) 45%, var(--card));
}
.person-bio p + p { margin-top: 0.7rem; }
.person-bio h5 {
	font-family: var(--sans);
	font-size: 0.78rem;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 0.04em;
	margin-bottom: 0.6rem;
	color: var(--ink-faint);
}

/* smooth inline reveal */
.person details[open] .person-bio,
.pub details[open] .pub-abstract {
	animation: revealBio 0.3s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes revealBio {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}

/* height animation where supported (progressive enhancement) */
details::details-content {
	block-size: 0;
	overflow: clip;
	transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
}
details[open]::details-content { block-size: auto; }

.undergrad-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.5rem 1.5rem;
	margin-top: 0.5rem;
}
.undergrad-list li {
	font-family: var(--sans);
	font-size: 0.97rem;
	padding: 0.45rem 0 0.45rem 1rem;
	border-left: 2px solid var(--rule);
}

/* ---------- Publications ---------- */
.pub-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }

.pub {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.pub:hover {
	border-color: color-mix(in srgb, var(--accent) 35%, var(--rule));
	box-shadow: var(--shadow);
}
.pub details[open] { border-radius: var(--radius); }

.pub summary, .pub-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.25rem;
	padding: 1rem 1.2rem;
	cursor: pointer;
	list-style: none;
}
.pub-noabstract .pub-row { cursor: default; }
.pub summary::-webkit-details-marker { display: none; }

.pub-citation {
	flex: 1 1 420px;
	font-family: var(--sans);
	font-size: 0.94rem;
	line-height: 1.6;
	color: var(--ink);
}
.pub-citation strong { font-weight: 700; color: var(--heading); }
.pub-citation em { font-style: italic; color: var(--ink-soft); }

.prereg {
	display: inline-block;
	margin-left: 0.5rem;
	font-family: var(--sans);
	font-size: 0.62rem;
	font-weight: 700;
	color: var(--accent);
	background: var(--accent-soft);
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	vertical-align: 1px;
}

.pub-links { display: flex; flex-wrap: wrap; gap: 0.4rem; flex-shrink: 0; }

.pill {
	font-family: var(--sans);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	border: 1px solid var(--accent);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}
.pill:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.pill-outline {
	background: transparent;
	color: var(--heading);
	border: 1px solid color-mix(in srgb, var(--heading) 45%, transparent);
}
.pill-outline:hover {
	background: var(--heading);
	border-color: var(--heading);
	color: var(--paper);
}

/* abstract toggle marker */
.pub summary::before {
	content: "▸";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	flex: 0 0 auto;
	order: -1;
	font-size: 0.7rem;
	border-radius: 50%;
	border: 1px solid var(--rule);
	color: var(--ink-faint);
	background: var(--paper-alt);
	transition: transform 0.2s ease, color 0.15s ease, border-color 0.15s ease;
}
.pub summary:hover::before { color: var(--accent); border-color: var(--accent); }
.pub details[open] summary::before { transform: rotate(90deg); color: var(--accent); border-color: var(--accent); }

.pub-abstract {
	padding: 1rem 1.2rem 1.25rem 3.1rem;
	font-family: var(--sans);
	font-size: 0.9rem;
	line-height: 1.72;
	max-width: 82ch;
	color: var(--ink-soft);
	border-top: 1px solid var(--rule-soft);
	background: color-mix(in srgb, var(--paper-alt) 45%, var(--card));
}

.pub-note {
	margin-top: 1.75rem;
	max-width: var(--measure);
	font-size: 0.8rem;
	line-height: 1.6;
	color: var(--ink-faint);
}
.pub-note + .pub-note { margin-top: 0.75rem; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--deep-dark);
	color: rgba(255, 255, 255, 0.6);
	padding: 2.5rem 0;
	text-align: center;
	font-size: 0.82rem;
	letter-spacing: 0.03em;
}
.site-footer a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.3);
	text-underline-offset: 3px;
}
.site-footer a:hover { text-decoration-color: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
	body { font-size: 16px; }
	.section { padding: 3rem 0; }
	.people-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 190px)); gap: 1.1rem; }
	.pub summary, .pub-row { padding: 0.9rem 1rem; }
	.pub-abstract { padding-left: 1rem; }
}

@media (max-width: 400px) {
	/* two columns rather than one full-width card, so 200px photos aren't upscaled */
	.people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
	.person-name { font-size: 1rem; }
	.person-name, .person-role, .person-bio { padding-left: 0.75rem; padding-right: 0.75rem; }
	.person summary::after { margin-left: 0.75rem; margin-right: 0.75rem; }
}

/* ---------- Print ---------- */
@media print {
	.site-header, .hero, .theme-toggle, .nav-toggle, .site-footer { display: none; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.pub, .person details, .opp-card { border: 1px solid #ccc; box-shadow: none; }
	details::details-content { block-size: auto; }
}
