/*
Theme Name: Ellie Research v3
Theme URI: https://elliedegobi.com
Author: Ellie Bastos Degobi
Description: Academic website theme for Ellie Bastos Degobi — publications with search and filters, projects, research areas, blog and resources. All home-page texts are editable in Appearance → Customize → Site content.
Version: 3.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: ellie-research
License: GPLv2 or later
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--tint: #f4f7fb;
	--ink: #0f1b2d;
	--ink-2: #334155;
	--muted: #5b6878;
	--line: #e2e8f0;
	--line-strong: #cbd5e1;
	--primary: #1d5f9e;
	--primary-hover: #164b7d;
	--primary-soft: #e8f1fa;
	--on-primary: #ffffff;
	--accent: #0f766e;
	--accent-soft: #e3f4f1;
	--warn-soft: #fff4e0;
	--warn: #8a5a00;
	--highlight: #0f1b2d;

	--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;

	--step--1: 0.875rem;
	--step-0: 1rem;
	--step-1: 1.125rem;
	--step-2: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	--step-3: clamp(1.6rem, 1.3rem + 1.2vw, 2.125rem);
	--step-4: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);

	--radius: 16px;
	--radius-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
	--shadow: 0 1px 2px rgba(15, 27, 45, 0.05), 0 10px 30px -12px rgba(15, 27, 45, 0.18);
	--container: 1160px;
	--gutter: clamp(1rem, 4vw, 2rem);
	--section: clamp(3.5rem, 7vw, 6rem);
	--header-h: 68px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b1320;
		--surface: #111b2b;
		--tint: #0e1726;
		--ink: #e7edf5;
		--ink-2: #c3cddb;
		--muted: #93a1b5;
		--line: #1f2c40;
		--line-strong: #2d3d55;
		--primary: #6cb2f0;
		--primary-hover: #94c8f6;
		--primary-soft: #14263d;
		--on-primary: #08121f;
		--accent: #5fd0c0;
		--accent-soft: #0f2c2a;
		--warn-soft: #2e2410;
		--warn: #f0c770;
		--highlight: #ffffff;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
	}
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: var(--step-0);
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3, h4 {
	font-family: var(--font-serif);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0 0 0.5em;
	text-wrap: balance;
}

p { margin: 0 0 1em; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }

:focus-visible {
	outline: 3px solid var(--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.icon { flex: none; width: 1em; height: 1em; vertical-align: -0.125em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 1rem; top: -100px;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--ink);
	color: var(--bg);
	border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--bg); }

.site-main:focus { outline: none; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   3. Layout
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(720px + 2 * var(--gutter)); }

.section { padding-block: var(--section); }
.section--flush { padding-top: 0; }
.section--tint { background: var(--tint); }

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem 2rem;
	margin-bottom: 2rem;
}
.section-head > div { max-width: 62ch; }

.section-title { font-size: var(--step-3); margin-bottom: 0.4em; }
.section-title--sm { font-size: var(--step-2); }
.section-title--spaced { margin-top: 3rem; }
.section-intro { color: var(--muted); font-size: var(--step-1); margin: 0; }

.eyebrow {
	margin: 0 0 0.75rem;
	font-size: var(--step--1);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}
.eyebrow a { color: inherit; text-decoration: none; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--areas { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* ==========================================================================
   4. Buttons & links
   ========================================================================== */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0.7rem 1.35rem;
	border: 1px solid var(--primary);
	border-radius: 999px;
	background: var(--primary);
	color: var(--on-primary);
	font: 600 var(--step-0) / 1.2 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.button:active { transform: translateY(1px); }
.button .icon { transition: transform 0.15s; }
.button:hover .icon { transform: translateX(2px); }

.button--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button--ghost:hover { background: var(--tint); color: var(--ink); border-color: var(--ink-2); }

.button--light { background: #fff; color: #0f1b2d; border-color: #fff; }
.button--light:hover { background: #e8f1fa; color: #0f1b2d; border-color: #e8f1fa; }

.button--small { min-height: 40px; padding: 0.5rem 1rem; font-size: var(--step--1); }
.button--block { width: 100%; }

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--primary);
	font: 600 var(--step-0) / 1.4 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
}
.text-link:hover { text-decoration: underline; }

