/* ===== VARIABLES ===== */
:root {
  --navy: #1B365D;
  --navy-light: #2A4A7F;
  --gold: #D4A843;
  --gold-light: #E8C97A;
  --white: #FFFFFF;
  --off-white: #F5F5F5;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-400: #CED4DA;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --text: #2D2D2D;
  --text-light: #555;
  --max-width: 1200px;
  --header-height: 72px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

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

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

/* ===== UTILITY ===== */
.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.bg-light { background: var(--gray-100); }
.center-text { text-align: center; }
.center-action { text-align: center; margin-top: 2rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--white);
}

.btn-secondary {
  background: var(--gold);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--gold-light);
  color: var(--white);
}

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  white-space: nowrap;
}
.site-logo:hover { color: var(--navy); }
.logo-accent { color: var(--gold); }

.site-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
  padding: 0.25rem 0;
}
.nav-link:hover,
.nav-link.active { color: var(--navy); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: 0.2s;
}

/* ===== HERO ===== */
.hero {
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.social-icons a:hover {
  background: var(--navy);
  color: var(--white);
}
.social-icons a svg {
  display: block;
  fill: currentColor;
}

/* Hero slideshow */
.hero-slideshow {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  aspect-ratio: 4/3;
}
.hero-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroFade 15s infinite;
  border-radius: 8px;
}
.hero-slideshow .slide:nth-child(1) { animation-delay: 0s; }
.hero-slideshow .slide:nth-child(2) { animation-delay: 5s; }
.hero-slideshow .slide:nth-child(3) { animation-delay: 10s; }

@keyframes heroFade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  33%  { opacity: 1; }
  38%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-image img {
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 0;
}

.section-title {
  margin-bottom: 1.5rem;
}

.page-header {
  padding: 3rem 0;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
  font-size: 2.5rem;
}

.subtitle { margin-top: 1rem; }
.subtitle-small { font-size: 0.95rem; color: var(--gray-600); margin-bottom: 0.5rem; }

/* ===== TWO COLUMN ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.two-col-aligned {
  grid-template-columns: 1fr 1fr;
}

.two-col-aligned .opportunities-box {
  margin-top: 0;
}

.two-col-aligned .opportunities-box .section-title {
  font-size: 1.8rem;
}

/* ===== RESEARCH FOCUS ===== */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.focus-item {
  padding: 1.25rem;
  background: var(--white);
  border-radius: 6px;
  border-left: 3px solid var(--gold);
}

.focus-item h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}

.focus-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ===== OPPORTUNITIES ===== */
.opportunities-box {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.opportunities-box p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

/* ===== PUBLICATIONS ===== */
.pub-stats {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.pub-note-inline {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.year-heading {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.publication-entry {
  margin-bottom: 1.25rem;
  padding-left: 0;
  line-height: 1.7;
}

.publication-entry p {
  font-size: 0.95rem;
}

.pub-number {
  font-weight: 600;
  color: var(--navy);
  margin-right: 0.5rem;
}

.pub-authors { color: var(--text); }

.pub-journal {
  font-weight: 600;
  color: var(--navy);
}

.pub-pdf {
  display: inline-block;
  font-weight: 600;
  color: var(--gold);
  margin-left: 0.25rem;
}
.pub-pdf:hover { color: var(--navy); }

.pub-note {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== NEWS ===== */
.two-col-news {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.media-outlets {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.news-item {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.news-source { color: var(--gray-600); }

.news-entry {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.news-year {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  flex-shrink: 0;
}

.covers-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cover-img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== PI PAGE ===== */
.pi-hero {
  padding: 4rem 0;
  background: var(--gray-100);
}

.pi-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  align-items: center;
}

.pi-photo img {
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.pi-title {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.pi-intro p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.pi-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Education */
.edu-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.edu-years {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

/* Honors */
.honor-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  align-items: baseline;
}

.honor-date {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ===== TEAM ===== */
.team-header {
  padding: 3rem 0;
}

.team-description {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-light);
  font-size: 1.05rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.team-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  text-align: center;
}

.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}

.team-role {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9rem;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ===== JOIN ===== */
.join-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

.join-intro p { margin-bottom: 1rem; }

.positions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.position-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gold);
}

.position-meta {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.apply-instruction {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

/* ===== RESEARCH ===== */
.research-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.pillar img {
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.project-category {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--gold);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.site-footer h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.site-footer a:hover { color: var(--gold); }

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== RESEARCH BANNER ===== */
.research-banner {
  margin: 1rem 0;
  text-align: center;
}
.research-banner img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.research-banner .banner-captions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* Research project cards with images */
.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.research-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  color: inherit;
}

.research-card-image {
  height: 260px;
  overflow: hidden;
  background: var(--gray-100);
}
.research-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}
/* Zoom in on the ingestible electronics card image (3rd card) */
.research-card:last-child .research-card-image img {
  object-fit: contain;
  transform: scale(1.6);
}

.research-section-heading {
  font-size: 1.5rem;
}

.research-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.research-card-body h3 {
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.research-card-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  flex: 1;
}
.research-card-body .read-more {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  display: inline-block;
  border: 1px solid var(--navy);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  align-self: flex-start;
  transition: all 0.2s;
}
.research-card:hover .read-more {
  background: var(--navy);
  color: var(--white);
}

/* ===== RESEARCH SUB-PAGE ===== */
.research-subpage .back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--gray-600);
  font-size: 0.9rem;
}
.research-subpage .back-link:hover {
  color: var(--navy);
}
.research-subpage-header {
  padding: 3rem 0;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.research-subpage-header h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.research-subpage-header .lead {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.8;
}
.research-subpage .media-highlights {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 2rem 0;
}
.research-subpage .subtopic {
  margin-bottom: 3rem;
}
.research-subpage .subtopic h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.research-subpage .subtopic-figure {
  margin: 1rem 0;
  text-align: center;
}
.research-subpage .subtopic-figure img {
  max-width: 100%;
  border-radius: 4px;
  margin: 0 auto;
}
.research-subpage .subtopic-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}
.research-subpage .subtopic-caption a {
  font-weight: 600;
  color: var(--navy);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }
  .site-nav.open { display: flex; }

  .hero-grid,
  .two-col,
  .pi-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 2rem; }
  h1 { font-size: 2rem; }

  .focus-grid,
  .positions,
  .project-cards { grid-template-columns: 1fr; }

  .research-pillars { grid-template-columns: 1fr; }

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

  .edu-entry,
  .honor-entry { grid-template-columns: 1fr; gap: 0.25rem; }

  .two-col-aligned { grid-template-columns: 1fr; }

  .research-card-grid { grid-template-columns: 1fr; }

  .banner-captions { grid-template-columns: 1fr !important; }

  .hero-slideshow { aspect-ratio: 3/2; }
}
