:root {
  --ink: #243b53;
  --blue: #486581;
  --gold: #b08d57;
  --sky: #9fb3c8;
  --cream: #f7f5f0;
  --paper: #fbfaf6;
  --silver: #e9edf2;
  --line: #d9e2ec;
  --charcoal: #1f2933;
  --muted: #627d98;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 236, .9);
  background: rgba(247, 245, 240, .92);
  backdrop-filter: blur(12px);
}

.nav-inner,
.hero-inner,
.footer-inner {
  width: min(100% - 3rem, 64rem);
  margin: 0 auto;
}

.nav-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: #526d82; font-size: .9rem; letter-spacing: .035em; }
.nav-links a:hover,
.nav-links a.active { color: var(--ink); font-weight: 650; }

.hero {
  background: linear-gradient(150deg, #fbfaf6 0%, #f1f1ee 55%, #e7ebef 100%);
  border-bottom: 1px solid rgba(217, 226, 236, .65);
}

.hero-inner {
  padding: 5rem 0;
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: center;
  gap: 4rem;
}

.portrait-wrap {
  width: 16rem;
  height: 16rem;
  overflow: hidden;
  border-radius: 50%;
  background: #f2f3f3;
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 5px var(--gold), 0 10px 30px rgba(36, 59, 83, .12);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.03);
}

.hero-copy h1,
.page-header h1,
.paper-header h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
}

.hero-copy h1 { font-size: clamp(2.8rem, 5vw, 3.8rem); }
.hero-copy h1 span { white-space: nowrap; }
.hero-copy { min-width: 0; }

