:root {
  color-scheme: light;
  --ink: #163033;
  --muted: #5f7477;
  --faint: #869799;
  --accent: #087d78;
  --accent-dark: #075e5b;
  --accent-soft: #e4f2ef;
  --line: #dce5e2;
  --surface: #ffffff;
  --background: #f7f9f8;
  --header-background: rgba(247, 249, 248, .9);
  --selection: #c9e8e2;
  --primary: #163033;
  --primary-hover: #075e5b;
  --on-primary: #ffffff;
  --media-background: #ffffff;
  --media-border: #e8eeec;
  --photo-shadow: 0 18px 46px rgba(22, 48, 51, .12);
  --contact-background: #163033;
  --contact-text: #ffffff;
  --contact-muted: #bed0d0;
  --contact-link: #8bdbd2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5efed;
  --muted: #aabbb8;
  --faint: #7f9692;
  --accent: #63d2c7;
  --accent-dark: #9ae1d9;
  --accent-soft: #163b38;
  --line: #29423f;
  --surface: #132522;
  --background: #0d1918;
  --header-background: rgba(13, 25, 24, .9);
  --selection: #24524d;
  --primary: #61cfc4;
  --primary-hover: #8cddd5;
  --on-primary: #0d1918;
  --media-background: #f8faf9;
  --media-border: #2b403d;
  --photo-shadow: 0 18px 46px rgba(0, 0, 0, .28);
  --contact-background: #142a28;
  --contact-text: #eaf2f0;
  --contact-muted: #a8bcb9;
  --contact-link: #72d4ca;
}

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--selection); }

