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

:root {
  --black:  #1a1917;
  --mid:    #4a4846;
  --light:  #8a8582;
  --rule:   #d8d4ce;
  --bg:     #f9f8f6;
  --olive:  #6B7B6A;
  --serif:  'EB Garamond', Georgia, serif;
  --body:   'Lora', Georgia, serif;
  --max-w:  860px;
  --pad:    clamp(1.5rem, 5vw, 4rem);
}

html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--black);
  font-family: var(--body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--olive); text-decoration-color: var(--olive); }

.site { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }

/* ── Nav ── */
nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2.2rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}
.nav-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
}
.nav-name:hover { color: var(--black); }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
}
.nav-links a:hover,
.nav-links a.active { color: var(--olive); }

/* ── Intro ── */
.intro { padding: 4rem 0 3.5rem; }

.intro-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 2.2rem;
}

.intro-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}
.intro-title {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--mid);
  line-height: 1.6;
}
.intro-photo { display: flex; justify-content: flex-end; }
.intro-photo img {
  width: 100%;
  max-width: 260px;
  display: block;
  filter: grayscale(15%) contrast(1.02);
  border-radius: 2px;
}

/* ── Drop cap — olive ── */
.intro-statement { font-size: 1rem; line-height: 1.78; }
.intro-statement p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  font-weight: 500;
  line-height: 0.82;
  float: left;
  margin-right: 0.06em;
  margin-top: 0.06em;
  color: var(--olive);
}
.intro-statement p:first-of-type::after { content: ''; display: table; clear: both; }

.divider { border: none; border-top: 1px solid var(--rule); }

/* ── Section label — olive ── */
.section-label {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1.6rem;
}

/* ── Carousel ── */
.featured { padding: 3.5rem 0; }
.carousel-wrap { position: relative; overflow: hidden; }
.carousel-track { display: flex; will-change: transform; }

.paper-card {
  flex: 0 0 100%;
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.paper-image {
  width: 100%; height: 155px;
  background: #e8e5e0;
  flex-shrink: 0; overflow: hidden; position: relative;
}
.paper-image img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(10%); }
.paper-image.is-book { background: #ede9e2; }
.paper-image-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: #c0bbb4;
}

.paper-card-body {
  padding: 1.5rem 2rem 0;
  display: flex; flex-direction: column; gap: 0.55rem; flex: 1;
}

.paper-meta {
  font-family: var(--serif);
  font-size: 0.82rem; font-style: italic; color: var(--light);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.7em;
}

.paper-meta-award {
  font-style: normal; font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--olive);
  border: 1px solid color-mix(in srgb, var(--olive) 30%, transparent);
  padding: 0.05em 0.5em; border-radius: 1px;
}

.paper-type-pill {
  font-style: normal; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--light);
  border: 1px solid var(--rule); padding: 0.05em 0.45em; border-radius: 1px;
}

.paper-title {
  font-family: var(--serif);
  font-size: 1.18rem; font-weight: 500; line-height: 1.38; color: var(--black);
}
.paper-finding { font-size: 0.88rem; line-height: 1.65; color: var(--mid); flex: 1; }

.paper-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 2rem 1.4rem; margin-top: 1rem; border-top: 1px solid var(--rule);
}
.paper-links { display: flex; gap: 0.75rem; }
.paper-link {
  font-family: var(--serif);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--mid);
  border: 1px solid var(--rule); padding: 0.28rem 0.65rem; border-radius: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.paper-link:hover { border-color: var(--olive); color: var(--olive); }
.paper-badge { font-family: var(--serif); font-size: 0.78rem; color: var(--light); letter-spacing: 0.03em; }

/* ── Controls ── */
.carousel-controls {
  display: flex; align-items: center; justify-content: space-between; margin-top: 1.4rem;
}
.carousel-arrows { display: flex; gap: 0.6rem; }
.arrow-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--rule); border-radius: 1px;
  background: transparent; cursor: pointer;
  color: var(--mid); font-size: 1rem; font-family: var(--serif);
  transition: border-color 0.15s, color 0.15s;
  line-height: 1; padding: 0;
}
.arrow-btn:hover { border-color: var(--olive); color: var(--olive); }

.carousel-dots { display: flex; gap: 0.5rem; align-items: center; }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--rule); border: none; padding: 0;
  cursor: pointer; transition: background 0.2s;
}
.dot.active { background: var(--olive); }

.carousel-progress { display: flex; align-items: center; gap: 0.6rem; }
.progress-bar-wrap { width: 80px; height: 2px; background: var(--rule); border-radius: 1px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--olive); border-radius: 1px; width: 0%; }
.progress-label { font-family: var(--serif); font-size: 0.75rem; color: var(--light); letter-spacing: 0.04em; min-width: 2rem; }

.pubs-link-wrap { margin-top: 1.8rem; }
.text-link {
  font-family: var(--serif); font-size: 0.92rem; color: var(--black);
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
}
.text-link:hover { color: var(--olive); text-decoration-color: var(--olive); }

/* ── Credentials ── */
.credentials { padding: 0 0 3.5rem; border-bottom: 1px solid var(--rule); }
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }

.cred-label {
  font-family: var(--serif);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 0.5rem;
  padding-top: 2.8rem;
  border-top: 1.5px solid var(--olive);
}
.cred-value { font-family: var(--serif); font-size: 0.93rem; line-height: 1.65; }

.links-row {
  padding: 2.5rem 0 0;
  display: flex; gap: 1.8rem; flex-wrap: wrap;
}
.ext-link {
  font-family: var(--serif);
  font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--mid); text-decoration: none;
}
.ext-link:hover { color: var(--olive); }

/* ── Footer ── */
footer {
  padding: 2.5rem 0 3rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-family: var(--serif); font-size: 0.8rem; color: var(--light); }
.footer-nav { list-style: none; display: flex; gap: 1.5rem; }
.footer-nav a { font-family: var(--serif); font-size: 0.8rem; color: var(--light); text-decoration: none; }
.footer-nav a:hover { color: var(--olive); }

/* ── Inner pages ── */
.inner-page { padding: 3.5rem 0 5rem; }
.inner-page > .section-label { margin-bottom: 2.2rem; }

.page-content p { margin-bottom: 1.2rem; font-size: 0.95rem; line-height: 1.78; }
.page-content p:last-child { margin-bottom: 0; }

.page-content h2 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--black);
  margin-top: 3.2rem;
  margin-bottom: 0.9rem;
  padding-top: 2.8rem;
  border-top: 1.5px solid var(--olive);
}
.page-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.page-content li { font-size: 0.92rem; line-height: 1.72; margin-bottom: 0.4rem; }
.page-content strong { font-weight: 600; color: var(--black); }
.page-content em { font-style: italic; }

/* Research page — key publications sub-list */
.research-content h3 {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 1.6rem 0 0.6rem;
}
.research-content blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 1.2rem;
  margin: 1rem 0;
  color: var(--mid);
  font-size: 0.9rem;
  font-style: italic;
}

/* ── Publications list ── */
.pub-list { list-style: none; padding: 0; }
.pub-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  line-height: 1.72;
}
.pub-num {
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--light);
  padding-top: 0.05rem;
  text-align: right;
}
.pub-flag { color: var(--olive); margin-right: 0.25em; font-size: 0.95em; }
.pub-body em { font-style: italic; }
.pub-note { font-size: 0.82rem; color: var(--mid); font-style: italic; display: block; margin-top: 0.2rem; }
.pub-award {
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--olive);
  display: block;
  margin-top: 0.25rem;
}
.pub-link {
  font-family: var(--serif);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  border: 1px solid var(--rule);
  padding: 0.18rem 0.5rem;
  border-radius: 1px;
  margin-left: 0.5rem;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.pub-link:hover { border-color: var(--olive); color: var(--olive); }

/* ── Teaching ── */
.course-list { list-style: none; padding: 0; }
.course-item { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.course-item:first-child { border-top: 1px solid var(--rule); }
.course-meta { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.course-badge {
  font-family: var(--serif);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  border: 1px solid var(--rule);
  padding: 0.05em 0.45em;
  border-radius: 1px;
}
.course-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  display: block;
  margin-bottom: 0.3rem;
}
.course-title:hover { color: var(--olive); }
.course-desc { font-size: 0.88rem; color: var(--mid); line-height: 1.65; }
.course-inst { font-family: var(--serif); font-size: 0.82rem; font-style: italic; color: var(--light); margin-top: 0.25rem; }

/* ── Talks ── */
.talk-list { list-style: none; padding: 0; }
.talk-item {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.talk-item:first-child { border-top: 1px solid var(--rule); }
.talk-date {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--light);
  font-style: italic;
  padding-top: 0.12rem;
}
.talk-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.2rem;
}
.talk-event { font-size: 0.85rem; color: var(--mid); line-height: 1.6; }
.talk-slides {
  font-family: var(--serif);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.5rem;
  border-radius: 1px;
  display: inline-block;
  margin-top: 0.45rem;
  transition: border-color 0.15s, color 0.15s;
}
.talk-slides:hover { border-color: var(--olive); color: var(--olive); }

/* ── CV page ── */
.cv-download {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  border: 1px solid var(--black);
  padding: 0.55rem 1.2rem;
  border-radius: 1px;
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 2rem;
}
.cv-download:hover { border-color: var(--olive); color: var(--olive); }
.cv-embed {
  width: 100%;
  height: 820px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .intro-header { grid-template-columns: 1fr; gap: 1.8rem; }
  .intro-photo { justify-content: flex-start; }
  .intro-photo img { max-width: 160px; }
  .cred-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  nav { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .nav-links { gap: 1.2rem; flex-wrap: wrap; }
  .paper-image { height: 120px; }
  .paper-card-body { padding: 1.2rem 1.4rem 0; }
  .paper-footer { padding: 0.9rem 1.4rem 1.2rem; }
  .talk-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .talk-date { font-size: 0.78rem; padding-top: 0; }
  .pub-item { grid-template-columns: 1.8rem 1fr; }
}
