/*
 * Site-wide page design, following the research page (assets/css/research.css).
 * Pages wrap their content in <div class="page"> and use the components below.
 * Colors are tokens so night mode (assets/css/theme.css) only swaps the values.
 */
:root {
	--site-accent: #40a8bf;
	--site-accent-strong: #298ba1;
	--site-accent-hover: #217a8d;
	--site-ink: #17191c;
	--site-text: #424e58;
	--site-muted: #66707a;
	--site-line: #dfe5e8;
	--site-soft: #f5f8f9;
	--site-surface: #fff;
	--site-page-bg: #fff;
	--site-badge-bg: #edf9fb;
	--site-badge-line: #b9dfe7;
	--site-badge-ink: #267f94;
}

body {
	letter-spacing: normal;
}

/* Page frame ---------------------------------------------------------------- */
.page {
	color: var(--site-ink);
	font-size: 16px;
	letter-spacing: normal;
	padding-bottom: 80px;
}

.page * {
	box-sizing: border-box;
}

.page-intro {
	padding: 0 0 38px;
	border-bottom: 1px solid var(--site-line);
}

.page .eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--site-accent);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.page .eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: var(--site-accent);
}

.page-intro h1 {
	max-width: 900px;
	margin: 13px 0 14px;
	color: var(--site-ink);
	font-size: clamp(38px, 5vw, 64px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.04em;
}

.page-intro .intro-copy {
	max-width: 820px;
	margin: 0;
	color: var(--site-muted);
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.65;
}

.page-section {
	padding: 56px 0;
	border-bottom: 1px solid var(--site-line);
	scroll-margin-top: 84px;
}

.page-section:last-child {
	border-bottom: 0;
}

.page .section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 26px;
}

.page .section-heading h2 {
	margin: 0;
	color: var(--site-ink);
	font-size: clamp(26px, 2.6vw, 38px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.035em;
}

.page .section-heading p {
	margin: 7px 0 0;
	color: var(--site-muted);
	font-size: 16px;
}

.page .section-kicker {
	display: block;
	margin-bottom: 8px;
	color: var(--site-accent);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.page h3 {
	color: var(--site-ink);
	font-weight: 800;
	letter-spacing: -.02em;
}

.page p {
	line-height: 1.65;
}

.page a {
	color: var(--site-accent-strong);
}

.page a:hover,
.page a:focus {
	color: var(--site-accent-hover);
}

/* Shared pieces ------------------------------------------------------------- */
.page .badge-pill {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 4px 10px;
	border: 1px solid var(--site-badge-line);
	border-radius: 999px;
	background: var(--site-badge-bg);
	color: var(--site-badge-ink);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.page .button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--site-accent-strong);
	background: var(--site-accent-strong);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.page .button:hover,
.page .button:focus {
	background: var(--site-accent-hover);
	color: #fff;
	text-decoration: none;
}

.page .card {
	border: 1px solid var(--site-line);
	background: var(--site-surface);
}

.page .bullet-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding-left: 18px;
	color: var(--site-text);
	font-size: 16px;
	line-height: 1.55;
}

.page .bullet-list li::marker {
	color: var(--site-accent);
}

.page .bullet-list ul {
	margin: 4px 0 0;
	padding-left: 18px;
	color: var(--site-muted);
	font-size: 15px;
}

/* Home ---------------------------------------------------------------------- */
.home-page .notice-slider-container {
	width: 100%;
	max-width: none;
	margin: 0;
	--swiper-theme-color: var(--site-accent);
}

/* Same light panel behind photos as the research page videos, instead of teal bars. */
.home-page .notice-swiper .swiper-slide .notice-image-wrapper {
	height: 560px;
	background-color: var(--site-soft);
}

/* Desktop only: main.css gives the graduation photo a fixed 933px width there, which crops
   it at this height. Below 1001px the photo already fits the screen width, so leave it alone. */
@media (min-width: 1001px) {
	.home-page .notice-swiper .swiper-slide .notice-image-wrapper .graduation-notice-image {
		width: auto;
		object-fit: contain;
	}
}

.home-page .notice-swiper .swiper-pagination {
	margin-top: 10px;
}

@media (max-width: 1000px) {
	.home-page .notice-swiper .swiper-slide .notice-image-wrapper { height: auto; }
}

@media (max-width: 600px) {
	.home-page .notice-swiper .notice-slide .notice-title { font-size: 19px; line-height: 1.3; }
	.home-page .notice-swiper .notice-slide .notice-text { font-size: 12px; }
}

.home-page .about-grid {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	border: 1px solid var(--site-line);
}

.home-page .about-copy {
	padding: 30px 34px;
	color: var(--site-text);
	font-size: 16px;
}

.home-page .about-copy p {
	margin: 0 0 14px;
}

.home-page .about-copy p:last-child {
	margin-bottom: 0;
}

.home-page .recruit {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 12px;
	padding: 30px 34px;
	border-left: 1px solid var(--site-line);
	background: var(--site-soft);
}

.home-page .recruit h3 {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
}

.home-page .recruit p {
	margin: 0;
	color: var(--site-muted);
}

.home-page .topic-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.home-page .topic-grid a {
	display: flex;
	min-height: 96px;
	flex-direction: column;
	justify-content: space-between;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--site-line);
	background: var(--site-surface);
	color: var(--site-ink);
	text-decoration: none;
	position: relative;
	overflow: hidden;
	transition: transform .35s ease, border-color .35s ease, background-color .35s ease, box-shadow .35s ease;
}

