:root {
  --background: #ffffff;
  --surface: #f8fafc;
  --surface-strong: #f1f5f9;
  --text: #172033;
  --muted: #5f6b7c;
  --quiet: #8490a2;
  --border: #dfe5ec;
  --border-light: #edf1f5;
  --link: #174a7e;
  --link-hover: #0c3157;
  --content-width: 1120px;
  --header-height: 66px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.018em;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 8px 12px;
  background: var(--text);
  color: #fff;
  border-radius: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

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

.site-name {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.site-nav a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--text);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span[aria-hidden="true"] {
  display: block;
  height: 1px;
  margin: 5px 0;
  background: var(--text);
}

.page-shell {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  padding: 54px 0 90px;
}

.profile {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  align-self: start;
}

.profile-photo {
  display: block;
  width: 174px;
  height: 210px;
  object-fit: cover;
  object-position: center 20%;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.profile h1 {
  margin-bottom: 4px;
  color: #282b30;
  font-size: 1.08rem;
  font-weight: 750;
}

.profile-role,
.profile-location {
  margin-bottom: 1px;
  color: #565c65;
  font-size: 0.83rem;
}

.profile-links {
  display: grid;
  gap: 11px;
  margin: 19px 0 27px;
}

.profile-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #454b54;
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.profile-links a:hover {
  color: var(--link);
}

.profile-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #3f4650;
}

.profile-link--linkedin .profile-icon {
  color: #0a66c2;
}

.profile-link--github .profile-icon {
  color: #24292f;
}

.profile-link--scholar .profile-icon {
  color: #5f6368;
}

.profile-link--kaggle .profile-icon {
  color: #111827;
}

.profile-link--cv .profile-icon {
  color: #374151;
}

.profile-facts {
  display: grid;
  gap: 21px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.profile-facts div {
  display: grid;
  gap: 1px;
}

.profile-facts strong {
  color: #2d3035;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: -0.005em;
}

.profile-facts span,
.profile-facts a {
  color: #4b5057;
  font-size: 0.83rem;
  line-height: 1.48;
}

.profile-facts a {
  text-decoration: none;
}

.profile-facts a:hover {
  text-decoration: underline;
}

main {
  min-width: 0;
}

.intro {
  max-width: 760px;
  padding: 12px 0 6px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--quiet);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.intro h2 {
  max-width: 710px;
  margin-bottom: 21px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 690;
  letter-spacing: -0.035em;
}

.intro > p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 14px;
  color: #354154;
  font-size: 1rem;
}

.research-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.research-interests span,
.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  color: #465367;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.74rem;
  font-weight: 600;
}

.content-section {
  padding-top: 68px;
}

