/* =========================================
   MOILab — Static Site Styles
   Inspired by Hestia theme, simplified
   ========================================= */

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

:root {
  --text: #3c4858;
  --text-light: #999999;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --border: #e9ecef;
  --accent: #3c4858;
  --radius: 6px;
  --max-width: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --- Nav --- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-social { display: flex; gap: 16px; margin-left: 24px; }
.nav-social a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s;
}
.nav-social a:hover { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 24px; }

/* --- Hero --- */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  background: var(--bg-light);
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

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

/* --- Section --- */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 60px;
}

/* --- Cards Grid --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-light);
}
.card-body { padding: 24px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card-body p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

/* --- Media/Row (for databases, members) --- */
.media-row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.media-row:last-child { border-bottom: none; }
.media-row.reverse { flex-direction: row-reverse; }
.media-img {
  flex: 0 0 280px;
  border-radius: var(--radius);
  overflow: hidden;
}
.media-img img { width: 100%; }
.media-body { flex: 1; }
.media-body h3 { font-size: 1.25rem; margin-bottom: 12px; }
.media-body p { font-size: 0.92rem; color: var(--text-light); line-height: 1.8; }

/* --- Member Card --- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.member-card {
  display: flex;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  align-items: center;
}
.member-avatar {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-light);
}
.member-info h4 { font-size: 1rem; margin-bottom: 4px; }
.member-info .email { font-size: 0.82rem; color: var(--text-light); word-break: break-all; }

/* --- Featured Member (Leader) --- */
.featured-member {
  display: flex;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.featured-member.reverse { flex-direction: row-reverse; }
.featured-avatar {
  flex: 0 0 180px;
  border-radius: var(--radius);
  overflow: hidden;
}
.featured-avatar img { width: 100%; }
.featured-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.featured-body .role { font-size: 0.95rem; color: var(--text-light); margin-bottom: 8px; }
.featured-body .focus { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
.featured-body .email { font-size: 0.85rem; color: var(--text-light); }

/* --- Publication list --- */
.pub-list { list-style: none; }
.pub-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.7;
}
.pub-list li:last-child { border-bottom: none; }

/* --- News item --- */
.news-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-item .date { font-size: 0.82rem; color: var(--text-light); }
.news-item h3 { font-size: 1.15rem; margin: 8px 0; }
.news-item p { font-size: 0.92rem; color: var(--text-light); line-height: 1.8; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Page Header --- */
.page-header {
  padding: 64px 24px 40px;
  text-align: center;
  background: var(--bg-light);
}
.page-header h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: var(--text-light); font-size: 1rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .media-row, .media-row.reverse { flex-direction: column; }
  .media-img { flex: 0 0 auto; }
  .featured-member, .featured-member.reverse { flex-direction: column; text-align: center; }
  .featured-avatar { flex: 0 0 150px; }
  .nav-inner { flex-direction: column; height: auto; padding: 16px 24px; gap: 12px; }
  .nav-links { gap: 20px; }
  .cards { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: 1fr; }
}
