:root {
  --header-target: 44px; --header-shell: 56px; --header-offset: 112px;
  --bg: #f3f3f3; --fg: #202020; --secondary: #3f3f3f; --muted: #595959;
  --line: rgb(0 0 0 / .15); --accent: #245676; --track: rgb(0 0 0 / .055); --thumb: rgb(255 255 255 / .82);
  --reading-surface: rgb(255 255 255 / .48);
  --venue-opacity: .12;
  --venue-tint: 0 0 0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161616; --fg: #f2f2f2; --secondary: #d0d0d0; --muted: #b4b4b4;
  --line: rgb(255 255 255 / .18); --accent: #afd5ef; --track: rgb(255 255 255 / .07); --thumb: rgb(255 255 255 / .17);
  --reading-surface: rgb(20 20 20 / .54);
  --venue-tint: 255 255 255;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); overscroll-behavior-y: none; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
body { isolation: isolate; padding-top: var(--nav-height,53px); overscroll-behavior-y: none; }
#silk-background { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; filter: blur(10px); transform: scale(1.04); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain-image, none); background-size: 196px 196px; opacity: .025; }
[data-theme="dark"] body::before { opacity: .022; }
@media (prefers-contrast: more) { body::before { display: none; } }
.appearance-controls { display: flex; align-items: center; gap: 8px; height: var(--header-target); padding: 0; justify-self: end; flex-shrink: 0; }
.appearance-controls .motion-control { width: var(--header-target); height: var(--header-target); min-height: var(--header-target); padding: 0; flex: 0 0 var(--header-target); display: grid; place-items: center; }
.motion-control:disabled { opacity: .65; cursor: default; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.35; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
strong { font-weight: 600; }
p { color: var(--secondary); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
button,a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: #d7d7d7; color: #191919; }
.lucide { width: 16px; height: 16px; flex-shrink: 0; }
.skip { position: fixed; left: 12px; top: -100px; padding: 12px 20px; background: var(--bg); z-index: 50; }
.skip:focus { top: 12px; }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 10; pointer-events: none; }
.nav-inner { max-width: 1224px; padding: max(4px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 4px max(24px,env(safe-area-inset-left)); margin: auto; min-height: 52px; display: grid; grid-template-columns: 90px minmax(0,1fr) 90px; align-items: center; gap: 12px; }
.nav-inner::before { content: ""; }
.nav-inner > * { pointer-events: auto; }
nav { position: relative; display: flex; justify-content: safe center; align-items: center; gap: 4px; height: var(--header-target); min-width: 0; padding: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
nav::-webkit-scrollbar { display: none; }
nav a { position: relative; z-index: 1; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; color: var(--secondary); font-size: 15px; font-weight: 600; height: var(--header-target); min-width: 0; padding: 0 10px; white-space: nowrap; line-height: 1; transition: color .2s; }
nav a:hover { text-decoration: none; color: var(--fg); }
nav a[aria-current] { color: var(--fg); }
nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: currentColor; transform: scaleX(0); transition: transform .2s; }
nav a[aria-current]::after { transform: scaleX(1); }
.segmented { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 5px; background: var(--track); border-radius: 999px; flex-shrink: 0; }
.segmented button { position: relative; z-index: 1; height: 40px; border: 0; background: none; border-radius: 999px; padding: 0 17px; line-height: 1; color: var(--secondary); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.segmented button[aria-pressed="true"] { color: var(--fg); font-weight: 600; }
.appearance-controls .theme-control { height: var(--header-target); padding: 0; gap: 2px; background: none; border-radius: 0; }
.appearance-controls button { border-radius: 6px; }
.appearance-controls .theme-control button[aria-pressed="true"] { background: var(--track); }
.appearance-controls .theme-control button { width: var(--header-target); height: var(--header-target); padding: 0; flex: 0 0 var(--header-target); }
.appearance-controls .lucide { width: 18px; height: 18px; display: block; }
main { max-width: 1224px; padding: 0 40px 72px; margin: auto; }
/* Full-width reading bands, not floating cards. Shadows extend only the fill. */
main > section { position: relative; isolation: isolate; }
.intro { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.54fr); gap: 24px 64px; align-items: center; padding: 64px 0 56px; }
.portrait-slot { grid-column: 1; grid-row: 1; align-self: center; min-height: 0; width: min(100%,var(--portrait-width,240px)); aspect-ratio: var(--portrait-aspect, 2 / 3); }
.intro-content { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.portrait-slot img { display: block; width: 100%; height: auto; border-radius: 8px; }
.identity { grid-column: 2; }
.intro-story { grid-column: 2; max-width: 100%; }
.eyebrow { display: block; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 12px; }
h1 { font-size: 48px; font-weight: 600; }
h1 span { display: inline-block; font-size: 18px; color: var(--muted); font-weight: 400; margin-left: 10px; }
.affiliation { font-size: 16px; margin-top: 16px; line-height: 1.75; }
.bio { font-size: 18px; line-height: 1.85; }
.bio + .bio { margin-top: 16px; }
.bio.secondary { font-size: 16px; margin-top: 18px; line-height: 1.75; }
.contact-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 8px 17px; border-radius: 999px; color: var(--fg); font-size: 14px; font-weight: 500; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; min-height: 40px; margin-top: 14px; }
.bio a, .affiliation a, .news-list a, .timeline p a, .text-link, footer a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.bio a:hover, .affiliation a:hover, .news-list a:hover, .timeline p a:hover, .text-link:hover, footer a:hover { text-decoration-color: currentColor; }
.updates { display: grid; grid-template-columns: 156px 1fr; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.updates h2 { font-size: 20px; }
.news-list { display: grid; gap: 18px; }
.news-list > div { display: grid; grid-template-columns: 126px minmax(0,1fr); gap: 22px; align-items: baseline; }
.news-list time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-list p { font-size: 16px; line-height: 1.75; max-width: 65ch; }
.inline-venue { color: var(--fg); font-weight: 600; }
#research,#projects,#experience,#background { padding-top: 64px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-heading .eyebrow { margin-bottom: 5px; }
#publications { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.publication { grid-column: 1 / -1; padding: 30px 0; border-bottom: 1px solid var(--line); }
.publication.featured { grid-column: auto; display: flex; flex-direction: column; padding: 0 0 34px; }
.publication[hidden] { display: none !important; }
.publication.with-thumbnail { display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: center; gap: 32px; }
.pub-thumbnail { display: block; width: 100%; aspect-ratio: 1.8; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.pub-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pub-thumbnail:hover { border-color: var(--secondary); }
.figure-dialog { width: min(1200px,94vw); max-height: 90dvh; padding: 48px 18px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.figure-dialog::backdrop { background: rgb(0 0 0 / .6); backdrop-filter: blur(6px); }
.figure-dialog img { display: block; width: 100%; max-height: calc(90dvh - 80px); object-fit: contain; }
.figure-dialog img[src$="rsd-bev-overview.png"] { background: #fff; }
.figure-close { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--track); color: var(--fg); }
.pub-links:empty { display: none; }
@media (max-width: 540px) {
  .publication.with-thumbnail { grid-template-columns: minmax(0,1fr) 80px; gap: 14px; align-items: start; }
  .pub-thumbnail { padding: 3px; }
}
.pub-visual { position: relative; width: 100%; aspect-ratio: 2.35; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 22px; }
.pub-visual img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.pub-visual video { display: block; width: 100%; height: 100%; object-fit: contain; }
.pub-visual video { pointer-events: none; }
.pub-visual [hidden] { display: none !important; }
.pub-visual video::-webkit-media-controls,
.pub-visual video::-webkit-media-controls-enclosure,
.pub-visual video::-webkit-media-controls-start-playback-button { display: none !important; }
.pub-visual:hover img { transform: scale(1.035); }
.pub-visual:has(video) { padding: 0; background: #202020; }
.figure-link { position: absolute; bottom: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #f5f5f5; color: #444; }
.featured .pub-body { padding-top: 22px; display: flex; flex-direction: column; flex: 1; }
.pub-meta { margin-bottom: 13px; }
.venue { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; padding: 7px 12px; font-size: 13px; font-weight: 600; line-height: 1.35; border-radius: 999px; border: 1px solid var(--line); background: rgb(var(--venue-tint) / var(--venue-opacity)); color: var(--secondary); }
.venue-iclr { --venue-tint: 55 115 88; color: #275444; border-color: rgb(55 115 88 / .18); }
.venue-icpr { --venue-tint: 98 76 148; color: #4f4479; border-color: rgb(98 76 148 / .18); }
.venue-cvpr { --venue-tint: 37 123 163; color: #215e7c; border-color: rgb(37 123 163 / .25); }
.venue-review { --venue-tint: 149 106 52; color: #82592b; border-color: rgb(149 106 52 / .2); }
[data-theme="dark"] .venue-iclr { color: #adcfbe; }
[data-theme="dark"] .venue-icpr { color: #c3bade; }
[data-theme="dark"] .venue-cvpr { --venue-tint: 75 151 185; color: #abd9ef; border-color: rgb(112 189 223 / .30); }
[data-theme="dark"] .venue-review { color: #d4bc9e; }
.publication h3 { font-size: 19px; line-height: 1.55; font-weight: 600; max-width: 890px; }
.featured h3 { font-size: 21px; }
.authors { font-size: 15px; color: var(--secondary); margin-top: 14px; line-height: 1.75; max-width: 78ch; }
.authors strong { color: var(--fg); font-weight: 650; }
.author-name { display: inline-block; white-space: nowrap; }
.pub-description { font-size: 16px; line-height: 1.75; margin-top: 12px; max-width: 68ch; }
.result-highlight { color: var(--fg); font-weight: 700; }
.pub-links { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 22px; }
.featured .pub-links { margin-top: auto; }
.pub-links a { display: inline-flex; gap: 7px; align-items: center; min-height: 42px; padding: 7px 15px; border-radius: 999px; color: var(--fg); font-size: 14px; }
.pub-links .lucide { width: 14px; height: 14px; }
.industry-project { border-left: 2px solid var(--line); padding: 4px 0 4px 26px; }
.industry-project + .industry-project { margin-top: 32px; }
.industry-project > p { margin-top: 10px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.project-meta > span:first-child { font-size: 16px; font-weight: 500; color: var(--fg); }
.industry-project h3 { max-width: 660px; font-size: 21px; }
.award-row { display: grid; grid-template-columns: minmax(0,1fr) 160px; gap: 24px; align-items: start; border-left: 2px solid var(--line); padding: 4px 0 4px 26px; }
.award-row + .award-row { margin-top: 32px; }
.award-copy { display: grid; gap: 8px; align-content: start; min-width: 0; }
.award-venue { color: var(--fg); font-size: 16px; font-weight: 500; line-height: 1.7; }
.award-copy h3 { font-size: 21px; }
.award-description { color: var(--secondary); line-height: 1.75; max-width: 65ch; }
.award-media { display: grid; justify-items: end; gap: 8px; }
.award-media .period { line-height: 27.2px; }
.award-thumbnail { width: 160px; height: 120px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.award-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 540px) {
  .award-row { grid-template-columns: minmax(0,1fr) 96px; gap: 8px 12px; }
  .award-copy, .award-media { display: contents; }
  .award-venue { grid-column: 1; grid-row: 1; }
  .award-copy h3 { grid-column: 1; grid-row: 2; }
  .award-description { grid-column: 1 / -1; grid-row: 3; }
  .award-media .period { grid-column: 2; grid-row: 1; justify-self: end; }
  .award-thumbnail { grid-column: 2; grid-row: 2; width: 96px; height: 84px; }
}
.project-details { display: flex; flex-wrap: wrap; gap: 20px 64px; margin: 24px 0 0; font-size: 16px; }
.project-details dt { color: var(--muted); font-size: 14px; }
.project-details dd { margin: 6px 0 0; color: var(--fg); font-weight: 500; }
.timeline article { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline article:first-child { padding-top: 0; }
.period { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline article > .period { padding-top: 2px; }
.organization { font-size: 16px; margin: 8px 0; color: var(--fg); }
.timeline article p:not(.organization) { font-size: 16px; line-height: 1.75; }
.bio a, .timeline a { white-space: nowrap; }
#awards, #education, #projects { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
#awards { border-top: 0; }
#certifications { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.education { margin-bottom: 26px; }
.education:last-child { margin-bottom: 0; }
.education h3 { font-size: 18px; margin-top: 10px; margin-bottom: 6px; }
.education p { font-size: 16px; line-height: 1.75; }
.muted { color: var(--muted); }
.awards { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }
.awards li { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 16px; }
.awards strong { font-size: 16px; line-height: 1.55; display: block; }
.awards p { font-size: 15px; margin-top: 6px; line-height: 1.75; }
footer { max-width: 1040px; margin: auto; padding: 0 0 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.visitor-stats { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; letter-spacing: .02em; min-height: 48px; }
.visitor-stat { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.visitor-stat strong { color: var(--fg); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.visitor-label { text-transform: uppercase; font-size: 10px; letter-spacing: .09em; }
.visitor-divider { width: 1px; height: 14px; background: var(--rule); }
.back-to-top { width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--fg); text-decoration: none; }
.back-to-top { grid-column: 2; justify-self: center; }
.back-to-top:hover { text-decoration: none; }
.back-to-top .lucide { width: 20px; height: 20px; }
@media (max-width: 1100px) {
  .intro { column-gap: 40px; }
  h1 { font-size: 42px; }
  h1 span { display: block; margin: 5px 0 0; }
  footer { margin: 0 40px; }
}
@media (max-width: 900px) {
  body { --nav-height: 53px; }
  .nav-inner { padding: max(4px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 4px max(16px,env(safe-area-inset-left)); grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .nav-inner::before { display: none; }
  nav { justify-content: flex-start; }
  .appearance-controls { grid-column: 2; grid-row: 1; }
}
@media (max-width: 800px) {
  main { padding: 0 24px 48px; }
  .intro { grid-template-columns: 220px minmax(0,1fr); gap: 28px 40.32px; padding: 38px 0 32px; }
  .portrait-slot { grid-row: 1; width: 100%; align-self: center; }
  .intro-content { display: contents; }
  .identity { align-self: center; }
  h1 { font-size: 40px; }
  h1 span { display: inline-block; margin: 0 0 0 10px; }
  .intro-story { grid-column: 1 / -1; margin-top: 0; }
  .bio { font-size: 16px; }
  .affiliation { margin-top: 12px; }
  .contact-links { margin-top: 18px; }
  .contact-links .contact-label { display: none; }
  .intro .contact-links .button { width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px; padding: 0; gap: 0; border-radius: 50%; }
  .contact-links .lucide { width: 18px; height: 18px; }
  .updates { grid-template-columns: 1fr; gap: 18px; }
  #publications { gap: 0 24px; }
  .publication h3, .featured h3 { font-size: 18px; }
  .pub-visual { padding: 12px; }
  footer { margin: 0 24px; }
}
@media (max-width: 540px) {
  .intro { grid-template-columns: 154px minmax(0,1fr); gap: 24px 28.8px; }
  .intro h1 { font-size: 26px; }
  .intro h1 span { display: block; margin: 5px 0 0; font-size: 16px; }
  .intro .eyebrow { font-size: 13px; }
  .intro .affiliation { font-size: 14px; }
  .intro .affiliation a { display: inline-flex; flex-direction: column; }
  .intro .affiliation .affiliation-divider { display: none; }
  .intro .contact-links { gap: 10px; }
  .intro .button { padding-inline: 12px; font-size: 14px; }
  nav a { padding-inline: 8px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 18px; }
  .publication.featured { grid-column: 1 / -1; padding: 26px 0; }
  .publication.featured:first-child { padding-top: 0; }
  .pub-visual { aspect-ratio: 2.2; }
  .featured .pub-links { margin-top: 0; }
  .news-list > div { grid-template-columns: 1fr; gap: 4px; }
  .news-list time { font-size: 14px; }
  .news-list p { font-size: 16px; }
  .timeline article { grid-template-columns: 1fr; gap: 6px; }
  .project-meta { flex-wrap: wrap; }
  .industry-project { padding-left: 18px; }
  #research,#projects,#experience,#background { padding-top: 44px; }
  #awards, #education, #projects { margin-top: 36px; padding-top: 36px; }
  #certifications { margin-top: 36px; padding-top: 36px; }
}
@media (max-width: 380px) {
  .intro { grid-template-columns: 139px minmax(0,1fr); column-gap: 17.28px; }
  .intro h1 { font-size: 24px; }
  .intro .affiliation { font-size: 13px; }
  .intro .contact-links { gap: 4px; }
}
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 0; color: var(--fg); background: transparent; cursor: pointer; }
.theme-toggle:hover { background: var(--track); }
.theme-toggle .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
@media (min-width: 901px) { .nav-inner { grid-template-columns: 44px minmax(0,1fr) 44px; } }
@media (max-width: 800px) {
  #publications { grid-template-columns: minmax(0,1fr); }
  .publication.featured, .publication.with-thumbnail { grid-column: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 26px 0; }
  .publication:first-child { padding-top: 0; }
  .publication.with-thumbnail .pub-thumbnail { order: -1; width: 100%; aspect-ratio: 2.2; padding: 12px; border-radius: 8px; }
  .publication.with-thumbnail .pub-body { padding-top: 22px; }
  .award-row { display: flex; flex-direction: column; align-items: stretch; gap: 12px; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 26px; }
  .award-row:last-child { border-bottom: 0; padding-bottom: 0; }
  .award-copy { display: grid; gap: 8px; }
  .award-media { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 16px; order: -1; }
  .award-thumbnail { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 360px; border-radius: 8px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation: none !important; transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --secondary: #222; --muted: #333; --reading-surface: #fff; }
  :root[data-theme="dark"] { --secondary: #eee; --muted: #ddd; --reading-surface: #161616; }
}
