/*
Theme Name:        Research Group Academic
Description:       A sober, accessible theme for an academic research group, with logo space in the header. Designed to pair with the Research Group Core plugin (People, Publications, News).
Version:           1.0.0
Requires at least: 6.0
Requires PHP:      7.4
License:           GPL-2.0-or-later
Text Domain:       rg-academic
*/

/* ---------------------------------------------------------------
   Tokens
   --------------------------------------------------------------- */

:root {
	--rg-ink: #1B1F24;
	--rg-body: #33404A;
	--rg-muted: #4A5560;
	--rg-rule: #DDE3E6;
	--rg-soft: #F2F5F5;
	--rg-accent: #0E5A62; /* overridden from Appearance › Customise */
	--rg-max: 1200px;
	--rg-measure: 72ch;
	--rg-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: #fff;
	color: var(--rg-ink);
	font-family: var(--rg-font);
	font-size: 1.0625rem;
	line-height: 1.6;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--rg-accent);
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--rg-ink);
}

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

h1,
h2,
h3,
h4 {
	color: var(--rg-ink);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h1 {
	font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
}

h2 {
	font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
}

h3 {
	font-size: 1.25rem;
}

.container {
	max-width: var(--rg-max);
	margin: 0 auto;
	padding-left: 2rem;
	padding-right: 2rem;
}

@media (max-width: 600px) {
	.container {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: #fff;
	color: var(--rg-ink);
}

/* ---------------------------------------------------------------
   Header and logo
   --------------------------------------------------------------- */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--rg-rule);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2.5rem;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--rg-ink);
	text-decoration: none;
}

.site-brand:hover {
	color: var(--rg-ink);
}

.site-brand__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-brand__logo-img {
	display: block;
	width: auto;
	max-height: 64px;
}

.site-brand__logo--placeholder {
	justify-content: center;
	width: 64px;
	height: 64px;
	border: 1.5px dashed #8A949C;
	border-radius: 4px;
	font-size: 0.75rem;
	color: var(--rg-muted);
}

.site-brand__text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.site-brand__name {
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.site-brand__tagline {
	font-size: 0.875rem;
	color: var(--rg-muted);
}

.site-nav__list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	display: inline-block;
	padding: 0.7rem 0;
	border-bottom: 2px solid transparent;
	color: var(--rg-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
}

.site-nav__list a:hover {
	border-bottom-color: var(--rg-ink);
}

.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current-menu-ancestor > a,
.site-nav__list .current_page_parent > a {
	border-bottom-color: var(--rg-accent);
}

/* ---------------------------------------------------------------
   Page layout
   --------------------------------------------------------------- */

.site-main {
	overflow-x: clip;
}

.page-body {
	padding-top: 3.5rem;
	padding-bottom: 5rem;
}

.container.page-body--narrow {
	max-width: calc(820px + 4rem);
}

.page-header {
	margin-bottom: 2.5rem;
}

.page-title {
	margin: 0;
}

.meta,
.breadcrumb {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--rg-muted);
}

.breadcrumb a {
	color: var(--rg-muted);
}

.breadcrumb a:hover {
	color: var(--rg-ink);
}

/* ---------------------------------------------------------------
   Page content (block editor output)
   --------------------------------------------------------------- */

.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > blockquote {
	max-width: var(--rg-measure);
}

.entry-content > p,
.entry-content > ul > li,
.entry-content > ol > li {
	color: var(--rg-body);
}

.entry-content h2 {
	margin-top: 3rem;
}

.entry-content blockquote {
	margin: 2rem 0;
	padding: 0 0 0 1.5rem;
	border-left: 3px solid var(--rg-rule);
	font-style: italic;
}

.entry-content figure {
	margin: 2rem 0;
}

figcaption {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: var(--rg-muted);
}

.entry-content .wp-block-button__link {
	border-radius: 4px;
	background: var(--rg-accent);
	color: #fff;
	font-weight: 600;
}

.entry-content .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--rg-ink);
	border: 1.5px solid var(--rg-ink);
}

.alignwide {
	max-width: var(--rg-max);
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Section label, e.g. above a homepage heading (Paragraph block › Advanced › class "eyebrow") */
.eyebrow {
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rg-accent) !important;
}

/* ---------------------------------------------------------------
   Post lists and pagination (fallback templates)
   --------------------------------------------------------------- */

.post-list__item {
	padding: 1.5rem 0;
	border-top: 1px solid var(--rg-rule);
}

.post-list__title {
	margin: 0.25rem 0 0.5rem;
	font-size: 1.25rem;
}

.post-list__title a {
	color: var(--rg-ink);
	text-decoration: none;
}

.post-list__title a:hover {
	color: var(--rg-accent);
	text-decoration: underline;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.5rem;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.75rem;
	border: 1px solid var(--rg-rule);
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
}

.navigation.pagination .page-numbers.current {
	background: var(--rg-ink);
	border-color: var(--rg-ink);
	color: #fff;
}

/* ---------------------------------------------------------------
   Person profile
   --------------------------------------------------------------- */

.person {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}

@media (max-width: 760px) {
	.person {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.person__aside {
		max-width: 280px;
	}
}

.person__contact {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 1.5rem 0 0;
	padding: 0;
	font-size: 0.9375rem;
	overflow-wrap: anywhere;
}

.person__contact a {
	display: inline-block;
	padding: 0.2rem 0;
	font-weight: 600;
}

.person__position {
	margin: 0.6rem 0 0;
	font-size: 1.1875rem;
	color: var(--rg-body);
}

.person__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	color: var(--rg-muted);
}

.badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border: 1px solid var(--rg-rule);
	border-radius: 999px;
	background: var(--rg-soft);
	color: var(--rg-ink);
	font-size: 0.8125rem;
	font-weight: 600;
}

.person__research {
	max-width: var(--rg-measure);
	margin: 1.75rem 0;
	padding: 1rem 1.25rem;
	border-radius: 4px;
	background: var(--rg-soft);
	color: var(--rg-body);
}

/* ---------------------------------------------------------------
   Publication and news
   --------------------------------------------------------------- */

.publication__authors {
	margin: 0.75rem 0 0;
	font-size: 1.125rem;
	color: var(--rg-body);
}

.publication__cite {
	margin: 2rem 0 0;
	padding: 1.25rem 1.5rem;
	border-radius: 4px;
	background: var(--rg-soft);
}

.publication__cite-label {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rg-muted);
}

.publication__cite p:last-child {
	margin-bottom: 0;
}

.publication__abstract {
	margin-top: 3rem;
}

.publication__abstract h2 {
	font-size: 1.25rem;
}

.news-single__image {
	margin: 0 0 2rem;
}

.news-single__image img {
	display: block;
	width: 100%;
	border-radius: 4px;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.site-footer {
	background: var(--rg-ink);
	color: #E6EBEE;
	font-size: 0.9375rem;
}

.site-footer a {
	color: #fff;
}

.site-footer a:hover {
	color: #E6EBEE;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2rem 3rem;
	padding-top: 3rem;
	padding-bottom: 2rem;
}

.site-footer__name {
	margin: 0 0 0.5rem;
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 700;
}

.site-footer__text p {
	margin: 0 0 0.35rem;
}

.site-footer__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
}

.site-footer__list a {
	display: inline-block;
	padding: 0.35rem 0;
}

.site-footer__legal {
	padding-top: 1.25rem;
	padding-bottom: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 0.8125rem;
	color: #B8C2C9;
}

.site-footer__legal p {
	margin: 0;
}