.back-link {
	display: inline-block;
	margin-bottom: 1.25rem;
	color: var(--muted);
	font-size: var(--step--1);
	font-weight: 500;
	text-decoration: none;
}
.back-link:hover { color: var(--primary); }

/* Visible only to logged-in editors. */
.admin-edit {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-top: 1rem;
	padding: 0.3rem 0.7rem;
	border: 1px dashed var(--line-strong);
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
}
.admin-edit:hover { border-color: var(--primary); color: var(--primary); }
.section-head .admin-edit { margin-top: 0; }

/* ==========================================================================
   5. Header & navigation
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, box-shadow 0.2s;
}
/* Blur lives on a pseudo-element: a backdrop-filter on the header itself
   would trap the fixed mobile menu inside the header box. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(12px);
	backdrop-filter: saturate(1.6) blur(12px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--ink);
	text-decoration: none;
	min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand-mark {
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	border-radius: 10px;
	background: var(--primary);
	color: var(--on-primary);
	font: 700 0.8rem/1 var(--font-sans);
	letter-spacing: 0.04em;
}
.brand-name {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: 1.125rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-nav .menu {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav .menu a {
	display: block;
	padding: 0.5rem 0.8rem;
	border-radius: 999px;
	color: var(--ink-2);
	font-weight: 500;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}
.site-nav .menu a:hover { background: var(--tint); color: var(--ink); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a,
.site-nav a[aria-current="page"] {
	background: var(--primary-soft);
	color: var(--primary);
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: 600 0.9375rem/1 var(--font-sans);
	cursor: pointer;
}
.nav-toggle-icon { position: relative; width: 18px; height: 12px; }
.nav-toggle-icon::before,
.nav-toggle-icon::after,
.nav-toggle-icon span {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s, opacity 0.2s, top 0.2s;
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon span { top: 5px; }
.nav-toggle-icon::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 5px; transform: rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span { opacity: 0; }

.site-nav { display: flex; align-items: center; gap: 0.75rem; }

@media (max-width: 959px) {
	.nav-toggle { display: inline-flex; }
	.brand-name { font-size: 1rem; }
	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		flex-direction: column;
		align-items: stretch;
		gap: 1.25rem;
		padding: 1.25rem var(--gutter) 2rem;
		background: var(--bg);
		border-top: 1px solid var(--line);
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	}
	.site-nav { top: var(--nav-top, var(--header-h)); }
	.nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
	.site-nav .menu { flex-direction: column; gap: 0.25rem; }
	.site-nav .menu a {
		padding: 0.9rem 1rem;
		border-radius: var(--radius-sm);
		font-size: 1.125rem;
	}
	.nav-cta { min-height: 52px; font-size: 1rem; }
	/* Without JS the menu stays reachable as a plain list. */
	html:not(.js) .site-nav { position: static; visibility: visible; opacity: 1; transform: none; }
	html:not(.js) .nav-toggle { display: none; }
	html:not(.js) .header-inner { flex-wrap: wrap; }
}

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
	position: relative;
	padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3rem, 7vw, 6rem);
	overflow: hidden;
	background:
		radial-gradient(60% 80% at 100% 0%, var(--primary-soft) 0%, transparent 60%),
		radial-gradient(40% 60% at 0% 100%, var(--accent-soft) 0%, transparent 70%);
}
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
}
.hero-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}
.hero-tags li {
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-2);
	font-size: 0.8125rem;
	font-weight: 500;
}
.hero-title { font-size: var(--step-4); margin-bottom: 0.4em; }
.hero-intro {
	max-width: 56ch;
	color: var(--ink-2);
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.65;
	margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-figure { position: relative; margin: 0; justify-self: end; width: 100%; max-width: 400px; }
.hero-figure img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 28px;
	box-shadow: var(--shadow);
}
.hero-badge {
	position: absolute;
	left: -1.5rem;
	bottom: 1.5rem;
	display: grid;
	gap: 0.15rem;
	max-width: 85%;
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: var(--shadow);
	font-size: var(--step--1);
}
.hero-badge span { color: var(--muted); }

