/* ==========================================================================
   BCLAB — Brain Connectivity Laboratory (NYCU)
   Pure White + Cobalt (#2563EB) + Black Minimalist Academic Design
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f4f6f9;
  --navy: #14181f;
  --navy-soft: #2c3440;
  --text: #1f242d;
  --text-muted: #4b5563;
  --text-subtle: #6b7280;
  /* Pure White + Academic Deep Blue (#00529B) + Black */
  --btn-blue: #00529b;
  --btn-blue-hover: #003a70;
  --accent: #00529b;
  --accent-hover: #003a70;
  --accent-soft: #edf4fb;
  --teal: #00529b;
  --teal-soft: #edf4fb;
  --coral: #00529b;
  --coral-soft: #edf4fb;
  --cobalt: #00529b;
  --amber: #00529b;
  --border: #e5e8ee;
  --border-strong: #cfd6e0;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: none;
  --shadow-md: 0 4px 16px rgba(20, 24, 31, 0.06);
  --shadow-lg: 0 14px 36px rgba(20, 24, 31, 0.14);
  --font-serif: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1120px;
  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 68px 0;
  background: #ffffff;
}

.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 36px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  max-width: 740px;
  font-size: 0.98rem;
}

/* Header & Navigation (Martinos-style crisp white academic bar) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 700;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--navy);
}

.brand-logo {
  height: 48px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
  background: transparent;
  padding: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-subtle);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: var(--surface-alt);
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-links a.nav-cta {
  background: var(--navy);
  color: #ffffff;
  font-weight: 600;
  margin-left: 6px;
}

.nav-links a.nav-cta:hover {
  background: var(--btn-blue);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
}

/* Hero — Martinos-style Crisp Pure White Editorial Showcase */
.hero {
  position: relative;
  background: #ffffff;
  color: var(--navy);
  padding: 72px 0 68px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.hero-subtitle {
  margin: 0 0 18px;
  font-size: 1.18rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  max-width: 310px;
  width: 100%;
  text-align: center;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.hero-card-caption {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-subtle);
  margin: 0;
}

/* Subpage Banner — BioMedIA-style Minimalist White Header + Text Anchor Bar */
.page-banner {
  background: #ffffff;
  color: var(--navy);
  padding: 48px 0 0;
  border-bottom: 1px solid var(--border);
}

.page-banner h1 {
  margin: 0 0 8px;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
}

.page-banner p {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 700px;
}

.subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.pill {
  display: inline-block;
  padding: 10px 2px 12px;
  border-radius: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
}

.pill:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-primary {
  background: var(--btn-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--btn-blue-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline-light {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--border-strong);
}

.btn-outline-light:hover {
  border-color: var(--navy);
  background: var(--surface-alt);
  color: var(--navy);
}

.btn-outline {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--btn-blue);
  color: var(--btn-blue);
}

/* Grids & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Editorial 4-Color Research Columns (dMRI Fiber Palette) */
.research-grid {
  gap: 32px 36px;
}

.research-item {
  padding: 24px 0 8px;
  border-top: 3px solid var(--border-strong);
}

.research-item.accent-coral { border-top-color: var(--coral); }
.research-item.accent-jade { border-top-color: var(--teal); }
.research-item.accent-cobalt { border-top-color: var(--cobalt); }
.research-item.accent-amber { border-top-color: var(--amber); }

.research-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-subtle);
}

.accent-coral .research-tag { color: var(--coral); }
.accent-jade .research-tag { color: var(--teal); }
.accent-cobalt .research-tag { color: var(--cobalt); }
.accent-amber .research-tag { color: var(--amber); }

.research-item h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--navy);
}

.research-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* News — Clean Editorial List with Coral Date Accent */
#news-list {
  display: grid;
  gap: 0;
}

.news-item {
  background: #ffffff;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 0;
}

.news-item:last-child {
  border-bottom: 1px solid var(--border);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.news-date {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--coral);
  background: transparent;
  padding: 0;
}

.news-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--navy);
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.news-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.news-gallery img:hover {
  transform: scale(1.02);
}

