/* Academic lab-style layout (inspired by common research group home pages) */

:root {
  --text: #1f2933;
  --muted: #52606d;
  --link: #1e5a8a;
  --link-hover: #0f3d5c;
  --border: #dce3e9;
  --bg: #eef2f6;
  --card: #ffffff;
  --banner-bg: #2d3a4a;
  --banner-bg-end: #1e2835;
  --banner-text: #f8fafc;
  --nav-hover: #e8eef4;
  --accent: #c45c26;
}

/* Homepage — cooler blues + teal accent (other pages keep :root until we tune them) */
body.page-home {
  --text: #1a2332;
  --muted: #5c6b7a;
  --link: #0c648c;
  --link-hover: #094a66;
  --border: #d0dce8;
  --bg: #eef3f8;
  --card: #ffffff;
  --banner-bg: #124560;
  --banner-bg-end: #0a2a3d;
  --banner-text: #f7fafc;
  --nav-hover: #e3eef6;
  --accent: #2a9d8f;
}


body.page-home .nav-main {
  border-bottom-color: #b8c9d9;
}

body.page-home .wrap {
  border-color: #d0dce8;
  box-shadow: 0 4px 22px rgba(10, 42, 61, 0.07);
}

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

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Justified alignment for narrative body text */
.wrap main p,
.home-intro .home-intro-text,
.home-research .research-card p,
.blades-lead,
.blades-objective p,
.blades-section .blades-list li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Hero banner stays centered */
.site-banner .site-banner-inner p,
.site-banner .site-banner-text p,
.site-banner .site-banner-title {
  text-align: center;
}

.home-section-title--center {
  text-align: center;
}

/* Thin utility strip */
.top-bar {
  background: #0d2236;
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.top-bar a:hover {
  color: #fff;
  text-decoration: underline;
}

.top-bar-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.top-bar-icons {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.top-bar-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  font-size: 1.15rem;
  color: #fff !important;
  text-decoration: none !important;
  transition: opacity 0.18s, transform 0.15s;
}

.top-bar-icons a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.icon-email       { background: #ea4335; }
.icon-orcid       { background: #a6ce39; }
.icon-pubmed      { background: #2c6fad; }
.icon-scholar     { background: #4285f4; }
.icon-researchgate { background: #00ccbb; }
.icon-github      { background: #24292e; }
.icon-linkedin    { background: #0077b5; }
.icon-twitter     { background: #1a1a1a; }
.icon-youtube     { background: #ff0000; }

.top-bar-inner .sep {
  opacity: 0.45;
  user-select: none;
}

/* Hero banner (lab-style) — sits below the white nav, full width */
.site-banner {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    165deg,
    var(--banner-bg) 0%,
    var(--banner-bg-end) 100%
  );
  color: var(--banner-text);
  text-align: center;
  padding: 2.5rem 1.25rem 2.75rem;
  margin-top: 0;
  border-bottom: 3px solid var(--accent);
}

.site-banner-inner {
  max-width: 48rem;
  margin: 0 auto;
}

.site-banner-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.85);
}

.site-banner-title {
  margin: 0 0 0.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.site-banner-tagline {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.95);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.site-banner-affil {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(248, 250, 252, 0.8);
  line-height: 1.5;
}

.site-banner-affil a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-banner-affil a:hover {
  color: #fff;
}

/* Home hero: text + portrait (lab-style split) */
.site-banner-grid {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 0.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}

.site-banner-text {
  text-align: center;
}

.site-banner-photo {
  justify-self: center;
  max-width: 280px;
}

.site-banner-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Hero with portrait + text (two columns on wide screens) */
@media (min-width: 900px) {
  .site-banner-grid:not(.site-banner-grid--text-only) {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
    gap: 2.5rem;
    align-items: center;
  }

  .site-banner-grid:not(.site-banner-grid--text-only) .site-banner-text {
    text-align: left;
  }

  .site-banner-grid:not(.site-banner-grid--text-only) .site-banner-tagline {
    margin-left: 0;
    margin-right: 0;
    max-width: 38rem;
  }

  .site-banner-photo {
    justify-self: end;
    max-width: 300px;
  }
}

/* Hero text only — left aligned */
.site-banner-grid--text-only {
  grid-template-columns: 1fr;
}

.site-banner-grid--text-only .site-banner-text {
  text-align: left;
}

.site-banner-grid--text-only .site-banner-tagline {
  margin-left: 0;
  margin-right: 0;
  max-width: 42rem;
}

@media (min-width: 900px) {
  .site-banner-grid--text-only .site-banner-text {
    max-width: 44rem;
  }
}

/* Compact banner (Publications page, etc.) */
.site-banner--sub {
  padding: 1.75rem 1.25rem 2rem;
}

.site-banner--sub .site-banner-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin-bottom: 0.35rem;
}

.site-banner--sub .site-banner-tagline {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: rgba(248, 250, 252, 0.88);
}

/* Main navigation — full-width bar above the hero (does not overlap it) */
.nav-main {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.35rem 0 0.45rem;
}

.nav-links {
  margin: 0;
  padding: 0.25rem 0.5rem 0.35rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.nav-links li {
  margin: 0;
  position: relative;
}

.nav-links a {
  display: block;
  padding: 0.55rem 0.5rem;
  border-radius: 2px;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--nav-hover);
  color: var(--link);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--link);
  box-shadow: inset 0 -2px 0 var(--link);
}

/* Dropdown indicator arrow */
.nav-links .has-dropdown > a::after {
  content: " ▾";
  font-size: 0.65em;
  opacity: 0.7;
}

/* Dropdown panel */
.nav-links .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 2px solid var(--link);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  min-width: 14rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  z-index: 100;
}

/* Show on hover OR keyboard focus-within */
.nav-links .has-dropdown:hover .dropdown,
.nav-links .has-dropdown:focus-within .dropdown {
  display: block;
}

.nav-links .dropdown li {
  margin: 0;
}

.nav-links .dropdown a {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: none;
  color: #334155;
  white-space: nowrap;
  border-radius: 0;
}

.nav-links .dropdown a:hover {
  background: #f0f5fa;
  color: var(--link);
}

.nav-links .dropdown a[aria-current="page"] {
  color: var(--link);
  box-shadow: none;
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--banner-bg);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
  top: 0.5rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.wrap {
  max-width: 64rem;
  margin: 1.75rem auto 0;
  padding: 2rem 1.35rem 2.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

@media (max-width: 600px) {
  .wrap {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}

/* About page — portrait + biography */
.about-page .about-lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.about-page .about-portrait {
  margin: 0;
  justify-self: center;
}

.about-page .about-portrait-img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
}

.about-page .about-name-line {
  font-size: 1.1rem;
  margin-top: 0;
}

.about-page .about-intro p {
  margin-bottom: 0.85rem;
  line-height: 1.65;
}

.about-page h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--text);
}

/* Publications page — external source list with icons (horizontal row) */
.pub-source-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.35rem;
}

.pub-source-list li {
  margin: 0;
  padding: 0;
}

.pub-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
}

.pub-source-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.pub-source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  font-size: 1rem;
  color: #fff !important;
  flex-shrink: 0;
}

/* Selected publications list (legacy) */
.pub-selected {
  margin: 0.75rem 0 0;
  padding-left: 1.35rem;
}

.pub-selected li {
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.pub-selected li:last-child {
  margin-bottom: 0;
}

.pub-selected .pub-featured {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--muted);
}

/* ── Publication sources section ── */
.pub-sources-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Publication controls (sort / filter) ── */
.pub-controls-section {
  margin-bottom: 1.25rem;
}

.pub-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.pub-controls label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  margin-right: 0.4rem;
}

