/* NSDG site styles. Colours are tokens so light and dark themes stay in sync. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #efede6;
  --ink: #14171f;
  --muted: #5a6170;
  --line: #e2dfd6;
  --accent: #3442c9;
  --accent-ink: #ffffff;
  --c-energy: #e3a51a;
  --c-light: #22a06b;
  --c-memory: #5b6cff;
  --c-model: #c2410c;
  --c-nano: #0e7490;
  --c-pack: #8b3fd1;
  --fig-ink: #2a2f3a;
  --fig-line: #c9c5ba;
  --fig-metal: #9aa1ad;
  --fig-soft: #d8d3c6;
  --fig-soft2: #c4cbe0;
  --fig-tco: #a8d8e8;
  --fig-glass: #e6eef2;
  --logo-ink: #1d2a6b;
  --logo-paper: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,23,31,.04), 0 8px 24px rgba(20,23,31,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --maxw: 1160px;
}
:root[data-mode="dark"] {
  --bg: #0e1015; --surface: #161a22; --surface-2: #1d222c; --ink: #eceef3; --muted: #a1a8b6; --line: #2a303b;
  --accent: #93a0ff; --accent-ink: #0e1015; --c-energy: #f2bd45; --c-light: #3cc98b; --c-memory: #8b98ff; --c-model: #fb8a4c; --c-nano: #38b2cf; --c-pack: #c08cf2;
  --fig-ink: #c9ced8; --fig-line: #3a4150; --fig-metal: #7d8592; --fig-soft: #3b3f48; --fig-soft2: #3a4566; --fig-tco: #2f5f70; --fig-glass: #232a35;
  --logo-ink: #e6e9ff; --logo-paper: #161a22;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .logo { width: 42px; height: 42px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: .04em; }
.brand-sub { font-size: .78rem; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .94rem; font-weight: 500; padding: .45em .7em; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.theme-toggle { margin-left: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .7em .6em; }
  .theme-toggle { margin: 8px 0 0 .6em; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: .7em 1.2em; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.4em; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .8em; }
.kicker a { color: inherit; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; }
.more { font-weight: 600; text-decoration: none; font-size: .95rem; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 180px; gap: 72px; } .hero { padding: 72px 0 52px; } }
.hl-energy { color: var(--c-energy); } .hl-light { color: var(--c-light); } .hl-memory { color: var(--c-memory); }
.hero-figure { margin: 0; width: 100%; max-width: 180px; justify-self: end; }
@media (max-width: 899px) { .hero-figure { display: none; } }
.hero .cta { margin-top: 28px; }
.hero .kicker { font-size: 1rem; letter-spacing: .08em; margin-bottom: 14px; }
@media (min-width: 900px) { .hero .kicker { font-size: 1.08rem; } }
.hero-figure svg { display: block; width: 100%; height: auto; }
.fig-cap { font: 600 13px var(--font); fill: var(--ink); }
.fig-label { font: 500 10.5px var(--font); fill: var(--muted); }

/* Sections */
.section { padding: 40px 16px; }
@media (min-width: 720px) { .section { padding: 56px 28px; } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-title { margin-top: 1.8em; display: flex; align-items: baseline; gap: .5em; }
.page-body > .section-title:first-child, .page-body > section:first-child .section-title { margin-top: 0; }
.count { font: 600 .8rem var(--font); color: var(--muted); background: var(--surface-2); padding: .15em .55em; border-radius: 99px; }

/* Area cards */
.area-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 196px), 1fr)); }
.area-card { --c: var(--accent); display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; border-top: 4px solid var(--c); }
.area-card:hover { transform: translateY(-2px); border-color: var(--c); }
/* Home page: on wide screens the research cards slide sideways while the page is scrolled (set up in site.js) */
.area-pin.hs-on .area-sticky { position: sticky; top: var(--pin-top, 80px); }
.area-pin.hs-on .area-window { overflow: hidden; margin: -10px; padding: 10px; }
.area-pin.hs-on .area-grid { display: flex; gap: 14px; will-change: transform; }
.area-pin.hs-on .area-card { flex: 0 0 var(--card-w); }
.area-pin.hs-on .area-icon.has-img, .area-pin.hs-on .area-plot { height: var(--img-h, 132px); }
.area-icon { display: block; height: 96px; margin-bottom: 6px; }
.area-icon svg { height: 100%; width: auto; }
.area-icon .fig-label { display: none; }
.area-short { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--c); }
.area-title { font: 600 1.15rem/1.3 var(--serif); }
.area-lead { color: var(--muted); font-size: .94rem; }
.area-memristors { --c: var(--c-memory); }
.area-solar-cells { --c: var(--c-energy); }
.area-light-emitting-diodes { --c: var(--c-light); }
.area-trap-analysis-modelling { --c: var(--c-model); }
.area-nanowire-devices { --c: var(--c-nano); }
.area-packaging { --c: var(--c-pack); }
.see-more { text-align: center; margin: 22px 0 0; }

