/* =========================================================
   AICONS Lab — custom theme overrides (Phase 1: foundation)
   Shared colors, fonts, the new navbar/footer, and a
   fade-up scroll animation utility used by later pages.
   ========================================================= */

:root {
  --brand: #6674CC;
  --brand-light: #F0F2FC;
  --brand-dark: #5060B8;
  --bg: #FAFBFF;
  --card-bg: #FFFFFF;
  --text-dark: #2D3158;
  --text-mid: #6B6F8F;
  --border: #E8EAF6;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  margin: 0;
}

/* ── Navbar ───────────────────────────────────────────── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 58px; background: #fff;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1rem; font-weight: 700; color: var(--text-dark); text-decoration: none; }
.nav-brand span { color: var(--brand); }
.navbar-links { display: flex; gap: 1.5rem; }
.navbar-links a { font-size: 0.83rem; font-weight: 500; color: var(--text-mid); text-decoration: none; transition: color 0.2s; }
.navbar-links a:hover, .navbar-links a.active { color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.4rem; color: var(--text-dark); padding: 0.25rem; line-height: 1; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .navbar-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: #fff; gap: 0.9rem;
    padding: 1rem 1.25rem 1.25rem; border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(45, 49, 88, 0.06);
  }
  .navbar-links.open { display: flex; }
}

/* ── Section headings (used across content pages) ───────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-light);
}

/* ── Fade-up scroll animation utility ────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }
.delay-7 { transition-delay: 0.56s; }
.delay-8 { transition-delay: 0.64s; }

/* ── Footer ───────────────────────────────────────────────
   Matches _includes/footer.html (driven by _data/footer.yml) */
footer {
  background: #12163a; padding: 2.5rem 2rem 2rem;
  border-top: 3px solid var(--brand); position: relative;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-links {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem;
}
.footer-link { font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #fff; }
.footer-divider { height: 1px; background: rgba(255, 255, 255, 0.08); margin-bottom: 2rem; }
.footer-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 3.5rem; flex-wrap: wrap;
}
.footer-logo-item {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.96); border-radius: 10px; padding: 0.6rem 1.1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.footer-logo-item:hover { box-shadow: 0 4px 18px rgba(102, 116, 204, 0.25); transform: translateY(-2px); }
.footer-logo-item img { height: 44px; width: auto; object-fit: contain; display: block; }
.footer-logo-aicons { background: transparent; padding: 0; }
.footer-logo-aicons img { height: 48px; }
.footer-logo-aicons:hover { background: transparent; box-shadow: none; transform: none; }
.footer-copy {
  position: absolute; bottom: 1.1rem; left: 2rem;
  font-size: 0.72rem; color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-logos { gap: 1.5rem; }
  .footer-logo-item img { height: 36px; }
}
@media (max-width: 480px) {
  footer { padding: 2rem 1.25rem 3.5rem; }
  .footer-links { gap: 1rem; }
  .footer-logos { gap: 1rem; }
  .footer-logo-item { padding: 0.4rem 0.7rem; }
  .footer-logo-item img { height: 28px; }
  .footer-logo-aicons img { height: 32px; }
  .footer-copy { left: 1.25rem; }
}

/* =========================================================
   News page
   Matches docs/news.md (driven by _data/news.yml)
   ========================================================= */

/* ── Page hero ── */
.page-hero {
  background: linear-gradient(135deg, #eef1fd 0%, #f7f8ff 60%, #e8f0ff 100%);
  padding: 2.25rem 0; border-bottom: 1px solid var(--border);
  min-height: 190px; display: flex; align-items: center;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 2rem; }
.page-hero-eyebrow { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 0.6rem; }
.page-hero h1 { font-size: 2rem; font-weight: 700; color: var(--text-dark); margin: 0 0 0.75rem; }
.page-hero p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.75; max-width: 700px; margin: 0; }

/* ── Content wrapper ── */
.content { max-width: 860px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }

/* ── Year filter pills ── */
.filter-bar {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; margin-bottom: 2.5rem;
}
.filter-label { font-size: 0.7rem; font-weight: 600; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 0.25rem; }
.filter-btn {
  font-size: 0.75rem; font-weight: 600; padding: 0.35rem 0.9rem;
  border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--card-bg); color: var(--text-mid);
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Year section ── */
.year-section { margin-bottom: 0.5rem; }
.year-section.hidden { display: none; }

.year-divider {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem; margin-top: 0.5rem;
}
.year-divider span {
  font-size: 1.05rem; font-weight: 700; color: var(--brand);
  white-space: nowrap;
}
.year-divider::after { content: ''; flex: 1; height: 1.5px; background: var(--border); }

/* ── News card ── */
.news-card {
  display: flex; gap: 1.25rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.25rem 1.5rem;
  margin-bottom: 0.85rem;
  transition: box-shadow 0.22s, transform 0.22s;
  position: relative;
}
.news-card:hover { box-shadow: 0 6px 24px rgba(102,116,204,0.1); transform: translateY(-2px); }

/* Left accent bar */
.news-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 14px 0 0 14px;
  background: var(--bar-color, var(--brand));
}

