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

:root {
  --c-bg: #ffffff;
  --c-surface: #f8f9fb;
  --c-border: #e2e6ec;
  --c-text: #1a1f2b;
  --c-text-muted: #5f6879;
  --c-primary: #1a56db;
  --c-primary-light: #e8eefb;
  --c-accent: #0d9488;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1100px;
  --max-w-narrow: 740px;
  --radius: 8px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--c-text); background: var(--c-bg); line-height: 1.65; font-size: 16px; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* === Layout === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-alt { background: var(--c-surface); }

/* === Header / Nav === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.nav-container {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; color: var(--c-text); text-decoration: none; }
.logo-icon { color: var(--c-primary); font-size: 1.3rem; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.4rem 0.75rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500;
  color: var(--c-text-muted); transition: all 0.15s; text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--c-primary); background: var(--c-primary-light); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--c-text); margin: 4px 0; border-radius: 2px; }

/* === Hero === */
.hero {
  padding: 6rem 0 5rem; text-align: center;
  background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-bg) 100%);
}
.hero-container { max-width: 700px; margin: 0 auto; padding: 0 1.5rem; }
.hero-badge {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em;
  color: var(--c-primary); background: white; padding: 0.35rem 1rem;
  border-radius: 100px; border: 1px solid var(--c-border); margin-bottom: 1.5rem;
}
.hero-title { font-size: 3rem; font-weight: 800; line-height: 1.15; margin-bottom: 1rem; letter-spacing: -0.02em; }
.hero-subtitle { font-size: 1.2rem; color: var(--c-text-muted); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; padding: 0.65rem 1.5rem;
  border-radius: 8px; font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: all 0.15s;
}
.btn-primary { background: var(--c-primary); color: white; }
.btn-primary:hover { background: #1347b8; text-decoration: none; }
.btn-outline { border: 1px solid var(--c-border); color: var(--c-text); background: white; }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); text-decoration: none; }

/* === Section Title === */
.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 2.5rem; text-align: center; letter-spacing: -0.01em; }
.page-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
.page-desc { color: var(--c-text-muted); margin-bottom: 2rem; font-size: 1.05rem; }
.page-section { padding-top: 3rem; }

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.card {
  background: white; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.75rem; transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.card-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--c-text-muted); font-size: 0.92rem; line-height: 1.6; }

/* === Post List === */
.post-list { display: grid; gap: 1rem; }
.post-card {
  background: white; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.5rem; transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.post-date { font-size: 0.8rem; color: var(--c-text-muted); font-family: var(--font-mono); }
.post-card h3 { margin: 0.3rem 0 0.5rem; font-size: 1.1rem; }
.post-card h3 a { color: var(--c-text); }
.post-card h3 a:hover { color: var(--c-primary); }
.post-card p { color: var(--c-text-muted); font-size: 0.92rem; }

/* === Team === */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.team-subsection { margin-top: 3rem; }
.team-subsection-title { margin-bottom: 1.5rem; text-align: left; }
.collaborator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.team-card { text-align: center; padding: 1.5rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: white; }
.team-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; }
.team-photo-placeholder {
  width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 1rem;
  background: var(--c-primary-light); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
}
.team-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.team-role { font-size: 0.85rem; color: var(--c-text-muted); margin-bottom: 0.25rem; }
.team-email { font-size: 0.8rem; }

/* === Publications === */
.pub-list { display: grid; gap: 1rem; }
.pub-item {
  display: grid; grid-template-columns: 60px 1fr; gap: 1rem;
  padding: 1.25rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: white;
}
.pub-year { font-family: var(--font-mono); font-size: 0.85rem; color: var(--c-text-muted); padding-top: 0.15rem; }
.pub-detail h3 { font-size: 1rem; margin-bottom: 0.25rem; line-height: 1.4; }
.pub-authors { font-size: 0.85rem; color: var(--c-text-muted); margin-bottom: 0.15rem; }
.pub-venue { font-size: 0.85rem; color: var(--c-accent); font-style: italic; margin-bottom: 0.5rem; }
.pub-links { display: flex; gap: 0.75rem; }
.pub-links a { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* === Tools === */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tool-card {
  display: block; padding: 1.75rem; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: white; transition: all 0.2s; text-decoration: none; color: var(--c-text);
}
.tool-card:hover { border-color: var(--c-primary); box-shadow: 0 4px 20px rgba(26,86,219,0.1); text-decoration: none; }
.tool-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tool-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.tool-card p { color: var(--c-text-muted); font-size: 0.9rem; line-height: 1.6; }
.tool-status { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 100px; margin-top: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status-live { background: #d1fae5; color: #065f46; }
.status-beta { background: #fef3c7; color: #92400e; }
.status-coming { background: #e0e7ff; color: #3730a3; }

/* === Content === */
.content h2 { font-size: 1.4rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul, .content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content li { margin-bottom: 0.3rem; }
.content code { font-family: var(--font-mono); font-size: 0.88em; background: var(--c-surface); padding: 0.15em 0.4em; border-radius: 4px; }
.content pre { background: #1e293b; color: #e2e8f0; padding: 1.25rem; border-radius: var(--radius); overflow-x: auto; margin-bottom: 1rem; }
.content pre code { background: none; padding: 0; color: inherit; }
.content img { border-radius: var(--radius); margin: 1.5rem 0; }
.tags { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 4px; background: var(--c-primary-light); color: var(--c-primary); }

/* === Footer === */
.site-footer { padding: 3rem 0; border-top: 1px solid var(--c-border); background: var(--c-surface); }
.footer-container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; text-align: center; }
.footer-lab { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.footer-container p { font-size: 0.88rem; color: var(--c-text-muted); margin-bottom: 0.25rem; }
.footer-links { margin: 1rem 0; display: flex; gap: 1rem; justify-content: center; }
.footer-links a { font-size: 0.88rem; font-weight: 600; }
.footer-copy { margin-top: 1rem; font-size: 0.78rem; color: var(--c-text-muted); }

/* === Mobile === */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--c-border);
    flex-direction: column; padding: 0.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.6rem 0.75rem; }
  .card-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .collaborator-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-item { grid-template-columns: 1fr; }
  .pub-year { font-weight: 600; }
}
