@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #0056b3;
  --text-main: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --bg-main: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-heading);
  margin-top: 0;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #003d82;
  text-decoration: underline;
}

/* Navigation */
nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  padding: 0 24px;
  align-items: center;
}

.nav-container a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
}

.nav-container a:hover,
.nav-container a.active {
  color: var(--primary-color);
  text-decoration: none;
}

/* Home Page Specifics */
.lab-desc {
  font-size: 1.125rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hiring {
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-weight: 500;
}

.photo-player {
  position: relative;
  margin-bottom: 2.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #000;
}

.photo-player img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease-in-out;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 16px;
}

.carousel-btn.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dots .dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dots .dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.3);
}

/* News */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.news-list li::before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.news-list .highlight {
  font-weight: 600;
  color: var(--text-heading);
  margin-right: 0.5rem;
}

/* Publications - Image List */
.topics {
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  font-size: 0.95rem;
}

.topics:hover {
  color: var(--primary-color);
}

.publication-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

.publication-img {
  width: 280px;
  min-width: 280px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.publication-info {
  flex: 1;
}

.pub-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pub-authors {
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.pub-venue {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.5rem;
}

.pub-links a {
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Publications - Text List (publications.html) */
.publication {
  margin-bottom: 1.5rem;
}

.publication-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.publication-authors {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.publication-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* People Page */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 3rem 2rem;
  margin-top: 2rem;
}

.person-card {
  text-align: center;
}

.person-card.pi {
  grid-column: 1 / -1;
  display: flex;
  text-align: left;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.person-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--bg-main);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.person-card.pi .person-photo {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  margin-bottom: 0;
}

.person-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
}

.person-role {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.person-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.person-teaching {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  .publication-item {
    flex-direction: column;
    gap: 1rem;
  }
  .publication-img {
    width: 100%;
    max-width: 400px;
  }
  .person-card.pi {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 0;
  }
  .person-card.pi .person-photo {
    border-radius: 50%;
    width: 200px;
    height: 200px;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
}
