/* ============================================================
   INDEX PAGE STYLES
   ============================================================ */

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* AI-generated photo background */
.hero-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}
/* Gradient overlay — left side darker so text stays legible */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 22, 42, 0.82) 0%,
    rgba(10, 22, 42, 0.60) 45%,
    rgba(10, 22, 42, 0.25) 100%
  );
}
.hero-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-24);
  max-width: 700px;
}
.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: var(--space-4);
}
.hero-title {
  font-size: var(--text-hero);
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.08;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-title .hero-phd {
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 600;
  opacity: 0.92;
  display: inline;
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: var(--space-8);
  font-style: italic;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---- Stats bar ---- */
.stats-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-8);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-5);
  border-right: 1px solid var(--color-border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Research overview ---- */
.research-overview { background: var(--color-bg); }
.section-header { margin-bottom: var(--space-10); }
.research-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.research-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.research-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}
.research-card-icon {
  width: 52px;
  height: 52px;
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  padding: var(--space-3);
  margin-bottom: var(--space-5);
}
.research-card-icon svg { width: 100%; height: 100%; }
.research-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.research-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}
.research-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: gap var(--transition);
}
.research-card-link:hover { gap: var(--space-2); }
.research-overview-footer { text-align: center; }

/* ---- PI spotlight ---- */
.pi-section {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.pi-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-12);
  align-items: center;
}
.pi-photo-wrap { display: flex; justify-content: center; }
.pi-photo-placeholder, .pi-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-accent-light);
  border: 4px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  object-position: center top;
}
.pi-photo { object-fit: cover; }
.pi-photo-placeholder svg { width: 80px; height: 80px; }
.pi-name {
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.pi-title {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}
.pi-bio {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-6);
}
.pi-links { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.pi-email {
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: none;
}
.pi-email:hover { text-decoration: underline; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

/* ---- News section ---- */
.news-section { background: var(--color-bg); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition), transform var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.news-tag {
  display: inline-block;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-accent-light);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.news-tag--award { background: #fef3e2; color: #b05f0a; }
.news-tag--award { background: color-mix(in srgb, var(--color-accent-2) 15%, white); color: var(--color-accent-2); }
.news-tag--join { background: #e8f5e9; color: #2e7d32; }
[data-theme='dark'] .news-tag--award { background: color-mix(in srgb, var(--color-accent-2) 20%, #1a1917); }
[data-theme='dark'] .news-tag--join { background: #1a2e1a; color: #6daa45; }
.news-date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.news-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-3);
}
.news-card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}
.news-card-title a:hover { color: var(--color-accent); }
.news-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}
.news-read-more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}
.news-footer { text-align: center; }

/* ---- Funding ---- */
.funding-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.funding-logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-6);
}
.funder-badge {
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  transition: color var(--transition), border-color var(--transition);
}
.funder-badge:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* ---- CTA banner ---- */
.cta-section { background: var(--color-bg); }
.cta-inner {
  background: linear-gradient(135deg, var(--color-accent) 0%, #0f2540 100%);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
}
.cta-title {
  font-size: var(--text-xl);
  color: #fff;
  margin-bottom: var(--space-4);
}
.cta-desc {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.8);
  max-width: 52ch;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

/* ---- Education timeline ---- */
.education-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.edu-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--color-border);
  margin-left: var(--space-6);
  padding-left: var(--space-8);
  position: relative;
}
.edu-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  position: relative;
}
.edu-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 5px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
}
.edu-year {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-accent-2);
  padding-top: 2px;
}
.edu-degree {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.edu-school {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.edu-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .research-cards { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .pi-inner { grid-template-columns: 1fr; text-align: center; }
  .pi-photo-wrap { justify-content: center; }
  .pi-links { justify-content: center; }
}

@media (max-width: 620px) {
  .hero-title { font-size: clamp(2rem, 8vw, 3.5rem); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid var(--color-border); }
  .stat-item:last-child { border-bottom: none; }
  .research-cards { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
}