.news-left {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 0.5rem; min-width: 92px;
}
.news-date {
  font-size: 0.68rem; font-weight: 700; color: var(--text-mid);
  text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap;
}
.news-tag {
  font-size: 0.62rem; font-weight: 600; padding: 0.18rem 0.55rem;
  border-radius: 20px; white-space: nowrap;
  background: var(--tag-bg); color: var(--tag-color);
}

.news-body { flex: 1; }
.news-title { font-size: 0.92rem; font-weight: 700; color: var(--text-dark); margin: 0 0 0.4rem; line-height: 1.45; }
.news-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.75; }
.news-desc p { margin: 0; }
.news-desc a { color: var(--brand); text-decoration: none; font-weight: 500; }
.news-desc a:hover { text-decoration: underline; }

/* Category colour tokens */
.cat-award    { --bar-color: #F59E0B; --tag-bg: #FFFBEB; --tag-color: #B45309; }
.cat-grant    { --bar-color: #10B981; --tag-bg: #ECFDF5; --tag-color: #047857; }
.cat-pub      { --bar-color: #6674CC; --tag-bg: #F0F2FC; --tag-color: #5060B8; }
.cat-conf     { --bar-color: #3B82F6; --tag-bg: #EFF6FF; --tag-color: #1D4ED8; }

@media (max-width: 600px) {
  .news-card { flex-direction: column; gap: 0.6rem; }
  .news-left { flex-direction: row; align-items: center; min-width: unset; }
}

/* =========================================================
   Homepage
   Matches index.md — particle hero + welcome animation,
   the About blurb, and the "Featured Work" paper carousel.
   ========================================================= */

/* ── Hero ── */
#hero {
  position: relative; overflow: hidden; min-height: 220px;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #eef1fd 0%, #f7f8ff 60%, #e8f0ff 100%);
  padding: 2rem 2rem;
}
#particles-js { position: absolute; inset: 0; z-index: 0; }

/* ── Welcome overlay ── */
#welcome-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef1fd 0%, #f7f8ff 60%, #e8f0ff 100%);
  opacity: 0; transition: opacity 0.7s ease; pointer-events: none;
}
.wl-inner { text-align: center; }
.wl-word { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; letter-spacing: 0.18em; color: var(--text-dark); opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s ease; }
.wl-sub { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--brand); margin-top: 0.6rem; opacity: 0; transition: opacity 0.6s ease 0.25s; }
.wl-full { font-size: 0.7rem; font-weight: 400; letter-spacing: 0.04em; color: var(--text-mid); margin-top: 0.35rem; opacity: 0; transition: opacity 0.6s ease 0.45s; }
.wl-full span { color: var(--brand); font-weight: 600; }
.wl-line { width: 0; height: 1.5px; background: var(--brand); margin: 0.9rem auto 0; opacity: 0.5; transition: width 0.7s ease 0.3s; }
#welcome-overlay.visible { opacity: 1; }
#welcome-overlay.visible .wl-word  { opacity: 1; transform: translateY(0); }
#welcome-overlay.visible .wl-sub   { opacity: 0.85; }
#welcome-overlay.visible .wl-full  { opacity: 0.7; }
#welcome-overlay.visible .wl-line  { width: 120px; }

/* ── Hero text ── */
.hero-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 2rem; }
.hero-text h1 { font-size: 2rem; font-weight: 700; color: var(--text-dark); line-height: 1.25; margin: 0 0 0.75rem; }
.hero-text h1 span { color: var(--brand); }
.hero-text p { font-size: 0.95rem; color: var(--text-mid); line-height: 1.7; margin: 0; }

/* ── Page sections ── */
.section { max-width: 1100px; margin: 2.5rem auto; padding: 0 2rem; }
.section p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.75; }
.section p a { color: var(--brand); text-decoration: none; font-weight: 500; }
.section p a:hover { text-decoration: underline; }

