:root {
  --bg: #070608;
  --bg-soft: #0d0a0f;
  --paper: #f3eef4;
  --muted: #b0a5b2;
  --line: rgba(243, 238, 244, 0.16);
  --line-strong: rgba(243, 238, 244, 0.34);
  --accent: #c776e7;
  --accent-hot: #e76eae;
  --max: 1440px;
  --pad: clamp(1.25rem, 4vw, 4.75rem);
  color-scheme: dark;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 7%, rgba(199, 118, 231, 0.065), transparent 30rem),
    var(--bg);
  color: var(--paper);
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

html.has-js,
.has-js body {
  height: 100%;
  overflow: hidden;
}

.has-js body {
  overscroll-behavior: none;
}

.has-js main {
  height: 100dvh;
  overflow: hidden;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

::selection {
  color: var(--bg);
  background: var(--accent-hot);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:focus-visible,
.menu-toggle:focus-visible,
.proof-details summary:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 5px;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 40;
  padding: 0.65rem 0.9rem;
  color: var(--bg);
  background: var(--paper);
  transform: translateY(-200%);
}

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at center, transparent 0 24%, rgba(7, 6, 8, 0.12) 52%, rgba(7, 6, 8, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 6, 8, 0.18), transparent 28%, transparent 72%, rgba(7, 6, 8, 0.55));
}

.hero-waterfall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
}

.hero-identity {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: clamp(1.5rem, 3vw, 2.3rem);
}

.hero h1 {
  margin: 0;
  padding: 1rem var(--pad) 0;
  color: var(--paper);
  font-size: clamp(4.25rem, 10.3vw, 9.6rem);
  letter-spacing: -0.068em;
  line-height: 0.88;
  text-align: center;
  text-shadow: 0 0 2.8rem rgba(7, 6, 8, 0.98);
}

.hero-portrait {
  width: clamp(5.75rem, 8vw, 7.25rem);
  height: clamp(5.75rem, 8vw, 7.25rem);
  object-fit: cover;
  object-position: 68% 34%;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-waterfall {
    animation: waterfall-depart 900ms cubic-bezier(0.16, 1, 0.3, 1) 2.35s forwards;
  }

  .hero h1 {
    animation: name-reveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 2.95s both;
  }

  .hero-portrait {
    animation: portrait-reveal 850ms cubic-bezier(0.16, 1, 0.3, 1) 3.2s both;
  }

  .has-js .site-menu {
    animation: menu-arrival 700ms cubic-bezier(0.16, 1, 0.3, 1) 3.65s both;
  }
}

@keyframes waterfall-depart {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes name-reveal {
  from {
    opacity: 0;
    letter-spacing: 0.015em;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    letter-spacing: -0.068em;
    transform: translateY(0);
  }
}

@keyframes portrait-reveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.site-menu {
  position: fixed;
  top: clamp(0.85rem, 2vw, 1.5rem);
  right: var(--pad);
  z-index: 30;
}

.has-js .site-menu {
  opacity: 0;
  visibility: hidden;
}

.menu-toggle {
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: grid;
  place-content: center;
  gap: 5px;
  color: var(--paper);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.menu-toggle:hover,
.site-menu.is-open .menu-toggle {
  color: var(--accent-hot);
  border-color: var(--accent-hot);
  background: #120d14;
}

.menu-toggle span {
  width: 1.25rem;
  height: 1px;
  display: block;
  background: currentColor;
  transform-origin: center;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms ease;
}

.site-menu.is-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-menu.is-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-menu.is-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 5rem);
  padding: 1rem 1.4rem 1.15rem;
  overflow-y: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.48);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms;
  pointer-events: none;
}

.site-menu.is-open .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-panel a {
  position: relative;
  padding: 0.58rem 0;
  display: block;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.2;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.menu-panel a:hover,
.menu-panel a.is-active {
  color: var(--paper);
  transform: translateX(0.3rem);
}

.menu-panel a.is-active {
  color: var(--accent-hot);
}

@keyframes menu-arrival {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.section-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(6.5rem, 10vw, 10rem) var(--pad);
  scroll-margin-top: 1rem;
}

.has-js .section-shell {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding: clamp(6.5rem, 10vw, 9rem) max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-width: thin;
  background:
    radial-gradient(circle at 78% 7%, rgba(199, 118, 231, 0.055), transparent 30rem),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1), visibility 420ms;
  pointer-events: none;
  -webkit-overflow-scrolling: touch;
}

.has-js .section-shell.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.has-js .section-shell:focus {
  outline: none;
}