/* Teal bar that grows across the top of the highlighted card. */
.home-page .topic-grid a::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 3px;
	background: var(--site-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .45s ease;
}

.home-page .topic-grid a::after {
	content: "→";
	color: var(--site-accent);
	font-weight: 800;
	transition: transform .35s ease;
}

/* Highlighted card: hovered/focused, or the one the auto-cycle is on (.is-active). */
.home-page .topic-grid a:hover,
.home-page .topic-grid a:focus-visible,
.home-page .topic-grid a.is-active {
	transform: translateY(-3px);
	border-color: var(--site-accent);
	background: var(--site-soft);
	box-shadow: 0 10px 24px rgba(30, 70, 82, .08);
	text-decoration: none;
}

.home-page .topic-grid a:hover::before,
.home-page .topic-grid a:focus-visible::before,
.home-page .topic-grid a.is-active::before {
	transform: scaleX(1);
}

.home-page .topic-grid a:hover::after,
.home-page .topic-grid a:focus-visible::after,
.home-page .topic-grid a.is-active::after {
	transform: translateX(6px);
}

@media (prefers-reduced-motion: reduce) {
	.home-page .topic-grid a,
	.home-page .topic-grid a::before,
	.home-page .topic-grid a::after { transition: none; }
}

.home-page .topic-grid .topic-label {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.home-page .news-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--site-line);
}

.home-page .news-list li {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--site-line);
	color: var(--site-text);
}

.home-page .news-list b {
	color: var(--site-ink);
}

/* People -------------------------------------------------------------------- */
.people-page .bio {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 34px;
	align-items: start;
}

.people-page .bio img {
	display: block;
	width: 100%;
	height: auto;
}

.people-page .bio-copy {
	color: var(--site-text);
	font-size: 17px;
}

.people-page .bio-copy p {
	margin: 0 0 16px;
}

.people-page .cv-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 34px 48px;
}

.people-page .cv-grid h3 {
	margin: 0 0 14px;
	font-size: 20px;
}

.people-page .member-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.people-page .member {
	display: grid;
	grid-template-columns: 132px 1fr;
	border: 1px solid var(--site-line);
	background: var(--site-surface);
}

.people-page .member img {
	display: block;
	width: 132px;
	height: 170px;
	object-fit: cover;
}

.people-page .member-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	padding: 18px 20px;
	min-width: 0;
}

.people-page .member-name {
	margin: 0;
	color: var(--site-ink);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.people-page .member-topic {
	margin: 0;
	color: var(--site-text);
	font-size: 15px;
	line-height: 1.45;
}

.people-page .member-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: auto;
	font-size: 14px;
	overflow-wrap: anywhere;
}

.people-page .member-links span {
	color: var(--site-muted);
}

.people-page .alumni-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.people-page .alumnus {
	padding: 20px 22px;
	border: 1px solid var(--site-line);
	background: var(--site-surface);
}

.people-page .alumnus dl {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 6px 12px;
	margin: 12px 0 0;
	font-size: 15px;
}

.people-page .alumnus dt {
	color: var(--site-muted);
	font-weight: 400;
}

.people-page .alumnus dd {
	margin: 0;
	color: var(--site-text);
	overflow-wrap: anywhere;
}

/* Publications -------------------------------------------------------------- */
.pubs-page .year-block {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 20px;
	padding: 22px 0;
	border-top: 1px solid var(--site-line);
}

