/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.65;
  color: #1c1c1c;
  background: #fdfdfb;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: #8a1538;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: #8a1538; }

/* ---------- Header & nav ---------- */
.site-header {
  border-bottom: 1px solid #e8e6e0;
  padding: 1.5rem 0;
  margin-bottom: 3rem;
  background: #fdfdfb;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.site-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

.site-nav {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.92rem;
}
.site-nav a {
  margin-left: 1.4rem;
  color: #4a4a4a;
  font-weight: 500;
}
.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: #8a1538; }

/* ---------- Hero / About ---------- */
.hero {
  margin-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  background: #ece9e2;
}

.hero-text h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.lede {
  font-size: 1.1rem;
  margin-top: 0;
}

.affiliation {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: #4a4a4a;
  margin-top: 1.5rem;
  line-height: 1.5;
}

/* ---------- Sections ---------- */
section {
  margin-bottom: 4rem;
}

section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e6e0;
}

.subhead {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ---------- Papers ---------- */
.paper {
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 2px solid #e8e6e0;
}

.paper h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.3rem 0;
  line-height: 1.35;
}

.paper-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #6a6a6a;
  margin: 0 0 0.7rem 0;
}

.abstract {
  margin: 0.5rem 0;
  text-align: justify;
  hyphens: auto;
}

.paper-extra {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #4a4a4a;
  margin: 0.6rem 0 0 0;
  line-height: 1.55;
}
.paper-extra em {
  font-style: normal;
  font-weight: 600;
  color: #1c1c1c;
}

.award {
  display: inline-block;
  margin-top: 0.2rem;
  color: #8a1538;
  font-style: italic;
}

/* ---------- Badges (R&R, JMP) ---------- */
.paper-badges {
  margin: 0.3rem 0 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-rr {
  background: #8a1538;
  color: #fff;
}

.badge-rr-soft {
  background: #c47a8c;
  color: #fff;
}

.badge-jmp {
  background: #2c5f2d;
  color: #fff;
}

/* ---------- CV sub-detail & prose blocks ---------- */
.cv-sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #6a6a6a;
  margin-top: 0.15rem;
}

.cv-prose {
  margin: 0.5rem 0 1rem 0;
  line-height: 1.7;
}

.paper-links {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  margin-top: 0.6rem;
}
.paper-links a { margin-right: 0.8rem; }

/* ---------- Foldable abstract ---------- */
.abstract-toggle {
  margin: 0.6rem 0;
}
.abstract-toggle summary {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8a1538;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  user-select: none;
  list-style: none;
  padding: 0.15rem 0;
}
.abstract-toggle summary::-webkit-details-marker {
  display: none;
}
.abstract-toggle summary::marker {
  display: none;
  content: "";
}
.abstract-toggle summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 0.15s ease;
  font-size: 0.75rem;
  color: #8a1538;
}
.abstract-toggle[open] summary::before {
  transform: rotate(90deg);
}
.abstract-toggle summary:hover {
  color: #6b0f2b;
}
.abstract-toggle > p {
  margin: 0.6rem 0 0 0;
  text-align: justify;
  hyphens: auto;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #2c2c2c;
  padding-left: 1.1rem;
  border-left: 2px solid #e8e6e0;
}

/* ---------- CV ---------- */
.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dotted #e8e6e0;
  align-items: start;
}
.cv-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #6a6a6a;
  font-weight: 500;
  padding-top: 0.1rem;
}
.cv-item {
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #e8e6e0;
  margin-top: 4rem;
  padding: 1.5rem 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #6a6a6a;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-photo img {
    width: 140px;
    height: 140px;
  }
  .hero-text h2 { font-size: 1.6rem; }
  .site-header { position: static; margin-bottom: 2rem; }
  .site-nav a { margin-left: 0; margin-right: 1rem; }
  .cv-list li { grid-template-columns: 90px 1fr; }
}