.has-js .section-shell::-webkit-scrollbar {
  width: 8px;
}

.has-js .section-shell::-webkit-scrollbar-track {
  background: var(--bg);
}

.has-js .section-shell::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.section-shell > h2,
.experience-copy h2,
.story-section > h2 {
  max-width: 12ch;
  margin-bottom: clamp(4rem, 7vw, 7rem);
  font-size: clamp(3.4rem, 7.2vw, 7.1rem);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: underline;
  transition: color 180ms ease, transform 180ms ease;
}

.project-link:hover {
  color: var(--accent-hot);
}

.project-link:active {
  transform: translateY(1px);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
}

.ascii-frame {
  position: relative;
  min-width: 0;
  min-height: 34rem;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}

.ascii-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 6rem 1.5rem var(--bg);
}

.ascii-frame .ascii-canvas {
  width: 100%;
  height: 100%;
}

.project-image {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.project-image::after {
  display: none;
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.project-entry,
.current-entry {
  padding: clamp(3.75rem, 7vw, 7rem) 0;
  border-bottom: 1px solid var(--line);
}

.project-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 24rem);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}

.project-entry-text {
  display: block;
}

.project-entry-copy,
.lunar-copy {
  max-width: 46rem;
}

.project-entry h3,
.current-entry h3 {
  margin-bottom: 1.35rem;
  font-size: clamp(3.2rem, 6vw, 6.4rem);
}

