:root {
  --ink: #1a1a1a;
  --muted: #6e6e6e;
  --line: #e2e2e2;
  --link: #1a1a1a;
  --accent: #3a6ea5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover, a:focus-visible { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

h2 {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 18px;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

/* ---------- page shell ---------- */

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.page--pad-top { padding-top: 72px; }
.page--pad-bottom { padding-bottom: 56px; }

.site-header { margin-bottom: 36px; }
.site-header h1 { font-size: 27px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.site-header .role { font-size: 16px; color: var(--muted); margin: 0; }

.bio-section {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 8px;
}
.avatar-xl {
  width: 240px;
  height: 240px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}
.bio-text { flex: 1; min-width: 0; }

nav.site-nav {
  font-size: 15px;
  margin: 20px 0 0;
}
nav.site-nav a {
  color: var(--ink);
  text-decoration: none;
  margin-right: 20px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
nav.site-nav a:last-child { margin-right: 0; }
nav.site-nav a:hover { border-bottom-color: var(--line); }
nav.site-nav a.active { font-weight: 600; border-bottom-color: var(--ink); }

.divider {
  text-align: center;
  color: var(--line);
  letter-spacing: 0.4em;
  font-size: 13px;
  margin: 32px 0;
  user-select: none;
}

.quicklinks {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 32px;
}
.quicklinks a { margin-right: 4px; color: var(--link); }
.quicklinks span.sep { margin: 0 8px; color: var(--line); }

/* ---------- research page ---------- */

.fieldwork-banner {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 24px;
  box-sizing: border-box;
}
.fieldwork-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.fieldwork-banner figcaption {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

.project { margin-bottom: 28px; }
.project:last-child { margin-bottom: 0; }
.project h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.project p { font-size: 16px; color: #333; margin: 0 0 6px; }
.project .meta { font-size: 13px; color: var(--muted); }

/* ---------- publications page ---------- */

.pubs-section { margin-bottom: 36px; }
.pubs-section:last-child { margin-bottom: 0; }
.pubs-section h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 16px;
}

.pub { margin-bottom: 18px; font-size: 16px; }
.pub:last-child { margin-bottom: 0; }
.pub .authors { color: #333; }
.pub .authors strong { font-weight: 700; color: var(--ink); }
.pub .authors sup { font-weight: 700; }
.pub .pub-title {
  color: var(--ink);
  text-decoration-color: var(--line);
}
.pub .venue {
  font-style: italic;
  color: var(--accent);
}
.pub .links {
  font-size: 13px;
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.pub-footnote {
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
}

footer {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 0 24px 56px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .bio-section { flex-direction: column; }
  .avatar-xl { width: 160px; height: 160px; }
}

@media (max-width: 480px) {
  .page { padding: 0 20px; }
  .page--pad-top { padding-top: 48px; }
  .page--pad-bottom { padding-bottom: 40px; }
  .fieldwork-banner { padding: 0 20px; }
  footer { padding: 0 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================
   Tufte-style preview — currently used only on research.html
   ============================================================ */

.tufte-body {
  background: #fffff8;
  color: #111;
  font-family: et-book, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
}

.tufte-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 40px 0;
}
.tufte-header h1 { font-size: 32px; font-weight: 400; margin: 0 0 4px; }
.tufte-header .role { font-style: italic; color: #555; font-size: 18px; margin: 0 0 20px; }

.tufte-nav { font-size: 15px; font-variant: small-caps; letter-spacing: 0.02em; }
.tufte-nav a { color: #111; text-decoration: none; margin-right: 22px; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.tufte-nav a.active { border-bottom-color: #111; }
.tufte-nav a:hover { border-bottom-color: #ccc; }

.tufte-rule { border: none; border-top: 1px solid #ddd; max-width: 1400px; margin: 32px auto; }

.tufte-figure { max-width: 55%; padding: 0 40px; margin: 0 auto 8px; }
.tufte-figure img { width: 100%; display: block; border-radius: 2px; }
.tufte-figure figcaption {
  font-style: italic;
  font-size: 15px;
  color: #555;
  margin-top: 8px;
}

article.tufte-article { max-width: 55%; padding: 0 40px; margin: 0 auto; counter-reset: sidenote-counter; }
.tufte-article h2 {
  font-variant: small-caps;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #111;
  margin: 8px 0 28px;
}

.tufte-project { margin-bottom: 2.4rem; }
.tufte-project:last-child { margin-bottom: 0; }
.tufte-project h3 { font-size: 21px; font-weight: 400; font-style: italic; margin: 0 0 6px; }
.tufte-project p { margin: 0; text-align: justify; hyphens: auto; }

.sidenote-number { counter-increment: sidenote-counter; font-size: 0.7em; vertical-align: super; }
.sidenote-number::after { content: counter(sidenote-counter); }

.sidenote {
  float: right;
  clear: right;
  margin-right: -46%;
  width: 40%;
  margin-top: 0.2rem;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #333;
  text-align: left;
}
.sidenote::before { content: counter(sidenote-counter) " "; vertical-align: super; font-size: 0.8em; }
.sidenote a { color: #333; }

.tufte-footer {
  max-width: 1400px;
  margin: 56px auto 0;
  padding: 0 40px 56px;
  font-size: 13px;
  color: #777;
}

/* -- about page: bio + avatar in the margin -- */

.tufte-bio { margin-bottom: 8px; }
.tufte-avatar {
  float: right;
  clear: right;
  margin-right: -46%;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  width: 40%;
}
.tufte-avatar img { width: 100%; display: block; border-radius: 4px; }

.tufte-quicklinks { font-size: 16px; color: #555; margin-top: 8px; }
.tufte-quicklinks a { color: #111; }
.tufte-quicklinks span.sep { margin: 0 8px; color: #ccc; }

/* -- publications page -- */

.tufte-margin-figure {
  float: left;
  clear: left;
  margin-left: -37%;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  width: 32%;
}
.tufte-margin-figure img { width: 100%; display: block; border-radius: 4px; }
.tufte-margin-figure figcaption {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
  margin-top: 0.5rem;
  text-align: left;
}

.tufte-pubs-section { margin-bottom: 40px; }
.tufte-pubs-section:last-child { margin-bottom: 0; }

.tufte-pubs-group {
  font-variant: small-caps;
  font-size: 18px;
  font-weight: 400;
  color: #555;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

.tufte-pub { margin-bottom: 1.6rem; }
.tufte-pub:last-child { margin-bottom: 0; }
.tufte-pub p { margin: 0; text-align: justify; hyphens: auto; }
.tufte-pub .authors { color: #333; }
.tufte-pub .authors strong { font-weight: 700; color: #111; }
.tufte-pub .authors sup { font-weight: 700; }
.tufte-pub .pub-title { font-style: italic; }

.tufte-pub-footnote { font-size: 15px; color: #777; margin-top: 20px; }

@media (max-width: 900px) {
  .tufte-figure, article.tufte-article { max-width: 100%; }
  .sidenote {
    float: none;
    display: block;
    width: auto;
    margin: 0.6rem 0 0.6rem 1.4rem;
    font-size: 15px;
  }
  .tufte-avatar,
  .tufte-margin-figure {
    float: none;
    width: 55%;
    margin: 0 auto 1.5rem;
  }
}