.pub-controls select {
  font-size: 0.88rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.pub-controls select:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.pub-count {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Publication list (structured numbered list) ── */
.pub-list {
  list-style: none;
  counter-reset: pub-counter;
  margin: 0;
  padding: 0;
}

.pub-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  counter-increment: pub-counter;
  position: relative;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-item::before {
  content: attr(value);
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--banner-bg);
  border-radius: 50%;
  margin-top: 0.15rem;
}

.pub-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.pub-item-text {
  flex: 1;
  min-width: 0;
}

.pub-authors {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.pub-authors strong {
  color: var(--link);
  font-weight: 700;
}

.pub-title {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
}

.pub-journal {
  font-size: 0.88rem;
  color: var(--muted);
}

.pub-journal em {
  font-style: italic;
  color: var(--text);
  font-weight: 500;
}

.pub-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  vertical-align: middle;
}

.pub-badge--preprint {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pub-type-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.25rem;
  color: var(--type-color, #475569);
  background: color-mix(in srgb, var(--type-color, #475569) 10%, #fff 90%);
  border: 1px solid color-mix(in srgb, var(--type-color, #475569) 25%, transparent 75%);
}

.pub-cite-count {
  display: none;
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
}

.pub-cite-count--loaded {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f3f4f6;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-weight: 500;
}

.pub-cite-count--loaded i {
  font-size: 0.65rem;
  color: #9ca3af;
}

.pub-sdgs {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pub-sdg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem 0.15rem 0.3rem;
  border-radius: 3px;
  color: #fff;
  background: var(--sdg-color, #475569);
  line-height: 1.3;
}

.pub-sdg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  font-size: 0.62rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Publication links row */
.pub-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
}

.pub-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}

.pub-link:hover {
  background: #e8eef4;
  border-color: var(--link);
  text-decoration: none;
}

/* Field tags */
.pub-tags {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pub-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  color: var(--tag-color, #475569);
  background: #f0f4f8;
  border: 1px solid #d0dce8;
}

@supports (background: color-mix(in srgb, red 10%, white 90%)) {
  .pub-tag {
    background: color-mix(in srgb, var(--tag-color, #475569) 10%, #fff 90%);
    border-color: color-mix(in srgb, var(--tag-color, #475569) 25%, transparent 75%);
  }
}

/* Altmetric badge column */
.pub-altmetric {
  flex-shrink: 0;
  width: 44px;
  min-height: 44px;
}

@media (max-width: 700px) {
  .pub-item-body {
    flex-direction: column;
  }
  .pub-altmetric {
    align-self: flex-start;
  }
  .pub-item::before {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.72rem;
  }
}

/* Teaching page — experience timeline */
.teaching-page .teaching-lead {
  margin-bottom: 1.35rem;
  line-height: 1.65;
}

.teaching-page .teaching-order-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: -0.25rem 0 1.35rem;
}

.teaching-page h2 {
  font-size: 1.12rem;
  margin: 2rem 0 0.65rem;
  color: var(--text);
  font-weight: 700;
}

.teaching-page main > h2:first-of-type {
  margin-top: 0.5rem;
}

.teaching-entry {
  margin: 0 0 0;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.teaching-entry:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

.teaching-entry__dates {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
}

.teaching-entry__role {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  color: var(--text);
}

.teaching-entry__org {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.teaching-entry__detail {
  margin: 0.45rem 0 0;
  line-height: 1.55;
  font-size: 0.95rem;
}

.teaching-entry ul {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.teaching-entry li {
  margin-bottom: 0.3rem;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .about-page .about-lead {
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 2.25rem;
    align-items: start;
  }

  .about-page .about-portrait {
    justify-self: start;
  }
}

header.site {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

header.site h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 15rem;
    align-items: start;
  }
}

main p {
  margin: 0 0 1rem;
}

.bio p {
  margin: 0 0 1rem;
}

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

section#research {
  margin-top: 1.5rem;
  scroll-margin-top: 0.75rem;
}

section#about,
section#profiles,
section#publications,
aside#contact {
  scroll-margin-top: 0.75rem;
}

.profile-links {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.95rem;
}

.profile-links li {
  display: inline;
}

.profile-links li:not(:last-child)::after {
  content: " ·";
  color: var(--muted);
}

main h2 {
  font-size: 1rem;
  font-weight: 650;
  margin: 1.75rem 0 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

aside.card h2 {
  margin-top: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

aside ul {
  margin: 0;
  padding-left: 1.1rem;
}

aside li {
  margin-bottom: 0.45rem;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

footer.site {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

/* Knowledge Translation — press listings */
.kt-muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.kt-press-item {
  margin: 1.25rem 0 1.75rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}

.kt-press-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.kt-press-item h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
  line-height: 1.35;
}

.kt-press-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.kt-press-item ul {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}

.kt-press-item li {
  margin-bottom: 0.45rem;
}

.kt-press-item cite {
  font-style: normal;
  color: var(--text);
}

/* Research theme pages — clickable first-page thumbnails → DOI / publisher */
.theme-papers {
  margin: 1.75rem 0 0;
}

.theme-papers h2 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.theme-papers-lead {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.paper-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Two-up gallery: larger thumbnails on theme pages */
.paper-gallery--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 44rem;
  margin-inline: auto;
}

.paper-gallery--duo > li:only-child {
  grid-column: 1 / -1;
  max-width: min(22rem, 100%);
  margin-inline: auto;
  width: 100%;
}

.paper-gallery li {
  margin: 0;
}

a.paper-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

a.paper-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

a.paper-card:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.paper-card__thumb {
  display: block;
  background: #f1f5f9;
  line-height: 0;
}

.paper-card__thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 420;
  object-fit: cover;
  display: block;
}

.paper-card__meta {
  display: block;
  padding: 0.65rem 0.75rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
  border-top: 1px solid var(--border);
  flex: 1;
}

.paper-card__meta strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (max-width: 520px) {
  .paper-gallery:not(.paper-gallery--duo) {
    grid-template-columns: 1fr 1fr;
  }

  .paper-gallery--duo {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* ── Photo gallery slideshow ───────────────────────────────────── */

/* Outer wrapper constrains width and adds breathing room */
.slideshow-wrap {
  background: #f4f7fb;
  padding: 2rem 0;
}

/* The slider itself uses a 16:9 ratio — matches any standard
   landscape photo from a phone, camera, or conference shot */
.slideshow {
  position: relative;
  width: 92%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
}

.slideshow-track {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.slide.active { opacity: 1; }

/* Gradient backgrounds shown while no photo is set */
.slide-bg-1 { background: linear-gradient(135deg, #0a2a3d, #1a6877); }
.slide-bg-2 { background: linear-gradient(135deg, #0d3347, #2a9d8f); }
.slide-bg-3 { background: linear-gradient(135deg, #162b40, #1b8a9a); }
.slide-bg-4 { background: linear-gradient(135deg, #0f2d45, #176d7e); }
.slide-bg-5 { background: linear-gradient(135deg, #123a52, #0d6b6b); }
.slide-bg-6 { background: linear-gradient(135deg, #1a3a4a, #1a7a8a); }
.slide-bg-7 { background: linear-gradient(135deg, #0e3048, #2a8d7f); }
.slide-bg-8 { background: linear-gradient(135deg, #152f42, #156b7a); }
.slide-bg-9 { background: linear-gradient(135deg, #123040, #1a6b78); }

/* Photos fill the slide naturally */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder shown until real photos are added */
.slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-placeholder span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  letter-spacing: 0.03em;
}

.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0.25rem 0.7rem 0.35rem;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s;
  z-index: 2;
}

.slideshow-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.slideshow-prev { left: 0.75rem; }
.slideshow-next { right: 0.75rem; }

.slideshow-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.dot.active {
  background: #fff;
}

@media (max-width: 600px) {
  .slideshow { width: 100%; border-radius: 0; }
  .slideshow-wrap { padding: 1rem 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Homepage white content sections ── */
.home-container {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-section-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.home-section-title--center {
  display: block;
  border-bottom: none;
  text-align: center;
  border-bottom: 3px solid var(--accent);
}

/* About intro */
.home-about {
  background: #fff;
  padding: 3.5rem 0 3rem;
}

.home-about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.home-about-photo img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  display: block;
}

.home-about-body p {
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.home-about-body a {
  color: var(--link);
}

.home-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.home-cta:hover {
  color: var(--link);
  border-color: var(--link);
}

/* Research cards */
.home-intro {
  padding: 2.25rem 0 0;
}

.home-intro-text {
  max-width: 52rem;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #3a4556;
}

.home-intro-text a {
  color: #1a4b8c;
}

.home-research {
  background: #f4f7fb;
  padding: 3rem 0;
}

.research-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.research-card {
  background: #fff;
  border-radius: 6px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-top: 3px solid var(--accent);
  transition: box-shadow 0.2s, transform 0.2s;
}

.research-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.11);
  transform: translateY(-2px);
}

.research-card-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.research-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  line-height: 1.35;
}

.research-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 0.9rem;
}

.research-card a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--link);
  text-decoration: none;
}

.research-card a:hover {
  text-decoration: underline;
}

/* Stats bar */
.home-stats {
  background: var(--banner-bg);
  padding: 2.25rem 0;
}

.stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
  text-align: center;
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stats-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Footer */
.site-footer {
  background: #0d2236;
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 0 1.25rem;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col strong {
  display: block;
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
}

.footer-col p {
  margin: 0;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.35rem;
}

.footer-col a,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.footer-col a:hover,
.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* BLADES cohort page */
.blades-main {
  padding-bottom: 2rem;
}

.blades-lead {
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  color: var(--text);
}

.blades-section {
  margin-bottom: 2rem;
}

.blades-section h2 {
  font-size: 1.35rem;
  font-weight: 650;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.blades-section p {
  margin: 0 0 1rem;
}

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

.blades-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.blades-list li {
  margin-bottom: 0.4rem;
}

.blades-list li:last-child {
  margin-bottom: 0;
}

.blades-objective {
  margin: 2rem 0;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(135deg, #f0f5fa, #e8f0f7);
  border-left: 4px solid var(--link);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 8px rgba(15, 61, 92, 0.06);
}

.blades-objective h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
}

.blades-objective p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
}

.blades-lead + .blades-figure--featured {
  margin: 0 0 2rem;
}

.blades-figure--featured {
  margin: 0 0 1.35rem;
}

.blades-figure--featured img {
  width: 100%;
  height: auto;
}

.blades-section .blades-figure--location,
.blades-section .blades-figure--exposure,
.blades-section .blades-figure--outcomes {
  margin: 1.25rem 0 1.5rem;
}

.blades-figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}

.blades-figure {
  margin: 0;
}

.blades-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  background: #f4f7fb;
}

.blades-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.blades-figure figcaption code {
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.blades-pub-link {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.blades-pub-link a {
  margin: 0 0.2rem;
}

@media (max-width: 720px) {
  .blades-figure-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .research-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .home-about-grid { grid-template-columns: 1fr; }
  .home-about-photo { max-width: 160px; }
  .research-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-list { flex-direction: row; }
}