.project-lead,
.current-lead,
.experience-lead {
  color: var(--paper);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.project-entry-copy > p:not(.project-lead),
.lunar-copy > p:not(.project-lead),
.current-entry > p:not(.project-state):not(.current-lead),
.network-copy > p:not(.project-state):not(.current-lead),
.experience-copy > p:not(.experience-lead) {
  color: var(--muted);
}

.project-entry .project-image {
  width: min(100%, 23rem);
  height: clamp(13rem, 20vw, 19rem);
  justify-self: end;
}

.project-image-feature img {
  object-position: center;
}

.project-metrics {
  margin: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.project-metrics p {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}

.project-metrics strong,
.project-metrics span {
  display: block;
}

.project-metrics strong {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.project-metrics span {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.project-entry .project-image-chef {
  height: clamp(15rem, 22vw, 21rem);
}

.project-image-chef img {
  object-position: center 24%;
}

.project-image-stonks img {
  object-position: center;
}

.current-section {
  position: relative;
}

.current-section::before {
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  left: calc(50% - 50vw);
  z-index: -1;
  content: "";
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.current-entry:not(.network-project) > * {
  max-width: 50rem;
}

.project-state,
.paper-field {
  margin-bottom: clamp(3rem, 7vw, 6rem);
  color: var(--accent);
  font-style: italic;
}

.network-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 24rem);
  grid-template-areas:
    "copy image"
    "flow flow";
  align-items: center;
  column-gap: clamp(3rem, 8vw, 8rem);
  row-gap: 3rem;
}

.network-copy {
  grid-area: copy;
  max-width: 50rem;
}

.network-copy .project-state {
  margin-bottom: 2.5rem;
}

.network-flow {
  grid-area: flow;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: none;
}

.network-flow::-webkit-scrollbar {
  display: none;
}

.network-flow span {
  white-space: nowrap;
}

.network-flow b {
  color: var(--accent-hot);
  font-weight: 400;
}

.network-image {
  grid-area: image;
  width: min(100%, 23rem);
  height: clamp(13rem, 20vw, 18rem);
  justify-self: end;
}

.network-image img {
  object-position: center;
}

.papers-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(3rem, 9vw, 10rem);
}

.paper-summary {
  padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.paper-summary-offset {
  margin-top: 8rem;
}

.paper-summary .paper-field {
  margin-bottom: 3rem;
}

.paper-summary h3 {
  max-width: 10ch;
  margin-bottom: 1.6rem;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
}

.paper-summary > p:not(.paper-field) {
  max-width: 37rem;
  color: var(--muted);
}

.paper-summary .paper-publication {
  color: var(--paper);
  font-style: italic;
}

.paper-summary .methods {
  margin-top: 2rem;
  color: var(--paper);
  font-size: 0.94rem;
}

.proofs-heading {
  margin-top: clamp(7rem, 14vw, 14rem);
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.proofs-heading h3 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.6rem, 5vw, 5rem);
}

.proofs-heading p {
  color: var(--muted);
}

.proofs-heading > .project-link {
  flex: 0 0 auto;
  margin-bottom: 1.25rem;
}

.proof-catalog {
  border-bottom: 1px solid var(--line);
}

.proof {
  scroll-margin-top: 80px;
  padding: clamp(2.75rem, 5vw, 5rem) 0;
  display: grid;
  grid-template-columns: minmax(13rem, 0.42fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 0.9rem clamp(3rem, 8vw, 9rem);
  align-items: start;
  border-top: 1px solid var(--line);
}

.proof .equation {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--accent);
  font-size: clamp(2.15rem, 3.8vw, 4.4rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.proof-accent-secondary .equation {
  color: var(--accent-hot);
}

.proof h4 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.02;
}

.proof > p:not(.equation) {
  grid-column: 2;
  grid-row: 2;
  max-width: 46rem;
  margin-bottom: 0;
  color: var(--muted);
}

.proof-details {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.proof-details summary {
  width: fit-content;
  color: var(--paper);
  cursor: pointer;
  transition: color 180ms ease;
}

.proof-details summary::marker {
  color: var(--accent-hot);
}

.proof-details summary:hover,
.proof-details[open] summary {
  color: var(--accent-hot);
}

.proof-transcript {
  margin-top: 1.75rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--bg-soft);
  border-left: 1px solid var(--accent);
}

.proof-transcript p,
.problem-parts {
  max-width: 78ch;
  color: #d2cad4;
}

.proof-transcript .transcript-label {
  margin-top: 2.75rem;
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-style: italic;
}

.proof-transcript .transcript-label:first-child {
  margin-top: 0;
}

.proof-transcript .problem-statement {
  max-width: 70ch;
  color: var(--paper);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.42;
}

.proof-transcript .math-line {
  max-width: 100%;
  padding: 0.75rem 0;
  overflow-x: auto;
  color: var(--paper);
  font-size: 1.08rem;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.problem-parts {
  margin: 1rem 0 2rem;
  padding-left: 1.3rem;
}

.problem-parts li {
  margin-bottom: 0.55rem;
  padding-left: 0.35rem;
}

.education-section {
  border-top: 1px solid var(--line);
}

.education-overview {
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(4rem, 9vw, 10rem);
  align-items: end;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.education-kicker {
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-style: italic;
}

.education-statement {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.education-metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
}

.education-metrics div {
  min-width: 8rem;
}

.education-metrics dt {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.education-metrics dd {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.education-detail-grid {
  margin-top: clamp(4rem, 8vw, 8rem);
  display: grid;
  grid-template-columns: minmax(17rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(4rem, 10vw, 12rem);
  align-items: start;
}

.education-courses h3,
.education-work h3 {
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  letter-spacing: 0;
  line-height: 1.3;
}

.course-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.course-list li {
  padding: 1rem 0;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.1vw, 1.85rem);
  border-bottom: 1px solid var(--line);
}

.course-list li:nth-child(even) {
  padding-left: clamp(1.5rem, 4vw, 4rem);
  color: var(--paper);
}

.education-work {
  border-top: 1px solid var(--line-strong);
}

.education-work h3 {
  padding-top: 1rem;
}

.education-work a {
  padding: 1.3rem 0;
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.education-work span,
.education-work small {
  color: var(--muted);
}

.education-work span {
  font-size: 0.84rem;
  font-style: italic;
}

.education-work strong {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 400;
  line-height: 1.15;
  transition: color 180ms ease, transform 180ms ease;
}

.education-work small {
  max-width: 56ch;
  font-size: 0.9rem;
}

.education-work a:hover strong {
  color: var(--accent-hot);
  transform: translateX(0.3rem);
}

.experience-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(27rem, 1.18fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: center;
  border-top: 1px solid var(--line);
}

.experience-copy h2 {
  max-width: 9ch;
  margin-bottom: 3rem;
}

.experience-photo {
  height: min(70vh, 690px);
}

.experience-photo img {
  object-position: center 42%;
}

.languages-section {
  border-top: 1px solid var(--line);
}

.languages-section > h2 {
  margin-bottom: 2rem;
}

.languages-intro {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem clamp(1.75rem, 4vw, 3.5rem);
  margin: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.language-list p {
  width: auto;
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
  line-height: 1.5;
}

.language-list p:nth-child(2) {
  color: var(--accent);
}

.language-list p:nth-child(3) {
  margin-left: 0;
}

.outside-work {
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 0.38fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line-strong);
}

.outside-work h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.outside-work p {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.story-section {
  display: grid;
  grid-template-columns: minmax(9rem, 0.3fr) minmax(28rem, 1.7fr);
  gap: clamp(3rem, 8vw, 9rem);
  border-top: 1px solid var(--line);
}

.story-section > h2 {
  position: sticky;
  top: 7.5rem;
  align-self: start;
  max-width: none;
  margin-bottom: 0;
  font-size: 1.12rem;
  letter-spacing: 0;
  line-height: 1.5;
}

.story-body {
  padding-top: 0;
}

.story-body p {
  max-width: 58rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.story-body p:last-child {
  margin-bottom: 0;
}

.story-body .story-lead {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.site-footer {
  width: min(100%, var(--max));
  min-height: 15rem;
  margin: 0 auto;
  padding: 3rem var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 2rem;
  border-top: 1px solid var(--line);
}

.story-section .site-footer {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: clamp(4rem, 8vw, 8rem);
  padding-right: 0;
  padding-left: 0;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  justify-self: end;
}

.footer-portrait {
  width: 6rem;
  height: 6rem;
  align-self: center;
  object-fit: cover;
  object-position: 68% 34%;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  body {
    font-size: 17px;
  }

  .experience-section {
    grid-template-columns: 1fr;
  }

  .project-entry,
  .network-project {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 20rem);
    column-gap: 4rem;
  }

  .experience-photo {
    height: 31rem;
    min-height: 0;
  }

  .project-entry .project-image,
  .network-image {
    width: min(100%, 20rem);
  }

  .papers-layout {
    gap: 4rem;
  }

  .story-section {
    grid-template-columns: 9rem 1fr;
    gap: 4rem;
  }
}

@media (max-width: 760px) {
  :root {
    --pad: 1rem;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 14vw, 4.4rem);
    line-height: 0.82;
  }

  .hero h1 span {
    display: block;
  }

  .hero-identity {
    gap: 1.35rem;
  }

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

  .site-menu {
    top: 0.75rem;
  }

  .menu-toggle {
    width: 2.85rem;
    height: 2.85rem;
  }

  .menu-panel {
    width: min(21rem, calc(100vw - 2rem));
  }

  .section-shell {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }

  .has-js .section-shell {
    padding: 5.5rem var(--pad);
  }

  .section-shell > h2,
  .experience-copy h2 {
    margin-bottom: 3.5rem;
    font-size: clamp(3.3rem, 16vw, 5.4rem);
  }

  .project-entry,
  .network-project,
  .papers-layout,
  .education-overview,
  .education-detail-grid,
  .story-section,
  .outside-work {
    grid-template-columns: 1fr;
  }

  .project-entry,
  .network-project {
    gap: 2.5rem;
  }

  .project-entry h3,
  .current-entry h3 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .experience-photo {
    height: 24rem;
  }

  .project-entry .project-image,
  .project-entry .project-image-chef,
  .network-image {
    width: min(100%, 20rem);
    height: 15rem;
    justify-self: start;
  }

  .project-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .network-project {
    grid-template-areas:
      "copy"
      "image"
      "flow";
  }

  .network-flow {
    padding-bottom: 1rem;
  }

  .paper-summary-offset {
    margin-top: 1rem;
  }

  .proofs-heading {
    margin-top: 7rem;
    display: block;
  }

  .proofs-heading p {
    margin-bottom: 1.25rem;
  }

  .proof {
    min-height: 0;
    padding: 3rem 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
  }

  .proof .equation,
  .proof h4,
  .proof > p:not(.equation),
  .proof-details {
    grid-column: 1;
    grid-row: auto;
  }

  .proof .equation {
    margin-bottom: 1.5rem;
  }

  .proof-details {
    margin-top: 1rem;
  }

  .proof-transcript {
    padding: 1.35rem;
  }

  .education-overview,
  .education-detail-grid {
    gap: 3rem;
  }

  .education-statement {
    font-size: clamp(2.25rem, 10vw, 3.8rem);
  }

  .education-metrics {
    width: 100%;
  }

  .education-detail-grid {
    margin-top: 4rem;
  }

  .outside-work {
    gap: 1rem;
  }

  .story-section {
    gap: 0;
  }

  .story-section > h2 {
    position: static;
    margin-bottom: 1.5rem;
    font-size: 1.12rem;
  }

  .story-body {
    padding-top: 0;
  }

  .site-footer {
    min-height: 13rem;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    font-size: 0.86rem;
  }

  .footer-portrait {
    width: 5rem;
    height: 5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .has-js .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-waterfall {
    display: none;
  }

  .hero h1 {
    opacity: 1;
    transform: none;
  }

  .hero-portrait {
    opacity: 1;
    transform: none;
  }

  .has-js .site-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