/* Equipment */
.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.equipment-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.equipment-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Contact & Links */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: start;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.info-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  font-size: 0.95rem;
}

.info-label {
  font-weight: 600;
  color: var(--navy);
}

.link-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--navy);
  font-weight: 500;
}

.link-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.map-frame img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* PI Layout — BioMedIA Clean White Unboxed Academic Hierarchy */
.pi-stack {
  display: grid;
  gap: 44px;
}

.pi-card {
  background: #ffffff;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 28px 0 8px;
}

.pi-card.pi-featured {
  border-top: 3px solid var(--accent);
  padding-top: 32px;
}

.pi-role-badge {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0;
  margin-bottom: 10px;
  background: transparent;
  color: var(--teal);
}

.pi-featured .pi-role-badge {
  font-size: 1.02rem;
  background: transparent;
  color: var(--accent);
}

.pi-top {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 36px;
  align-items: start;
}

.pi-co-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
}

.pi-co-card .pi-top {
  grid-template-columns: 140px 1fr;
  gap: 22px;
}

.pi-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.pi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 4px;
}

.pi-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 600;
}

.pi-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Academic Links & Live Sync Bar */
.academic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sync-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.sync-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sync-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pi-name {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: var(--navy);
}

.pi-en {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-subtle);
  margin-left: 8px;
}

.pi-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pi-block-title {
  margin: 18px 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.pi-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.pi-list li + li {
  margin-top: 4px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--navy-soft);
  border: 1px solid var(--border);
}

.pi-details {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pi-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.94rem;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pi-details summary::-webkit-details-marker {
  display: none;
}

.pi-details summary::after {
  content: "▾";
  font-size: 0.85rem;
}

.pi-details[open] summary::after {
  content: "▴";
}

.pi-details-body {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* BioMedIA-style Minimalist Text-Only Member Directory */
.member-group {
  margin-bottom: 44px;
}

.member-group:last-child {
  margin-bottom: 0;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  color: var(--navy);
}

.group-count {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 28px;
}

.member-card {
  background: #ffffff;
  border: none;
  border-left: 2px solid var(--border);
  border-radius: 0;
  padding: 2px 0 2px 14px;
}

.member-name {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.member-en {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.member-dept {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* BioMedIA-style Collaborator Directory (with Clean Portraits) */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px 36px;
}

.collab-card {
  background: #ffffff;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collab-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.collab-photo {
  width: 76px;
  height: 92px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  flex-shrink: 0;
}

.collab-card h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--navy);
}

.collab-affil {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.collab-expertise {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.collab-link {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Filter Toolbar (Alumni & Publications) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.search-input {
  min-width: 240px;
  flex: 0 1 320px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

/* Alumni List */
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 18px;
}

.alumni-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.alumni-name {
  font-weight: 700;
  color: var(--navy);
  margin-right: 6px;
}

.alumni-dept {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Publications */
.pub-group {
  margin-bottom: 36px;
}

.pub-group-title {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pub-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
}

.pub-pi {
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(2, 132, 199, 0.45);
  text-underline-offset: 3px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

/* Photo Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.photo-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-alt);
}

.photo-caption {
  padding: 14px 16px;
}

.photo-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.photo-title {
  margin: 3px 0 0;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(11, 23, 42, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: min(1000px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  margin-top: 12px;
  color: #e2e8f0;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Footer — Clean Light Academic Footer (BioMedIA / Martinos style) */
.site-footer {
  background: var(--surface-alt);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: 44px 0 34px;
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.footer-copy {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .equipment-grid,
  .contact-grid,
  .grid-2,
  .pi-top,
  .pi-co-grid,
  .pi-co-card .pi-top {
    grid-template-columns: 1fr;
  }

  .pi-photo {
    max-width: 220px;
  }

  .hero {
    padding: 64px 0 56px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a.nav-cta {
    margin-left: 0;
    margin-top: 6px;
    text-align: center;
  }

  .news-gallery {
    grid-template-columns: 1fr;
  }
}
