:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --panel: #ffffff;
  --panel-soft: #fbfaf6;
  --ink: #1d2329;
  --muted: #5e6871;
  --subtle: #8c969f;
  --line: #dcd8cd;
  --accent: #2f6f73;
  --accent-strong: #174d52;
  --warm: #ad6d3c;
  --gold: #bf942e;
  --shadow: 0 18px 45px rgba(39, 45, 50, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 320px),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  color: var(--warm);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  min-height: 64px;
  margin: 0 auto;
  padding: 0.65rem 0;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 216, 205, 0.8);
}

.wordmark {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: #e9eee9;
  color: var(--accent-strong);
}

.page-shell {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 2.5rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 2.5rem auto 0;
  align-items: start;
}

.profile-panel {
  position: sticky;
  top: 92px;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #ece8df;
}

.profile-panel h1 {
  margin: 1rem 0 0.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.12;
}

.role,
.affiliation {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.affiliation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}

.epfl-logo {
  width: 58px;
  height: auto;
  margin-top: 0.1rem;
}

.role {
  font-weight: 700;
  color: var(--accent-strong);
}

.profile-meta {
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0;
}

.profile-meta div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.profile-meta dt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-meta dt svg {
  width: 14px;
  height: 14px;
  color: var(--accent-strong);
}

.profile-meta dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-links {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.profile-links a,
.contact-actions a,
.filter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.72rem;
  cursor: pointer;
}

.profile-links a.icon-link {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 0.35rem 0.72rem;
  border-radius: var(--radius);
  background: #fff;
}

.profile-links a.icon-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.profile-links a.icon-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-links a.icon-link-mail {
  border-color: rgba(47, 111, 115, 0.36);
  background: #eef7f5;
  color: var(--accent-strong);
}

.profile-links a.icon-link-scholar {
  border-color: rgba(191, 148, 46, 0.42);
  background: #fbf3df;
  color: #6a4c21;
}

.profile-links a.icon-link-linkedin {
  border-color: rgba(31, 98, 151, 0.34);
  background: #eef5fb;
  color: #195580;
}

.profile-links a.icon-link-github {
  border-color: rgba(29, 35, 41, 0.2);
  background: #f1f3f4;
  color: var(--ink);
}

.profile-links a.icon-link-cv {
  border-color: rgba(173, 109, 60, 0.36);
  background: #fbefe7;
  color: #7a4526;
}

.profile-links a:hover,
.contact-actions a:hover,
.filter-row button:hover,
.filter-row button.is-selected {
  border-color: rgba(47, 111, 115, 0.4);
  background: #e9eee9;
  color: var(--accent-strong);
}

.content {
  display: grid;
  gap: 1.25rem;
}

.section-band,
.section-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-band {
  padding: clamp(1.35rem, 3vw, 2.35rem);
}

.section-block {
  padding: clamp(1.25rem, 2.4vw, 2rem);
}

.section-kicker,
.section-label {
  margin: 0 0 0.4rem;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-section h2,
.contact-section h2,
.section-heading h2,
.two-column h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
}

.intro-section h2 {
  max-width: 820px;
  font-size: clamp(2rem, 4.7vw, 4.65rem);
}

.bio-copy {
  display: grid;
  gap: 0.85rem;
  max-width: 840px;
  margin-top: 1.1rem;
}

.bio-copy p {
  margin: 0;
  color: var(--muted);
}

.bio-copy a {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.opportunity-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 840px;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #eef7f5;
}

.opportunity-callout p {
  margin: 0;
}

.opportunity-label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.opportunity-label + p {
  margin-top: 0.2rem;
  color: var(--ink);
  font-weight: 650;
}

.opportunity-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.opportunity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--accent-strong);
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.38rem 0.78rem;
}

.opportunity-button:hover {
  background: #123f43;
  border-color: #123f43;
  color: #fff;
}

.opportunity-button-secondary {
  background: #eef5fb;
  border-color: rgba(31, 98, 151, 0.34);
  color: #195580;
}

.opportunity-button-secondary:hover {
  background: #ddebf7;
  border-color: rgba(31, 98, 151, 0.5);
  color: #164a70;
}

.interest-heading {
  margin: 1.35rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.interest-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
}

.interest-chip-0 {
  background: #deecea;
  color: #174d52;
}

.interest-chip-1 {
  background: #f4eadb;
  color: #765022;
}

.interest-chip-2 {
  background: #e7eef9;
  color: #234b7a;
}

.interest-chip-3 {
  background: #efe8f5;
  color: #5d3c78;
}

.interest-chip-4 {
  background: #f7e7e0;
  color: #7a4526;
}

.interest-chip-5 {
  background: #e5f0e3;
  color: #315b35;
}

