:root {
  --ink: #16201f;
  --muted: #596866;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --surface-2: #eef4f2;
  --teal: #0f766e;
  --copper: #a05a2c;
  --line: rgba(22, 32, 31, 0.14);
  --shadow: 0 18px 55px rgba(22, 32, 31, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  color: #ffffff;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 248, 244, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a {
  text-decoration: none;
  opacity: 0.9;
}

.nav a:hover {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: clamp(660px, 86svh, 860px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #111a19;
  color: #ffffff;
}

.hero__image {
  position: absolute;
  inset: 0;
  background-image: url("assets/profile.jpg");
  background-size: cover;
  background-position: 60% 18%;
  filter: saturate(0.95) contrast(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 19, 0.48);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 116px 0 clamp(48px, 7vh, 72px);
}

.eyebrow,
.section-kicker,
.meta {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: #d9f7f0;
}

.section-kicker {
  color: var(--teal);
}

.meta {
  color: var(--copper);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 12px 0 18px;
  font-size: clamp(4rem, 11vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 8px 0 0;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero__summary {
  max-width: 650px;
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--light {
  background: #ffffff;
  color: var(--ink);
}

.button--outline {
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #ffffff;
}

.section {
  padding: clamp(46px, 6vw, 76px) 0;
  background: var(--surface);
}

.section--intro {
  padding: clamp(44px, 5vw, 68px) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.section--muted {
  background: var(--surface-2);
}

.section__inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

section[id] {
  scroll-margin-top: 86px;
}

.intro-grid,
.feature,
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.profile-block {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: start;
}

.profile-heading h2 {
  max-width: 460px;
  margin-top: 10px;
  font-size: clamp(1.9rem, 2.8vw, 3rem);
  line-height: 1.06;
}

.profile-body {
  padding-top: 4px;
}

.profile-lead {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  color: var(--muted);
}

.affiliation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.affiliation-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.affiliation-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.42);
  background: #ffffff;
}

.affiliation-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 58px;
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
}

.affiliation-logo img {
  display: block;
  max-width: 72px;
  max-height: 42px;
  object-fit: contain;
}

.affiliation-logo--worldquant img {
  width: 58px;
  height: 58px;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.affiliation-logo--ucl img {
  max-width: 76px;
}

.affiliation-card strong,
.affiliation-card small {
  display: block;
}

.affiliation-card strong {
  font-size: 0.95rem;
  line-height: 1.15;
}

.affiliation-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-rows {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.profile-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-row p {
  margin: 0;
  color: var(--muted);
}

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

.paper-authors {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-topper {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: 24px;
}

.section-topper .section-heading {
  margin-bottom: 0;
}

.section-topper .affiliation-grid {
  margin-top: 0;
}

.affiliation-grid--research {
  grid-template-columns: minmax(0, 1fr);
}

.affiliation-grid--internships {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature {
  padding: clamp(24px, 3vw, 34px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature p,
.timeline-item p,
.project-card p {
  color: var(--muted);
}

.compact-list,
.project-list {
  margin: 20px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.compact-list li,
.project-list li {
  margin: 8px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-card__top {
  min-height: 74px;
}

.project-list {
  margin-bottom: 22px;
}

.text-link {
  margin-top: auto;
  color: var(--teal);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (min-width: 821px) {
  .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 240px;
  }

  .project-card:last-child:nth-child(odd) .project-list {
    column-count: 2;
    column-gap: clamp(30px, 5vw, 72px);
  }

  .project-card:last-child:nth-child(odd) .project-list li {
    break-inside: avoid;
  }
}

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1.62fr);
  gap: clamp(20px, 5vw, 60px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-content {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.timeline-content h3,
.timeline-content p {
  margin: 0;
}

.outcome {
  margin-top: 4px !important;
  font-weight: 750;
  color: var(--ink) !important;
}

.contact {
  padding: clamp(46px, 7vw, 72px) 0;
  background: #16201f;
  color: #ffffff;
}

.contact h2 {
  max-width: 430px;
  font-size: clamp(1.9rem, 4vw, 3.45rem);
  line-height: 0.98;
}

.contact-links {
  display: grid;
  gap: 12px;
  align-content: start;
}

.contact-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 750;
}

.contact-links a:hover {
  color: #ffffff;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding: 14px 20px;
  }

  .nav {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 86svh;
  }

  .hero__image {
    background-position: 58% 18%;
  }

  .hero__overlay {
    background: rgba(11, 20, 19, 0.56);
  }

  .hero__content {
    padding-top: 132px;
  }

  .intro-grid,
  .profile-block,
  .section-topper,
  .feature,
  .contact__inner,
  .timeline-item,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .profile-heading h2 {
    max-width: 100%;
  }

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

  .affiliation-grid--internships {
    grid-template-columns: 1fr;
  }

  .affiliation-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .affiliation-logo {
    width: 96px;
  }

  .affiliation-logo img {
    max-width: 84px;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-card {
    min-height: auto;
  }

}

@media (max-width: 520px) {
  .site-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    row-gap: 8px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
    font-size: 0.69rem;
  }

  .nav a {
    padding: 4px 0;
  }

  .hero__content {
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
  }

  h1 {
    font-size: clamp(3.25rem, 18vw, 5.2rem);
  }

  .hero__summary {
    max-width: 100%;
    font-size: 1.05rem;
  }

  .affiliation-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .affiliation-logo {
    width: 82px;
  }

  .affiliation-logo img {
    max-width: 72px;
  }

}
