/*
 * Mohan Lab (UH) theme styles.
 *
 * Built to the UH Web Style Guidelines
 * (https://www.uh.edu/marcom/guidelines-policies/web-style/):
 *   - Colors: only official UH palette values (HEX from the guide).
 *   - Type:   League Gothic for headings, Source Sans 3 for body/UI, Crimson Pro for reading text (>= 18px).
 *   - Sizes:  base 16px+, nothing smaller than 12px, touch targets >= 48px.
 *   - Contrast: every text/background pair below passes WCAG AA (verified by tools/audit.py).
 *
 * Spacing uses one scale: 8 / 16 / 24 / 32 / 48 / 64 px. Change the tokens here, not individual rules.
 */

:root {
	/* UH primary */
	--uh-red: #c8102e;
	--uh-gold: #f6be00;
	--uh-gray: #888b8d;
	--uh-white: #fff;
	/* UH secondary / tertiary */
	--uh-brick: #960c22;
	--uh-slate: #54585a;
	--uh-cream: #fff9d9;
	--uh-chocolate: #640817;
	--uh-black: #000;
	/* Tints of UH Gray on white (allowed by the guide: percentages of palette colors) */
	--tint: #f3f3f4;   /* 10% */
	--line: #dbdcdd;   /* 30% */

	--font-head: "League Gothic", Impact, "Arial Narrow", sans-serif;
	--font-body: "Source Sans 3 Variable", "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-serif: "Crimson Pro Variable", "Crimson Pro", Georgia, serif;

	--wrap: 1200px;
	--prose: 760px;
	--gutter: clamp(20px, 4vw, 40px);
	--section: clamp(48px, 7vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	overflow-x: clip;
	color: var(--uh-black);
	background: var(--uh-white);
	font-family: var(--font-body);
	font-size: 1.0625rem; /* 17px */
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--uh-red); text-underline-offset: 3px; }
a:hover { color: var(--uh-brick); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 16px; font-weight: 400; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--uh-black); outline-offset: 3px; }
::selection { color: var(--uh-white); background: var(--uh-red); }

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	padding: 12px 20px;
	color: var(--uh-white);
	background: var(--uh-black);
	font-weight: 700;
}
.skip-link:focus { top: 16px; }

.eyebrow {
	margin: 0 0 8px;
	color: var(--uh-red);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}
.eyebrow-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.eyebrow-link:hover { text-decoration: underline; color: var(--uh-brick); }

