/* Layout: slim sticky masthead → home hero (statement left, live diffusion network right) → about with portrait → theme cards → papers + news split → contact footer. Inner pages use a 240px label rail beside a reading column. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #131a2b;
  --ink-2: #2b3449;
  --muted: #5d6579;
  --line: #e1e4eb;
  --accent: #c63a2f;
  --accent-soft: #fbe8e5;
  --health: #c63a2f;
  --platforms: #3b4aa3;
  --news: #1b6a59;
  --foot: #131a2b;
  --foot-ink: #eef0f5;
  --foot-muted: #a3abbe;
  --f-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --f-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-bn: "Noto Serif Bengali", "Nirmala UI", serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c111d; --surface: #131a2a; --ink: #e9ecf3; --ink-2: #c8cddb; --muted: #98a1b7; --line: #222b40;
    --accent: #ff6b5e; --accent-soft: #2d1a1f; --health: #ff7d70; --platforms: #93a0ff; --news: #5ccaa8;
    --foot: #070b14; --foot-ink: #e9ecf3; --foot-muted: #98a1b7; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c111d; --surface: #131a2a; --ink: #e9ecf3; --ink-2: #c8cddb; --muted: #98a1b7; --line: #222b40;
  --accent: #ff6b5e; --accent-soft: #2d1a1f; --health: #ff7d70; --platforms: #93a0ff; --news: #5ccaa8;
  --foot: #070b14; --foot-ink: #e9ecf3; --foot-muted: #98a1b7; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.68; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 14px; }
.in { max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--f-mono); }
.kicker { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }

/* masthead */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.mk { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-family: var(--f-display); font-size: .95rem; letter-spacing: .02em; position: relative; }
.mk::after { content: ""; position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.mk-name { font-family: var(--f-display); font-size: 1.25rem; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.theme-btn { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

main { padding-block: 0 40px; }
main > .view > section, main > section { margin-top: 104px; }
main > .view > section:first-child, main > section:first-child, main > .view > header:first-child, main > header:first-child { margin-top: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 9px; font: 600 .92rem var(--f-body); text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; transition: transform .2s, border-color .2s; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.big { padding: 13px 24px; font-size: 1rem; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 72px; }
.eyebrow { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 26px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.9rem, 6.6vw, 5.4rem); line-height: .98; letter-spacing: -.02em; margin: 0 0 30px; display: flex; flex-direction: column; gap: 14px; }
.bn { font-family: var(--f-bn); font-size: .3em; letter-spacing: 0; color: var(--muted); line-height: 1.3; }
.thesis { font-family: var(--f-serif); font-size: clamp(1.3rem, 2.3vw, 1.7rem); line-height: 1.4; color: var(--ink); max-width: 24em; margin: 0 0 16px; }
.hero-sub { color: var(--muted); font-size: 1.04rem; max-width: 36em; margin: 0 0 32px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }

.net-wrap { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
#net { display: block; width: 100%; aspect-ratio: 1 / .92; max-width: 100%; cursor: crosshair; touch-action: manipulation; }
.net-wrap figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.net-wrap figcaption .mono { font-size: .74rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.net-wrap figcaption span:nth-child(2) { order: 3; flex-basis: 100%; }

/* about */
.about { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 104px; border-top: 1px solid var(--line); margin-top: 96px !important; }
.portrait { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 160px 160px var(--r) var(--r); overflow: hidden; background: linear-gradient(165deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); display: grid; place-items: center; }
.portrait span { font-family: var(--f-display); font-size: 5rem; color: var(--accent); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-text { min-width: 0; }
.lead { font-family: var(--f-serif); font-size: clamp(1.45rem, 2.6vw, 1.95rem); line-height: 1.3; margin: 0 0 22px; max-width: 22em; text-wrap: balance; }
.about-text > p:not(.lead):not(.kicker) { max-width: 64ch; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: .92rem; line-height: 1.45; }

/* section heads */
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 28px; }
.sec-head .kicker { flex-basis: 100%; margin: 0; }
h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.more { margin-left: auto; font-weight: 600; font-size: .92rem; text-decoration: none; }

/* theme cards */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.theme-card { --c: var(--accent); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.tc-health, .rt-health { --c: var(--health); }
.tc-platforms, .rt-platforms { --c: var(--platforms); }
.tc-news, .rt-news { --c: var(--news); }
.theme-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); transform: scaleX(.18); transform-origin: left; transition: transform .35s ease; }
.theme-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--c) 60%, transparent); }
.theme-card:hover::before { transform: scaleX(1); }
.tc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 16%, transparent); display: inline-block; }
.theme-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; line-height: 1.15; margin: 4px 0 0; }
.theme-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.tc-n { margin-top: auto; padding-top: 10px; font-family: var(--f-mono); font-size: .74rem; color: var(--c); }

