:root {
  color-scheme: light;
  --paper: #f2f0e9;
  --paper-raised: #faf9f5;
  --ink: #161815;
  --muted: #62675e;
  --line: #cfd1c8;
  --mint: #7fd4ac;
  --mint-bright: #b7f5d8;
  --charcoal: #20231f;
  --max-width: 1180px;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141613;
  --paper-raised: #1d201c;
  --ink: #eef0e8;
  --muted: #a2a89d;
  --line: #3a3f38;
  --mint: #78d3a7;
  --mint-bright: #316c50;
  --charcoal: #090a09;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--mint);
  color: #101310;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.section-shell,
.site-header {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  box-shadow: 0 10px 34px rgb(20 24 18 / 6%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  width: max-content;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark-dot,
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 18%, transparent);
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a,
.theme-toggle {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}

.nav a {
  position: relative;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  justify-self: end;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  background: var(--mint);
  color: #101310;
  transform: rotate(18deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
  min-height: calc(100svh - 92px);
  padding-block: 100px 112px;
}

.eyebrow,
.section-index,
.card-topline,
.mark-caption,
.timeline-meta,
.tags,
.pub-year,
.pub-venue {
  font-family: var(--mono);
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 0.74rem;
}

.sf-mark {
  display: inline-flex;
  align-items: center;
  margin-left: -3px;
}

.sf-mark img {
  display: block;
  width: 30px;
  height: 30px;
  box-shadow: 0 4px 12px rgb(20 24 18 / 10%);
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 5.7vw, 5.9rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-intro {
  max-width: 745px;
  margin: 40px 0 0;
  color: var(--ink);
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.hero-intro a {
  text-decoration-color: var(--mint);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.hero-intro-secondary {
  margin-top: 12px;
  color: var(--muted);
}

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

.button,
.text-link,
.inline-link,
.all-work-link,
.closing-link,
.more-card a {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
}

.button {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary:hover {
  border-color: var(--mint);
  background: var(--mint);
  color: #101310;
}

.text-link,
.inline-link,
.more-card a {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

.text-link:hover,
.inline-link:hover,
.more-card a:hover {
  border-color: var(--ink);
}

.social-text-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.social-text-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.social-text-link .linkedin-mark {
  fill: #0a66c2;
}

.hero-mark {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0;
  justify-self: end;
}

.hero-mark::before {
  position: absolute;
  inset: -20px 20px 22px -20px;
  border: 1px solid var(--line);
  content: "";
  pointer-events: none;
  transform: rotate(-3deg);
}

.profile-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  box-shadow: 22px 22px 0 var(--mint-bright);
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(0.98);
}

.mark-caption {
  position: relative;
  z-index: 2;
  margin: 42px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  text-align: right;
}

.hero-experience-links {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 17px;
}

.hero-logo-link {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.hero-logo-link:hover,
.hero-logo-link:focus-visible {
  border-color: var(--mint);
  box-shadow: 0 6px 16px rgb(20 24 18 / 10%);
  transform: translateY(-3px);
}

.hero-logo-link img {
  display: block;
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.hero-research-link {
  background: var(--mint-bright);
  color: #101310;
}

.hero-research-link svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.hero-logo-overflow {
  position: relative;
}

.hero-logo-overflow summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  list-style: none;
}

.hero-logo-overflow summary::-webkit-details-marker {
  display: none;
}

.hero-logo-overflow[open] summary {
  border-color: var(--mint);
  background: var(--mint-bright);
}

.hero-logo-overflow-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 9px);
  right: 0;
  display: flex;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  box-shadow: 0 14px 34px rgb(20 24 18 / 12%);
}

.hero-logo-overflow:not([open]) .hero-logo-overflow-panel {
  display: none;
}

.hero-logo-overflow-panel .hero-logo-link {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.hero-logo-overflow-panel .hero-logo-link img {
  width: 21px;
  height: 21px;
}

.content-section {
  padding-block: clamp(100px, 13vw, 180px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(300px, 1.15fr) minmax(260px, 0.65fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 80px;
}

.section-index {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.section-heading h2,
.closing h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.7vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.section-heading > p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.timeline {
  margin-left: calc(35% + 12px);
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 38px;
  padding: 42px 0 52px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.68rem;
}

.timeline-meta p {
  margin: 4px 0 12px;
}

.status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.timeline-body h3,
.project-card h3,
.more-card h3 {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.timeline-body {
  position: relative;
  min-height: 50px;
  padding-left: 68px;
}

.experience-logo {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.experience-logo:hover,
.experience-logo:focus-visible {
  border-color: var(--mint);
  box-shadow: 0 7px 20px rgb(20 24 18 / 9%);
  transform: translateY(-2px);
}

.experience-logo img {
  display: block;
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.experience-title {
  color: inherit;
  text-decoration: none;
}

.experience-title::after {
  margin-left: 0.5em;
  color: var(--muted);
  content: "↗";
  font-family: var(--mono);
  font-size: 0.58em;
  font-weight: 400;
  opacity: 0;
  transition: opacity 160ms ease;
}

.experience-title:hover::after,
.experience-title:focus-visible::after {
  opacity: 1;
}

.timeline-body .role {
  margin: 5px 0 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.timeline-body > p:not(.role) {
  max-width: 600px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.61rem;
}

.inline-link {
  display: inline-block;
  margin-top: 12px;
}

.experience-toggle {
  display: flex;
  width: 100%;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 23px 0 23px 188px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: left;
}

.experience-toggle::after {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "+";
  font-size: 0.9rem;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.experience-toggle[aria-expanded="true"]::after {
  content: "−";
  transform: rotate(180deg);
}

.experience-toggle:hover::after,
.experience-toggle:focus-visible::after {
  border-color: var(--mint);
  background: var(--mint);
  color: #101310;
}

.experience-toggle-count {
  margin-left: auto;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 370px;
  padding: 26px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 200ms ease, transform 200ms ease;
}

.project-card:hover {
  position: relative;
  z-index: 1;
  background: var(--mint-bright);
}

.project-card-featured {
  grid-row: span 2;
  min-height: 740px;
  background: var(--charcoal);
  color: #f3f5ef;
}

.project-card-featured:hover {
  background: #252a24;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  color: currentColor;
  font-size: 0.64rem;
  opacity: 0.68;
}

.project-card h3 {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.5vw, 2.3rem);
}

.project-card p {
  max-width: 470px;
  margin: 0;
  color: currentColor;
  font-size: 0.88rem;
  opacity: 0.68;
}

.card-link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 0.7rem;
}

.project-glyph {
  position: relative;
  width: min(78%, 390px);
  aspect-ratio: 1.08;
  align-self: center;
}

.glyph-browser {
  border: 1px solid #60665e;
  border-radius: 10px;
  background: linear-gradient(135deg, #2e332d, #181a18);
}

.glyph-browser::before {
  position: absolute;
  top: 12%;
  right: 7%;
  left: 7%;
  height: 1px;
  background: #60665e;
  content: "";
}

.glyph-browser::after {
  position: absolute;
  top: 36%;
  left: 24%;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid #74c9a0;
  border-radius: 50%;
  box-shadow: 0 0 50px rgb(127 212 172 / 18%);
  content: "";
}

.glyph-browser span {
  position: absolute;
  z-index: 1;
  top: 5.5%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #70766e;
}

.glyph-browser span:nth-child(1) { left: 8%; }
.glyph-browser span:nth-child(2) { left: 12%; }
.glyph-browser span:nth-child(3) { left: 16%; }

.all-work-link {
  display: block;
  width: max-content;
  margin: 38px 0 0 auto;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ink);
}

.research-group + .research-group {
  margin-top: 58px;
}

.research-label {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

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

.publication {
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 132px;
  padding: 26px 22px 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 180ms ease, background-color 180ms ease;
}

.publication:hover {
  padding-left: 22px;
  background: var(--paper-raised);
}

.publication > div {
  display: flex;
  gap: 14px;
}

.pub-year,
.pub-venue {
  color: var(--muted);
  font-size: 0.66rem;
}

.pub-venue {
  color: var(--ink);
}

.publication h3 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.pub-arrow {
  font-size: 1.25rem;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.more-card {
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.more-card:nth-child(2) {
  transform: translateY(24px);
}

.more-card:nth-child(3) {
  transform: translateY(48px);
}

.more-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 82px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.15rem;
}

.more-card p {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 0.87rem;
}

.closing {
  padding-block: clamp(110px, 14vw, 190px);
}

.closing .section-index {
  margin-bottom: 32px;
}

.closing h2 {
  max-width: 820px;
}

.closing-link {
  display: inline-block;
  margin-top: 54px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.footer p {
  margin: 0;
}

.footer a {
  justify-self: end;
  text-decoration: none;
}

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

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

@media (max-width: 900px) {
  .section-shell,
  .site-header {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 110px 100px;
  }

  .hero-mark {
    width: min(64vw, 360px);
    margin-right: 22px;
    justify-self: start;
  }

  .hero-experience-links {
    justify-content: flex-start;
  }

  .hero-logo-overflow-panel {
    right: auto;
    left: 0;
  }

  .section-heading {
    grid-template-columns: 160px 1fr;
  }

  .section-heading > p:last-child {
    grid-column: 2;
  }

  .timeline {
    margin-left: 160px;
  }

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

  .more-card,
  .more-card:nth-child(2),
  .more-card:nth-child(3) {
    min-height: 280px;
    transform: none;
  }

  .more-icon {
    margin-bottom: 58px;
  }
}

@media (max-width: 680px) {
  .section-shell,
  .site-header {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .site-header {
    top: 10px;
    margin-top: 10px;
  }

  .hero {
    gap: 74px;
    padding-block: 82px 90px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 12vw, 4.4rem);
  }

  .eyebrow {
    margin-bottom: 27px;
  }

  .hero-intro {
    margin-top: 30px;
  }

  .hero-intro-secondary {
    margin-top: 12px;
  }

  .hero-links {
    gap: 18px;
  }

  .hero-mark {
    width: calc(100% - 24px);
    max-width: 330px;
  }

  .content-section {
    padding-block: 92px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 52px;
  }

  .section-heading > p:last-child {
    grid-column: auto;
    max-width: 460px;
  }

  .timeline {
    margin-left: 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .timeline-meta {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .timeline-meta p {
    margin: 0;
  }

  .timeline-body {
    padding-left: 60px;
  }

  .experience-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .experience-logo img {
    width: 26px;
    height: 26px;
  }

  .experience-toggle {
    padding-left: 0;
  }

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

  .project-card,
  .project-card-featured {
    min-height: 400px;
  }

  .project-card-featured {
    grid-row: auto;
    min-height: 630px;
  }

  .publication {
    grid-template-columns: 1fr auto;
    gap: 18px;
    min-height: 150px;
    padding-right: 8px;
  }

  .publication > div {
    grid-column: 1;
  }

  .publication h3 {
    grid-column: 1;
  }

  .pub-arrow {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

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

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

@supports not (color: color-mix(in srgb, black, white)) {
  .site-header {
    background: var(--paper);
  }
}