/* ── Featured work carousel ── */
.carousel-wrap { position: relative; padding: 10px 0; margin: -10px 0; }
#carousel-viewport { overflow-x: clip; overflow-y: visible; margin: 0 36px; }
#aicons-carousel-track { display: flex; will-change: transform; }
.aicons-carousel-slide { flex-shrink: 0; padding: 0 8px; box-sizing: border-box; }
.paper-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: box-shadow 0.2s, transform 0.2s; }
.paper-card:hover { box-shadow: 0 6px 24px rgba(102,116,204,0.13); transform: translateY(-2px); }
.paper-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.paper-body { padding: 0.9rem 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.paper-journal { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.paper-title { font-size: 0.82rem; font-weight: 600; color: var(--text-dark); line-height: 1.4; }
.paper-year { font-size: 0.72rem; color: var(--text-mid); margin-top: auto; padding-top: 0.5rem; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(102,116,204,0.85); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 16px; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.carousel-btn:hover { background: var(--brand-dark); }
#carousel-prev { left: 0; } #carousel-next { right: 0; }

.carousel-footer { display: flex; align-items: center; justify-content: center; margin-top: 16px; }
.carousel-progress { width: 160px; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; position: relative; }
.carousel-progress-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: var(--brand); border-radius: 2px;
  animation: progressFill var(--prog-dur, 7500ms) linear forwards;
}
@keyframes progressFill { from { width: 0; } to { width: 100%; } }

@media (max-width: 768px) {
  .hero-text h1 { font-size: 1.6rem; }
  #hero { padding: 2.25rem 1.25rem; }
  .section { padding: 0 1rem; margin: 1.75rem auto; }
}
@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.35rem; }
  #carousel-viewport { margin: 0 26px; }
  .carousel-btn { width: 28px; height: 28px; font-size: 13px; }
  .carousel-progress { width: 100px; }
}

/* =========================================================
   Research page
   Matches docs/research.md — theme accordions, figure grid,
   and the funding logo strip.
   ========================================================= */

/* Wider variant of .content (defined for the News page) */
.content.wide { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem 4rem; }

/* ── Theme block / accordion ── */
.theme-block { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card-bg); }
.theme-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; cursor: pointer;
  user-select: none; transition: background 0.2s;
}
.theme-header:hover { background: var(--brand-light); }
.theme-number {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; transition: background 0.2s;
}
.theme-block.open .theme-number { background: var(--brand-dark); }
.theme-title { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); letter-spacing: 0.02em; flex: 1; }
.theme-chevron {
  flex-shrink: 0; width: 20px; height: 20px; color: var(--text-mid);
  transition: transform 0.35s ease;
}
.theme-block.open .theme-chevron { transform: rotate(180deg); }

.theme-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4,0,0.2,1), padding 0.35s ease;
  padding: 0 1.4rem;
}
.theme-block.open .theme-body { max-height: 4000px; padding: 0 1.4rem 1.75rem; }
.theme-body p { font-size: 0.88rem; color: var(--text-mid); line-height: 1.8; margin: 1.25rem 0 1.75rem; }

/* ── Figure grid ── */
.fig-grid { display: flex; flex-direction: column; gap: 1.75rem; margin-bottom: 0.5rem; }
.fig-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  transition: box-shadow 0.2s;
}
.fig-card:hover { box-shadow: 0 6px 24px rgba(102,116,204,0.1); }
.fig-card img { width: 100%; height: auto; max-height: 480px; object-fit: contain; background: #fff; display: block; padding: 1.25rem; }
.fig-caption { padding: 0.65rem 1.25rem 0.9rem; font-size: 0.78rem; color: var(--text-mid); line-height: 1.6; border-top: 1px solid var(--border); }

/* ── Funding ── */
.funding-section { margin-top: 1rem; }
.funding-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.4rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--brand-light); }
.funding-sub { font-size: 0.83rem; color: var(--text-mid); margin: 0 0 2rem; }
.funding-grid {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 2.5rem 3.5rem;
}
.funding-grid img { height: 52px; width: auto; object-fit: contain; filter: grayscale(20%); opacity: 0.8; transition: opacity 0.2s; }
.funding-grid img:hover { opacity: 1; filter: none; }

/* ── Slide-in scroll animation ── */
.slide-in-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }

@media (max-width: 768px) {
  .theme-body { padding-left: 0; padding-right: 0; }
}

/* =========================================================
   People page
   Matches docs/people.md — PI card, member grids, alumni
   list, and the lab-photos carousel.
   ========================================================= */

