/* Morandi-inspired palette: muted, low-saturation tones */
:root {
  --bg: #f4f1ec;          /* warm paper */
  --ink: #3b3835;         /* main text */
  --muted: #7d766f;       /* secondary text */
  --rule: #ddd6cc;        /* dividers */
  --accent: #7f8f7b;      /* sage: nav active */
  --link: #6f8195;        /* dusty blue: links */
  --clay: #a98573;        /* clay: photo border */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
}

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

h2, h3, .brand {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 500;
  color: var(--ink);
}

/* Top bar: name on the left, section links on the right */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 14px 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.brand { font-size: 24px; line-height: 1.2; }
.brand:hover { text-decoration: none; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav a { color: var(--muted); font-size: 18px; padding: 4px 0; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--accent); font-weight: 500; }

/* Single centered column; full width on small screens */
.page {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 56px 40px 112px;
}

.section {
  scroll-margin-top: 80px;
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.section:last-child { border-bottom: 0; margin-bottom: 0; }

/* Intro: photo on the left, text block on the right */
.intro {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.avatar {
  flex: 0 0 240px;
  width: 240px;
  height: 320px;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 30%;
  border: 0;
}

.intro-body { flex: 1; min-width: 0; }
.intro-body p { margin: 0 0 18px; }

/* Three buttons under the intro text */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--clay);
  border-radius: 999px;
  color: var(--ink);
  font-size: 17px;
  transition: background 0.2s, color 0.2s;
}
.btn i { color: var(--link); }
.btn:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.btn:hover i { color: var(--bg); }

/* Section headings */
.section h2 { font-size: 42px; margin: 0 0 24px; line-height: 1.1; }
.section h3 {
  font-size: 24px;
  margin: 32px 0 12px;
  color: var(--muted);
}

.muted { color: var(--muted); }

/* Education & experience entries */
.entry { margin-bottom: 20px; }
.entry-title { font-weight: 500; font-size: 20px; }
.entry-meta { color: var(--muted); font-size: 17px; }

.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px dotted var(--rule); }
.plain-list li:last-child { border-bottom: 0; }

.job {
  display: flex;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px dotted var(--rule);
}
.job:last-of-type { border-bottom: 0; }
.logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex: 0 0 68px;
}
.job-body { flex: 1 1 0; min-width: 0; }
.bullets { margin: 10px 0 0; padding-left: 20px; color: var(--ink); font-size: 16px; }
.bullets li { margin-bottom: 6px; }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: 18px 0; border-bottom: 1px dotted var(--rule); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 500; font-size: 20px; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--link); }
.pub-authors { font-size: 17px; color: var(--muted); margin-top: 4px; }
.pub-venue { font-size: 17px; font-style: italic; color: var(--muted); }

/* Phone / narrow screens: stack the intro, shrink the photo */
@media (max-width: 720px) {
  .topbar { padding: 12px 20px; }
  .brand { font-size: 20px; }
  .nav { gap: 4px 16px; }
  .nav a { font-size: 16px; }
  .page { padding: 32px 20px 72px; }
  .intro { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
  .avatar { flex-basis: 170px; width: 170px; height: 227px; }
  .buttons { justify-content: center; }
  .section h2 { font-size: 36px; }
  .job { gap: 16px; }
  .logo { width: 56px; height: 56px; flex-basis: 56px; }
}