.section-heading {
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-heading .eyebrow {
  margin-bottom: 3px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.24rem;
}

.publication {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.publication:first-of-type {
  padding-top: 3px;
}

.publication-figure {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

a.publication-figure:hover {
  border-color: #b9c4d0;
}

.publication-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-body {
  min-width: 0;
}

.publication h3 {
  margin-bottom: 7px;
  font-size: 0.99rem;
  font-weight: 700;
  line-height: 1.42;
}

.publication h3 a {
  color: var(--text);
  text-decoration: none;
}

.publication h3 a:hover {
  color: var(--link);
}

.authors {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.authors strong {
  color: #344054;
}

.venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #4a5568;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.4;
}

.venue strong {
  color: #1f2a3d;
  font-weight: 650;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status--accepted {
  color: #1d5c3a;
  background: #eaf5ee;
  border-color: #c9e3d2;
}

.status--preprint {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #dde2e8;
}

.publication-links,
.lecture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.publication-links a,
.lecture-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: #36475b;
  background: #fff;
  border: 1px solid #ccd5df;
  border-radius: 3px;
  font-size: 0.73rem;
  font-weight: 650;
  text-decoration: none;
}

.publication-links a:hover,
.lecture-actions a:hover {
  background: var(--surface);
  border-color: #aebbc8;
}

.experience-heading {
  margin-bottom: 16px;
}

.experience-heading h2 {
  font-size: 1.14rem;
}

.experience-item {
  margin-bottom: 14px;
  padding: 16px 18px 17px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid #64748b;
  border-radius: 0 6px 6px 0;
}

.experience-item header {
  display: block;
  margin-bottom: 10px;
}

.experience-item h3 {
  margin-bottom: 3px;
  color: #202735;
  font-size: 0.96rem;
}

.experience-item h3 a {
  color: inherit;
  text-decoration: none;
}

.experience-item h3 a:hover {
  color: var(--link);
}

.experience-item header p,
.experience-item time {
  margin: 0;
  color: #6b7483;
  font-size: 0.79rem;
}

.experience-item header p span {
  padding: 0 5px;
  color: #8a94a3;
}

.experience-item ul {
  margin: 0;
  padding-left: 19px;
  color: #374357;
  font-size: 0.85rem;
  line-height: 1.52;
}

.experience-item ul ul {
  margin: 2px 0 3px;
  padding-left: 20px;
}

.experience-item li {
  margin: 4px 0;
}

.experience-item li strong {
  color: #2f3a4c;
  font-weight: 700;
}

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

.project {
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.project h3 {
  margin-bottom: 7px;
  font-size: 0.92rem;
}

.project > p:not(.tags) {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0;
}

.tags span {
  min-height: 23px;
  padding: 2px 7px;
  font-size: 0.67rem;
}

.award-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.award-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  color: #465367;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.84rem;
}

.award-list strong {
  color: var(--text);
}

.award-list time {
  color: var(--quiet);
  font-size: 0.74rem;
  white-space: nowrap;
}

.lecture-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.lecture-card h3 {
  margin-bottom: 7px;
  font-size: 0.98rem;
}

.lecture-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.lecture-actions {
  width: 144px;
  flex-direction: column;
}

.lecture-actions a {
  justify-content: center;
}

.site-footer {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: 30px 0 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--quiet);
  font-size: 0.74rem;
}

.site-footer div {
  display: grid;
}

.site-footer strong {
  color: var(--text);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-top: 38px;
  }

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

  .profile-photo {
    grid-row: 1 / span 5;
    width: 132px;
    height: 158px;
    margin: 0;
  }

  .profile h1,
  .profile-role,
  .profile-location,
  .profile-links {
    grid-column: 2;
  }

  .profile-links {
    margin: 13px 0 0;
  }

  .profile-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
  }

  .intro {
    padding-top: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 58px;
  }

  .header-inner,
  .page-shell,
  .site-footer {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    padding: 8px 14px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 9px 0;
  }

  .page-shell {
    padding: 28px 0 68px;
  }

  .profile {
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 17px;
  }

  .profile-photo {
    width: 96px;
    height: 116px;
  }

  .profile-facts {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .intro h2 {
    font-size: 1.55rem;
  }

  .intro > p:not(.eyebrow) {
    font-size: 0.94rem;
  }

  .content-section {
    padding-top: 54px;
  }

  .publication {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 13px;
    padding: 17px 0;
  }

  .publication h3 {
    font-size: 0.9rem;
  }

  .authors {
    font-size: 0.73rem;
  }

  .publication-figure {
    aspect-ratio: 1 / 1;
  }

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

  .lecture-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lecture-actions {
    width: auto;
    flex-direction: row;
  }

  .site-footer {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 430px) {
  .publication {
    grid-template-columns: 1fr;
  }

  .publication-figure {
    width: 100%;
    aspect-ratio: 16 / 8;
  }

  .award-list li {
    align-items: flex-start;
  }
}

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

/* Standalone lecture index */
.directory-page {
  min-height: 100vh;
  background: var(--surface);
}

.directory-shell {
  width: min(calc(100% - 32px), 760px);
  margin: 0 auto;
  padding: 68px 0 90px;
}

.directory-back {
  display: inline-flex;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.directory-shell h1 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.directory-intro {
  max-width: 610px;
  margin-bottom: 36px;
  color: var(--muted);
}

.directory-list {
  display: grid;
  gap: 12px;
}

.directory-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
}

.directory-item:hover {
  border-color: #aebbc8;
}

.directory-kind {
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.directory-item strong {
  font-size: 0.93rem;
}

.directory-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 400;
}

.directory-arrow {
  color: var(--quiet);
}

@media (max-width: 520px) {
  .directory-shell {
    padding-top: 34px;
  }

  .directory-back {
    margin-bottom: 32px;
  }

  .directory-item {
    grid-template-columns: 1fr auto;
  }

  .directory-kind {
    grid-column: 1 / -1;
    margin-bottom: -10px;
  }
}

/* CV page */
.cv-page {
  background: var(--surface);
}

.cv-shell {
  width: min(calc(100% - 32px), 960px);
  margin: 0 auto;
  padding: 36px 0 72px;
}

.cv-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.cv-header h1 {
  margin-bottom: 4px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.cv-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 13px;
  color: #36475b;
  background: #fff;
  border: 1px solid #ccd5df;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.cv-actions a:hover {
  border-color: #aebbc8;
  background: var(--surface-strong);
}

.cv-actions a.is-primary {
  color: #fff;
  background: var(--link);
  border-color: var(--link);
}

.cv-actions a.is-primary:hover {
  background: var(--link-hover);
  border-color: var(--link-hover);
}

.cv-actions svg {
  width: 15px;
  height: 15px;
}

.cv-frame {
  width: 100%;
  height: min(calc(100vh - var(--header-height) - 150px), 1240px);
  min-height: 560px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.cv-fallback {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 680px) {
  .cv-shell {
    padding-top: 20px;
  }

  .cv-frame {
    height: 70vh;
    min-height: 420px;
  }
}