.pubs-page .year-block:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.pubs-page .year {
	color: var(--site-accent);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.pubs-page .pub-list {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pubs-page .pub-title {
	margin: 0 0 4px;
	color: var(--site-ink);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
}

.pubs-page .pub-authors {
	margin: 0 0 2px;
	color: var(--site-text);
	font-size: 15px;
	line-height: 1.5;
}

.pubs-page .pub-authors strong {
	color: var(--site-ink);
}

.pubs-page .pub-venue {
	margin: 0;
	color: var(--site-muted);
	font-size: 15px;
	line-height: 1.5;
}

.pubs-page .pub-venue strong {
	color: var(--site-accent-strong);
}

/* Gallery ------------------------------------------------------------------- */
.gallery-page .year-tabs {
	position: sticky;
	top: 72px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 0;
	background: var(--site-page-bg);
}

.gallery-page .year-tabs a {
	padding: 7px 14px;
	border: 1px solid var(--site-line);
	color: var(--site-text);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.gallery-page .year-tabs a:hover {
	border-color: var(--site-accent);
	color: var(--site-accent-strong);
}

.gallery-page .event {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	padding: 24px 0;
	border-top: 1px solid var(--site-line);
}

.gallery-page .event:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.gallery-page .event-meta time {
	display: block;
	color: var(--site-accent);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .1em;
}

.gallery-page .event-meta h3 {
	margin: 6px 0 0;
	font-size: 18px;
	line-height: 1.35;
}

.gallery-page .event-photos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.gallery-page .event-photos img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}

/* Contact ------------------------------------------------------------------- */
.contact-page .contact-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 18px;
}

.contact-page .contact-item {
	padding: 22px 24px;
	border: 1px solid var(--site-line);
	background: var(--site-surface);
}

.contact-page .contact-item .section-kicker {
	margin-bottom: 10px;
}

.contact-page .contact-item p {
	margin: 0;
	color: var(--site-text);
	font-size: 16px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.contact-page .map {
	border: 1px solid var(--site-line);
}

.contact-page .map iframe {
	display: block;
	width: 100%;
	height: 420px;
	border: 0;
}

/* Motion -------------------------------------------------------------------- */
/* Scroll reveal: assets/js/site.js adds .is-visible as elements enter the viewport. */
/* These rules only apply before and during the reveal; afterwards (.reveal-done) each
   element's own hover styles and transitions take over again. */
html.reveal-on :is(.page-intro > *, .page-section, .research-intro > *, .research-section,
	.topic-grid > a, .member, .alumnus, .year-block, .event, .contact-item, .map, .news-list li):not(.is-visible) {
	opacity: 0;
	transform: translateY(18px);
}

html.reveal-on :is(.page-intro > *, .page-section, .research-intro > *, .research-section,
	.topic-grid > a, .member, .alumnus, .year-block, .event, .contact-item, .map, .news-list li).is-visible:not(.reveal-done) {
	transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
	transition-delay: var(--reveal-delay, 0ms);
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 991px) {
	.home-page .about-grid { grid-template-columns: 1fr; }
	.home-page .recruit { border-left: 0; border-top: 1px solid var(--site-line); }
	.home-page .topic-grid { grid-template-columns: repeat(2, 1fr); }
	/* Tablets and phones: one photo per row at its natural shape, never cropped. */
	.gallery-page .event-photos { grid-template-columns: 1fr; gap: 12px; }
	.gallery-page .event-photos img { height: auto; object-fit: initial; }
}

/* Two cards per row still fit on tablets in portrait; stack only on phones. */
@media (max-width: 680px) {
	.people-page .member-grid,
	.people-page .alumni-grid { grid-template-columns: 1fr; }
	.contact-page .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
	.page-section { padding: 42px 0; }
	.page .section-heading { flex-direction: column; align-items: flex-start; }
	.people-page .bio { grid-template-columns: 1fr; }
	.people-page .bio img { max-width: 240px; }
	.people-page .cv-grid { grid-template-columns: 1fr; }
	.pubs-page .year-block,
	.gallery-page .event { grid-template-columns: 1fr; gap: 10px; }
	.home-page .about-copy,
	.home-page .recruit { padding: 22px; }
}

@media (max-width: 480px) {
	.home-page .topic-grid { grid-template-columns: 1fr; }
	.people-page .member { grid-template-columns: 104px 1fr; }
	.people-page .member img { width: 104px; height: 136px; }
}
