:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-text: #1a1a1a;
  --color-light: #555;
  --color-link: #1a56a0;
  --color-accent: #b91c2c;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --max-width: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
}

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

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  overflow-x: auto;
}

nav a {
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

nav a:hover { color: var(--color-link); }

/* ── Main layout ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Profile header ── */
.profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.profile img {
  width: 175px;
  height: 175px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.profile-info .position {
  font-size: 0.975rem;
  color: var(--color-light);
  margin-bottom: 0.5rem;
}

.profile-info .contact {
  font-size: 0.9rem;
  color: var(--color-light);
  margin-bottom: 0.25rem;
}

.profile-info .affiliations {
  margin-top: 0.65rem;
}

.affiliations ul {
  list-style: disc;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.affiliations li { margin-bottom: 0.15rem; }

/* ── Section headings ── */
section { margin-bottom: 2.5rem; }

section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
  color: var(--color-text);
}

section p { margin-bottom: 0.75rem; }

section ul { padding-left: 1.4rem; }
section ul li { margin-bottom: 0.4rem; }

/* ── Links ── */
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Info box (prospective students) ── */
.info-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0 2.5rem;
  font-size: 0.95rem;
}

.info-box > strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.975rem;
}

.info-box > p { margin-bottom: 0.5rem; }

.info-box ul {
  padding-left: 1.2rem;
}

.info-box li { margin-bottom: 0.45rem; }

/* ── Publication tabs ── */
.pub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pub-tab {
  padding: 0.3rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--color-light);
  transition: all 0.15s;
}

.pub-tab:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.pub-tab.active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

/* ── Publications ── */
.pub-disclaimer {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding: 0.7rem 1rem;
  background: var(--color-bg-alt);
  border-radius: 5px;
}

.pub-year-group { margin-bottom: 0.5rem; }

.pub-year {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-light);
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-list {
  list-style: none;
  padding: 0;
}

.pub-entry {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-entry:last-child { border-bottom: none; }

.pub-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.45;
}

.pub-title a { color: var(--color-text); }
.pub-title a:hover { color: var(--color-link); text-decoration: none; }

.pub-authors {
  font-size: 0.9rem;
  color: var(--color-light);
  margin-bottom: 0.3rem;
}

.pub-authors a {
  color: var(--color-light);
  font-weight: 500;
}

.pub-authors a:hover { color: var(--color-link); text-decoration: underline; }

.pub-self { font-weight: 700; color: var(--color-text) !important; }

.pub-meta {
  font-size: 0.875rem;
  line-height: 1.8;
}

.venue-conf { color: var(--color-accent); font-weight: 500; }
.venue-preprint { color: var(--color-muted); }

.pub-award {
  font-weight: 600;
  color: #854d0e;
}

.pub-links { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; vertical-align: middle; }

/* ── Topic badges ── */
.topic-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.3rem;
  border: 1px solid;
}

.topic-alignment-safety { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.topic-interpretability { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.topic-reasoning        { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.topic-agents           { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.topic-retrieval        { background: #ecfeff; color: #0891b2; border-color: #a5f3fc; }
.topic-evaluation       { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.topic-ai-for-science   { background: #f0fdfa; color: #0d9488; border-color: #99f6e4; }
.topic-multilinguality  { background: #fdf2f8; color: #db2777; border-color: #fbcfe8; }
.topic-social-impact    { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
.topic-embodied         { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }
.topic-multimodal       { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }


.pub-link {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-link);
  white-space: nowrap;
  transition: background 0.15s;
}

.pub-link:hover {
  background: #dbeafe;
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .profile { flex-direction: column; gap: 1rem; }
  .profile img { width: 110px; height: 110px; }
  .nav-inner { gap: 1.1rem; }
  main { padding: 1.5rem 1rem 3rem; }
}
