:root {
  --paper: #f7f7f2;
  --ink: #20211f;
  --body: #373834;
  --muted: #6f706a;
  --rule: #dadbd4;
  --sage: #62635e;
  --section-gap: 28px;
  --serif: var(--sans);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; isolation: isolate; background: var(--paper); color: var(--body); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: #dedfd8; color: var(--ink); }
a { color: inherit; text-decoration: none; text-underline-offset: 5px; }
a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: currentColor; }
p a, .section-link, .paper-links a, .contact-actions a { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; }
p a:hover, .section-link:hover, .paper-links a:hover, .contact-actions a:hover { text-decoration-color: currentColor; }
.interests-list > li > a { text-decoration: none; }
.interests-list > li > a:hover .interests-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sage); outline-offset: 6px; border-radius: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }

.page { position: relative; z-index: 1; width: min(100% - 112px, 1040px); margin: 0 auto; }
.site-header { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 13px; line-height: 20px; padding: 34px 0 24px; border-bottom: 1px solid var(--rule); }
.wordmark { white-space: nowrap; color: var(--ink); font-size: inherit; font-weight: 500; letter-spacing: -0.015em; }
.header-links { display: flex; flex-wrap: nowrap; flex-shrink: 0; gap: 26px; font-size: inherit; }
.pending-link { color: var(--muted); cursor: default; }
.pending-link > span, a > span[aria-hidden] { display: inline-block; font-size: 0.9em; margin-left: 2px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); color: var(--paper); }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) auto auto; row-gap: 20px; padding: 0 0 var(--section-gap); min-height: calc(80vh - 76px); min-height: calc(80svh - 76px); }
.hero-copy { position: relative; grid-row: 2; z-index: 1; width: min(100%, 572px); }
h1 { margin: 0 0 26px; color: var(--ink); font-family: var(--sans); font-size: 34px; font-weight: 400; line-height: 1.08; letter-spacing: -0.025em; }
.bio { max-width: 24em; margin: 0; color: var(--ink); font: 400 24px/1.5 var(--sans); text-wrap: balance; letter-spacing: -0.02em; }
.bio-research { color: #555650; }
.bio a { text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.bio a:hover, .bio a:focus-visible { text-decoration: underline; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; margin-top: 24px; font-size: 13px; color: var(--muted); }
.separator { color: #969b91; }
.ecology { position: absolute; grid-area: 1 / 1 / 2 / 2; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; opacity: 0.46; -webkit-mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.75) 12%, #000 65%, transparent); mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.75) 12%, #000 65%, transparent); }
#ecology { display: block; width: 100%; height: 100%; }
.hero-controls { grid-row: 3; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.hero-controls > a, .hero-controls > button { display: flex; align-items: center; gap: 5px; appearance: none; margin: 0; border: 0; padding: 0; height: 20px; font: 400 11px/20px var(--sans); }
.animation-toggle { position: relative; z-index: 2; min-height: 20px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 11px; line-height: 20px; cursor: pointer; text-underline-offset: 4px; }
.animation-toggle::before { content: ""; position: absolute; inset: -12px 0; }
.animation-toggle:hover { color: var(--ink); text-decoration: underline; }
.scroll-cue { display: block; min-width: 44px; min-height: 44px; padding: 12px 0; color: var(--muted); font-size: 11px; line-height: 20px; }
.scroll-cue > span[aria-hidden] { margin: 0; font-size: inherit; }

[data-reveal] { transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal-pending { opacity: 0; transform: translateY(18px); }
[data-reveal]:focus-within { opacity: 1; transform: none; transition: none; }

.content-section { border-top: 1px solid var(--rule); padding-top: var(--section-gap); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 29px; }
h2 { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 400; letter-spacing: 0; }
.section-link { font-size: 12px; }
.publication-list { list-style: none; margin: 0; padding: 0; }
.publication { display: grid; align-items: baseline; grid-template-columns: 62px minmax(0, 1fr); gap: 24px; padding: 0 0 29px; }
.publication + .publication { padding-top: 12px; }
.publication-year { position: relative; top: -1px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.publication h3 { margin: 0 0 8px; color: var(--ink); font-family: var(--sans); font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -0.018em; }
.authors { margin: 0; font-size: 13px; line-height: 1.7; }
.authors strong { font-weight: 500; color: var(--ink); }
.publication-details { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px 25px; margin-top: 11px; font-size: 12px; line-height: 1.5; }
.venue { color: var(--muted); }
.paper-links { display: flex; gap: 18px; }
.resource-note { color: var(--muted); }

.research-section { margin-top: 50px; }
.research-list { margin: 0; }
.research-item { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding: 0 0 26px; }
.research-item + .research-item { padding-top: 10px; }
.research-item dt { color: var(--ink); font-family: var(--sans); font-size: 17px; font-weight: 500; line-height: 1.5; letter-spacing: -0.015em; }
.research-item dd { margin: 0; font-size: 14px; line-height: 1.85; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 20px; border-top: 1px solid var(--rule); padding: 26px 0 80px; margin-top: 61px; color: var(--muted); font-size: 12px; }
.mathematics-link { flex-basis: 100%; font-size: 11px; }

@media (max-width: 900px) {
  .page { width: calc(100% - 72px); }
  .research-item { grid-template-columns: 225px minmax(0, 1fr); gap: 30px; }
}
@media (max-width: 640px) {
  :root { --section-gap: 24px; }
  .page { width: calc(100% - 44px); }
  .site-header { padding-top: 24px; padding-bottom: 21px; gap: 12px; flex-wrap: nowrap; }
  .site-header { font-size: 12px; }
  .header-links { gap: 12px; font-size: inherit; }
  .hero { min-height: calc(80vh - 60px); min-height: calc(80svh - 60px); padding: 0 0 var(--section-gap); }
  .hero-copy { width: 100%; }
  h1 { margin-bottom: 22px; font-size: 30px; }
  .bio { font-size: 20px; }
  .contact-line { margin-top: 24px; }
  .ecology { opacity: 0.36; }
  .section-heading { margin-bottom: 27px; }
  .publication { grid-template-columns: 40px minmax(0, 1fr); gap: 15px; padding-bottom: 25px; }
  .publication + .publication { padding-top: 10px; }
  .publication h3 { font-size: 18px; }
  .publication-year { font-size: 11px; }
  .authors { font-size: 12px; }
  .publication-details { gap: 9px 18px; }
  .research-section { margin-top: 33px; }
  .research-item { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .research-item dt { font-size: 17px; }
  .research-item dd { font-size: 14px; }
  .site-footer { margin-top: 35px; }
}
@media (max-width: 360px) {
  .site-header { font-size: 11px; }
  .header-links { gap: 9px; }
  .page { width: calc(100% - 36px); }
  .publication { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .publication-year { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
@media print {
  body { background: #fff; color: #000; }
  .page { width: 100%; }
  .ecology, .animation-toggle, .scroll-cue, .skip-link, .site-footer a, .mathematics-link { display: none !important; }
  .hero { display: block; padding: 45px 0; min-height: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  h1 { font-size: 40px; }
  .bio { font-size: 20px; }
  .publication, .research-item { break-inside: avoid; }
  .research-section, .site-footer { margin-top: 30px; }
}

/* Email reveal stays out of the layout until requested. */
.contact-line { position: relative; }
.contact-trigger, .contact-action { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-underline-offset: 4px; }
.contact-trigger:hover, .contact-action:hover { text-decoration: underline; }
.contact-panel { position: absolute; z-index: 5; top: calc(100% + 14px); left: 0; width: min(350px, calc(100vw - 44px)); padding: 14px 18px 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; color: var(--body); }
.contact-panel-heading { display: flex; justify-content: space-between; align-items: center; }
.contact-panel h2 { font-size: 12px; letter-spacing: 0; font-weight: 500; }
#contact-close { border: 0; padding: 8px; margin-right: -8px; background: none; color: var(--muted); font: 20px var(--sans); cursor: pointer; }
.contact-panel p { font-size: 12px; line-height: 1.6; margin: 6px 0 12px; color: var(--muted); }
#contact-status:empty { display: none; }
#contact-challenge { max-width: 100%; }
.contact-address-label { display: block; font-size: 11px; margin: 6px 0; color: var(--muted); }
#contact-address { width: 100%; padding: 7px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--ink); font: 13px var(--sans); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 14px; font-size: 12px; }
#contact-retry { min-height: 32px; font-size: 12px; }
#contact-address:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

/* The contact reveal belongs to the navigation, above the drawing. */
.header-links { align-items: center; line-height: 20px; }
.wordmark, .header-links > a, .header-links .contact-trigger { display: flex; align-items: center; height: 20px; line-height: 20px; }
.header-links .contact-line { display: flex; align-items: center; height: 20px; margin: 0; font-size: inherit; line-height: inherit; }
.header-links .contact-trigger { display: flex; appearance: none; margin: 0; border: 0; padding: 0; font: inherit; line-height: inherit; text-align: left; }
.header-links > a > span[aria-hidden], .header-links .contact-trigger > span { display: block; font-size: inherit; line-height: inherit; margin-left: 4px; }
.header-links .contact-panel { left: auto; right: 0; }

.header-links > a, .contact-trigger { white-space: nowrap; }

.writing-intro, .interests-intro { padding: 64px 0 100px; min-height: 65svh; }
.writing-intro h1, .interests-intro h1 { font: 400 24px/1.4 var(--sans); letter-spacing: -.025em; margin: 0 0 18px; }
.writing-intro p { color: var(--muted); font-size: 14px; }

.header-links > a { gap: 4px; }
.header-links > a > span[aria-hidden] { margin-left: 0; }

.interests-list { max-width: 620px; list-style: none; margin: 32px 0 0; padding: 0; }
.interests-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 0; }
.interests-title { font: 500 20px/1.4 var(--sans); color: var(--ink); }
.interests-status { display: block; color: var(--muted); font: 400 12px/1.6 var(--sans); margin-top: 6px; }