@media (max-width: 799px) {
	.hero-grid { grid-template-columns: 1fr; }
	/* Mobile: compact photo above the name so the intro stays above the fold. */
	.hero-figure { order: -1; justify-self: start; display: flex; align-items: center; gap: 1rem; max-width: none; }
	.hero-figure img { width: 88px; height: 88px; aspect-ratio: 1; border-radius: 50%; box-shadow: none; border: 3px solid var(--surface); outline: 1px solid var(--line); }
	.hero-badge { position: static; max-width: none; padding: 0; border: 0; background: none; box-shadow: none; }
	.hero-actions .button { flex: 1 1 100%; }
}

/* ==========================================================================
   7. Profile & stats
   ========================================================================== */
.profile-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}
.stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
}
.stat {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}
.stat dd {
	margin: 0 0 0.25rem;
	font-family: var(--font-serif);
	font-size: var(--step-3);
	font-weight: 700;
	line-height: 1.1;
	color: var(--primary);
}
.stat dt { color: var(--muted); font-size: var(--step--1); font-weight: 500; }
@media (max-width: 799px) {
	.profile-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   8. Cards
   ========================================================================== */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.card--link { cursor: pointer; }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card--link:focus-within { border-color: var(--primary); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 0.6rem; padding: clamp(1.25rem, 2.5vw, 1.6rem); }
.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
	color: var(--muted);
	font-size: 0.8125rem;
}
.card-cat { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; }
.card-title { margin: 0; font-size: var(--step-2); }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--primary); }
.card-text { margin: 0; color: var(--ink-2); }
.card-more {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: auto;
	padding-top: 0.5rem;
	color: var(--primary);
	font-weight: 600;
	font-size: 0.9375rem;
}
.card--link:hover .card-more .icon { transform: translateX(3px); }
.card-more .icon { transition: transform 0.15s; }
.card-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid var(--line);
}
.card-footer .card-more { margin: 0; padding: 0; }
.card-counts { color: var(--muted); font-size: 0.8125rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: auto; padding-top: 0.5rem; }

.card--area .card-title { font-size: 1.3rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.tags li {
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--tint);
	color: var(--ink-2);
	font-size: 0.75rem;
	font-weight: 500;
}
.tags a { color: inherit; text-decoration: none; }
.tags--spaced { margin-block: 2rem; }

.status {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: var(--tint);
	color: var(--ink-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--ongoing { background: var(--accent-soft); color: var(--accent); }
.status--planned { background: var(--warn-soft); color: var(--warn); }

/* ==========================================================================
   9. Publications
   ========================================================================== */
.pub-tools {
	position: sticky;
	top: var(--header-h);
	z-index: 5;
	display: grid;
	gap: 0.75rem;
	margin: 0 calc(-1 * var(--gutter)) 1rem;
	padding: 1rem var(--gutter);
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.admin-bar .pub-tools { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) { .pub-tools { position: static; } }

.pub-search {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 520px;
}
.pub-search .icon { position: absolute; left: 1rem; color: var(--muted); pointer-events: none; }
.pub-search input[type="search"] {
	width: 100%;
	min-height: 48px;
	padding: 0.65rem 1rem 0.65rem 2.75rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font: 400 1rem/1.4 var(--font-sans); /* 16px avoids iOS zoom */
}
.pub-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 40px;
	padding: 0.4rem 0.95rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink-2);
	font: 500 0.875rem/1 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.filter-chip span { color: var(--muted); font-size: 0.75rem; }
.filter-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-chip.is-active span { color: inherit; opacity: 0.75; }
[data-card-filter] > .filter-chips { margin-bottom: 1.5rem; }

.pub-count { margin: 0; color: var(--muted); font-size: var(--step--1); min-height: 1.25em; }
.pub-count:empty { display: none; }

.pub-year-group {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr);
	gap: 1.5rem;
	padding-block: 1.75rem;
	border-top: 1px solid var(--line);
}
.pub-year-group:first-of-type { border-top: 0; }
.pub-year-heading {
	position: sticky;
	top: calc(var(--header-h) + 140px);
	align-self: start;
	margin: 0;
	font-size: var(--step-3);
	color: var(--muted);
}
.pub-year-items { display: grid; gap: 1.75rem; }

.pub-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.badge {
	padding: 0.15rem 0.55rem;
	border-radius: 6px;
	background: var(--primary-soft);
	color: var(--primary);
	font-size: 0.75rem;
	font-weight: 600;
}
.badge--accent { background: var(--warn-soft); color: var(--warn); }

.pub-title { margin: 0 0 0.35rem; font-size: 1.1875rem; line-height: 1.35; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--primary); text-decoration: underline; }
.pub-authors { margin: 0 0 0.2rem; color: var(--ink-2); font-size: 0.9375rem; }
.pub-authors strong { color: var(--highlight); font-weight: 600; }
.pub-venue { margin: 0; color: var(--muted); font-size: 0.9375rem; font-style: italic; }