.eyebrow,
.page-kicker {
  margin: 1.25rem 0 0;
  color: var(--gold);
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow { font-weight: 650; }

.research-fields { margin: 1.25rem 0 0; color: var(--muted); }

.profile-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.profile-links a,
.paper-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 400;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.profile-links a:first-child { background: var(--ink); border-color: var(--ink); color: white; }
.profile-links a:hover,
.paper-links a:hover { border-color: var(--gold); transform: translateY(-1px); }

.home-main,
.page-shell {
  width: min(100% - 3rem, 64rem);
  margin: 0 auto;
}

.home-main { padding: 5.5rem 0 6rem; }

.about-section,
.contact-section,
.research-section {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 3rem;
}

.section-label {
  padding-top: .35rem;
  color: #6f716f;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.about-copy {
  color: #4a4d4f;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  text-align: justify;
  text-justify: inter-word;
}

.about-copy p { margin: 0 0 1.35rem; }
.about-copy a { color: #8c4028; font-weight: 600; }
.about-copy em { color: #262d33; }
.about-content { min-width: 0; }

.education-list {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid #ded8ca;
  display: grid;
  grid-template-columns: minmax(15rem, .9fr) minmax(0, 1.2fr);
  column-gap: 2.5rem;
  row-gap: 1.65rem;
}

.degree,
.institution {
  color: #404b52;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
}

.contact-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.contact-section { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 2rem; }

.contact-content {
  display: grid;
  grid-template-columns: 1.75fr .9fr .65fr;
  gap: 2rem;
  color: #52636f;
  font-size: .94rem;
}

.contact-content p:first-child { white-space: nowrap; }

.contact-content p { margin: 0; }

.page-shell { padding: 4.75rem 0 6rem; }
.page-header { max-width: 47rem; margin: 0 0 4.5rem 12rem; }
.page-header .page-kicker { margin-top: 0; }
.page-header h1 { margin-top: .7rem; font-size: clamp(2.8rem, 5vw, 4rem); }
.page-header > p:last-child { margin: 1.2rem 0 0; color: var(--muted); font-size: 1.05rem; }

.research-page .page-header { max-width: none; margin-left: 0; }
.research-page .page-header h1 { font-size: 3.35rem; white-space: nowrap; }
.gold-title { color: var(--gold) !important; text-transform: uppercase; }
.prose-page .page-header h1 { color: var(--gold); font-size: 3.35rem; }

.research-section { padding: 2.75rem 0; border-top: 1px solid var(--line); }
.research-section:first-of-type { border-top-color: #c9d4dd; }
.paper-list { margin: 0; padding: 0; list-style: none; counter-reset: papers; }
.paper-item { position: relative; margin: 0 0 2.4rem; padding-left: 2.25rem; counter-increment: papers; }
.paper-item::before {
  content: counter(papers, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .2rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: .95rem;
}

.paper-item h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 600;
  text-align: justify;
  text-justify: inter-word;
}
.paper-item h3 a { color: var(--ink); }
.paper-item h3 a:hover { color: var(--blue); }
.paper-authors { margin: .5rem 0 0; color: #5d6b75; font-size: .9rem; }
.paper-venue { margin: .15rem 0 0; color: #384c5a; font-size: .9rem; }
.paper-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.paper-links a { min-height: 30px; padding: .2rem .7rem; font-size: .72rem; }

.prose-page { max-width: 52rem; }
.prose-page .page-header { margin-left: 0; }
.prose-content { font-size: 1.02rem; }
.prose-content h2 { margin: 2.8rem 0 1rem; color: var(--ink); font-family: var(--serif); font-size: 2rem; }
.prose-content ul { margin: 0; padding: 0; list-style: none; }
.prose-content li { padding: 1.15rem 0; border-top: 1px solid var(--line); }
.prose-content a[href*="youtube.com"],
.youtube-link { display: inline-flex; align-items: center; gap: .4rem; }
.prose-content a[href*="youtube.com"]::before,
.youtube-link::before {
  content: "";
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff0000' d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2 31 31 0 0 0 0 12a31 31 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1A31 31 0 0 0 24 12a31 31 0 0 0-.5-5.8ZM9.6 15.6V8.4L15.8 12l-6.2 3.6Z'/%3E%3C/svg%3E");
}

.paper-page { max-width: 64rem; }
.back-link { display: inline-block; margin-bottom: 2.5rem; color: var(--muted); font-size: .86rem; }
.paper-header h1 { margin-top: .8rem; font-size: clamp(1.9rem, 3.25vw, 2.75rem); }
.paper-header .paper-authors { margin-top: 1.25rem; font-size: 1rem; }
.paper-header .paper-venue { margin-top: .25rem; font-size: 1rem; }
.paper-links.prominent { margin-top: 1.4rem; }
.paper-body { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.paper-body h2 { color: var(--ink); font-family: var(--serif); font-size: 2rem; }

.site-footer { border-top: 1px solid var(--line); background: linear-gradient(150deg, #fbfaf6 0%, #eef0ef 100%); }
.footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; color: #7b8791; font-size: .82rem; }
.footer-inner a { color: var(--ink); font-weight: 600; }

@media (max-width: 760px) {
  .nav-inner,
  .hero-inner,
  .footer-inner,
  .home-main,
  .page-shell { width: min(100% - 2rem, 64rem); }

  .nav-inner { min-height: 60px; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .78rem; }

  .hero-inner { padding: 3.75rem 0; grid-template-columns: 1fr; justify-items: center; gap: 2.5rem; }
  .portrait-wrap { width: 13rem; height: 13rem; }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: 3.3rem; }
  .profile-links { justify-content: center; }

  .home-main { padding: 4rem 0; }
  .about-section,
  .contact-section,
  .research-section { grid-template-columns: 1fr; gap: 1.4rem; }
  .section-label { padding-top: 0; }
  .about-copy { font-size: 1rem; }
  .education-list { grid-template-columns: 1fr; row-gap: .35rem; }
  .institution { margin-bottom: 1.25rem; }
  .contact-content { grid-template-columns: 1fr; gap: 1rem; }
  .contact-content p:first-child { white-space: normal; }

  .page-shell { padding: 3.5rem 0 4.5rem; }
  .page-header { margin: 0 0 3rem; }
  .research-section { padding: 2.25rem 0; }
  .research-page .page-header h1 { font-size: 2.8rem; white-space: normal; }
  .paper-item { padding-left: 1.9rem; }
  .footer-inner { padding: 1rem 0; flex-direction: column; justify-content: center; gap: .1rem; }
}

@media (max-width: 500px) {
  .wordmark { max-width: none; white-space: nowrap; font-size: .68rem; line-height: 1.3; }
  .nav-links { gap: .55rem; }
  .nav-links a { font-size: .67rem; }
  .nav-links a:last-child { display: none; }
  .hero-copy { width: 100%; }
  .hero-copy h1 { max-width: 100%; font-size: 2.15rem; line-height: 1.15; }
  .eyebrow { font-size: .72rem; }
  .research-fields { font-size: .9rem; }
  .profile-links { max-width: 100%; }
  .profile-links a { padding-inline: .85rem; }
  .about-copy { overflow-wrap: anywhere; }
}