/* Stats */
.stats-band { padding: 8px 0 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stats > div:nth-child(1) .stat-num { color: var(--c-memory); } .stats > div:nth-child(2) .stat-num { color: var(--c-energy); } .stats > div:nth-child(3) .stat-num { color: var(--c-light); } .stats > div:nth-child(4) .stat-num { color: var(--accent); }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-num { display: block; font: 600 2.4rem/1 var(--serif); }
.stat-label { font-size: .9rem; opacity: .75; }

/* Home split */
.home-split { display: grid; gap: 40px; }
@media (min-width: 900px) { .home-split { grid-template-columns: 1fr 1.3fr; } }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--muted); font-size: .85rem; padding-top: 2px; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.news-list a:hover { color: var(--accent); }
.join-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.join-box > div { max-width: 640px; }
.join-box p { margin: 0; color: var(--muted); }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.pub { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub-title { font-weight: 600; line-height: 1.4; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { color: var(--muted); font-size: .93rem; }
.pub-venue { font-size: .93rem; }
.doi, .doi a { font-size: .85rem; color: var(--muted); word-break: break-all; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1em .55em; border-radius: 99px; background: color-mix(in srgb, var(--c-energy) 22%, transparent); color: var(--ink); vertical-align: 1px; }
.pubs.compact .pub-authors, .pubs.compact .doi { display: none; }
.year { font: 600 1rem var(--font); color: var(--muted); margin: 1.4em 0 0; }
.pub-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.pub-tools input { flex: 1 1 260px; font: inherit; padding: .65em .9em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 .9rem var(--font); padding: .5em .9em; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hidden { display: none !important; }

/* Page heads */
.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-body { padding-top: 32px; padding-bottom: 56px; }
.area-head-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .area-head-grid { grid-template-columns: 1.4fr 1fr; } }
.area-head { border-top: 5px solid var(--c, var(--accent)); }
.area-figure { margin: 0; }
.area-figure svg { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }

/* Two-column article */
.two-col { display: grid; gap: 40px; padding-top: 36px; padding-bottom: 8px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 320px; } }
.prose { max-width: 720px; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .55em; }
.methods { color: var(--muted); }
.side-title { font: 600 .8rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.side > * + .side-title { margin-top: 28px; }
.people-stack { display: flex; flex-direction: column; gap: 10px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 6px 0; }
.plain.cols { columns: 2 260px; }
.highlights { list-style: none; padding: 0; margin: 0; }
.highlights li { position: relative; padding: 8px 0 8px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.highlights li::before { content: ""; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* People */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.lg { width: 96px; height: 96px; }
.avatar.xl { width: 220px; height: auto; border-radius: 12px; object-fit: contain; }
.avatar.xl.initials { width: 180px; height: 180px; font-size: 2.4rem; }
.initials { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--c-energy) 22%, var(--surface))); color: var(--ink); font: 600 1.1rem var(--serif); }
.initials.lg { font-size: 1.8rem; } .initials.xl { font-size: 2.6rem; }
.person-card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.person-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.person-meta { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 600; }
.person-role { font-size: .85rem; color: var(--muted); }
.person-topic { font-size: .88rem; margin-top: 2px; }
.people-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.pi-card { display: flex; gap: 22px; align-items: center; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pi-card h2 { margin-bottom: .2em; }
.pi-card p:last-child { margin: 0; }
@media (max-width: 560px) { .pi-card { flex-direction: column; align-items: flex-start; } }
.person-head-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 720px) { .person-head-grid { grid-template-columns: auto 1fr; gap: 36px; } }
.person-role-lg { font-weight: 500; margin: -.2em 0 .4em; }
.person-links { list-style: none; padding: 0; margin: .6em 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.thesis { margin-top: 1.6em; padding-top: 1em; border-top: 1px solid var(--line); }

/* Research list */
.area-list { display: flex; flex-direction: column; gap: 18px; }
.area-row { display: grid; gap: 20px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-left: 5px solid var(--c); align-items: center; }
@media (min-width: 760px) { .area-row { grid-template-columns: 240px 1fr; } }
.area-row h2 a { color: var(--ink); text-decoration: none; }
.area-row h2 a:hover { color: var(--accent); }
.area-row .area-figure svg { max-width: 240px; }
.area-row .area-figure .area-icon.has-img { height: 180px; margin: 0; }
.area-row p { margin-bottom: .6em; }
.area-people { font-size: .92rem; }
.approach { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.approach > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.approach p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.status { font-size: .8rem; font-weight: 600; padding: .15em .6em; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.status.ongoing { background: color-mix(in srgb, var(--c-light) 20%, transparent); }

/* News page */
.news-full { list-style: none; padding: 0; margin: 0; }
.news-full li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-full time { color: var(--muted); font-size: .9rem; padding-top: 3px; }
.news-full h3 { font: 600 1.05rem/1.4 var(--font); margin: 0 0 .25em; }
.news-full h3 a { color: var(--ink); }
.news-full p { margin: 0; color: var(--muted); }

/* Facilities, teaching, contact */
.facility-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.facility { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.facility ul { padding-left: 1.1em; margin: 0; }
.facility li { margin-bottom: .3em; }
.course-cols { display: grid; gap: 32px; }
@media (min-width: 860px) { .course-cols { grid-template-columns: 1fr 1fr; } }
.course-cols .section-title:first-child { margin-top: 0; }
.courses { list-style: none; padding: 0; margin: 0; }
.courses li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.code { font: 600 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); min-width: 64px; padding-top: 2px; }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); align-self: start; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 20px; font-size: .92rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-title { font-weight: 600; margin-bottom: .4em; }
.footer-base { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Figures from papers */
.figs { display: grid; gap: 16px; margin: 1.6em 0; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 640px) { .figs { grid-template-columns: repeat(2, 1fr); } }
.fig { margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.fig img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; background: #fff; }
.fig figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.avatar { object-position: 50% 25%; }

/* Gallery */
.video-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); margin-bottom: 8px; }
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-frame iframe, .video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { padding: 0; cursor: pointer; background: #000; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .9; transition: opacity .15s; }
.video-play:hover .video-icon, .video-play:focus-visible .video-icon { opacity: 1; }
.video-frame noscript a { position: absolute; inset: auto 0 0 0; padding: 8px; background: rgba(0,0,0,.7); color: #fff; text-align: center; }
.video figcaption { margin-top: 8px; font-size: .95rem; }
.video figcaption strong { display: block; font-size: 1.02rem; }
.video-date { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.video-text { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.video-about { margin-top: 8px; font-size: .9rem; }
.video-about summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.video-about p { margin: 6px 0 0; color: var(--muted); line-height: 1.55; }
@media (min-width: 900px) {   /* a single video sits beside its text */
  .video-grid:has(> .video:only-child) .video { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .video-grid:has(> .video:only-child) { grid-template-columns: 1fr; }
  .video-grid:has(> .video:only-child) figcaption { margin-top: 0; }
}
.gallery-sub { margin-top: 36px; }
.gallery-jump { margin: -8px 0 16px; text-align: right; }
.gallery-jump a { font-weight: 600; text-decoration: none; }
.gallery-videos { margin: 36px 0 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 84px; }
.gallery-videos h2 { margin-top: 0; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); grid-auto-flow: dense; }
.g-item { position: relative; margin: 0; overflow: hidden; border-radius: 14px; background: var(--surface-2); aspect-ratio: 4 / 3; }
.g-item a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.g-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.g-item:hover img { transform: scale(1.04); }
.g-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; font-size: .85rem; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.g-item figcaption span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@media (min-width: 720px) { .g-feature { grid-column: span 2; grid-row: span 2; } .g-feature figcaption { font-size: 1rem; padding: 40px 16px 14px; } }
/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 56px 16px 24px; background: rgba(12,14,20,.94); }
.lb.open { display: flex; }
.lb img { max-width: min(1400px, 100%); max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; background: #fff; }
.lb-cap { color: #e8e8ec; font-size: .95rem; text-align: center; max-width: 900px; }
.lb-count { color: #9a9aa6; font-size: .8rem; }
.lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb button:hover, .lb button:focus-visible { background: rgba(255,255,255,.25); outline: none; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lab-photos img, .figs img { cursor: zoom-in; }
body.lb-lock { overflow: hidden; }
.lab-photos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 2em; }
.lab-photos figure { margin: 0; }
.lab-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.lab-photos figcaption { font-size: .85rem; color: var(--muted); padding-top: 6px; }
.news-full li.has-img { grid-template-columns: 70px 1fr 200px; }
.news-img { width: 200px; height: 130px; object-fit: cover; border-radius: 8px; }
@media (max-width: 640px) { .news-full li.has-img { grid-template-columns: 70px 1fr; } .news-full li.has-img .news-img { grid-column: 2; width: 100%; height: auto; } }
.photo-strip { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 720px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }

/* Team photos: rounded rectangles in a portrait frame, so heads are not clipped */
.person-card .avatar { width: 84px; height: 105px; border-radius: 10px; object-position: 50% 20%; }
.person-card .avatar.initials { height: 105px; }
.avatar.lg { width: 104px; height: 130px; border-radius: 12px; object-position: 50% 20%; }
.person-card { align-items: flex-start; }

/* Added old-site content */
ul.edu { padding-left: 1.1em; margin: 6px 0 18px; }
.course-level { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.useful-links { margin-top: 36px; }

/* IIT Guwahati logo */
.inst-logo { display: flex; align-items: center; padding-left: 14px; margin-left: 14px; border-left: 1px solid var(--line); margin-right: auto; }
.inst-logo img { width: 40px; height: 40px; display: block; }
.footer-inst img { width: 52px; height: 52px; display: block; margin-bottom: 12px; }

/* Refinements */
html { scroll-padding-top: 80px; }
h1, h2, h3, .area-title, .pub-title { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
a, .btn, .chip, .site-nav a { transition: color .15s, background-color .15s, border-color .15s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
/* Home intro: one lead paragraph, then normal reading text */
.hero .lead { max-width: 42em; }
.hero .lead + .lead { font-size: 1rem; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.hero-figure { align-self: start; margin-top: 64px; }
/* Sub-headings between lists and tables */
.sub-title { margin: 2em 0 .7em; }
.people-grid + .section-title, .pi-card + .section-title { margin-top: 2em; }
/* Facilities: the long list sits on the left, short ones share the right */
@media (min-width: 900px) {
  .facility-grid { grid-template-columns: repeat(3, 1fr); }
  .facility-grid .facility:nth-child(1) { grid-row: span 2; }
  .facility-grid .facility:nth-child(4) { grid-column: span 2; }
  .facility-grid .facility:nth-child(4) ul { columns: 2; column-gap: 32px; }
  .facility li { break-inside: avoid; }
}
.contact-grid .useful-links { margin-top: 28px; }
.contact-grid .useful-links h2 { font-size: 1.25rem; }

/* Theme toggle shows the theme you would switch to */
.icon-sun, .theme-label { display: none; }
:root[data-mode="dark"] .icon-sun { display: block; }
:root[data-mode="dark"] .icon-moon { display: none; }
@media (max-width: 1100px) {
  .theme-toggle { width: auto; padding: 0 14px 0 10px; gap: 8px; display: inline-flex; align-items: center; align-self: flex-start; border-radius: 99px; font: 500 .9rem var(--font); }
  .theme-label { display: inline; }
}
/* Phone */
@media (max-width: 560px) {
  .hero .kicker { font-size: .78rem; letter-spacing: .06em; }
  .hero { padding-top: 36px; }
}
@media (max-width: 640px) {
  table.compact thead { display: none; }
  table.compact tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.compact tr:last-child { border-bottom: 0; }
  table.compact td { padding: 0; border: 0; }
  table.compact td:nth-child(1) { font-weight: 600; }
  table.compact td:nth-child(2) { color: var(--muted); }
  table.compact td:nth-child(3) { grid-column: 1 / -1; color: var(--muted); }
  .table-wrap table:not(.compact) { min-width: 700px; }
}
/* Publications: year in the left margin on wide screens */
@media (min-width: 860px) {
  .pub-section { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 8px; }
  .pub-section > .section-title { grid-column: 1 / -1; }
  .pub-section > .year { grid-column: 1; margin: 0; padding-top: 14px; font: 600 1.15rem var(--serif); color: var(--ink); position: sticky; top: 80px; align-self: start; }
  .pub-section > .pubs { grid-column: 2; }
}
.pub-tools { position: sticky; top: 66px; z-index: 3; background: var(--bg); padding: 12px 0; margin: -12px 0 0; }
/* Links to the other areas at the foot of a research page */
.other-areas { padding-top: 8px; padding-bottom: 24px; }
.other-areas-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.other-areas-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; color: var(--ink); text-decoration: none; font: 600 1rem/1.3 var(--serif); }
.other-areas-list a:hover { border-color: var(--c); }
/* Header gets a soft shadow once the page is scrolled */
.site-header.scrolled { box-shadow: 0 4px 18px rgba(20,23,31,.07); }
@media print {
  .site-header, .site-footer, .pub-tools, .cta, .theme-toggle, .join, .photo-strip { display: none !important; }
  body { background: #fff; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 640px) { .table-wrap table:not(.compact) td:first-child { min-width: 250px; } }
/* Home opening: text fills its column, sketches sit beside it */
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 180px; gap: 48px; align-items: center; }
  .hero .lead, .hero .lead + .lead { max-width: none; }
  .hero-figure { align-self: center; margin-top: 0; }
}
/* Headline on one line across the full width, sketches below it beside the text */
.hero-head h1 { margin-bottom: 28px; }
@media (min-width: 900px) {
  .hero-head h1 { white-space: nowrap; font-size: min(3.1rem, calc((min(100vw, 1180px) - 76px) / 22.6)); }
  .hero-head { margin-bottom: 4px; }
}

/* Search */
.search-open { margin-left: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.search-label { display: none; }
@media (max-width: 1100px) { .search-open { width: auto; padding: 0 14px 0 10px; gap: 8px; display: inline-flex; align-items: center; align-self: flex-start; border-radius: 99px; font: 500 .9rem var(--font); margin: 8px 0 0 .6em; } .search-label { display: inline; } }
.sr { position: fixed; inset: 0; z-index: 900; display: none; background: rgba(12,14,20,.55); padding: 9vh 16px 16px; }
.sr.open { display: block; }
.sr-box { max-width: 680px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; display: flex; flex-direction: column; max-height: 78vh; }
.sr-box input { font: inherit; font-size: 1.1rem; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); outline: none; width: 100%; }
.sr-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.sr-list a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sr-list a:hover, .sr-list a.active { background: var(--surface-2); }
.sr-kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; color: var(--accent); }
.sr-title { display: block; font-weight: 600; line-height: 1.35; }
.sr-sub { display: block; font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-empty { padding: 18px 20px; color: var(--muted); margin: 0; }
/* Citation buttons */
.pub-actions { display: flex; gap: 6px; margin-top: 6px; }
.pubs.compact .pub-actions { display: none; }
.cite-btn { font: 500 .78rem var(--font); padding: .25em .7em; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.cite-btn:hover { color: var(--ink); border-color: var(--muted); }
.cite-btn.done { color: var(--c-light); border-color: var(--c-light); }
/* Papers per year */
.pub-chart { margin: 0 0 22px; padding: 16px 20px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pub-chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .9rem; margin-bottom: 10px; }
.pc-legend { color: var(--muted); font-size: .85rem; }
.pc-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 5px 0 12px; }
.pc-j { background: var(--accent); } .pc-c { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.pc-bars { display: flex; align-items: flex-end; gap: clamp(4px, 1.4vw, 14px); }
.pc-col { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: center; }
.pc-bar { display: block; height: calc(var(--n) * 13px); border-radius: 3px; }
.pc-total { font-size: .8rem; font-weight: 600; }
.pc-year { font-size: .78rem; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); margin-top: 1px; }
.feed-link { margin: 0 0 4px; font-size: .92rem; }
.feed-link code { font-size: .86rem; overflow-wrap: anywhere; }
.feed-copy { margin-left: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: inherit; font: 500 .82rem var(--font); cursor: pointer; }
.feed-copy:hover { border-color: var(--accent); }
@media print { .pub-actions, .pub-chart, .search-open { display: none !important; } }

/* Chat assistant (only present when chat_endpoint is set) */
.chat-open { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border: 0; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 600 .9rem var(--font); cursor: pointer; box-shadow: var(--shadow); }
.chat-open[aria-expanded="true"] { display: none; }
.chat-panel { position: fixed; right: 18px; bottom: 18px; z-index: 61; width: min(380px, calc(100vw - 24px)); height: min(540px, calc(100dvh - 36px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-close { border: 0; background: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.chat-bot { align-self: flex-start; background: var(--surface-2); }
.chat-wait { color: var(--muted); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 16px var(--font); }
.chat-form button { padding: 0 14px; border: 0; border-radius: 10px; background: var(--ink); color: var(--bg); font: 600 .9rem var(--font); cursor: pointer; }
.chat-form button:disabled { opacity: .5; }
.chat-note { margin: 0; padding: 0 12px 10px; font-size: .72rem; color: var(--muted); }
@media (max-width: 520px) { .chat-open span { display: none; } .chat-open { padding: 12px; } .chat-panel { right: 12px; bottom: 12px; } }
@media print { .chat-open, .chat-panel { display: none !important; } }

/* Private edit page */
.edit-app { max-width: 760px; }
.edit-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 24px; display: grid; gap: 16px; }
.edit-form h2 { margin: 0; }
.edit-form > p { margin: 0; }
.edit-field { display: grid; gap: 6px; }
.edit-label { font-weight: 600; font-size: .92rem; }
.edit-hint { font-size: .8rem; color: var(--muted); }
.edit-form input:not([type="checkbox"]), .edit-form textarea, .edit-form select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
.edit-form textarea { resize: vertical; }
.edit-form .btn { justify-self: start; cursor: pointer; }
.edit-form .btn:disabled { opacity: .5; }
.edit-status { margin: 0; font-size: .92rem; color: var(--muted); }
.edit-status:empty { display: none; }
.edit-status.ok { color: var(--c-light); font-weight: 600; }
.edit-status.bad { color: var(--c-model); font-weight: 600; }
.edit-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.edit-links li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.edit-links strong { flex: 1; min-width: 180px; font-weight: 500; }
.edit-checks { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.edit-checks label { font-size: .9rem; }
.edit-sub { margin: 10px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.edit-papers { margin: 0; padding-left: 1.2em; font-size: .92rem; }
.edit-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 12px; }
.edit-box summary { cursor: pointer; font-weight: 600; }
.edit-box .cite-btn { justify-self: start; }
.edit-fig img { max-width: 100%; max-height: 220px; justify-self: start; background: #fff; border-radius: 6px; }
.edit-rows { display: grid; gap: 12px; }
.edit-rows:empty { display: none; }

/* CEISIM page */
.soon { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c-model); border-radius: var(--radius); padding: 24px 26px; margin: 0 0 28px; max-width: 860px; }
.soon h2 { margin: 0 0 .4em; }
.soon p:last-child { margin-bottom: 0; }
.soon-tag { display: inline-block; margin: 0 0 12px; padding: 3px 12px; border-radius: 99px; background: var(--c-model); color: #fff; font: 600 .78rem var(--font); letter-spacing: .06em; text-transform: uppercase; }
.soon .btn:disabled { opacity: .5; cursor: not-allowed; }
.ceisim-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .ceisim-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ceisim-grid .edit-form { margin: 0; }

/* Tools menu in the header */
.nav-drop { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--ink); font: 500 .94rem var(--font); padding: .45em .7em; border-radius: 8px; cursor: pointer; }
.nav-drop-btn:hover, .nav-drop.open .nav-drop-btn { background: var(--surface-2); }
.nav-drop-btn.current { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-drop-btn svg { transition: transform .15s; }
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 250px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.nav-drop.open .nav-drop-menu { display: block; }
.site-nav .nav-drop-menu a { display: flex; align-items: center; gap: 12px; padding: .6em .7em; }
.nav-drop-id { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; width: 58px; }
.nav-drop-menu .tool-logo { width: 36px; height: 36px; flex: none; }
.nav-drop-id .nav-drop-name { font-size: .8rem; line-height: 1.2; }
.nav-drop-menu .nav-drop-note { font-size: .86rem; line-height: 1.4; }
.page-head h1 .tool-logo { width: .95em; height: .95em; vertical-align: -.12em; margin-right: .3em; }
.nav-drop-name { display: block; font-weight: 600; }
.nav-drop-note { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
@media (max-width: 1100px) {
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: .7em .6em; font-size: .94rem; }
  .nav-drop-menu { position: static; min-width: 0; border: 0; box-shadow: none; background: none; padding: 0 0 4px 14px; }
}
@media print { .nav-drop-menu { display: none !important; } }
.brand-sub { white-space: nowrap; }
.form-off { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.form-off:disabled { opacity: .55; }
.form-off:disabled .btn, .form-off:disabled input, .form-off:disabled textarea { cursor: not-allowed; }
.ceisim-left .soon { max-width: none; margin-bottom: 24px; }

/* A page that holds a full-height tool (Fermi) under the site header */
.app-page { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-page .site-header { flex: none; }
.app-page main { flex: 1; min-height: 0; display: flex; }
.app-page .site-footer, .app-page footer { display: none; }
.app-frame { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }

/* Home opening: justified text, then a row of real plots from the group's papers */
.hero .lead { text-align: justify; hyphens: auto; }
.hero-grid.text-only { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.hero-figure.hero-plots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: none; margin: 0; justify-self: stretch; align-self: stretch; }
.hero-plot { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 10px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hero-plot:hover, .hero-plot:focus-visible { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.hero-plot .hp-img { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 6px; padding: 4px; }
.hero-plot img { display: block; width: 100%; height: auto; max-height: 250px; object-fit: contain; }
.hp-cap { display: flex; justify-content: space-between; align-items: baseline; font: 600 .95rem var(--font); margin: 0 2px 8px; }
.hp-cap .hp-go { font-weight: 500; font-size: .82rem; color: var(--muted); }
.hero-plot:hover .hp-go { color: var(--accent); }
.hp-src { display: block; font-size: .78rem; line-height: 1.4; color: var(--muted); margin: 8px 2px 0; }
@media (max-width: 899px) {
  .hero-figure.hero-plots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 6px; }
  .hero-plot { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (max-width: 599px) { .hero .lead { text-align: left; hyphens: manual; } }
/* Research cards on the home page: a real figure from the group's papers */
.area-icon.has-img { height: 132px; background: #fff; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.area-icon.has-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

/* Result plot under the text in each research card */
.area-plot { margin-top: auto; height: 132px; background: #fff; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.area-lead { margin-bottom: 8px; }
.area-plot img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Funding agencies logo strip */
.funders { padding: 22px 28px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.funders-label { margin: 0 0 14px; text-align: center; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.funder-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 18px; }
.funder-logos a { display: flex; align-items: center; justify-content: center; height: 104px; padding: 8px 10px; background: #fff; border-radius: 8px; border: 1px solid var(--line); transition: transform .15s; }
.funder-logos a:hover { transform: translateY(-2px); }
.funder-logos img { height: 86px; width: auto; max-width: 170px; object-fit: contain; display: block; }
@media (max-width: 599px) { .funder-logos a { height: 78px; } .funder-logos img { height: 62px; max-width: 120px; } .funders { padding: 18px 14px 20px; } }

/* Centre for Nanotechnology logo next to the IIT Guwahati logo */
.inst-logo:has(+ .cnt-logo) { margin-right: 0; }
.inst-logo.cnt-logo { border-left: 0; padding-left: 0; margin-left: 10px; }
.inst-logo.cnt-logo img { width: auto; height: 42px; }
:root[data-mode="dark"] .inst-logo.cnt-logo img { background: #fff; border-radius: 6px; padding: 2px; }

/* Home news: two columns on wide screens */
@media (min-width: 900px) { .news-cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; } }

/* Intro: all three paragraphs in one style */
.hero .lead, .hero .lead + .lead { font-size: 1.15rem; line-height: 1.7; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
@media (max-width: 599px) { .hero .lead, .hero .lead + .lead { font-size: 1.05rem; } }

/* Inline SVG figure in a research card (white box, labels shown) */
.area-icon.has-svg { --fig-ink: #1f2430; --surface: #fff; --muted: #4a5160; }
.area-icon.has-svg svg { height: 100%; width: auto; max-width: 100%; }
.area-icon.has-svg .fig-label { display: inline; }
