:root {
  --ink: #1b1916;
  --ink-soft: #2c2924;
  --paper: #f4ecd8;
  --paper-2: #ebe1c9;
  --brass: #b8903e;
  --brass-deep: #8f6c28;
  --verdigris: #2f5e4c;
  --muted: #6d6556;
  --line: #d9ccb3;
  --danger: #7a3b2e;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
  --max: 1120px;
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: 0.005em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--space);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.brand-mark { width: 28px; height: 28px; color: var(--brass-deep); }

.site-nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--brass);
}

.nav-toggle {
  display: none;
  font: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

main { overflow: hidden; }

.hero,
.about,
.experience,
.projects,
.research,
.kit,
.hobbies,
.contact {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.4rem) var(--space) 0;
}

.hero {
  padding-top: clamp(3rem, 8vw, 5.5rem);
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.portrait {
  width: 6.5rem;
  height: 6.5rem;
  flex-shrink: 0;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.hero-copy {
  min-width: 0;
}

.hero-copy .kicker {
  margin: 0 0 0.2rem;
}

.hero-copy h1 {
  margin: 0 0 0.45rem;
}

.hobbies {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.hobbies-figure {
  margin: 1.6rem 0 0;
}

.hobbies-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.hobbies-figure figcaption {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.hobby + .hobby {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.hobby h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0;
}

.hobby p {
  margin: 0;
  color: var(--ink-soft);
}

.kicker,
.section-label,
.fact-label,
.card-kicker,
.when {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  margin: 0.35rem 0 0.7rem;
  font-weight: 400;
  line-height: 1.05;
}

.lede {
  font-size: 1.15rem;
  max-width: 36rem;
  color: var(--ink-soft);
  margin: 0;
}

.hero-figure,
.research-figure {
  margin: 2rem 0 0;
}

.hero-figure img,
.research-figure img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.hero-figure img {
  height: auto;
  max-height: 280px;
  object-fit: cover;
}

h2 {
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 1.1rem;
}

.about-body p,
.section-intro,
.research-copy p,
.role p {
  color: var(--ink-soft);
}

.about-body p:first-child { margin-top: 0; }

.about-body a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brass) 55%, var(--line));
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child { border-bottom: 1px solid var(--line); }

.role h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0;
}
.role p { margin: 0; }

.pubs {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.pubs a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brass) 55%, var(--line));
}

.pubs a:hover cite { color: var(--verdigris); }

.pubs cite {
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.08rem;
}

.pub-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.kit {
  padding-bottom: 0.5rem;
}

.kit h3 {
  font-size: 0.95rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 0.7rem;
}

.kit ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
}

.kit li + li { margin-top: 0.35rem; }

.contact {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.contact-lede {
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.email {
  display: inline-block;
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
}

.email:hover { color: var(--brass-deep); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.95rem;
}

.contact-links a { color: var(--muted); }

.site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.4rem var(--space) 2.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .kit-grid,
  .timeline li {
    grid-template-columns: 1fr;
  }

  .when { margin-bottom: -0.6rem; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--space);
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px -24px rgba(27, 25, 22, 0.5);
  }

  .site-header.is-open .site-nav { display: flex; }

  .portrait {
    width: 5.25rem;
    height: 5.25rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .nav-toggle, .skip { display: none !important; }
  body { background: white; }
  a { text-decoration: underline; }
}
