/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
}

a {
  color: #1a6fb5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Navigation */
nav {
  background: #1a1a2e;
  color: #fff;
  padding: 0 1rem;
}

.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #ccc;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  text-decoration: none;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1rem 2rem;
  background: #f5f7fa;
  border-bottom: 1px solid #e0e4e8;
}

.hero-video {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a1a;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  opacity: 0.5;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.hero-video h1 {
  color: #fff;
}

.hero .subtitle,
.hero .tagline {
  font-size: 1.15rem;
  color: #444;
  max-width: 600px;
  margin: 0 auto 0.25rem;
}

.hero .tagline {
  font-size: 1.3rem;
  font-weight: 500;
  color: #1a1a2e;
  max-width: 650px;
  margin: 0 auto 0.5rem;
}

.hero-video .tagline {
  color: #e0e4e8;
}

.hero .institution {
  font-size: 0.95rem;
  color: #666;
}

.hero-video .institution {
  color: #aaa;
}

/* Research cards */
.research-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.research-card {
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.research-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.research-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.research-card h2 {
  font-size: 1.15rem;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}

.research-card p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}

/* Main content */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

.page h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.page p {
  margin-bottom: 1rem;
}

/* Publications */
.publication-list {
  list-style: none;
  margin-top: 1.5rem;
}

.publication-item {
  padding: 1rem 0;
  border-bottom: 1px solid #e0e4e8;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pub-title {
  font-weight: 600;
  color: #1a1a2e;
}

.pub-authors {
  font-size: 0.95rem;
  color: #444;
}

.pub-journal {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.pub-links a {
  font-weight: 500;
}

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

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

.team-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
}

.photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #dde1e6;
  margin: 0 auto;
}

.team-card h2 {
  font-size: 1.15rem;
  margin-top: 0.75rem;
  margin-bottom: 0.15rem;
}

.team-role {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.team-bio {
  font-size: 0.9rem;
  color: #444;
}

.team-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  font-size: 0.9rem;
}

/* Software/tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.tool-card {
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.tool-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tool-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.tool-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.tool-header h2 a {
  color: #1a1a2e;
}

.tool-lang {
  font-size: 0.8rem;
  color: #666;
  background: #f0f2f5;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.tool-card p {
  font-size: 0.9rem;
  color: #444;
  flex-grow: 1;
}

.tool-footer {
  margin-top: 0.75rem;
}

.tool-link {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Media grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.media-item video {
  width: 100%;
  border-radius: 4px;
  background: #000;
}

.media-item h2 {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.media-item p {
  font-size: 0.9rem;
  color: #444;
}

/* Footer */
footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.85rem;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.footer-links a {
  color: #8ab4f8;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero {
    padding: 2.5rem 1rem 1.5rem;
  }

  .hero-video {
    min-height: 300px;
  }

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

  .team-grid,
  .tools-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }
}
