:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #004b8d;
  --brand-50: #004b8d1a;
  --card: #f8fafc;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

.header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky; top:0; z-index: 100;
}
.header-inner { display:flex; gap:16px; align-items:center; justify-content:space-between; padding: 12px 24px; }
.brand { display:flex; align-items:center; gap:12px; }
.brand .logo { width:40px; height:40px; border-radius: 8px; background: var(--brand); display:flex; align-items:center; justify-content:center; color:white; font-weight:700; }
.brand .titles { display:flex; flex-direction:column; }
.brand .title { font-size:18px; font-weight:700; }
.brand .subtitle { font-size:12px; color: var(--muted); }

.nav { display:flex; gap:14px; flex-wrap:wrap; }
.nav a { padding:8px 12px; border-radius: 10px; }
.nav a[aria-current="page"], .nav a:hover { background: var(--brand-50); }

.lang-switch { font-size: 14px; color: var(--muted); }

.hero {
  background: linear-gradient(180deg, var(--brand-50), transparent);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 48px 24px; }
.hero h1 { font-size: 44px; line-height:1.1; margin:0 0 12px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 90ch;}

.main { padding: 24px; }
.section { margin: 32px 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.section h2 { margin-top:0; font-size: 24px; }

.grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }

.people-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.person { background:#fff; border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.person img { width:100%; aspect-ratio: 1 / 1; object-fit: cover; display:block; }
.person .meta { padding:12px; }
.person .name { font-weight:600; }
.person .role { color: var(--muted); font-size: 14px; }

.footer {
  border-top:1px solid var(--border);
  background:#fff;
}
.footer-inner { padding: 24px; display:flex; gap:16px; flex-wrap:wrap; align-items:center; justify-content:space-between; }
.footer small { color: var(--muted); }
.footer .links a { margin-right: 12px; }

.timeline { list-style:none; margin:0; padding:0; }
.timeline li { display:flex; gap:12px; padding: 10px 0; border-bottom:1px dashed var(--border); }
.timeline .year { width: 80px; font-weight: 600; color: var(--brand); }
.timeline .event { flex:1; }

.events { list-style: none; padding:0; margin:0; }
.events li { padding:10px 0; border-bottom:1px dashed var(--border); display:flex; gap:12px; align-items:center; }
.events .date { font-weight:600; min-width: 110px; width: auto; white-space: nowrap; }
.events .title { flex:1; }

/* === Moved from people.html === */

  .section h3 { margin: 0 0 12px; font-size: 20px; }
  .avatar {
    width: 100%; aspect-ratio: 1 / 1; border-radius: 12px;
    display:flex; align-items:center; justify-content:center;
    border:1px solid var(--border); background: var(--card); color: var(--muted);
    font-weight: 700; font-size: 36px;
  }


/* === Moved from research.html === */

  .media-grid { display:grid; grid-template-columns: 1fr; gap: 16px; }
  .media-grid img { width: 100%; height: auto; display:block; border-radius: 12px; border:1px solid var(--border); background:#fff; }
  .media-caption { color: var(--muted); font-size: 16px; font-weight: bold; margin-top: 6px; text-align:center; }
  @media (min-width: 900px) {
  .media-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .media-grid figure:first-child {
    grid-column: 1 / -1;
    width: 70%;
    justify-self: center;
    margin: 0 auto;
  }
  .media-grid figure:nth-child(2),
  .media-grid figure:nth-child(3) {
    transform: scale(1.05); /* slightly larger */
  }
}

  .media-grid figure:first-child {
    grid-column: 1 / -1;
    width: 70%;
    justify-self: center;
    margin: 0 auto;
  }
}

    .media-grid figure:first-child { grid-column: 1 / -1; }
}

  .link-list { list-style: none; margin: 0; padding: 0; }
  .link-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
  .link-list a { font-weight: 600; }


.awards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.award-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.award-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.award-card h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: var(--text);
}

.award-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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


/* === Moved from projects.html === */

  /* Page-specific styling for projects */
  .projects-intro { color: var(--muted); margin-top: -8px; }
  .project-list { list-style: none; margin: 0; padding: 0; }
  .project-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 10px 0;
  }
  .project-title { font-weight: 600; line-height: 1.45; }
  .project-meta { font-size: 14px; color: var(--muted); margin-top: 6px; display:flex; flex-wrap:wrap; gap: 10px; }
  .badge {
    display:inline-block; font-size: 12px; padding: 2px 8px;
    border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  }
  .section h2 { margin-bottom: 8px; }


/* === Moved from publications.html === */

  /* Publications page tweaks for readability */
  .pub-section h2 { margin-bottom: 8px; }
  .pub-note { color: var(--muted); margin-top: 0; }
  .pub-list { margin: 0; padding-left: 1.2rem; }
  .pub-list li { 
    margin: 8px 0 12px; 
    line-height: 1.55;
  }
  /* Hanging indent look for long entries */
  .pub-list { list-style: decimal; }
  .pub-list li { padding-left: .6rem; text-indent: -.6rem; }


/* === Moved from facilities.html === */

  /* Facilities page tweaks */
  .facilities-intro { color: var(--muted); margin-top: -4px; }
  .facility-grid { display:grid; grid-template-columns: 1fr; gap: 16px; }
  @media (min-width: 900px) { .facility-grid { grid-template-columns: 1fr 1fr; } }
  .facility-card { background:#fff; border:1px solid var(--border); border-radius:16px; padding:16px; }
  .facility-card h3 { margin: 0 0 8px; font-size: 18px; line-height:1.3; }
  .specs { margin:0; padding-left: 1.1rem; }
  .specs li { margin: 4px 0; }



/* === Poster links modern style === */
.poster-links { list-style: none; margin: 0; padding: 0; }
.poster-links li { margin: 10px 0; font-weight: 500; }
.poster-links a {
  display: flex; align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}
.poster-links a:hover { background: var(--brand-50); }
/* === Posters Option 3 (minimal modern links) === */
.poster-links { list-style: none; margin: 0; padding: 0; }
.poster-links li { margin: 10px 0; font-weight: 500; }
.poster-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.poster-links a:hover { background: var(--brand-50); text-decoration: none; }
/* === Scoped Posters badge so Projects' badges are unaffected === */
.poster-links .badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}