.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 9px 13px; border-radius: 8px; background: var(--primary); color: var(--on-primary); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid var(--line); background: var(--header-background); backdrop-filter: blur(14px); }
.nav-shell { width: min(1120px, calc(100% - 48px)); height: 68px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { font-weight: 750; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 30px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.nav-links a, .nav-contact { transition: color .2s ease; }
.nav-links a:hover, .nav-contact:hover { color: var(--accent); }
.nav-contact { font-size: .86rem; font-weight: 750; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }

.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.profile-section { padding: 44px 0 68px; }
.profile-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 52px; align-items: start; }
.profile-media { position: sticky; top: 92px; }
.profile-photo { width: 230px; height: 260px; object-fit: cover; object-position: 52% center; border-radius: 24px; box-shadow: var(--photo-shadow); filter: saturate(.88); }
.profile-links { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.profile-link { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.profile-link span { display: none; }
.profile-link i { font-size: 1.15rem; }
.profile-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.role { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { margin-bottom: 12px; font-family: "Saira Semi Condensed", sans-serif; font-size: clamp(3.7rem, 7vw, 5.2rem); font-weight: 400; line-height: 1; }
.bio { max-width: 720px; margin-bottom: 28px; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }
.research-interests { display: flex; flex-wrap: wrap; gap: 8px; }
.research-interests span { padding: 6px 11px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-dark); font-size: .77rem; font-weight: 700; }
.profile-details { min-width: 0; margin-bottom: 24px; display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.profile-details span, .profile-details a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.profile-details i { color: var(--accent); font-size: .75rem; }
.profile-details a:hover { color: var(--accent); }
.button { min-height: 44px; padding: 0 17px; display: inline-flex; align-items: center; gap: 9px; border-radius: 10px; font-size: .84rem; font-weight: 750; transition: background .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-1px); }
.primary-button { background: var(--primary); color: var(--on-primary); }
.primary-button:hover { background: var(--primary-hover); }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.text-link:hover { color: var(--accent); }

.content-section { padding: 60px 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 48px; border-top: 1px solid var(--line); }
.section-label h2 { margin: 0; font-family: "Saira Semi Condensed", sans-serif; font-size: 1.65rem; font-weight: 500; }
.section-content { min-width: 0; }
.experience-item, .education-item { color: var(--muted); }
.experience-item { line-height: 1.5; }
.experience-item ul { margin: 10px 0 0; padding-left: 20px; }
.experience-item li + li { margin-top: 2px; }
.item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.item-header h3 { margin-bottom: 1px; color: var(--ink); font-size: 1.18rem; }
.item-header time { flex: 0 0 auto; color: var(--faint); font-size: .78rem; font-weight: 700; }
.organization { margin: 0; color: var(--accent); font-size: .88rem; font-weight: 700; }
.secondary { margin: 8px 0 0; color: var(--faint); font-size: .86rem; }

.publication-item { padding: 22px 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
.publication-item + .publication-item { border-top: 1px solid var(--line); }
.publication-thumb { height: 126px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--media-background); border: 1px solid var(--media-border); }
.publication-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.publication-thumb:hover img { transform: scale(1.025); }
.publication-heading { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 20px; color: var(--faint); font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.venue { color: var(--accent); }
.publication-details h3 { margin-bottom: 8px; font-size: 1.08rem; line-height: 1.35; }
.authors { margin-bottom: 12px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.authors strong { color: var(--ink); }
.paper-links { display: flex; flex-wrap: wrap; gap: 15px; }
.paper-links a { color: var(--accent); font-size: .75rem; font-weight: 750; }
.paper-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.education-item { padding: 22px 0; }
.education-item + .education-item { border-top: 1px solid var(--line); }
.education-item > p { margin: 11px 0 0; font-size: .84rem; }
.education-item .thesis { margin-top: 4px; color: var(--faint); font-style: italic; }

.contact-section { margin: 12px 0 46px; padding: 40px; border-radius: 18px; background: var(--contact-background); color: var(--contact-text); }
.contact-section h2 { margin-bottom: 8px; font-family: "Saira Semi Condensed", sans-serif; font-size: 2rem; font-weight: 500; }
.contact-section p { margin-bottom: 18px; color: var(--contact-muted); }
.contact-section a { display: inline-flex; align-items: center; gap: 10px; color: var(--contact-link); font-size: .9rem; font-weight: 750; }
.contact-section a:hover { color: var(--contact-text); }

.site-footer { border-top: 1px solid var(--line); color: var(--faint); font-size: .76rem; }
.site-footer > div { width: min(1120px, calc(100% - 48px)); min-height: 64px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 820px) {
  .profile-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 36px; }
  .profile-media { width: 190px; }
  .profile-photo { width: 190px; height: 220px; }
  .content-section { grid-template-columns: 140px minmax(0, 1fr); gap: 30px; }
  .publication-item { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
  .publication-thumb { height: 110px; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 72px; }
  .nav-shell, .page-shell, .site-footer > div { width: min(100% - 28px, 1120px); }
  .nav-shell { height: 60px; }
  .nav-links { display: none; }
  .profile-section { padding: 26px 0 52px; }
  .profile-layout { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .profile-media { position: static; width: 168px; align-self: center; }
  .profile-photo-wrap { display: flex; justify-content: center; }
  .profile-photo { width: 168px; height: 168px; border-radius: 30px; box-shadow: var(--photo-shadow); }
  .profile-content { text-align: center; }
  .role { margin-bottom: 7px; }
  h1 { margin-bottom: 10px; font-size: clamp(3.4rem, 16vw, 4.4rem); }
  .bio { margin-left: auto; margin-right: auto; font-size: .97rem; line-height: 1.75; }
  .research-interests { justify-content: center; }
  .profile-details { margin-bottom: 22px; justify-content: center; gap: 18px; }
  .content-section { padding: 50px 0; grid-template-columns: 1fr; gap: 22px; }
  .section-label h2 { font-size: 1.8rem; }
  .publication-item { grid-template-columns: 1fr; gap: 17px; }
  .publication-thumb { width: 100%; height: 170px; }
  .item-header { flex-direction: column; gap: 5px; }
  .contact-section { padding: 30px 26px; }
}

@media (max-width: 390px) {
  .profile-details { gap: 12px; font-size: .7rem; }
  .publication-thumb { height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
