@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --text:       #1a1a18;
  --muted:      #6b6b63;
  --subtle:     #a8a89f;
  --accent:     #2a5c8f;
  --accent-lt:  #e8f0f8;
  --border:     #e0dfd6;
  --bg:         #faf9f6;
  --white:      #ffffff;
  --nav-w:      200px;
  --serif:      'Lora', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────── */
nav {
  width: var(--nav-w);
  flex-shrink: 0;
  padding: 3rem 2rem 2rem 2.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--white);
}

nav .site-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 2.5rem;
  color: var(--text);
  text-decoration: none;
}

nav ul { list-style: none; }
nav ul li + li { margin-top: 0.15rem; }

nav ul li a {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: block;
  padding: 0.3rem 0;
  transition: color 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--accent);
}

nav ul li a.active {
  font-weight: 500;
}

/* ── Main ────────────────────────────────────── */
main {
  flex: 1;
  max-width: 680px;
  padding: 4rem 3.5rem 6rem;
}

/* ── Profile section ─────────────────────────── */
.profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

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

.profile-photo-placeholder {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--accent-lt);
  flex-shrink: 0;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
}

.profile-info h1 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.profile-info .role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.profile-info .institution {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.links a {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-lt);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.links a:hover { border-color: var(--accent); }

/* ── Bio ─────────────────────────────────────── */
.bio {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.bio p + p { margin-top: 1em; }

.bio a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-lt);
  transition: border-color 0.15s;
}
.bio a:hover { border-color: var(--accent); }

/* ── Page headings ───────────────────────────── */
h2.page-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ── Section heading ─────────────────────────── */
h3.section-heading {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 2.5rem 0 1rem;
}

/* ── Publication entry ───────────────────────── */
.pub-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-entry:first-of-type { border-top: 1px solid var(--border); }

.pub-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.pub-authors strong { color: var(--text); font-weight: 500; }

.pub-venue {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.pub-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-lt);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  transition: background 0.15s;
}
.pub-links a:hover { background: #d4e4f4; }

.award-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #7a4f00;
  background: #fff3d0;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ── Teaching entry ──────────────────────────── */
.teaching-entry {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.teaching-entry:first-of-type { border-top: 1px solid var(--border); }

.teaching-entry .course {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.teaching-entry .course-detail {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Generic list items ──────────────────────── */
.item-entry {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.item-entry:first-of-type { border-top: 1px solid var(--border); }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 720px) {
  body { flex-direction: column; }
  nav {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.5rem 1rem;
  }
  nav .site-name { margin-bottom: 1rem; }
  nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
  main { padding: 2rem 1.5rem 4rem; max-width: 100%; }
  .profile { flex-direction: column; gap: 1.5rem; }
}