/* ================================================================ UH bar */
/* PLACEHOLDER for the official UH header (see header.php) */
.uh-bar { color: var(--uh-white); background: var(--uh-red); }
.uh-bar a { color: var(--uh-white); text-decoration: none; }
.uh-bar :focus-visible { outline-color: var(--uh-white); }
.uh-bar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.uh-wordmark {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	font-family: var(--font-head);
	font-size: 1.625rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ========================================================== Site header */
.site-header { background: var(--uh-white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding-block: 8px; }
.site-title { display: flex; flex-direction: column; color: var(--uh-black); text-decoration: none; }
.site-title:hover { color: var(--uh-black); }
.site-title__name { font-family: var(--font-head); font-size: 2.5rem; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; }
.site-title__unit { margin-top: 4px; color: var(--uh-slate); font-size: 0.875rem; font-weight: 600; }

.primary-menu { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0; padding: 0; list-style: none; }
.primary-menu a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 12px;
	color: var(--uh-black);
	font-size: 1.0625rem;
	font-weight: 600;
	text-decoration: none;
}
.primary-menu a::after {
	position: absolute;
	right: 12px;
	bottom: 6px;
	left: 12px;
	height: 3px;
	background: var(--uh-red);
	content: "";
	transform: scaleX(0);
	transition: transform 0.2s;
}
.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after,
.primary-menu .current-menu-ancestor > a::after { transform: scaleX(1); }
.primary-menu a:hover { color: var(--uh-black); }

.menu-toggle { display: none; }
@media (max-width: 920px) {
	.site-header__inner { flex-wrap: wrap; }
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 12px;
		min-width: 48px;
		min-height: 48px;
		padding: 0 16px;
		color: var(--uh-black);
		background: var(--uh-white);
		border: 2px solid var(--uh-black);
		font: inherit;
		font-weight: 700;
		cursor: pointer;
	}
	.menu-toggle__bars { display: grid; gap: 4px; }
	.menu-toggle__bars span { display: block; width: 20px; height: 3px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.primary-nav { flex-basis: 100%; }
	.js .primary-nav { display: none; }
	.js .primary-nav.is-open { display: block; }
	.primary-menu { flex-direction: column; border-top: 1px solid var(--line); }
	.primary-menu li { border-bottom: 1px solid var(--line); }
	.primary-menu a { width: 100%; min-height: 56px; }
	.primary-menu a::after { display: none; }
	.primary-menu .current-menu-item > a,
	.primary-menu .current_page_item > a { color: var(--uh-red); }
}

/* ============================================================ Page intro */
.page-intro { padding-block: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 40px); background: var(--uh-white); border-bottom: 1px solid var(--line); }
.page-intro__title {
	margin: 0 0 24px;
	font-family: var(--font-head);
	font-size: clamp(3rem, 7vw, 5rem);
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.page-intro__title::after { display: block; width: 80px; height: 6px; margin-top: 24px; background: var(--uh-red); content: ""; }
.page-intro__title--long { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.04; text-transform: none; max-width: 30ch; }
.page-intro__lead { max-width: 46rem; margin: 0; color: var(--uh-slate); font-family: var(--font-serif); font-size: 1.375rem; line-height: 1.5; }

/* ======================================================= Entry content */
.entry-content > *:not(.alignfull),
.mlab-band > * {
	width: 100%;
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.entry-content > .alignfull { max-width: none; padding-inline: 0; }
/* Lists and grids produced by shortcodes keep the full content width, even inside a band. */
.mlab-band > :is(.mlab-news, .mlab-people-grid, .mlab-intern-grid, .mlab-research, .mlab-cohort, .mlab-pubs) {
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.entry-content > :is(p, ul, ol, h2, h3, h4, blockquote, .wp-block-heading),
.mlab-band > :is(p, ul, ol, h2, h3, h4) {
	max-width: min(var(--prose), calc(100% - var(--gutter) * 2));
	margin-left: max(var(--gutter), calc((100% - var(--wrap)) / 2));
	margin-right: auto;
	padding-inline: 0;
}
.entry-content > :is(.mlab-wide, .mlab-research, .mlab-people-grid, .mlab-pubs, .mlab-news, .mlab-cohort, .mlab-split, .mlab-facts) {
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.entry-content > :first-child:not(.alignfull) { margin-top: var(--section); }
.entry-content > :last-child:not(.alignfull) { margin-bottom: var(--section); }
.entry-content > *:not(.alignfull) + h2 { margin-top: 48px; }

.entry-content h2, .mlab-band h2 {
	font-family: var(--font-head);
	margin-bottom: 24px;
	font-size: clamp(2.25rem, 4.4vw, 3.25rem);
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.entry-content h3, .mlab-band h3 { font-family: var(--font-head); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: 0.01em; }
.entry-content h4 { font-size: 1.125rem; font-weight: 700; }
.entry-content :is(ul, ol):is(:not([class]), .wp-block-list) { padding-left: 1.25em; }
.entry-content :is(ul, ol):is(:not([class]), .wp-block-list) > li { margin-bottom: 0.4em; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content td, .entry-content th { padding: 8px 12px; border: 1px solid var(--line); }

/* Reading text uses Crimson Pro at 18px+ as the UH guide encourages. */
.entry-content--prose { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.65; }
.entry-content.entry-content--prose > *:not(.alignfull) { max-width: none; padding-inline: 0; margin-inline: 0; }
.entry-content--prose h2 { margin: 40px 0 12px; font-size: clamp(1.875rem, 3vw, 2.25rem); text-transform: none; letter-spacing: 0; }
.entry-content--prose h3 { margin: 32px 0 8px; font-size: clamp(1.625rem, 2.6vw, 2rem); }
.entry-content--prose p { margin-bottom: 1.1em; }
.entry-content--prose figure, .entry-content--prose video { max-width: 100%; margin: 0 0 24px; }
.entry-content--prose img { max-width: 100%; height: auto; }

/* ================================================================ Buttons */
.button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 48px;
	padding: 0 28px;
	border: 2px solid transparent;
	border-radius: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.button--red, .wp-block-button.is-style-fill .wp-block-button__link { color: var(--uh-white); background: var(--uh-red); border-color: var(--uh-red); }
.button--red:hover, .wp-block-button.is-style-fill .wp-block-button__link:hover { color: var(--uh-white); background: var(--uh-brick); border-color: var(--uh-brick); }
.button--outline, .wp-block-button.is-style-outline .wp-block-button__link { color: var(--uh-black); background: transparent; border-color: var(--uh-black); }
.button--outline:hover, .wp-block-button.is-style-outline .wp-block-button__link:hover { color: var(--uh-white); background: var(--uh-black); }
.wp-block-button.btn-white .wp-block-button__link { color: var(--uh-black); background: var(--uh-white); border-color: var(--uh-white); }
.wp-block-button.btn-white .wp-block-button__link:hover { color: var(--uh-black); background: var(--uh-cream); border-color: var(--uh-cream); }
.wp-block-button.btn-ghost .wp-block-button__link { color: var(--uh-white); background: transparent; border-color: var(--uh-white); }
.wp-block-button.btn-ghost .wp-block-button__link:hover { color: var(--uh-black); background: var(--uh-white); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 24px 0; }
.wp-block-button { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--uh-black); font-weight: 700; }
.text-link:hover { color: var(--uh-red); }

/* ================================================================= Bands */
.mlab-band { padding-block: var(--section); }
.mlab-band--tint { background: var(--tint); }
.mlab-band--cream { background: var(--uh-cream); }
.mlab-band--brick { color: var(--uh-white); background: var(--uh-brick); }
.mlab-band--black { color: var(--uh-white); background: var(--uh-black); }
.mlab-band--slate { color: var(--uh-white); background: var(--uh-slate); }
.mlab-band--brick a:not(.wp-block-button__link),
.mlab-band--black a:not(.wp-block-button__link),
.mlab-band--slate a:not(.wp-block-button__link) { color: var(--uh-white); }
.mlab-band--brick :focus-visible,
.mlab-band--black :focus-visible,
.mlab-band--slate :focus-visible { outline-color: var(--uh-white); }
.mlab-band .eyebrow { color: var(--uh-red); }
.mlab-band--brick .eyebrow, .mlab-band--black .eyebrow { color: var(--uh-gold); }
.mlab-band--slate .eyebrow { color: var(--uh-white); }
.mlab-band--brick h2, .mlab-band--black h2, .mlab-band--slate h2 { color: var(--uh-white); }
.mlab-lead { font-family: var(--font-serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.5; }
.mlab-band--brick .mlab-lead { color: var(--uh-white); }

/* Two-column split (text + visual) */
.mlab-split { display: grid; grid-template-columns: 1fr; gap: 32px 64px; align-items: center; }
@media (min-width: 900px) { .mlab-split { grid-template-columns: 5fr 7fr; } .mlab-split--even { grid-template-columns: 1fr 1fr; } }
.mlab-split > * { min-width: 0; }
.mlab-split > .wp-block-image,
.mlab-split figure { margin: 0; }

/* Figures are shown whole: white frame, image contained, never cropped. */
.mlab-figure { margin: 0; padding: 16px; background: var(--uh-white); border: 1px solid var(--line); }
.mlab-figure img { width: 100%; max-height: 520px; object-fit: contain; }
.mlab-figure figcaption { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--uh-slate); font-size: 0.9375rem; line-height: 1.45; }
.mlab-figure figcaption strong { display: block; color: var(--uh-black); }

/* ================================================================== Hero */
.mlab-hero { position: relative; display: grid; background: var(--uh-black); }
.mlab-hero > * { grid-area: 1 / 1; margin: 0; }
.mlab-hero > .wp-block-image img {
	width: 100%;
	aspect-ratio: 1800 / 809;
	max-height: 680px;
	object-fit: cover;
	object-position: center 22%;
}
.mlab-hero__title {
	align-self: end;
	padding: 96px 0 32px;
	color: var(--uh-white);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
}
.mlab-hero__title > * { max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.mlab-hero__title .eyebrow { color: var(--uh-gold); margin-bottom: 0; }
.mlab-hero__title h1 {
	margin-block: 0;
	font-family: var(--font-head);
	font-size: clamp(3.75rem, 11vw, 8rem);
	line-height: 0.95;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
@media (max-width: 700px) {
	.mlab-hero > .wp-block-image img { aspect-ratio: 4 / 3; object-position: center 12%; }
}

/* Intro band under hero */
.mlab-intro { display: grid; grid-template-columns: 1fr; gap: 24px 64px; align-items: center; }
@media (min-width: 900px) { .mlab-intro { grid-template-columns: 7fr 5fr; } }
.mlab-intro p { margin: 0; }
.mlab-intro .wp-block-buttons { margin: 0; }

/* Study callout */
.mlab-callout { display: grid; grid-template-columns: 1fr; gap: 24px 48px; align-items: center; }
@media (min-width: 900px) { .mlab-callout { grid-template-columns: 1fr auto; } }
.mlab-callout h2 { margin-bottom: 8px; font-size: clamp(2rem, 3.4vw, 2.75rem); }
.mlab-callout p { margin: 0; }
.mlab-callout .wp-block-buttons { margin: 0; }

/* Expertise strip */
.mlab-strip { padding-block: 0; }
.mlab-strip > ul {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	margin-block: 0;
	margin-inline: auto;
	padding: 0 var(--gutter);
	width: 100%;
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	list-style: none;
}
@media (min-width: 700px) { .mlab-strip > ul { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .mlab-strip > ul { grid-template-columns: repeat(6, 1fr); } }
.mlab-strip li {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
	margin: 0;
	padding: 16px;
	border-left: 1px solid rgba(255, 255, 255, 0.28);
	font-weight: 700;
	text-align: center;
}
.mlab-strip li:last-child { border-right: 1px solid rgba(255, 255, 255, 0.28); }

/* Focus areas */
.mlab-focus { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
@media (min-width: 800px) { .mlab-focus { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.mlab-focus__item { padding-top: 24px; border-top: 4px solid var(--uh-black); }
.mlab-focus__item .eyebrow { margin-bottom: 16px; }
.mlab-focus__item h3 { margin-bottom: 12px; }
.mlab-focus__item p { margin: 0; color: var(--uh-slate); }

/* Section heading with link on the right */
.mlab-heading-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
.mlab-heading-row > * { margin: 0; }
.mlab-heading-row h2 { margin: 0; }

/* People feature */
.mlab-people-feature { display: grid; grid-template-columns: 1fr; gap: 32px 64px; align-items: center; }
@media (min-width: 900px) { .mlab-people-feature { grid-template-columns: 7fr 5fr; } }
.mlab-people-feature figure { margin: 0; }
.mlab-people-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 20%; }

/* CTA band */
.mlab-cta { display: grid; grid-template-columns: 1fr; gap: 24px 64px; align-items: center; }
@media (min-width: 900px) { .mlab-cta { grid-template-columns: 1fr 1fr; } }
.mlab-cta h2 { margin: 0 0 16px; }
.mlab-cta p { margin: 0 0 16px; }
.mlab-cta :is(h2, p):last-child { margin-bottom: 0; }

/* Facts row (e.g. internship stats) */
.mlab-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (min-width: 800px) { .mlab-facts { grid-template-columns: repeat(4, 1fr); } }
.mlab-facts > div { padding-top: 16px; border-top: 4px solid var(--uh-red); }
.mlab-facts strong { display: block; font-family: var(--font-head); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 400; line-height: 1; }
.mlab-facts span { display: block; margin-top: 4px; color: var(--uh-slate); font-weight: 600; }
.mlab-band--brick .mlab-facts span, .mlab-band--black .mlab-facts span { color: var(--uh-white); }
.mlab-band--brick .mlab-facts > div, .mlab-band--black .mlab-facts > div { border-top-color: var(--uh-gold); }

/* Card grids made from plain blocks (opportunities, program steps) */
.mlab-cards { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
@media (min-width: 760px) { .mlab-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .mlab-cards--3 { grid-template-columns: repeat(3, 1fr); } .mlab-cards--4 { grid-template-columns: repeat(4, 1fr); } }
.mlab-cards__item { padding: 24px; background: var(--uh-white); border: 1px solid var(--line); border-top: 4px solid var(--uh-red); }
.mlab-band--tint .mlab-cards__item { background: var(--uh-white); }
.mlab-cards__item .eyebrow { margin-bottom: 8px; }
.mlab-cards__item h3 { margin-bottom: 12px; font-size: 1.875rem; }
.mlab-cards__item p:last-child { margin-bottom: 0; }
.mlab-cards__item p { color: var(--uh-slate); }

/* Contact page */
.mlab-contact { display: grid; grid-template-columns: 1fr; gap: 32px 64px; }
@media (min-width: 900px) { .mlab-contact { grid-template-columns: 1fr 1fr; align-items: start; } }
.mlab-contact figure { margin: 0; }
.mlab-contact img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.mlab-contact dl { margin: 24px 0; }
.mlab-contact dt { margin-top: 16px; color: var(--uh-red); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mlab-contact dd { margin: 4px 0 0; font-size: 1.1875rem; }

/* Alumni lists */
.mlab-alumni { display: grid; grid-template-columns: 1fr; gap: 32px 48px; }
@media (min-width: 760px) { .mlab-alumni { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .mlab-alumni { grid-template-columns: repeat(3, 1fr); } }
.mlab-alumni h3 { padding-bottom: 8px; border-bottom: 4px solid var(--uh-black); }
.mlab-alumni ul { margin: 0; padding: 0; list-style: none; columns: 1; }
.mlab-alumni li { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* ================================================== Project (single) page */
.project__grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 1000px) { .project__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; } }
.project__figure { margin: 0 0 32px; padding: 16px; background: var(--uh-white); border: 1px solid var(--line); text-align: center; }
.project__figure img { display: inline-block; max-height: 560px; width: auto; max-width: 100%; object-fit: contain; }
.project__main video { display: block; width: 100%; height: auto; margin-bottom: 24px; background: var(--uh-black); }
.project__aside { padding: 24px; background: var(--tint); border-top: 4px solid var(--uh-red); }
@media (min-width: 1000px) { .project__aside { position: sticky; top: 24px; } }
.facts { margin: 0 0 24px; }
.facts__row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts__row:first-child { padding-top: 0; }
.facts dt { margin: 0 0 4px; color: var(--uh-slate); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 0; line-height: 1.45; }
.project__cta { margin: 0 0 8px; }

.news-single__grid { display: grid; grid-template-columns: 1fr; gap: 32px; max-width: calc(980px + var(--gutter) * 2); }
.news-single__figure { margin: 0; }
.news-single__figure img { width: 100%; max-height: 640px; object-fit: contain; object-position: left top; }

/* ================================================================ Footer */
.site-footer { margin-top: 0; }
.unit-footer { padding-block: 48px; color: var(--uh-white); background: var(--uh-black); }
.unit-footer a { color: var(--uh-white); }
.unit-footer :focus-visible { outline-color: var(--uh-white); }
.unit-footer__grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 640px) { .unit-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .unit-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 48px; } }
.unit-footer p, .unit-footer address { margin: 0 0 8px; font-style: normal; line-height: 1.55; }
.unit-footer__name { font-family: var(--font-head); font-size: 2.25rem; letter-spacing: 0.02em; line-height: 1; text-transform: uppercase; margin-bottom: 16px !important; }
.unit-footer__heading { margin: 0 0 16px; color: var(--uh-gold); font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.unit-footer__links { margin: 0; padding: 0; list-style: none; }
.unit-footer__links a { display: inline-flex; align-items: center; min-height: 48px; }
.unit-footer p a { display: inline-flex; align-items: center; min-height: 40px; }

.global-footer { padding-block: 32px; color: var(--uh-white); background: var(--uh-slate); font-size: 0.875rem; }
.global-footer a { color: var(--uh-white); }
.global-footer :focus-visible { outline-color: var(--uh-white); }
.global-footer__address { margin: 0 0 16px; font-size: 1rem; }
.global-footer__links { display: grid; grid-template-columns: 1fr; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .global-footer__links { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .global-footer__links { display: flex; flex-wrap: wrap; } }
.global-footer__links li { display: flex; align-items: center; min-height: 48px; margin: 0; }

/* Mobile fine-tuning */
@media (max-width: 520px) {
	.site-title__name { font-size: 2.125rem; }
	.site-title__unit { font-size: 0.8125rem; }
	.mlab-hero__title { padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Names inside list shortcodes are h2 for a correct heading outline, but keep the card look. */
.entry-content .mlab-person__name { margin: 0 0 10px; font-size: 1.75rem; line-height: 1.1; letter-spacing: 0.01em; text-transform: none; }

@media (max-width: 560px) {
	.uh-wordmark { font-size: 1.375rem; white-space: nowrap; }
}

/* Pagination */
.pagination { margin: 40px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; min-height: 48px; padding: 0 16px;
	color: var(--uh-black); background: var(--uh-white); border: 1px solid var(--uh-black);
	font-weight: 700; text-decoration: none;
}
.pagination a.page-numbers:hover { color: var(--uh-white); background: var(--uh-red); border-color: var(--uh-red); }
.pagination .page-numbers.current { color: var(--uh-white); background: var(--uh-black); }

/* Footer lines taken from the redesign copy */
.unit-footer .unit-footer__tagline { max-width: 26ch; margin-bottom: 16px; color: var(--uh-white); font-family: var(--font-serif); font-size: 1.1875rem; line-height: 1.4; }
.unit-footer__bottom { padding-block: 16px; color: var(--uh-white); background: var(--uh-black); border-top: 1px solid rgba(255, 255, 255, 0.28); font-size: 0.9375rem; }
.unit-footer__bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.unit-footer .unit-footer__eyebrow { margin-bottom: 8px; color: var(--uh-gold); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

/* Topic strip on the home page: each cell links to the matching research filter. */
.mlab-strip li { padding: 0; }
.mlab-strip li a { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 72px; padding: 16px; font-weight: 700; text-align: center; text-decoration: none; transition: background 0.2s; }
.mlab-strip li a:hover { background: rgba(255, 255, 255, 0.14); text-decoration: underline; text-underline-offset: 6px; }