/* ── Section label ── */
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--brand);
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── PI card ── */
.pi-card {
  display: flex; gap: 2.25rem; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 16px; padding: 2rem 2.25rem;
  align-items: flex-start; margin-bottom: 3rem;
  transition: box-shadow 0.25s;
}
.pi-card:hover { box-shadow: 0 8px 36px rgba(102,116,204,0.12); }
.pi-avatar-wrap { flex-shrink: 0; }
.pi-avatar {
  width: 130px; height: 130px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--brand-light); display: block;
  filter: saturate(1.08);
}
.pi-info { flex: 1; }
.pi-name { font-size: 1.25rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.25rem; }
.pi-credential { font-size: 0.8rem; font-weight: 600; color: var(--brand); margin-bottom: 0.85rem; letter-spacing: 0.01em; }
.pi-roles { list-style: none; margin-bottom: 1rem; padding: 0; }
.pi-roles li {
  font-size: 0.82rem; color: var(--text-mid); padding: 0.18rem 0;
  padding-left: 1rem; position: relative; line-height: 1.55;
}
.pi-roles li::before { content: '–'; position: absolute; left: 0; color: var(--brand); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.85rem; }
.tag {
  display: inline-block; font-size: 0.67rem; font-weight: 500;
  color: var(--brand); background: var(--brand-light);
  border-radius: 20px; padding: 0.22rem 0.6rem;
}

/* ── People section block ── */
.people-section { margin-bottom: 3rem; }

/* ── Member grid ── */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.member-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.6rem 1.25rem 1.25rem;
  text-align: center; transition: box-shadow 0.25s, transform 0.25s;
  display: flex; flex-direction: column; align-items: center;
}
.member-card:hover { box-shadow: 0 8px 28px rgba(102,116,204,0.13); transform: translateY(-4px); }
.member-avatar {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  margin-bottom: 1rem; border: 2px solid var(--border); display: block;
  filter: saturate(1.08);
}
.member-name { font-size: 0.88rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.25rem; line-height: 1.35; }
.member-role { font-size: 0.75rem; color: var(--text-mid); margin-bottom: 0.65rem; line-height: 1.5; }
.member-funding { font-size: 0.68rem; color: var(--brand); font-weight: 500; margin-bottom: 0.5rem; font-style: italic; }
.member-card .tag-row { justify-content: center; margin-top: 0.5rem; }
.member-card .tag { font-size: 0.62rem; padding: 0.18rem 0.5rem; }
.member-email {
  margin-top: auto; padding-top: 0.85rem;
  font-size: 0.72rem; color: var(--brand); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: color 0.2s;
}
.member-email:hover { color: var(--brand-dark); }

/* ── Past members ── */
.past-block {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 3rem;
}
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem 1.5rem; }
.past-item {
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.past-item:last-child { border-bottom: none; }
.past-name { font-size: 0.82rem; font-weight: 600; color: var(--text-dark); }
.past-role-text { font-size: 0.75rem; color: var(--text-mid); }
.past-current { font-size: 0.72rem; color: var(--text-mid); }
.past-email {
  font-size: 0.72rem; color: var(--brand); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.1rem;
  transition: color 0.2s;
}
.past-email:hover { color: var(--brand-dark); }

/* ── Group photo carousel ── */
.group-photos-section { margin-bottom: 3rem; }
.photo-carousel {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: #fff;
  box-shadow: 0 2px 16px rgba(102,116,204,0.07);
}
.photo-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.photo-slide { min-width: 100%; position: relative; }
.photo-slide img { width: 100%; height: auto; display: block; max-height: 500px; object-fit: cover; }
.photo-caption {
  font-size: 0.8rem; color: var(--text-mid); text-align: center;
  padding: 0.8rem 1.25rem; background: var(--brand-light);
  font-weight: 500; letter-spacing: 0.03em;
}

/* Photo carousel arrow buttons */
.photo-nav-btn {
  position: absolute; top: calc(50% - 20px); transform: translateY(-50%);
  background: rgba(255,255,255,0.92); border: 1px solid var(--border);
  cursor: pointer; width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.1rem; color: var(--text-dark); line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: background 0.2s, box-shadow 0.2s;
  z-index: 2; display: flex; align-items: center; justify-content: center;
}
.photo-nav-btn:hover { background: #fff; box-shadow: 0 4px 16px rgba(102,116,204,0.18); color: var(--brand); }
.photo-nav-btn.prev { left: 1rem; }
.photo-nav-btn.next { right: 1rem; }

/* Photo carousel dot indicators */
.carousel-dots {
  display: flex; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 0; background: var(--brand-light);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); transition: background 0.25s, transform 0.25s; cursor: pointer;
}
.dot.active { background: var(--brand); transform: scale(1.25); }

@media (max-width: 680px) {
  .pi-card { flex-direction: column; align-items: center; text-align: center; }
  .pi-roles li { text-align: left; }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .tag-row { justify-content: center; }
}
@media (max-width: 440px) {
  .member-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Publications page
   Matches docs/papers.md — preprint/article lists and the
   PubMed call-to-action.
   ========================================================= */

.pub-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2.5rem; }
.pub-list p {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.25rem; margin: 0;
  font-size: 0.85rem; color: var(--text-mid); line-height: 1.7;
  transition: box-shadow 0.2s, transform 0.2s;
}
.pub-list p:hover { box-shadow: 0 6px 20px rgba(102,116,204,0.1); transform: translateY(-1px); }
.pub-list strong { color: var(--text-dark); font-weight: 600; }
.pub-list em { color: var(--brand); font-style: italic; }
.pub-list a { color: var(--brand); text-decoration: none; font-weight: 500; }
.pub-list a em { color: var(--brand); }
.pub-list a:hover { text-decoration: underline; }

.pubmed-cta {
  text-align: center; padding: 1.5rem; background: var(--brand-light);
  border-radius: 12px;
}
.pubmed-cta p { margin: 0; font-size: 0.88rem; color: var(--text-mid); }
.pubmed-cta a { color: var(--brand); font-weight: 600; text-decoration: none; }
.pubmed-cta a:hover { text-decoration: underline; }

/* =========================================================
   Software page
   Matches docs/software.md — software card grid driven by
   _data/our_software.yml.
   ========================================================= */

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.software-card {
  display: flex; gap: 1rem; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem; transition: box-shadow 0.25s, transform 0.25s;
}
.software-card:hover { box-shadow: 0 8px 28px rgba(102,116,204,0.13); transform: translateY(-4px); }
.software-icon { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; border-radius: 10px; background: var(--brand-light); padding: 0.5rem; }
.software-body { flex: 1; display: flex; flex-direction: column; }
.software-title { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.15rem; }
.software-subtitle { font-size: 0.72rem; color: var(--brand); font-weight: 500; margin-bottom: 0.5rem; line-height: 1.4; }
.software-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.6; margin: 0 0 0.85rem; flex: 1; }
.software-cta {
  align-self: flex-start; font-size: 0.75rem; font-weight: 600;
  color: var(--brand); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: color 0.2s;
}
.software-cta:hover { color: var(--brand-dark); }
.software-cta svg { transition: transform 0.2s; }
.software-cta:hover svg { transform: translateX(2px); }

