@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Newsreader:ital,opsz,wght@1,6..72,400&display=swap");

:root {
  --ink: #002c43;
  --muted: #66736c;
  --paper: #e8e5dc;
  --paper-deep: #dedad0;
  --accent: #d8ff55;
  --line: rgba(22, 34, 28, 0.18);
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(232, 229, 220, 0.9);
  backdrop-filter: blur(16px);
}

.wordmark { font-weight: 600; letter-spacing: -0.05em; }
.wordmark span { color: #769200; }

.nav {
  justify-self: center;
  display: flex;
  gap: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a, .header-link, .footer-links a { transition: opacity 180ms ease; }
.nav a:hover, .header-link:hover, .footer-links a:hover { opacity: 0.5; }

.header-link {
  grid-column: 3;
  justify-self: end;
  font-size: 0.83rem;
  font-weight: 600;
}

.header-link span { color: #769200; }

main, .footer {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  gap: clamp(60px, 10vw, 150px);
  align-items: center;
  padding: clamp(32px, 4vw, 48px) 0;
}

.eyebrow, .section-number, .research-card span, .pub-year {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 10px 4px 0;
  background: currentColor;
}

h1 {
  margin: 0 0 30px;
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-position,
.hero-address {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-position {
  margin-bottom: 22px;
  color: var(--ink);
}

.hero-address {
  font-style: normal;
}

.hero-email-block {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 8px;
  width: max-content;
  margin-top: 22px;
}

.hero-email {
  display: contents;
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-email > span {
  font-weight: 600;
}

.hero-email-links {
  display: flex;
  justify-content: space-between;
  gap: 72px;
  font-weight: 400 !important;
}

.hero-email a {
  border-bottom: 1px solid var(--line);
}

.hero-email small {
  color: var(--muted);
  font-size: inherit;
}

.hero-email a:hover {
  border-bottom-color: var(--ink);
}

.hero-email-note {
  grid-column: 2;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: left;
}

.page-note {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.hero-photo-frame {
  margin: 0;
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
}

.hero-actions { display: flex; gap: 10px; margin-top: 38px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.secondary:hover { background: var(--accent); }

.hero-aside {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 500px;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
}

.status { display: flex; align-items: center; gap: 9px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(216, 255, 85, 0.13); }
.hero-aside > p { margin: 6px 0 0; color: #aeb8b2; font-size: 0.88rem; }

.formula {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: auto 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-style: italic;
}

.formula sup { font-size: 0.45em; }
.formula-line { flex: 1; height: 1px; background: rgba(243, 241, 233, 0.35); }
.hero-aside .aside-note { color: var(--paper); line-height: 1.85; }

.section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(48px, 8vw, 120px);
  padding: clamp(80px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
}

.section-heading { align-self: start; position: sticky; top: 120px; }
.section-number { color: #769200; }

.section-heading h2 {
  margin: 20px 0 16px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.section-heading > p:last-child { max-width: 230px; margin: 0; color: var(--muted); font-size: 0.9rem; }

.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.research-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 22px;
  border: 1px solid var(--line);
  transition: background 200ms ease, transform 200ms ease;
}

.research-card:hover { background: var(--accent); transform: translateY(-5px); }
.research-card span { color: var(--muted); }
.research-card h3 { margin: auto 0 15px; font-size: 1.4rem; letter-spacing: -0.04em; line-height: 1.1; }
.research-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.research-card:hover p, .research-card:hover span { color: var(--ink); }

.pub-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); counter-reset: publication calc(var(--pub-count) + 1); }
.pub-list { --pub-count: 1; }
.pub-list.count-4 { --pub-count: 4; }
.pub-list.count-9 { --pub-count: 9; }
.pub-list.count-10 { --pub-count: 10; }

.pub-list li {
  counter-increment: publication -1;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 140px;
  gap: 12px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.pub-year { color: transparent; padding-top: 4px; font-size: 0; }
.pub-year::before { content: "[" counter(publication) "]"; color: var(--muted); font-size: 0.72rem; }
.pub-list h3 { margin: 0 0 5px; font-size: 1.15rem; font-weight: 400; letter-spacing: -0.025em; line-height: 1.35; }
.pub-list p { margin: 2px 0; color: var(--muted); font-size: 0.83rem; line-height: 1.45; }
.pub-list a { align-self: start; font-size: 0.75rem; font-weight: 600; }
.pub-links { display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.pub-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 180ms ease, background 180ms ease;
}
.pub-links a:hover { border-color: var(--ink); background: rgba(0, 44, 67, 0.06); }
.pub-links a[title="PDF"] { display: none; }
.other-writings .pub-links a[title="PDF"] { display: inline-flex; }
.link-icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.arxiv-icon { display: inline-flex; width: auto; height: auto; font-size: 0.58rem; font-weight: 600; letter-spacing: -0.08em; line-height: 1; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.math { white-space: nowrap; }

.journey-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 110px; }
.journey-section { display: block; }
.journey-section .section-heading {
  position: static;
  margin-bottom: 48px;
  text-align: left;
}
.journey-section .section-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.journey-section .journey-grid {
  width: min(860px, 100%);
}
.journey-section {
  padding: clamp(32px, 4vw, 48px) 0;
}
.research-publications-section { display: block; }
.research-publications-section { padding: clamp(32px, 4vw, 48px) 0; }
.research-publications-section .section-heading {
  position: static;
  margin-bottom: 48px;
  text-align: left;
}
.research-publications-section .section-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.travel-section { display: block; padding: clamp(32px, 4vw, 48px) 0; }
.travel-section .section-heading { position: static; margin-bottom: 48px; }
.travel-section .section-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.travel-section .section-heading .travel-note { display: flex; flex-wrap: nowrap; gap: 28px; max-width: none; margin: 8px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; white-space: nowrap; }
.travel-month sup { font-size: 0.72em; }
.travel-year h3 {
  margin: 0;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  letter-spacing: 0.12em;
}
.travel-past { border-top: 1px solid var(--line); }
.travel-past summary {
  padding: 15px 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.travel-past summary::-webkit-details-marker { display: none; }
.travel-past summary::after { content: "+"; margin-left: 10px; color: var(--muted); font-weight: 400; }
.travel-past[open] summary::after { content: "−"; }
.travel-past .travel-year h3 { border-top: 0; }
.travel-past .travel-year + .travel-year { border-top: 1px solid var(--line); }
.travel-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  min-height: 250px;
  margin: 12px 0 28px;
  padding-top: 114px;
}
.travel-track::before {
  content: "";
  position: absolute;
  top: 118px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}
.travel-month { position: relative; min-width: 0; }
.travel-month span {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  transform: translate(-50%, -7px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.travel-month i {
  display: none;
}
.travel-month:has(i.visited) span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.travel-month:has(i.visited)::after {
  content: "";
  position: absolute;
  left: 0;
  z-index: 0;
  width: 1px;
  transform: translateX(-50%);
  background: var(--line);
}
.travel-month:nth-child(odd):has(i.visited)::after {
  top: -25px;
  height: 14px;
}
.travel-month:nth-child(even):has(i.visited)::after {
  top: 22px;
  height: 18px;
}
.travel-month p {
  position: absolute;
  left: 0;
  width: 150px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.travel-month p a {
  border-bottom: 1px solid var(--muted);
  color: var(--ink);
}
.travel-month p a:hover { border-bottom-color: var(--ink); }
.travel-month p.travel-nowrap { width: max-content; white-space: nowrap; }
.travel-month:nth-child(odd) p { bottom: calc(100% + 26px); }
.travel-month:nth-child(even) p { top: 40px; }
.travel-month:last-child p { right: auto; left: 0; text-align: left; }
.travel-track-combined {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 230px;
  margin: 12px 0 28px;
  padding-top: 105px;
}
.travel-event { position: relative; min-width: 0; }
.travel-event::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}
.travel-event:first-child::before { left: 50%; }
.travel-event:last-child::before { right: 50%; }
.travel-event.gap::after {
  content: "···";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 0;
  padding: 0 10px;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--muted);
  letter-spacing: 0.15em;
}
.travel-event span {
  position: relative;
  z-index: 3;
  display: table;
  margin: 0 auto;
  padding: 3px 9px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.travel-event p { position: absolute; left: 50%; width: 180px; margin: 0; transform: translateX(-50%); color: var(--muted); font-size: 0.72rem; line-height: 1.5; text-align: center; }
.travel-event:nth-child(odd) p { bottom: calc(100% + 24px); }
.travel-event:nth-child(even) p { top: 38px; }
.travel-event p a { border-bottom: 1px solid var(--muted); color: var(--ink); }
.research-block + .research-block { margin-top: 60px; }
.interest-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 50px;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.group-title { margin: 0 0 28px; font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.timeline { margin: 0; }
.timeline div { position: relative; padding: 0 0 30px 22px; border-left: 1px solid var(--line); }
.timeline div::before { content: ""; position: absolute; top: 7px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline dt { margin-bottom: 5px; color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.timeline dd { margin: 0; }
.timeline dd strong, .timeline dd span { display: block; }
.timeline dd strong { font-size: 0.95rem; }
.timeline dd span { color: var(--muted); font-size: 0.82rem; }
.timeline dd a { border-bottom: 1px solid var(--line); }
.timeline dd a:hover { border-bottom-color: var(--ink); }

.awards { margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--line); }
.awards p { display: grid; grid-template-columns: 110px 1fr; gap: 20px; margin: 12px 0; color: var(--muted); font-size: 0.85rem; }
.awards strong { color: var(--ink); font-size: 0.72rem; letter-spacing: 0.06em; }

.teaching-list { border-top: 1px solid var(--line); }
.teaching-list p { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 24px; margin: 0; padding: 24px 0; border-bottom: 1px solid var(--line); }
.teaching-list span, .teaching-list small { color: var(--muted); font-size: 0.8rem; }
.teaching-list strong { font-size: 0.95rem; }

.footer {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 80px;
  margin-bottom: 24px;
  padding: clamp(70px, 10vw, 130px);
  background: var(--ink);
  color: var(--paper);
}

.footer h2 { margin: 22px 0 35px; font-size: clamp(3.5rem, 8vw, 7rem); font-weight: 500; letter-spacing: -0.08em; line-height: 0.82; }
.footer-email { display: inline-block; border-bottom: 1px solid rgba(243, 241, 233, 0.5); font-size: 0.9rem; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; font-size: 0.85rem; }
.copyright { position: absolute; right: 28px; top: 28px; margin: 0; color: #929e97; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr minmax(220px, 300px); gap: 50px; }
  .section { grid-template-columns: 1fr; }
  .section-heading { position: static; }
  .section-heading > p:last-child { max-width: 400px; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { min-height: 220px; }
  .awards { grid-column: auto; }
}

@media (max-width: 680px) {
  .site-header { height: 58px; padding: 0 16px; }
  .nav {
    display: flex !important;
    visibility: visible;
    opacity: 1;
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    color: var(--ink);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
  }
  .nav a { display: inline-block; }
  main, .footer { width: min(100% - 32px, 1240px); }
  .hero { padding: 32px 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-email-block { display: block; width: 100%; }
  .hero-email { display: block; }
  .hero-email > span:first-child { display: block; }
  .hero-email-links { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero-photo-frame { width: min(100%, 320px); }
  h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-aside { min-height: 320px; padding: 22px; }
  .section { padding: 80px 0; gap: 45px; }
  .pub-list li { grid-template-columns: 1fr auto; gap: 12px 20px; }
  .pub-year { grid-column: 1 / -1; }
  .journey-grid { grid-template-columns: 1fr; gap: 30px; }
  .interest-list { grid-template-columns: 1fr; }
  .travel-track { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .travel-track::before { display: none; }
  .travel-month { min-height: 90px; }
  .travel-month span { position: static; transform: none; }
  .travel-month:has(i.visited)::after { display: none; }
  .travel-month p,
  .travel-month:nth-child(odd) p,
  .travel-month:nth-child(even) p,
  .travel-month:last-child p { position: static; width: auto; margin: 10px 0 0; text-align: left; }
  .travel-track-combined { display: grid; grid-template-columns: 1fr; gap: 18px; min-height: 0; padding-top: 0; }
  .travel-event { padding-left: 0; }
  .travel-event::before, .travel-event.gap::after { display: none; }
  .travel-event span { margin: 0; }
  .travel-event p,
  .travel-event:nth-child(odd) p,
  .travel-event:nth-child(even) p { position: static; width: auto; margin: 8px 0 0; transform: none; text-align: left; }
  .awards { margin-top: 30px; }
  .awards p, .teaching-list p { grid-template-columns: 1fr; gap: 5px; }
  .footer { grid-template-columns: 1fr; gap: 60px; padding: 70px 28px 35px; }
  .footer h2 { font-size: clamp(3.3rem, 17vw, 5rem); }
  .copyright { position: static; grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
