:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1e40af;
  --border: #e5e7eb;
  --surface: #f9fafb;
  --max: 740px;
  --cv-max: 820px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

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

/* ── Nav ── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.nav-inner {
  max-width: var(--cv-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.nav-name:hover { text-decoration: none; color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.875rem; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

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

main.wide { max-width: var(--cv-max); }

/* ── Hero ── */
.hero { margin-bottom: 3.5rem; }
.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.hero .subtitle { color: var(--muted); font-size: 0.975rem; margin-bottom: 0.15rem; }
.hero .affil { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

.pill-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.pill-links a {
  font-size: 0.825rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.75rem;
  border-radius: 2rem;
  transition: color 0.15s, border-color 0.15s;
}
.pill-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

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

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.about p {
  line-height: 1.8;
  color: var(--text);
  max-width: 62ch;
}

/* ── Project Cards ── */
.projects-grid { display: grid; gap: 0.875rem; }

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.project-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 12px rgba(30,64,175,0.07);
}
.project-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent); text-decoration: none; }
.project-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.tag {
  font-size: 0.72rem;
  background: var(--surface);
  color: var(--muted);
  padding: 0.15rem 0.55rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
}

/* ── Publications ── */
.pub-entry {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}
.pub-authors { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.15rem; }
.pub-title { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.15rem; line-height: 1.4; }
.pub-venue { font-size: 0.85rem; color: var(--muted); }
.pub-venue a { color: var(--muted); }
.pub-venue a:hover { color: var(--accent); }

/* ── CV-specific ── */
.cv-header { margin-bottom: 2.5rem; }
.cv-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.cv-header .cv-contact {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.cv-header .cv-contact a { color: var(--muted); }
.cv-header .cv-contact a:hover { color: var(--accent); }

.cv-section { margin-bottom: 2.25rem; }
.cv-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.1rem;
}

.cv-entry { margin-bottom: 1.25rem; }
.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.cv-entry-title { font-weight: 600; font-size: 0.95rem; }
.cv-entry-date { font-size: 0.825rem; color: var(--muted); white-space: nowrap; }
.cv-entry-org { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.4rem; }
.cv-entry ul { padding-left: 1.25rem; margin-top: 0.35rem; }
.cv-entry ul li { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.2rem; line-height: 1.55; }

.cv-pub { margin-bottom: 0.85rem; font-size: 0.875rem; line-height: 1.65; padding-left: 1.25rem; text-indent: -1.25rem; }
.cv-pub .pub-venue { color: var(--muted); font-style: italic; }
.pub-status { font-size: 0.72rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.cv-sync-note {
  margin-top: 2.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