@media (max-width: 600px) {
  .software-card { flex-direction: column; }
}

/* =========================================================
   Stories page
   Matches docs/stories.md — list of external media/press links.
   ========================================================= */

.story-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.1rem 1.4rem;
  margin-bottom: 0.85rem; text-decoration: none;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.story-card:hover { box-shadow: 0 6px 24px rgba(102,116,204,0.1); transform: translateY(-2px); border-color: var(--brand); }
.story-date {
  font-size: 0.68rem; font-weight: 700; color: var(--text-mid);
  text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap; min-width: 92px;
}
.story-body { flex: 1; }
.story-source { font-size: 0.68rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.story-title { font-size: 0.92rem; font-weight: 700; color: var(--text-dark); line-height: 1.45; }
.story-arrow { color: var(--text-mid); flex-shrink: 0; transition: color 0.2s, transform 0.2s; }
.story-card:hover .story-arrow { color: var(--brand); transform: translateX(3px); }

@media (max-width: 640px) {
  .story-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .story-date { min-width: unset; }
  .story-arrow { display: none; }
}

/* =========================================================
   Join Us page
   Matches docs/join.md — intro callout + open position list.
   ========================================================= */

.join-intro {
  background: var(--brand-light); border-radius: 12px;
  padding: 1.5rem 1.75rem; margin-bottom: 2.5rem;
}
.join-intro p { margin: 0; font-size: 0.92rem; color: var(--text-mid); line-height: 1.7; }
.join-intro p + p { margin-top: 0.6rem; }
.join-intro a { color: var(--brand); font-weight: 600; text-decoration: none; }
.join-intro a:hover { text-decoration: underline; }

.position-list { display: flex; flex-direction: column; gap: 0.85rem; }
.position-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem 1.4rem;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.position-card:hover { box-shadow: 0 6px 24px rgba(102,116,204,0.1); transform: translateY(-2px); border-color: var(--brand); }
.position-title { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }
.position-note { font-size: 0.78rem; color: var(--text-mid); font-style: italic; white-space: nowrap; }
.position-cta {
  font-size: 0.78rem; font-weight: 600; color: var(--brand); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  transition: color 0.2s;
}
.position-cta:hover { color: var(--brand-dark); }
.position-cta svg { transition: transform 0.2s; }
.position-cta:hover svg { transform: translateX(2px); }

@media (max-width: 560px) {
  .position-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
