/* ===================================================
   Saenz Lab — style.css
   Clean academic aesthetic · white base · restrained
   =================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --text: #1a1a2e;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --line: #e5e7eb;
  --accent: #0b5cab;
  --max: 1040px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
}

.meta {
  color: var(--muted-2);
  font-size: 14px;
}

/* ===================================================
   Header / Navigation
   =================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.brand a { color: var(--text); }
.brand small {
  color: var(--muted-2);
  font-weight: 400;
  margin-left: 8px;
  font-size: 14px;
}

.navlinks a {
  margin-left: 20px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.navlinks a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ===================================================
   Hero Banner
   =================================================== */
.hero {
  position: relative;
  padding: 72px 40px 64px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 40px;
  background: url('../img/hero-bg.jpg') center center / cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.55);
  z-index: 1;
}

.hero-tagline,
.hero h1 {
  position: relative;
  z-index: 2;
}

.hero-tagline {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
}
.hero-tagline em {
  font-style: italic;
  color: #7cb8f0;
}

.hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #ffffff;
}

/* ===================================================
   Intro Row: Research outlook + Bluesky feed
   Two-column on desktop, stacked on mobile
   =================================================== */
.intro-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 760px) {
  .intro-row {
    flex-direction: row;
    gap: 48px;
  }
  .intro-text {
    flex: 3;
    min-width: 0;
  }
  .intro-feed {
    flex: 2;
    min-width: 0;
  }
}

.intro-text h2,
.intro-feed h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

.intro-text p {
  margin: 16px 0 0 0;
  color: var(--muted);
}

/* Membrane video / animation */
.intro-media {
  margin: 16px 0;
}

.membrane-video {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  display: block;
  background: var(--surface-2);
}

.media-caption {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-2);
}

/* Bluesky embed container */
.intro-feed bsky-embed {
  display: block;
  max-height: 500px;
  overflow-y: auto;
}

/* ===================================================
   Photo Carousel
   =================================================== */
.carousel-section {
  margin-top: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.carousel-slide.active {
  opacity: 1;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--muted-2);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===================================================
   Grid + Cards (research page and shared)
   =================================================== */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.card {
  grid-column: span 12;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .card.half { grid-column: span 6; }
  .card.third { grid-column: span 4; }
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.section-title {
  margin: 40px 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===================================================
   Tables (publications)
   =================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.table th, .table td {
  padding: 12px 8px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===================================================
   Footer
   =================================================== */
.footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ===================================================
   Mobile
   =================================================== */
@media (max-width: 600px) {
  .hero {
    padding: 48px 20px 40px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .navlinks a {
    margin-left: 12px;
    font-size: 14px;
  }
}

/* ===================================================
   People Page
   =================================================== */
.people-section { margin-bottom: 48px; }
.people-section h2 {
  font-size: 20px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0 0 24px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.people-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 700px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .people-grid { grid-template-columns: repeat(3, 1fr); }
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.person-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 3px solid var(--line);
  margin-bottom: 16px;
}
.person-photo-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #f0f2f5;
  border: 3px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #9ca3af;
  margin-bottom: 16px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.person-name {
  margin: 0 0 2px 0;
  font-size: 18px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}
.person-role {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.person-bio {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 320px;
}
.person-links {
  margin-top: 8px;
  font-size: 13px;
}
.person-links a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 6px;
}
.person-links a:hover { text-decoration: underline; }

/* ===================================================
   Research Page
   =================================================== */
.research-intro {
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.wiki-link-banner {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-decoration: none !important;
  transition: background 0.15s;
}
.wiki-link-banner:hover {
  background: #094a8a;
}

.research-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .research-section {
    flex-direction: row;
    gap: 36px;
  }
  .research-section.img-right {
    flex-direction: row;
  }
  .research-section.img-left {
    flex-direction: row-reverse;
  }
  .research-text {
    flex: 3;
    min-width: 0;
  }
  .research-figure {
    flex: 2;
    min-width: 0;
  }
}

.research-section h2 {
  margin: 0 0 6px 0;
  font-size: 20px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

.research-question {
  font-style: italic;
  color: var(--accent);
  font-size: 15px;
  margin: 0 0 16px 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}

.research-text p {
  margin: 0 0 12px 0;
  color: var(--muted);
}

.key-pubs {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-2);
  font-size: 13px;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
.key-pubs strong {
  font-weight: 600;
  color: var(--muted);
}
.key-pubs a {
  color: var(--muted-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.key-pubs a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.research-figure img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.research-figure-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 16px;
  line-height: 1.4;
}

.research-figure .media-caption {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-2);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.research-all-pubs {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
}
.research-all-pubs a {
  color: var(--accent);
  font-weight: 500;
}

/* Alumni table */
.alumni-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.alumni-table th {
  text-align: left;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, sans-serif;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  color: var(--text);
  font-size: 14px;
}
.alumni-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--muted);
}
.alumni-table tr:hover td {
  background: var(--surface-2);
}
