:root {
  color-scheme: light;
  --ink: #1a2721;
  --muted: #485750;
  --paper: #f9faf5;
  --line: #ced6ca;
  --lime: #e1f2aa;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid #547026; outline-offset: 5px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(100% - 3rem, 73rem); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .5rem 1rem; background: white; translate: 0 -200%; }
.skip:focus { translate: 0; }

.masthead { display: flex; min-height: 5rem; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 680; text-decoration: none; white-space: nowrap; }
.monogram { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .4rem; background: var(--ink); color: var(--lime); font-size: .8rem; letter-spacing: .04em; }
nav { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2rem); }
nav a { font-size: .9rem; font-weight: 600; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.nav-cv { border: 1px solid var(--ink); padding: .27rem .65rem; border-radius: .25rem; }

.hero { display: grid; grid-template-columns: minmax(0,1.24fr) minmax(0,.86fr); gap: clamp(2rem,6vw,6.3rem); padding-block: clamp(3rem,7vw,6.6rem); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: .55rem; font-size: .79rem; font-weight: 710; text-transform: uppercase; letter-spacing: .12em; }
.eyebrow span { width: .72rem; height: .72rem; border-radius: 50%; background: #738e3e; }
h1, h2, .project h3, .updates h3 { font-family: var(--serif); font-weight: 500; }
h1 { margin-block: .85rem 1.4rem; font-size: clamp(3.1rem,7.1vw,7rem); line-height: .94; letter-spacing: -.075em; }
h1 span { color: #6c862e; }
.intro { max-width: 34rem; color: var(--muted); font-size: clamp(1.05rem,1.7vw,1.23rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.button { display: inline-flex; align-items: center; padding: .55rem .95rem; min-height: 2.75rem; border: 1px solid var(--ink); border-radius: .3rem; font-size: .9rem; font-weight: 680; text-decoration: none; }
.button.primary { background: var(--lime); }
.button.secondary:hover, .button.primary:hover { background: var(--ink); color: white; }
.portrait { padding: .65rem; background: #e7eadd; border: 1px solid #c6cebf; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4/4.1; object-fit: cover; object-position: 50% 38%; }
.portrait figcaption { display: flex; justify-content: space-between; gap: .5rem; padding: .65rem .15rem .1rem; color: #38493e; font-size: .79rem; font-weight: 620; }

.papers-section, .about-section { background: #eef1e8; border-block: 1px solid var(--line); }
.papers-section, .projects, .about-section, .footer { padding-block: clamp(3rem,6vw,5.5rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.1rem; margin-bottom: 1.65rem; }
h2 { font-size: clamp(2.35rem,5vw,4.7rem); line-height: 1.04; letter-spacing: -.065em; }
.section-heading h2, .about-grid h2, .footer h2 { margin-top: .35rem; }
.text-link { font-size: .9rem; font-weight: 680; }
.paper-list { border-top: 1px solid var(--line); }
.paper { display: grid; grid-template-columns: 9rem minmax(0,1fr) 10rem; gap: 1rem 1.45rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.paper-meta { display: grid; gap: .18rem; align-content: start; color: var(--muted); font-size: .86rem; }
.paper-meta span { font-weight: 710; }
.paper h3 { font-size: clamp(1.1rem,2vw,1.38rem); font-weight: 670; line-height: 1.32; letter-spacing: -.025em; }
.paper p { margin-top: .3rem; color: var(--muted); }
.paper .authors { font-size: .91rem; }
.paper-links { display: flex; flex-wrap: wrap; justify-content: end; align-content: start; gap: .35rem; }
.paper-links a { display: inline-block; padding: .18rem .48rem; border: 1px solid #a9b7a4; border-radius: .22rem; font-size: .83rem; font-weight: 650; text-decoration: none; }
.paper-links a:hover { background: var(--lime); }
.featured .paper-meta span { color: #31461b; }
.archive-link { margin-top: 1.1rem; }

.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.project { display: flex; flex-direction: column; align-items: start; padding: clamp(1rem,2.5vw,1.8rem); min-height: 16rem; border: 1px solid #a5b199; border-radius: .4rem; }
.temporal { background: #e1edc7; }
.sam { background: #e5e8f2; }
.tmj { background: #eee8e0; }
.tag { font-size: .82rem; font-weight: 650; }
.project h3 { margin-block: .65rem .5rem; font-size: clamp(1.8rem,3.4vw,2.65rem); line-height: 1.02; letter-spacing: -.045em; }
.project > p:not(.tag) { margin-bottom: 1rem; }
.project > :last-child { margin-top: auto; }
.project a { display: inline-block; margin-right: .65rem; font-size: .86rem; font-weight: 700; }

.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem,8vw,8rem); align-items: start; }
.about-grid p:not(.eyebrow) { margin-block: .8rem; }
.updates { padding-top: .25rem; }
.updates h3 { font-size: 1.85rem; line-height: 1.2; letter-spacing: -.03em; margin-bottom: .65rem; }
.updates div { border-top: 1px solid var(--line); padding: .65rem 0; }
.updates time { color: var(--muted); font-size: .86rem; font-weight: 650; }
.updates div p:not(.eyebrow) { margin-block: .15rem 0; }
.footer { background: var(--ink); color: white; }
.footer .eyebrow { color: var(--lime); }
.footer-grid { display: flex; justify-content: space-between; gap: 1.25rem; align-items: end; flex-wrap: wrap; }
.email { display: inline-block; margin-top: .65rem; }
.profiles { display: flex; gap: .6rem 1rem; flex-wrap: wrap; font-size: .9rem; }

@media (max-width: 50rem) {
  .hero { gap: 1.65rem; }
  .paper { grid-template-columns: 7rem minmax(0,1fr); }
  .paper-links { grid-column: 2; justify-content: start; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 38rem) {
  .wrap { width: calc(100% - 2rem); }
  .masthead { flex-wrap: wrap; padding-block: .75rem; gap: .55rem; }
  nav { overflow-wrap: anywhere; flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; }
  .portrait { width: min(100%, 28rem); }
  .portrait img { aspect-ratio: 4/3; }
  .section-heading { align-items: start; flex-direction: column; gap: .6rem; }
  .paper { grid-template-columns: 1fr; gap: .55rem; }
  .paper-meta { display: flex; flex-wrap: wrap; gap: .55rem; }
  .paper-links { grid-column: auto; }
  .project-grid, .about-grid { grid-template-columns: 1fr; }
  .project { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