/* papers */
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.split > div, .split > aside { min-width: 0; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.pubs .pub:last-child { border-bottom: 1px solid var(--line); }
.p-when span { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; display: block; padding-top: 3px; }
.p-body { min-width: 0; }
.p-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.th { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; color: var(--c); }
.th::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.th-health { --c: var(--health); } .th-platforms { --c: var(--platforms); } .th-news { --c: var(--news); }
.stat { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; color: var(--muted); border: 1px solid var(--line); }
.stat.s-pub { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat.s-acc { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); }
.stat.s-rev { color: var(--ink-2); border-style: dashed; }
.p-ttl { font-family: var(--f-serif); font-size: 1.12rem; line-height: 1.42; margin: 0 0 6px; color: var(--ink); }
.p-au { font-size: .9rem; color: var(--muted); margin: 0 0 2px; }
.p-au b { color: var(--ink); font-weight: 600; }
.p-ve { font-size: .9rem; color: var(--ink-2); margin: 0; }
.p-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.act { font: 600 .82rem var(--f-body); color: var(--ink); text-decoration: none; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.act:hover { border-color: var(--accent); color: var(--accent); }
.act.done { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* news */
.news { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 28px 10px; }
.news h2 { font-size: 1.8rem; }
.news .sec-head { margin-bottom: 14px; }
.news-list { list-style: none; margin: 0; padding: 0; position: relative; }
.news-list li { position: relative; padding: 0 0 20px 22px; border-left: 1px solid var(--line); }
.news-list li:last-child { border-left-color: transparent; }
.news-list li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.news-list li:first-child::before { background: var(--accent); }
.news-list time { font-family: var(--f-mono); font-size: .74rem; color: var(--accent); display: block; }
.news-list p { margin: 2px 0 0; font-size: .94rem; line-height: 1.5; }

/* inner pages */
.page-head { padding-top: 76px; padding-bottom: 46px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.page-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.02em; margin: 0 0 22px; text-wrap: balance; }
.page-sub { font-family: var(--f-serif); font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 40em; margin: 0; }
.cv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }

.r-theme, .methods, .course-block { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding-block: 56px; border-bottom: 1px solid var(--line); margin-top: 0 !important; }
.r-side { min-width: 0; }
.r-side h2 { font-size: 1.75rem; margin-top: 12px; }
.methods .r-side h2, .course-block .r-side h2 { margin-top: 0; }
.r-count { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); margin: 10px 0 0; }
.r-theme .r-count { color: var(--c); }
.r-main { min-width: 0; }
.lead-sm { font-family: var(--f-serif); font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: 40em; margin: 0 0 18px; }
.m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.m-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.m-grid h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.m-grid p { margin: 0; font-size: .93rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }
.chip { font: 500 .9rem var(--f-body); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.chip em { font-style: normal; font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] em { color: var(--bg); opacity: .75; }
.pgroup { margin-top: 52px !important; }
.pgroup h2 { font-size: 1.6rem; margin-bottom: 14px; }

.role { color: var(--muted); font-size: .95rem; margin: 0 0 16px; }
.courses { list-style: none; margin: 0 0 18px; padding: 0; }
.courses li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.courses li:last-child { border-bottom: 1px solid var(--line); }
.code { font-family: var(--f-mono); font-size: .8rem; color: var(--accent); }
.cn { font-family: var(--f-serif); font-size: 1.06rem; }
.ci { font-size: .86rem; color: var(--muted); text-align: right; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); font-size: .98rem; }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows time { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.rows span { min-width: 0; }
.rows b { font-weight: 600; }
.rows small { display: block; color: var(--muted); font-size: .88rem; }

.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-block: 56px; border-bottom: 1px solid var(--line); margin-top: 0 !important; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.proj .pk { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); margin: 0; letter-spacing: .02em; }
.proj h2 { font-size: 1.7rem; }
.proj p { font-size: .95rem; color: var(--ink-2); margin: 0; }
.proj .fig { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .86rem; }
.proj .fig b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }

/* footer */
.foot { background: var(--foot); color: var(--foot-ink); margin-top: 110px; scroll-margin-top: 64px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; padding-block: 76px 56px; align-items: end; }
.foot .kicker { color: var(--accent); }
.f-big { font-family: var(--f-display); font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; margin: 0 0 14px; max-width: 14em; text-wrap: balance; }
.f-sub { color: var(--foot-muted); margin: 0; }
.f-links { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.f-links a { color: var(--foot-ink); font-weight: 500; }
.mail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 100%; background: color-mix(in srgb, var(--foot-ink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--foot-ink) 16%, transparent); border-radius: 12px; padding: 10px 10px 10px 16px; }
.mail-row code { font-family: var(--f-mono); font-size: .92rem; color: var(--foot-ink); user-select: all; word-break: break-all; }
.copy { font: 600 .82rem var(--f-body); color: #fff; background: var(--accent); border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.addr { color: var(--foot-muted); font-size: .9rem; margin: 0; }
.f-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-block: 20px; border-top: 1px solid color-mix(in srgb, var(--foot-ink) 12%, transparent); color: var(--foot-muted); font-size: .82rem; }

/* gentle entrance */
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-text > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-text > *:nth-child(2) { animation-delay: .06s; } .hero-text > *:nth-child(3) { animation-delay: .12s; }
.hero-text > *:nth-child(4) { animation-delay: .18s; } .hero-text > *:nth-child(5) { animation-delay: .24s; }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; }
  .themes, .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .top-in { gap: 12px; height: 58px; }
  .mk-name { display: none; }
  .nav a { padding: 6px 9px; font-size: .88rem; }
  main > .view > section, main > section { margin-top: 72px; }
  .about { grid-template-columns: minmax(0, 1fr); padding-top: 64px; margin-top: 64px !important; gap: 28px; }
  .portrait { width: 200px; }
  .r-theme, .methods, .course-block { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 40px; }
  .m-grid { grid-template-columns: minmax(0, 1fr); }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rows li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .courses li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ci { text-align: left; }
  .foot-in { grid-template-columns: minmax(0, 1fr); padding-block: 56px 40px; }
  .page-head { padding-top: 48px; padding-bottom: 32px; }
  .news { padding: 22px 20px 6px; }
  .more { margin-left: 0; flex-basis: 100%; }
}