.section-heading,
.two-column {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.section-heading {
  grid-template-columns: 1fr;
  gap: 0;
}

.section-heading h2,
.two-column h2,
.contact-section h2 {
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
}

.news-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.news-date {
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.news-list p {
  margin: 0;
  color: var(--muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0 1rem;
}

.publication-list {
  display: grid;
  gap: 1rem;
}

.publication-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  min-height: 166px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.publication-card-wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.publication-visual {
  display: grid;
  gap: 0.75rem;
  align-self: center;
}

.publication-card-wide .publication-visual {
  align-self: center;
  align-content: center;
}

.publication-card-wide > div:not(.publication-visual) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.publication-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e9e1d3;
}

.publication-image-wide {
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #fff;
  align-self: center;
}

.publication-media-stack {
  display: grid;
  gap: 0.55rem;
}

.publication-media-stack .publication-image {
  align-self: center;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.venue,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.15rem 0.52rem;
}

.venue {
  background: #deecea;
  color: var(--accent-strong);
}

.tag {
  background: #f4eadb;
  color: #765022;
}

.tag-world-models {
  background: #deecea;
  color: #174d52;
}

.tag-trajectory-prediction {
  background: #e7eef9;
  color: #234b7a;
}

.tag-computer-vision {
  background: #efe8f5;
  color: #5d3c78;
}

.tag-3d-computer-vision {
  background: #e5f0e3;
  color: #315b35;
}

.tag-video-generation {
  background: #f7e7e0;
  color: #7a4526;
}

.tag-human-motion {
  background: #e4f0f0;
  color: #2b5f63;
}

.tag-robotics {
  background: #edf1df;
  color: #516121;
}

.publication-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.publication-card-wide h3 {
  font-size: 1.02rem;
}

.publication-card-wide .authors,
.publication-card-wide .publication-note {
  margin-top: 0.6rem;
}

.authors {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.authors strong {
  color: var(--ink);
  font-weight: 800;
}

.publication-note {
  margin: 0.2rem 0 0;
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 700;
}

.summary {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.summary-visual {
  display: none;
  margin-top: 0;
  max-width: 96%;
  font-size: 0.9rem;
  line-height: 1.55;
}

.publication-card-wide .summary-main {
  margin-top: 0.6rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.publication-card-wide .publication-links {
  padding-top: 0;
}

.publication-card-wide .publication-links-visual {
  justify-content: flex-start;
  margin-top: 0.15rem;
}

.publication-card-wide .publication-links-main,
.publication-card:not(.publication-card-wide) .publication-links-visual {
  display: none;
}

.publication-links:empty {
  display: none;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(23, 77, 82, 0.22);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(39, 45, 50, 0.06);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.72rem;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.publication-link::after {
  content: "\2197";
  margin-left: 0.38rem;
  font-size: 0.72rem;
  line-height: 1;
}

.publication-link:hover {
  border-color: rgba(23, 77, 82, 0.45);
  box-shadow: 0 10px 24px rgba(39, 45, 50, 0.1);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.publication-link-paper {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.publication-link-paper:hover {
  background: #123f43;
  border-color: #123f43;
  color: #fff;
}

.publication-link-project {
  background: #f7eadf;
  border-color: #e2c4aa;
  color: #7a4526;
}

.publication-link-project:hover {
  background: #f2ddcc;
  border-color: #d7ad8a;
  color: #6a391d;
}

.publication-link-code {
  background: #edf1df;
  border-color: #d7ddb8;
  color: #516121;
}

.publication-link-code:hover {
  background: #e2e9cb;
  border-color: #c6d09b;
  color: #435018;
}

.publication-scholar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.publication-scholar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.publication-link-scholar {
  background: #e7eef9;
  border-color: #cad9ee;
  color: #234b7a;
  white-space: nowrap;
}

.publication-link-scholar:hover {
  background: #dce8f8;
  border-color: #b8cde8;
  color: #1d416d;
}

.timeline,
.stacked-lists,
.award-list {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-date {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-item h3,
.stacked-lists h3 {
  margin: 0;
  font-size: 1rem;
}

.timeline-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.stacked-lists > div {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.stacked-lists > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.compact-list,
.award-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.award-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
}

.compact-list li + li,
.award-list li + li {
  margin-top: 0.55rem;
}

.compact-list li::before,
.award-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.contact-section p {
  margin: 0;
  color: var(--muted);
}

.contact-actions {
  margin-top: 1rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 2rem auto 1.5rem;
  color: var(--subtle);
  font-size: 0.86rem;
}

@media (max-width: 940px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }

  .profile-panel {
    position: static;
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .profile-photo {
    grid-row: span 4;
  }

  .profile-panel h1 {
    margin-top: 0;
  }

  .profile-meta,
  .profile-links {
    grid-column: 1 / -1;
  }

  .section-heading,
  .two-column,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .topbar {
    width: calc(100% - 1rem);
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .wordmark {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-links {
    width: 100%;
  }

  .page-shell,
  .site-footer {
    width: calc(100% - 1rem);
  }

  .profile-panel {
    grid-template-columns: 108px minmax(0, 1fr);
    padding: 0.9rem;
  }

  .profile-panel h1 {
    font-size: 1.55rem;
  }

  .profile-meta div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .intro-section h2 {
    font-size: 2rem;
  }

  .opportunity-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .news-list li,
  .timeline-item,
  .publication-card {
    grid-template-columns: 1fr;
  }

  .publication-image {
    max-height: 210px;
  }

  .publication-scholar {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    display: grid;
  }
}
