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

:root {
  --bg:       #ffffff;
  --bg-alt:   #f7f8fa;
  --fg:       #1a1a2e;
  --fg-muted: #555;
  --accent:   #2d5f9a;
  --accent-hover: #1e4474;
  --border:   #e0e0e0;
  --radius:   6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #121218;
    --bg-alt:   #1a1a24;
    --fg:       #e0e0e6;
    --fg-muted: #9a9ab0;
    --accent:   #6ea8e6;
    --accent-hover: #8fc0f5;
    --border:   #2a2a3a;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.header-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.header-text h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.header-text .tagline {
  font-size: 1.05rem;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.header-links a {
  white-space: nowrap;
}

/* ── Sections ────────────────────────────────────────────── */
section {
  padding-top: 2rem;
}

section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── About ───────────────────────────────────────────────── */
.about p {
  margin-bottom: 0.75rem;
  color: var(--fg);
}

/* ── Publications ────────────────────────────────────────── */
.pub-list {
  list-style: none;
}

.pub-list li {
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.pub-title {
  font-weight: 600;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--fg-muted);
}

.pub-venue {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--fg-muted);
}

.pub-summary {
  font-size: 0.92rem;
  color: var(--fg);
  margin-top: 0.35rem;
}

.pub-links {
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.pub-links a {
  margin-right: 0.75rem;
}

/* ── Experience & Education ──────────────────────────────── */
.entry {
  margin-bottom: 1rem;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.entry-title {
  font-weight: 600;
}

.entry-date {
  font-size: 0.88rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

.entry-detail {
  font-size: 0.92rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
}

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 560px) {
  .header {
    flex-direction: column;
    text-align: center;
  }
  .header-links { justify-content: center; }
  .entry-header { flex-direction: column; }
}