.pub-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.chip-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 36px;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink-2);
	font: 500 0.8125rem/1 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.chip-link:hover { border-color: var(--primary); color: var(--primary); }
.chip-link.is-copied, .button.is-copied { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.pub-list--compact { display: grid; border-top: 1px solid var(--line); }
.pub--compact {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 1rem;
	padding-block: 1.25rem;
	border-bottom: 1px solid var(--line);
}
.pub--compact .pub-year { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
.pub--compact .pub-title { font-size: 1.0625rem; }

@media (max-width: 699px) {
	.pub-year-group { grid-template-columns: 1fr; gap: 1rem; }
	.pub-year-heading { position: static; font-size: var(--step-2); }
	.pub--compact { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ==========================================================================
   10. Page headers & articles
   ========================================================================== */
.page-header { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.page-title { font-size: var(--step-4); margin-bottom: 0.35em; }
.page-title--sm { font-size: var(--step-3); }
.page-intro { max-width: 65ch; color: var(--ink-2); font-size: var(--step-1); }
.page-intro p:last-child { margin-bottom: 0; }
.page-intro--inline { margin-bottom: 1.5rem; color: var(--muted); font-size: var(--step-0); }

.article-header { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.article-lead { color: var(--ink-2); font-size: var(--step-2); line-height: 1.5; font-family: var(--font-serif); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: var(--muted); font-size: var(--step--1); }
.article-cover { margin: 0 auto 2.5rem; }
.article-cover img { width: 100%; border-radius: var(--radius); }
.article-cover--inline { padding: 0; margin-bottom: 2rem; }

.prose { max-width: 70ch; font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.prose--lead { font-size: var(--step-1); }
.prose--wide { max-width: 80ch; }
.prose--spaced { margin-top: 3rem; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > p + p { margin-top: 1em; }
.prose h2 { font-size: var(--step-3); margin-top: 2em; color: var(--ink); }
.prose h3 { font-size: var(--step-2); margin-top: 1.75em; color: var(--ink); }
.prose h4 { font-size: var(--step-1); margin-top: 1.5em; font-family: var(--font-sans); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose strong { color: var(--ink); }
.prose blockquote {
	margin-inline: 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 3px solid var(--primary);
	font-family: var(--font-serif);
	font-size: var(--step-1);
	color: var(--ink);
}
.prose figure { margin-inline: 0; }
.prose figcaption { color: var(--muted); font-size: var(--step--1); margin-top: 0.5em; }
.prose img { border-radius: var(--radius-sm); }
.prose code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--tint); font-size: 0.9em; }
.prose pre { overflow-x: auto; padding: 1rem; border-radius: var(--radius-sm); background: var(--tint); font-size: 0.875rem; }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.prose .wp-block-button__link { border-radius: 999px; background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600; }
.prose .wp-block-buttons { gap: 0.75rem; }
.prose .wp-block-separator { border-top: 1px solid var(--line); }

.author-box {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 3rem;
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--tint);
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-box p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.author-box .author-box-name { color: var(--ink); font-weight: 600; font-size: var(--step-0); }

.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin-block: 2rem 4rem; }
.post-nav-link {
	display: grid;
	gap: 0.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}
.post-nav-link span { color: var(--muted); font-size: var(--step--1); font-weight: 500; }
.post-nav-link:hover { border-color: var(--primary); color: var(--primary); }
.post-nav-link--next { text-align: right; }

/* Project page */
.project-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
	padding-bottom: var(--section);
}
.details-card {
	position: sticky;
	top: calc(var(--header-h) + 1.5rem);
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--tint);
}
.details-card dl { display: grid; gap: 1rem; margin: 0 0 1.25rem; }
.details-card dt { color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.details-card dd { margin: 0.2rem 0 0; color: var(--ink); }
@media (max-width: 899px) {
	.project-grid { grid-template-columns: 1fr; }
	.details-card { position: static; order: -1; }
}

/* About page */
.about-grid {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
	padding-bottom: var(--section);
}
.profile-card {
	position: sticky;
	top: calc(var(--header-h) + 1.5rem);
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}
.profile-card img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; }
.profile-card-body { padding: 1.25rem; }
.profile-card-body p { margin: 0; }
.profile-card-name { font-family: var(--font-serif); font-weight: 600; font-size: var(--step-1); color: var(--ink); }
.profile-card-role { color: var(--ink-2); }
.profile-card-aff { color: var(--muted); font-size: var(--step--1); margin-top: 0.25rem !important; }
.profile-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 1rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; font-size: var(--step--1); }
.profile-links a { color: var(--ink-2); text-decoration: none; }
.profile-links a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 799px) {
	.about-grid { grid-template-columns: 1fr; }
	.profile-card { position: static; display: grid; grid-template-columns: auto 1fr; align-items: start; }
	.profile-card img { width: 72px; height: 72px; margin: 1.25rem 0 0 1.25rem; border-radius: 50%; object-position: center 20%; }
	.profile-card-actions, .profile-links { grid-column: 1 / -1; }
}

/* Blog toolbar */
.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.blog-toolbar .pub-search { flex: 1 1 280px; max-width: 360px; }

.pagination { margin-top: 2.5rem; }
.pagination ul, .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.85rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink-2);
	text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.empty-state {
	padding: 2.5rem 1.5rem;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--muted);
	text-align: center;
}

