:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --text: #191c1a;
  --muted: #626963;
  --line: #dfe2dc;
  --accent: #176b5b;
  --accent-soft: #e6f0ec;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", sans-serif;
  --shell: min(1040px, calc(100vw - 48px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

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

body.menu-open {
  overflow: hidden;
}

::selection {
  color: #fff;
  background: var(--accent);
}

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

button {
  color: inherit;
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin-right: auto;
  margin-left: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 12px;
  color: #fff;
  background: var(--accent);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: rgba(247, 247, 243, 0.9);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
}

.header-inner {
  display: flex;
  width: var(--shell);
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 26px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  transition: color 160ms ease;
}

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

.nav-toggle {
  display: none;
}

.hero {
  display: grid;
  min-height: 590px;
  padding: 86px 0 78px;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: clamp(60px, 10vw, 130px);
  align-items: center;
}

.overline,
.meta,
.section-index,
.quick-facts span,
.project-number,
.project-heading span,
.skills span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.overline {
  margin: 0 0 18px;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 7vw, 72px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero-lead {
  max-width: 610px;
  margin: 24px 0 0;
  color: #3e4540;
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.38;
}

.hero-links {
  display: flex;
  margin-top: 34px;
  gap: 24px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 43px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: #0f584b;
  border-color: #0f584b;
  transform: translateY(-1px);
}

.text-link {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.portrait {
  margin: 0;
}

.portrait img {
  width: 255px;
  height: 310px;
  background: #ecece8;
  border-radius: 4px;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.84);
}

.portrait figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.quick-facts {
  display: grid;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr 1.5fr 0.75fr 0.75fr;
  gap: 28px;
}

.quick-facts div {
  display: flex;
  flex-direction: column;
}

.quick-facts span {
  margin-bottom: 4px;
  font-size: 10px;
}

.quick-facts strong {
  font-size: 14px;
  font-weight: 500;
}

.section {
  display: grid;
  padding: 100px 0;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 45px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  padding-top: 8px;
  color: var(--accent);
}

.section-content > h2 {
  max-width: 720px;
  margin: 0 0 45px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.two-column-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  color: var(--muted);
}

.two-column-copy p {
  margin: 0;
}

.education {
  display: grid;
  margin-top: 58px;
  padding: 25px 0 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.education h3 {
  margin: 8px 0 2px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.education p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.education-notes {
  padding-top: 29px;
}

.paper {
  padding: 35px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.paper-topline {
  display: flex;
  margin-bottom: 25px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.paper-topline .venue {
  color: var(--accent);
}

.paper h3 {
  max-width: 760px;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 37px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.paper h3 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color 180ms ease, background-size 300ms var(--ease);
}

.paper h3 a:hover,
.paper h3 a:focus-visible {
  color: var(--accent);
  background-size: 100% 1px;
}

.paper > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.paper-highlights {
  display: grid;
  max-width: 760px;
  margin: 25px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.paper-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
}

.paper-highlights li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "—";
}

.paper-actions {
  margin-top: 30px;
}

.button-dark {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.button-dark:hover,
.button-dark:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

.project-list {
  border-top: 1px solid var(--line);
}

.project {
  display: grid;
  padding: 32px 0;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.project-number {
  padding-top: 4px;
  color: var(--accent);
}

.project-heading {
  display: flex;
  gap: 25px;
  align-items: baseline;
  justify-content: space-between;
}

.project-heading h3 {
  max-width: 600px;
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-heading span {
  flex: none;
  font-size: 10px;
}

.project-main > p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.project-tags {
  display: flex;
  margin-top: 18px;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  padding: 4px 9px;
  color: #36584f;
  background: var(--accent-soft);
  border-radius: 3px;
  font-size: 11px;
}

.award-list {
  border-top: 1px solid var(--line);
}

.award {
  display: grid;
  min-height: 70px;
  padding: 17px 0;
  grid-template-columns: 115px minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.award span {
  color: var(--accent);
  font-size: 12px;
}

.award strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.award p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.skills div {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.skills div:nth-child(odd) {
  padding-right: 30px;
}

.skills div:nth-child(even) {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.skills p {
  margin: 7px 0 0;
  font-size: 15px;
}

.contact {
  display: flex;
  padding: 75px 0;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.contact h2 {
  max-width: 590px;
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(33px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.contact-actions {
  display: flex;
  gap: 10px;
}

.copy-email {
  min-height: 43px;
  padding: 0 15px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
}

.copy-email:hover,
.copy-email:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.site-footer {
  display: grid;
  padding: 24px 0 32px;
  color: var(--muted);
  grid-template-columns: 1fr 1fr auto;
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer a:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 34px, 620px);
  }

  .site-header {
    height: 64px;
  }

  .nav-toggle {
    position: relative;
    z-index: 102;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--bg);
    cursor: pointer;
    place-content: center;
    gap: 5px;
  }

  .nav-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background: var(--text);
    transition: transform 180ms ease;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: flex;
    padding: 95px 24px;
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
    color: var(--text);
    background: var(--bg);
    font-family: var(--serif);
    font-size: 30px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .hero {
    min-height: 0;
    padding: 55px 0 60px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero-lead {
    font-size: 24px;
  }

  .portrait {
    width: 190px;
  }

  .portrait img {
    width: 190px;
    height: 230px;
  }

  .hero-links {
    gap: 15px;
    flex-wrap: wrap;
  }

  .quick-facts {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    display: block;
    padding: 72px 0;
  }

  .section-index {
    margin-bottom: 24px;
    padding: 0;
  }

  .section-content > h2 {
    margin-bottom: 35px;
    font-size: 38px;
  }

  .two-column-copy,
  .education {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .education-notes {
    padding-top: 0;
  }

  .paper {
    padding: 25px 21px;
  }

  .paper-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .paper h3 {
    font-size: 29px;
  }

  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .award {
    grid-template-columns: 88px 1fr;
  }

  .award p {
    display: none;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .skills div:nth-child(odd),
  .skills div:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .contact {
    align-items: flex-start;
    flex-direction: column;
    gap: 30px;
  }

  .contact-actions {
    flex-wrap: wrap;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .site-footer p:nth-child(2) {
    display: none;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
