:root {
  --paper: #EBEFE8;
  --paper-2: #E2E8DF;
  --plate: #FFFFFF;
  --ink: #15221B;
  --ink-2: #3E4C44;
  --muted: #627168;
  --rule: #C6D0C6;
  --moss: #256B55;
  --moss-l: #DCEBE3;
  --violet: #5A4A9B;
  --violet-l: #E6E2F3;
  --bronze: #8F661A;
  --bronze-l: #F3E8D0;
  --drawer: #1B2B24;
  --felt: #22382E;
  --cell: #2A4237;
  --gold: #E9C46A;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --bn: "Noto Sans Bengali", "Bricolage Grotesque", sans-serif;
  --wrap: 1180px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 12px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.nav.dark { background: color-mix(in srgb, var(--drawer) 92%, transparent); border-bottom-color: #33493e; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 62px; }
.brand { font: 800 1.15rem/1 var(--display); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.brand svg { width: 22px; height: 26px; }
.nav.dark .brand { color: #EEF2EC; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav li a { font: 600 0.95rem/1 var(--display); color: var(--ink-2); text-decoration: none; padding: 9px 12px; border-radius: 6px; display: block; }
.nav li a:hover, .nav li a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav.dark li a { color: #C9D6CE; }
.nav.dark li a:hover, .nav.dark li a[aria-current="page"] { background: #2C4338; color: #fff; }
.menu-btn { display: none; background: none; border: 1.5px solid currentColor; color: inherit; font: 600 .9rem var(--display); padding: 7px 12px; border-radius: 6px; cursor: pointer; }
.nav.dark .menu-btn { color: #EEF2EC; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav ul { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav.dark ul { background: var(--drawer); }
  .nav.open ul { display: flex; }
}

/* ---------- hero: the specimen drawer ---------- */
.hero { background: var(--drawer); color: #E9EFE9; padding: 56px 0 64px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(3.4rem, 8.6vw, 7.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: .9; color: #F4F7F2; font-variation-settings: "wdth" 85; }
.hero .lede { font-size: 1.22rem; line-height: 1.55; color: #C9D6CE; margin: 26px 0 26px; max-width: 34ch; }
.hero .affil { font: 500 1rem/1.5 var(--display); color: #A9BBB0; margin-bottom: 26px; }
.hero .affil a { color: #E9EFE9; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 650 0.95rem/1 var(--display); padding: 11px 16px; border-radius: 7px; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--moss); border-color: var(--moss); }
.btn svg { width: 16px; height: 16px; }
.hero .btn { border-color: #5E7A6C; color: #EEF2EC; }
.hero .btn:hover { background: #EEF2EC; color: var(--drawer); border-color: #EEF2EC; }
.hero .btn.solid { background: var(--gold); border-color: var(--gold); color: var(--drawer); }
.hero .btn.solid:hover { background: #fff; border-color: #fff; }
.open-to { margin-top: 22px; font: 500 .95rem/1.4 var(--display); color: var(--gold); }

.drawer { position: relative; background: #2E2418; padding: 14px; border-radius: 6px; box-shadow: inset 0 0 0 2px #45372A, 0 30px 60px -30px rgba(0,0,0,.7); }
.drawer-svg { width: 100%; height: auto; border-radius: 2px; }
.drawer-svg .spec { cursor: crosshair; }
.drawer-svg .spec .cell { transition: fill .2s; }
.drawer-svg .spec:hover .cell, .drawer-svg .spec.on .cell { fill: #31503F; }
.drawer-svg .cal path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .7s ease, opacity .2s; }
.drawer-svg .cal-t { opacity: 0; transition: opacity .3s .4s; font-family: var(--display); font-weight: 600; }
.drawer-svg .spec:hover .cal path, .drawer-svg .spec.on .cal path { stroke-dashoffset: 0; opacity: 1; }
.drawer-svg .spec:hover .cal-t, .drawer-svg .spec.on .cal-t { opacity: 1; }
.drawer-svg .sp { font-family: var(--serif); font-style: italic; }
.drawer-note { margin-top: 10px; font: 500 .85rem/1.3 var(--display); color: #A9BBB0; display: flex; justify-content: space-between; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .drawer-svg .cal path, .drawer-svg .cal-t { transition: none; } }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--rule); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.sec-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.sec-head a.more { font: 650 1rem var(--display); }

.about { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 0.9fr); gap: 44px; align-items: start; }
.about img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; filter: saturate(.9); }
.about .bio p { max-width: var(--measure); }
.news h3 { font-size: 1.25rem; margin-bottom: 14px; }
.news ol { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: .98rem; line-height: 1.5; }
.news time { font: 650 .88rem/1.6 var(--display); color: var(--muted); }
@media (max-width: 980px) { .about { grid-template-columns: 160px 1fr; } .news { grid-column: 1 / -1; } }
@media (max-width: 560px) { .about { grid-template-columns: 1fr; } .about img { max-width: 200px; } }

/* venue tags: color encodes publication type */
.tag { display: inline-block; font: 650 .8rem/1 var(--display); padding: 5px 8px 6px; border-radius: 4px; white-space: nowrap; vertical-align: 2px; }
.tag.conf { background: var(--moss); color: #fff; }
.tag.journal { background: var(--violet); color: #fff; }
.tag.workshop { box-shadow: inset 0 0 0 1.5px var(--bronze); color: var(--bronze); }
.tag.review { box-shadow: inset 0 0 0 1.5px var(--muted); color: var(--muted); background: transparent; }
.tag.first { background: var(--gold); color: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font: 500 .9rem var(--display); color: var(--muted); align-items: center; }

/* ---------- theme rows on home ---------- */
.themes { display: grid; gap: 22px; }
.theme { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; padding: 30px; background: var(--plate); border-radius: 6px; align-items: center; text-decoration: none; color: inherit; }
.theme .plate-fig { background: #F7F9F6; border-radius: 4px; padding: 14px; }
.theme h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 12px; }
.theme h3 a { color: var(--ink); text-decoration: none; }
.theme h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.theme .short { font-size: 1.12rem; color: var(--ink-2); margin-bottom: 18px; }
.theme ul { list-style: none; margin: 0 0 20px; padding: 0; }
.theme li { padding: 9px 0; border-top: 1px solid #E3E8E2; font-size: .98rem; line-height: 1.4; }
.theme li .tag { margin-right: 8px; }
.theme li a { color: var(--ink); text-decoration: none; }
.theme li a:hover { color: var(--moss); text-decoration: underline; }
.theme.small { grid-template-columns: 1fr; }
.theme-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .theme, .theme-pair { grid-template-columns: 1fr; } .theme { padding: 20px; gap: 22px; } }

/* featured project panels */
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feat { display: flex; flex-direction: column; background: var(--ink); color: #E9EFE9; border-radius: 6px; overflow: hidden; text-decoration: none; }
.feat .figwrap { background: #fff; padding: 12px; }
.feat .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.feat h3 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.feat p { color: #BFCDC5; margin: 0; font-size: 1rem; }
.feat .go { margin-top: auto; padding-top: 8px; font: 650 .95rem var(--display); color: var(--gold); }
.feat:hover .go { text-decoration: underline; }
.feat:hover { outline: 2px solid var(--gold); outline-offset: 0; }
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; } }

/* publication list */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; padding: 20px 0; border-top: 1px solid var(--rule); }
.pub .meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pub h3 { font: 700 1.12rem/1.3 var(--display); letter-spacing: -0.005em; margin-bottom: 6px; }
.pub h3 a { color: var(--ink); text-decoration: none; }
.pub h3 a:hover { color: var(--moss); text-decoration: underline; }
.pub .authors { font-size: .96rem; color: var(--ink-2); margin-bottom: 4px; }
.pub .authors b { color: var(--ink); font-weight: 650; }
.pub .vfull { font-size: .92rem; color: var(--muted); font-style: italic; margin-bottom: 8px; }
.linkrow { display: flex; flex-wrap: wrap; gap: 6px; }
.lk { font: 600 .85rem/1 var(--display); padding: 7px 10px; border-radius: 5px; background: var(--paper-2); color: var(--ink); text-decoration: none; }
.lk:hover { background: var(--ink); color: #fff; }
.lk.pp { background: var(--gold); }
.lk.pp:hover { background: var(--ink); color: var(--gold); }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; gap: 8px; } .pub .meta { flex-direction: row; flex-wrap: wrap; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filters button { font: 600 .92rem var(--display); padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ink-2); background: transparent; color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* cv-ish columns */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.cols h3 { font-size: 1.4rem; margin-bottom: 14px; }
.tl { list-style: none; margin: 0 0 36px; padding: 0; }
.tl li { padding: 12px 0; border-top: 1px solid var(--rule); }
.tl .when { font: 600 .86rem var(--display); color: var(--muted); }
.tl .what { font: 700 1.05rem/1.3 var(--display); display: block; margin: 2px 0; }
.tl .where { color: var(--ink-2); font-size: .98rem; }
.tl .note { color: var(--muted); font-size: .94rem; }
.plain { margin: 0 0 36px; padding-left: 1.1em; }
.plain li { margin: 6px 0; }
dl.skills { margin: 0; display: grid; grid-template-columns: 170px 1fr; gap: 8px 18px; font-size: .96rem; }
dl.skills dt { font: 700 .95rem var(--display); }
dl.skills dd { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; gap: 10px; } dl.skills { grid-template-columns: 1fr; } dl.skills dd { margin-bottom: 8px; } }

/* ---------- page header (theme, project, list pages) ---------- */
.phead { background: var(--drawer); color: #E9EFE9; padding: 56px 0 52px; }
.phead .crumbs { font: 600 .92rem var(--display); color: #A9BBB0; margin-bottom: 18px; }
.phead .crumbs a { color: #D6E2DA; }
.phead h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: .98; max-width: 20ch; color: #F4F7F2; }
.phead .intro { font-size: 1.18rem; color: #C9D6CE; max-width: 62ch; margin: 20px 0 0; }

/* theme page project blocks */
.proj { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; padding: 44px 0; border-top: 1px solid var(--rule); align-items: start; }
.proj:first-child { border-top: 0; padding-top: 8px; }
.proj .figlink { display: block; background: var(--plate); border-radius: 6px; padding: 16px; text-decoration: none; position: relative; }
a.figlink:hover { outline: 2px solid var(--moss); }
.figlink .hint { position: absolute; right: 12px; top: 12px; font: 650 .82rem/1 var(--display); background: var(--ink); color: #fff; padding: 7px 9px; border-radius: 4px; }
.proj h2 { font-size: clamp(1.4rem, 2.1vw, 1.65rem); font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 10px; line-height: 1.12; }
.proj h2 a { color: var(--ink); text-decoration: none; }
.proj h2 a:hover { text-decoration: underline; }
.proj .authors { font-size: .95rem; color: var(--ink-2); margin-bottom: 14px; }
.proj .authors b { color: var(--ink); }
.proj .sum { font-size: 1.04rem; margin-bottom: 18px; }
.proj .tags { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .proj { grid-template-columns: 1fr; gap: 20px; } }
.ongoing { background: var(--violet-l); border-radius: 6px; padding: 26px 28px; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 36px; align-items: center; margin-top: 12px; }
.ongoing h2 { font-size: 1.6rem; font-weight: 800; color: var(--violet); margin-bottom: 10px; }
@media (max-width: 900px) { .ongoing { grid-template-columns: 1fr; } }

.dsets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ds { background: var(--plate); border-radius: 6px; padding: 22px; display: flex; flex-direction: column; gap: 10px; border-left: 5px solid var(--moss); }
.ds h3 { font-size: 1.3rem; font-weight: 800; }
.ds h3 a { color: var(--ink); text-decoration: none; }
.ds h3 a:hover { text-decoration: underline; }
.ds .facts { font: 500 .88rem/1.5 var(--display); color: var(--muted); }
.ds p { margin: 0; font-size: .98rem; }

.theme-index { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.ti { background: var(--plate); border-radius: 6px; padding: 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; }
.ti h2 { font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.ti p { margin: 0; color: var(--ink-2); }
.ti:hover { outline: 2px solid var(--moss); }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { padding: 8px 0; border-top: 1px solid #E3E8E2; font-size: .95rem; line-height: 1.4; }
.tlist li .tag { margin-right: 8px; }
.tlist a { color: var(--ink); text-decoration: none; }
.tlist a:hover { color: var(--moss); text-decoration: underline; }
.ti .n { font: 600 .9rem var(--display); color: var(--muted); }
@media (max-width: 820px) { .theme-index { grid-template-columns: 1fr; } }

/* ---------- project pages ---------- */
.ph { background: var(--drawer); color: #E9EFE9; padding: 56px 0 60px; }
.ph .venue { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ph .venue .tag.workshop { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold); }
.ph h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; max-width: 28ch; color: #F6F8F4; }
.ph .authors { margin: 22px 0 6px; font-size: 1.08rem; color: #D6E2DA; max-width: 80ch; }
.ph .authors b { color: #fff; }
.ph .vfull { color: #A9BBB0; font-style: italic; margin-bottom: 26px; }
.ph .btn { border-color: #5E7A6C; color: #EEF2EC; }
.ph .btn:hover { background: #EEF2EC; color: var(--drawer); }
.ph .btn.solid { background: var(--gold); border-color: var(--gold); color: var(--drawer); }
.teaser { margin-top: -28px; }
.teaser .plate, .plate { background: var(--plate); border-radius: 6px; padding: 22px; }
figcaption { font-size: .95rem; color: var(--muted); margin-top: 12px; max-width: 80ch; }
.tldr { font: 700 clamp(1.4rem, 2.6vw, 2rem)/1.25 var(--display); letter-spacing: -0.02em; max-width: 34ch; margin: 0; }
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
.prose h3 { font-size: 1.25rem; margin: 26px 0 8px; }
.twocol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .twocol { grid-template-columns: 1fr; gap: 28px; } }
table.facts { width: 100%; border-collapse: collapse; font-size: .98rem; }
table.facts th, table.facts td { text-align: left; padding: 11px 10px 11px 0; border-top: 1px solid var(--rule); vertical-align: top; }
table.facts th { font: 700 .95rem var(--display); width: 40%; }
table.facts td { color: var(--ink-2); }
.find { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.find li { padding: 16px 0 16px 22px; border-top: 1px solid var(--rule); position: relative; }
.find li::before { content: ""; position: absolute; left: 0; top: 25px; width: 10px; height: 10px; border-radius: 2px; background: var(--moss); }
.find b { font-family: var(--display); }
.bib { position: relative; }
.bib pre { background: var(--ink); color: #DDE7E0; padding: 22px; border-radius: 6px; overflow-x: auto; font: 400 .86rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; margin: 0; }
.bib button { position: absolute; top: 12px; right: 12px; }
.bib button.btn { background: var(--gold); color: var(--ink); border-color: var(--gold); padding: 8px 12px; }
.comp { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.comp > div { background: var(--plate); border-radius: 6px; padding: 22px; }
.comp h3 { font-size: 1.2rem; margin-bottom: 8px; }
.comp p { margin: 0; font-size: .98rem; }
@media (max-width: 760px) { .comp { grid-template-columns: 1fr; } }

/* footer */
footer { background: var(--drawer); color: #A9BBB0; padding: 40px 0; font: 500 .95rem/1.5 var(--display); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: #E9EFE9; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

.fig { width: 100%; height: auto; }
.fig text { font-family: var(--display); }
.fig text.bn { font-family: var(--bn); }
.bnf { font-family: var(--bn); }
.muted { color: var(--muted); }