.notfound-nav .menu { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; }
.notfound-nav a { display: inline-block; padding: 0.6rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); }

/* ==========================================================================
   11. Call to action & footer
   ========================================================================== */
.cta-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: 24px;
	background: linear-gradient(135deg, #133b63 0%, #1d5f9e 60%, #0f766e 140%);
	color: #e8f1fa;
}
.cta-band > div { max-width: 60ch; }
.cta-band h2 { color: #fff; font-size: var(--step-3); }
.cta-band p { margin: 0; color: #d3e3f3; }
.cta-band .admin-edit { color: #d3e3f3; border-color: rgba(255, 255, 255, 0.4); flex-basis: 100%; margin: 0; width: max-content; }
@media (max-width: 599px) { .cta-band .button { width: 100%; } }

.site-footer {
	padding-top: clamp(3rem, 6vw, 4.5rem);
	border-top: 1px solid var(--line);
	background: var(--tint);
	font-size: 0.9375rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.5rem;
	padding-bottom: 2.5rem;
}
.footer-about p { color: var(--muted); max-width: 42ch; margin: 0.75rem 0 0; }
.footer-email { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; font-weight: 500; }
.footer-heading { margin: 0 0 0.85rem; font: 600 0.75rem/1 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer-nav .menu, .footer-links { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a, .footer-links a { display: inline-block; padding-block: 0.3rem; color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover, .footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.25rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: var(--step--1);
}
.footer-bottom p { margin: 0; }
.back-to-top { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); text-decoration: none; }
.back-to-top:hover { color: var(--primary); }
@media (max-width: 799px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}

/* ==========================================================================
   12. WordPress core classes
   ========================================================================== */
.alignwide { max-width: 1000px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0.25em 1.5em 1em 0; }
.alignright { float: right; margin: 0.25em 0 1em 1.5em; }
.wp-caption-text { color: var(--muted); font-size: var(--step--1); }
.sticky, .bypostauthor, .gallery-caption { /* required by theme check */ }

@media print {
	.site-header, .site-footer, .cta-band, .pub-tools, .pub-actions, .admin-edit, .hero-actions { display: none !important; }
	body { color: #000; background: #fff; }
}
