/* tousifislam.com, 2026 redesign, version 2.
   Tall uppercase serif display, off-white and white bands, one coral accent. */

:root {
  --paper: #f8f7f2;
  --white: #ffffff;
  --ink: #131313;
  --ink-2: #3c3a36;
  --muted: #77736b;
  --line: #e4e1d8;
  --coral: #ee7d54;
  --coral-deep: #c9572f;
  --coral-ink: #ffffff;
  --display: "Oranienbaum", "Bodoni 72", "Didot", Georgia, serif;
  --text: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --bengali: "Noto Serif Bengali", serif;
  --gutter: clamp(16px, 4.5vw, 64px);
  --max: 1280px;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151412;
    --white: #1c1b18;
    --ink: #f2efe8;
    --ink-2: #cfcac0;
    --muted: #9a958b;
    --line: #34312c;
    --coral: #f08a63;
    --coral-deep: #f08a63;
    --coral-ink: #151412;
  }
}

:root[data-theme="dark"] {
  --paper: #151412;
  --white: #1c1b18;
  --ink: #f2efe8;
  --ink-2: #cfcac0;
  --muted: #9a958b;
  --line: #34312c;
  --coral: #f08a63;
  --coral-deep: #f08a63;
  --coral-ink: #151412;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--coral-deep);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--gutter);
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 12px;
  z-index: 10;
}

.kicker {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.3rem;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark i {
  width: 12px;
  height: 12px;
  background: var(--coral);
  transform: rotate(45deg);
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 34px);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--coral-deep);
}

@media (max-width: 760px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-nav {
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 18px;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(28px, 5vw, 64px);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(4rem, 13vw, 11.5rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
}

.hero h1 .bn {
  display: block;
  margin-top: 18px;
  font-family: var(--bengali);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.2;
  text-transform: none;
  color: var(--muted);
}

.hero-aside {
  position: relative;
  z-index: 2;
  max-width: 17rem;
  padding-top: 14px;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.hero-aside strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.hero-aside .btn {
  margin-top: 18px;
}

.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: clamp(-150px, -9vw, -40px);
  padding-bottom: 0;
}

.hero-stage .shape {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(760px, 92vw);
  aspect-ratio: 1.45;
  transform: translateX(-50%);
  background: var(--coral);
  clip-path: polygon(8% 100%, 0 62%, 13% 52%, 9% 30%, 27% 26%, 34% 6%, 52% 14%, 64% 0, 74% 18%, 93% 16%, 90% 40%, 100% 52%, 92% 70%, 97% 100%);
}

.hero-stage img {
  position: relative;
  width: min(440px, 70vw);
  margin-bottom: clamp(-40px, -3vw, -16px);
  border-radius: 50%;
  border: 10px solid var(--paper);
  filter: grayscale(1) contrast(1.06);
}

@media (max-width: 760px) {
  .hero-top {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    text-align: left;
    padding-top: 0;
  }

  .hero-stage {
    margin-top: 36px;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
}

.btn:hover {
  background: var(--coral-deep);
  color: #fff;
}

.btn.light {
  background: var(--line);
  color: var(--ink);
}

.btn.light:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- bands ---------- */

.band {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0;
}

.band.white {
  background: var(--white);
}

.band.cut-tr::before,
.band.cut-bl::after {
  content: "";
  position: absolute;
  width: clamp(80px, 14vw, 200px);
  height: clamp(56px, 9vw, 130px);
  background: var(--paper);
}

.band.cut-tr::before {
  top: 0;
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.band.cut-bl::after {
  bottom: 0;
  left: 0;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.band-title {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  margin-bottom: clamp(36px, 5vw, 64px);
}

.band-title.center {
  text-align: center;
}

/* ---------- about split ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}

.split h2 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}

.split .body {
  max-width: 40rem;
  color: var(--ink-2);
}

.split .body strong {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ---------- accordion (research) ---------- */

.acc {
  border-top: 1px solid var(--line);
}

.acc details {
  border-bottom: 1px solid var(--line);
}

.acc summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 26px 4px;
  cursor: pointer;
  list-style: none;
}

.acc summary::-webkit-details-marker {
  display: none;
}

.acc summary h3 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1;
}

.acc summary sup {
  font-family: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  vertical-align: top;
  margin-right: 10px;
  color: var(--coral-deep);
}

.acc summary .arrow {
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.25s;
}

.acc details[open] summary .arrow {
  transform: rotate(90deg);
  color: var(--coral-deep);
}

.acc summary:hover h3 {
  color: var(--coral-deep);
}

.acc .panel {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 0 4px 34px;
  color: var(--ink-2);
}

.acc .panel p {
  max-width: 36rem;
}

.acc .panel .figure {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 16px;
}

.acc .panel .figure img {
  margin: 0 auto;
  max-height: 300px;
  width: auto;
}

@media (max-width: 760px) {
  .acc .panel {
    grid-template-columns: 1fr;
  }
}

/* ---------- project-style rows (selected papers) ---------- */

.works {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.works li {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(26px, 3.5vw, 42px) 0;
  border-bottom: 1px solid var(--line);
}

.works h3 {
  font-size: clamp(2.3rem, 5.6vw, 4.6rem);
  overflow-wrap: anywhere;
}

.works h3 a {
  text-decoration: none;
}

.works .sub {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.works .desc {
  font-size: 0.95rem;
  color: var(--ink-2);
  text-align: right;
}

.works .desc .t {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}

.works .desc b {
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 760px) {
  .works li {
    grid-template-columns: 1fr;
  }

  .works .desc {
    text-align: left;
  }
}

.center-cta {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.center-cta .btn {
  min-width: min(380px, 100%);
  text-align: center;
}

/* ---------- coral section with cards ---------- */

.coral {
  position: relative;
  background: var(--coral);
  color: var(--coral-ink);
  padding: clamp(72px, 10vw, 140px) 0;
}

.coral::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(80px, 14vw, 200px);
  height: clamp(56px, 9vw, 130px);
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.coral .band-title {
  text-align: center;
  margin-bottom: 18px;
}

.coral .intro {
  max-width: 40rem;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
  font-size: 1rem;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 160px 160px var(--radius) var(--radius);
  padding: 54px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card h3 {
  font-size: 2.1rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.card .role {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.93rem;
  color: var(--ink-2);
  flex: 1;
}

.card .links {
  justify-content: center;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links a {
  text-decoration: none;
}

.links a::after {
  content: " \2192";
}

/* ---------- inner page head ---------- */

.page-head {
  padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px);
}

.page-head .split {
  align-items: end;
}

.page-head h1 {
  font-size: clamp(3.8rem, 12vw, 10rem);
  line-height: 0.86;
}

.page-head .lead {
  color: var(--ink-2);
  max-width: 34rem;
  margin: 0;
}

/* ---------- research page themes ---------- */

.theme {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.theme:first-child {
  border-top: 0;
  padding-top: 0;
}

.theme header .sticky {
  position: sticky;
  top: 28px;
}

.theme header sup {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--coral-deep);
  margin-bottom: 12px;
}

.theme h2 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.theme .body {
  max-width: 42rem;
  color: var(--ink-2);
}

.theme .body strong {
  color: var(--ink);
  font-weight: 500;
}

.theme figure {
  margin: 30px 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: clamp(14px, 2.4vw, 26px);
}

.theme figure img {
  margin: 0 auto;
  max-height: 420px;
  width: auto;
}

/* vector plots scale to the card width instead of their small intrinsic size */
.theme figure img[src$=".svg"],
.theme figure img.fill {
  width: 100%;
  max-height: none;
}

.theme figcaption {
  margin-top: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #6f6b63;
}

.theme figcaption b {
  color: #131313;
  font-weight: 500;
}

.small-label {
  display: block;
  margin: 28px 0 10px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 860px) {
  .theme {
    grid-template-columns: 1fr;
  }
}

/* ---------- publication entries ---------- */

.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.pub:first-child {
  padding-top: 4px;
}

.pub .title {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 4px;
  color: var(--ink);
}

.pub .title a {
  text-decoration: none;
}

.pub .title a:hover {
  text-decoration: underline;
}

.pub .authors {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 0 0 4px;
}

.pub .authors b {
  font-weight: 500;
  color: var(--ink);
}

.pub .venue {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.pub .venue .note {
  color: var(--coral-deep);
  font-weight: 500;
}

.pub .venue .sep {
  margin: 0 7px;
  opacity: 0.6;
}

.year-group {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
  padding: 40px 0 20px;
  border-top: 1px solid var(--line);
}

.year-group > h2 {
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--ink);
}

.year-group > h2 span {
  position: sticky;
  top: 24px;
  display: block;
}

@media (max-width: 760px) {
  .year-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 40px;
}

.filters button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--line);
  border: 0;
  border-radius: 3px;
  padding: 9px 14px;
  cursor: pointer;
}

.filters button:hover {
  background: var(--ink);
  color: var(--paper);
}

.filters button[aria-pressed="true"] {
  background: var(--coral);
  color: #fff;
}

.filters .count {
  margin-left: 6px;
  opacity: 0.7;
}

@media (max-width: 560px) {
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 4px;
    scrollbar-width: none;
  }

  .filters button {
    flex: none;
  }
}

/* ---------- talks ---------- */

.tally {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tally li {
  padding: 22px 18px 18px 0;
}

.tally li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.tally b {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 4.6rem);
  font-weight: 400;
  line-height: 1;
}

.tally span {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .tally {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tally li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

.talk-block {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(48px, 7vw, 88px) 0;
  border-top: 1px solid var(--line);
}

.talk-block h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.talk-block header .sticky {
  position: sticky;
  top: 28px;
}

.talk-block header sup {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--coral-deep);
  margin-bottom: 12px;
}

.talks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.talks li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.talks .t {
  font-weight: 500;
}

.talks .v {
  color: var(--ink-2);
}

.talks .d {
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .talk-block {
    grid-template-columns: 1fr;
  }
}

/* ---------- news ---------- */

.news {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.news li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.news time {
  font-family: var(--display);
  font-size: 1.3rem;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
}

@media (max-width: 520px) {
  .news li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- software list page ---------- */

.tools {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.tool {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(16px, 4vw, 64px);
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.tool h3 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  overflow-wrap: anywhere;
}

.tool .role {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool .role.lead {
  color: var(--coral-deep);
}

.tool p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

@media (max-width: 700px) {
  .tool {
    grid-template-columns: 1fr;
  }
}

/* ---------- people, gallery ---------- */

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.people li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-2);
}

.people li b {
  display: block;
  font-weight: 500;
  color: var(--ink);
}

.gallery {
  columns: 3 220px;
  column-gap: 14px;
}

.gallery img {
  width: 100%;
  margin-bottom: 14px;
  border-radius: 6px;
  break-inside: avoid;
}

/* ---------- footer ---------- */

.site-footer {
  background: #131313;
  color: #f2efe8;
  padding: clamp(64px, 9vw, 120px) 0 32px;
}

.site-footer a:hover {
  color: #ee7d54;
}

.site-footer .big {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(3.4rem, 10vw, 8.6rem);
  line-height: 0.88;
  margin: 0 0 30px;
}

.site-footer .big span {
  color: #ee7d54;
}

.site-footer .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid #3a3833;
}

.site-footer .email {
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  overflow-wrap: anywhere;
}

.site-footer address {
  font-style: normal;
  margin-top: 8px;
  color: #a6a197;
  font-size: 0.95rem;
}

.site-footer .ext {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: flex-end;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer .ext a {
  text-decoration: none;
}

.site-footer .fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #8f8a80;
}

@media (max-width: 760px) {
  .site-footer .row {
    grid-template-columns: 1fr;
  }

  .site-footer .ext {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- fixes: keep model names in their real case, keep the name clear of the portrait ---------- */

.works h3,
.card h3,
.tool h3 {
  text-transform: none;
}

.card h3 {
  font-size: clamp(1.55rem, 2.2vw, 1.9rem);
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 761px) {
  .hero-stage {
    justify-content: flex-end;
    padding-right: 6%;
    margin-top: clamp(-150px, -9vw, -50px);
  }

  .hero-stage .shape {
    left: auto;
    right: 0;
    transform: none;
    width: min(700px, 56vw);
  }
}

/* ---------- research pillars under the name ---------- */

.pillars {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  max-width: 22rem;
}

.pillars li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  align-items: start;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--line);
}

.pillars .x {
  width: 9px;
  height: 9px;
  background: var(--coral);
  margin-top: 0.75rem;
  transform: rotate(45deg);
}

.pillars b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}

.pillars li > span:last-child {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- hero: photo in the right column, beside the pillars ---------- */

.hero-top {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: stretch;
}

@media (min-width: 761px) {
  .hero-right .hero-stage {
    flex: 1;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    margin-top: 28px;
    padding-right: 0;
  }

  .hero-right .hero-stage .shape {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(640px, 115%);
  }

  .hero-right .hero-stage img {
    width: min(420px, 80%);
  }
}

@media (max-width: 760px) {
  .hero-top {
    grid-template-columns: 1fr;
  }

  .hero-right {
    align-items: stretch;
  }
}

/* Home page has no wordmark; keep the nav on the right. */
.site-nav:only-child {
  margin-left: auto;
}

@media (max-width: 760px) {
  .site-nav:only-child {
    margin-left: 0;
  }
}

.wordmark .sep {
  margin-left: 12px;
  color: var(--muted);
}

.wordmark .bn {
  margin-left: 12px;
  font-family: var(--bengali);
  font-size: 0.95rem;
  text-transform: none;
  color: var(--muted);
}

/* ---------- section headings: small coral label over a mixed-case title ---------- */

.label,
.theme header sup,
.talk-block header sup {
  display: block;
  font-family: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 14px;
}

.label.center {
  text-align: center;
}

.coral .label {
  color: var(--coral-ink);
}

.band-title,
.split h2,
.theme h2,
.talk-block h2,
.year-group > h2 {
  text-transform: none;
  letter-spacing: -0.01em;
}

/* Pillar titles: mixed case, second word in coral. */
.pillars b {
  text-transform: none;
  letter-spacing: -0.01em;
}

.pillars b {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

.pillars b em {
  font-style: normal;
  color: inherit;
}

/* Home tagline: mixed case, second word in coral, in English and Bengali. */
span.wordmark {
  text-transform: none;
}

span.wordmark .bn {
  color: var(--ink);
}

.wordmark em {
  font-style: normal;
  color: var(--coral-deep);
}

/* Pillar marker drawn as a gravitational-wave chirp instead of a diamond. */
.pillars .x.gw {
  width: 26px;
  height: 13px;
  margin-top: 0.55rem;
  margin-left: -4px;
  background: none;
  transform: none;
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* ---------- portrait inside a binary black hole orbit ---------- */
/* The back svg sits behind the photo; the front svg repeats the orbit clipped to its near half. */

.hero-stage .orbit {
  position: relative;
  width: min(440px, 70vw);
  margin-bottom: clamp(-40px, -3vw, -16px);
}

.hero-stage .orbit img {
  display: block;
  width: 100%;
  margin-bottom: 0;
}

.orbit svg {
  position: absolute;
  left: -25%;
  top: -25%;
  width: 150%;
  height: 150%;
  overflow: visible;
  pointer-events: none;
}

.orbit-back {
  z-index: 0;
}

.orbit img {
  z-index: 1;
}

.orbit-front {
  z-index: 2;
}

.orbit-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

.orbit .bh {
  fill: #0b0b0b;
  stroke: var(--coral);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

@media (min-width: 761px) {
  .hero-right .hero-stage .orbit {
    width: min(420px, 80%);
  }

  .hero-right .hero-stage .orbit img {
    width: 100%;
  }
}

/* The orbit reaches past the photo; keep it from widening the page on phones. */
.hero {
  overflow-x: clip;
}

/* Section titles in the version-1 style: Playfair Display, mixed case, italic coral second part.
   On the coral band the italic part switches to ink. */
.band-title,
.split h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 em {
  font-style: italic;
  color: var(--coral-deep);
}

.coral h2 em {
  color: var(--ink);
}

/* ---------- professional service ---------- */

.service-group + .service-group {
  margin-top: 36px;
}

.service h3 {
  font-family: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 8px;
}

.service ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.service .y {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- press: photo cards in the Firenze "Insights" style ---------- */
/* Two columns, square image with one large rounded top corner, the right column dropped. */

.press-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em clamp(24px, 3vw, 40px);
}

.press-card:nth-child(even) {
  margin-top: clamp(4em, 10vw, 10em);
}

.press-img {
  aspect-ratio: 1;
  background: #0b0b0b;
  overflow: hidden;
}

.press-card:nth-child(odd) .press-img {
  border-top-left-radius: clamp(100px, 18vw, 250px);
}

.press-card:nth-child(even) .press-img {
  border-top-right-radius: clamp(100px, 18vw, 250px);
}

.press-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.press-card:hover .press-img img {
  transform: scale(1.04);
}

.press-card .credit {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--coral-ink);
  opacity: 0.8;
}

.press-body {
  padding-top: 1.4em;
  color: var(--coral-ink);
}

.press-body h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  text-transform: none;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.press-body .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 0.95rem;
}

.press-body .tag {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.press-body .summary {
  margin: 12px 0 18px;
  line-height: 1.5;
}

.press-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.press-links li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.92rem;
}

.press-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  color: var(--coral-ink);
  text-decoration: none;
}

.press-links a:hover .outlet {
  text-decoration: underline;
}

.press-links .dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--coral-ink);
  border-radius: 50%;
  flex: none;
}

.press-links .role {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.press-links time {
  font-size: 0.82rem;
  opacity: 0.85;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .press-cards {
    grid-template-columns: 1fr;
  }

  .press-card:nth-child(even) {
    margin-top: 0;
  }
}

/* Page titles keep their natural width; the lead sits beside them or wraps below, never under them. */
.page-head .split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: clamp(28px, 6vw, 96px);
  row-gap: 24px;
}

.page-head .split h1 {
  flex: none;
}

.page-head .split .lead {
  flex: 1 1 20rem;
}

/* Hero name: surname in curly Playfair italic, as in version 1. */
.hero h1 em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--coral-deep);
}

/* Two white bands in a row read as one; don't stack both paddings between them. */
.band.white + .band.white {
  padding-top: clamp(8px, 2vw, 32px);
}

.site-footer .intro {
  max-width: 44rem;
  margin: 0 0 clamp(28px, 4vw, 44px);
  color: #cfcac0;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.6;
}

.site-footer .intro strong {
  color: #f2efe8;
  font-weight: 500;
}

.site-footer .email {
  display: block;
}

.site-footer .email + .email {
  margin-top: 4px;
}

/* Smooth scroll for in-page links such as Contact Me!, unless the visitor prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Footer heading: "physics" in curly Playfair italic, matching the hero surname. */
.site-footer .big span {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
}

/* ---------- selected research contributions ---------- */

.contribs-intro {
  max-width: 52rem;
  margin: -24px auto clamp(36px, 5vw, 56px);
  text-align: center;
  color: var(--ink-2);
}

.contribs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 72px);
  align-items: start;
}

.contrib {
  border-top: 1px solid var(--ink);
}

.contrib summary {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  row-gap: 10px;
  padding: 22px 0 26px;
  cursor: pointer;
  list-style: none;
}

.contrib summary::-webkit-details-marker {
  display: none;
}

.contrib summary .n {
  grid-column: 1;
}

.contrib summary h3 {
  grid-column: 1;
}

.contrib summary .arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--coral-deep);
  transition: transform 0.25s ease;
}

.contrib details[open] .arrow {
  transform: rotate(90deg);
}

.contrib summary:hover h3 {
  color: var(--coral-deep);
}

.contrib-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 30px;
}

.contrib .n {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--coral-deep);
}

.contrib h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  text-transform: none;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.contrib p {
  margin: 0;
  color: var(--ink-2);
  flex: 1;
}

.contrib .links {
  margin-top: 6px;
  gap: 10px 20px;
  font-size: 0.74rem;
}

.contrib .links a {
  color: var(--coral-deep);
}

@media (max-width: 760px) {
  .contribs {
    grid-template-columns: 1fr;
  }
}

/* ---------- about: expandable trajectory, education and collaboration panels ---------- */

.about-acc {
  margin-top: 28px;
  border-top: 1px solid var(--ink);
}

.about-acc details {
  border-bottom: 1px solid var(--line);
}

.about-acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.about-acc summary::-webkit-details-marker {
  display: none;
}

.about-acc summary h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  text-transform: none;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.about-acc summary h3 em {
  font-style: italic;
  color: var(--coral-deep);
}

.about-acc .arrow {
  font-size: 1.3rem;
  color: var(--coral-deep);
  transition: transform 0.25s ease;
}

.about-acc details[open] .arrow {
  transform: rotate(90deg);
}

.about-acc ul {
  list-style: none;
  margin: 0;
  padding: 0 0 18px;
}

.about-acc li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

.about-acc li b {
  color: var(--ink);
  font-weight: 500;
}

.about-acc .y {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .about-acc .arrow {
    transition: none;
  }
}

.contrib p b {
  color: var(--ink);
  font-weight: 500;
}

.contrib p mark {
  background: none;
  color: var(--coral-deep);
  font-weight: 500;
}

.contrib p code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--coral-deep);
}

/* ---------- hero: gravitational-wave field behind the portrait (replaces the starburst) ---------- */

.hero-stage .shape {
  display: none;
}

.hero-stage .gw-field {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(820px, 135%);
  aspect-ratio: 1.3;
  pointer-events: none;
}

/* Pillars without markers: title and description fill the row. */
.pillars li {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- collaborator world map ---------- */

.collab-stats {
  margin: -28px auto clamp(28px, 4vw, 44px);
  text-align: center;
  color: var(--ink-2);
}

.world-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.world {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.world .land {
  fill: none;
  stroke: var(--muted);
  stroke-opacity: 0.38;
  stroke-linecap: round;
}

.world .arcs {
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.1;
  stroke-opacity: 0.45;
  stroke-dasharray: 3 4;
}

.world .pin .dot {
  fill: var(--coral);
  stroke: var(--paper);
  stroke-width: 2;
  transition: transform 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.world .pin:hover .dot {
  transform: scale(1.35);
  fill: var(--coral-deep);
}

.world .pin.home .dot {
  fill: var(--ink);
}

.world .home-ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: home-pulse 2.4s ease-out infinite;
}

@keyframes home-pulse {
  from {
    transform: scale(0.6);
    opacity: 0.8;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world .home-ring {
    animation: none;
    opacity: 0;
  }
}

/* Clickable pins and the card that lists who is there. */
.world-wrap {
  position: relative;
}

.world .pin {
  cursor: pointer;
  outline: none;
}

.world .pin:focus-visible .dot,
.world .pin.active .dot {
  transform: scale(1.4);
  fill: var(--coral-deep);
  stroke: var(--ink);
}

.world .pin.home.active .dot,
.world .pin.home:focus-visible .dot {
  fill: var(--ink);
}

.pin-card {
  position: absolute;
  z-index: 3;
  width: min(280px, 70vw);
  max-height: 320px;
  overflow-y: auto;
  padding: 16px 18px;
  background: var(--white);
  border-top: 3px solid var(--coral);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.pin-card .where {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
}

.pin-card .where span {
  margin-left: 8px;
  font-family: var(--text);
  font-size: 0.78rem;
  color: var(--muted);
}

.pin-card .inst {
  margin: 4px 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.pin-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pin-card li {
  padding: 5px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* Invisible, larger tap target around each pin. */
.world .pin .hit {
  fill: transparent;
  stroke: none;
}

/* Talk rows: title, then venue (linked when the CV has a link), then small tags. */
.talks .t {
  display: block;
  color: var(--ink);
}

.talks .v {
  display: block;
  margin-top: 2px;
  font-size: 0.88rem;
}

.talks .v a {
  color: var(--ink-2);
}

.talks .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.talks .tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--line);
  color: var(--ink-2);
}

.talks .tag.ai {
  background: var(--coral);
  color: var(--coral-ink);
}

.talks .tag.soon {
  background: var(--ink);
  color: var(--paper);
}

/* Talks counts strip: compact. */
.tally li {
  padding: 12px 14px 10px 0;
}

.tally li + li {
  padding-left: 14px;
}

.tally b {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.tally span {
  font-size: 0.75rem;
}

/* Software page: cards on a white band sit on paper; centred intro under a band title. */
.band.white .card {
  background: var(--paper);
}

.intro-center {
  max-width: 40rem;
  margin: -24px auto clamp(36px, 5vw, 56px);
  text-align: center;
  color: var(--ink-2);
}

.cards-center .cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  justify-content: center;
}

/* Selected papers: coral star before the title, and on the filter button. */
.pub .star,
.filters .star {
  color: var(--coral-deep);
}

.pub .star {
  margin-right: 2px;
}

/* ---------- publications: headline numbers and per-year charts ---------- */
/* Palette validated (dataviz validate_palette.js) on #f8f7f2 light and #151412 dark. */

:root {
  --chart-first: #c9572f;
  --chart-all: #2f6ea8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chart-first: #dd7148;
    --chart-all: #5a8fd0;
  }
}

:root[data-theme="dark"] {
  --chart-first: #dd7148;
  --chart-all: #5a8fd0;
}

.pub-charts {
  margin: 0 0 clamp(36px, 5vw, 56px);
}

.pub-stats {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pub-stats li {
  padding: 12px 14px 10px 0;
}

.pub-stats li + li {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.pub-stats b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--ink);
}

.pub-stats span {
  font-size: 0.75rem;
  color: var(--muted);
}

.pubcharts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.pubchart {
  position: relative;
  margin: 0;
}

.pubchart figcaption {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  color: var(--ink);
}

.pubchart .legend {
  display: flex;
  gap: 16px;
  margin: 4px 0 6px;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.pubchart .legend span,
.chart-tip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pubchart .legend i,
.chart-tip i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.pubchart i.s-first {
  background: var(--chart-first);
}

.pubchart i.s-all {
  background: var(--chart-all);
}

.pubchart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.pubchart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.pubchart .ylab,
.pubchart .xlab,
.pubchart .so-far {
  font-family: var(--text);
  font-size: 11px;
  fill: var(--muted);
}

.pubchart .ylab {
  text-anchor: end;
}

.pubchart .xlab,
.pubchart .so-far {
  text-anchor: middle;
}

.pubchart rect.s-first,
.pubchart path.s-first {
  fill: var(--chart-first);
}

.pubchart path.s-all {
  fill: var(--chart-all);
}

.pubchart .line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.pubchart .line.s-first {
  stroke: var(--chart-first);
}

.pubchart .line.s-all {
  stroke: var(--chart-all);
}

.pubchart .line.partial {
  stroke-dasharray: 4 4;
}

.pubchart .mark {
  stroke: var(--paper);
  stroke-width: 2;
}

.pubchart .mark.s-first {
  fill: var(--chart-first);
}

.pubchart .mark.s-all {
  fill: var(--chart-all);
}

.pubchart .mark.on {
  r: 5.5;
}

.pubchart rect.on,
.pubchart path.on {
  opacity: 0.8;
}

.pubchart .cross {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0;
}

.pubchart .hit {
  fill: transparent;
  outline: none;
}

.chart-tip {
  position: absolute;
  top: 36px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  font-size: 0.78rem;
  color: var(--ink-2);
  pointer-events: none;
  white-space: nowrap;
}

.chart-tip b {
  color: var(--ink);
  font-weight: 500;
}

.chart-tip i.s-first {
  background: var(--chart-first);
}

.chart-tip i.s-all {
  background: var(--chart-all);
}

.chart-data {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-data summary {
  cursor: pointer;
}

.chart-data table {
  margin-top: 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.chart-data th,
.chart-data td {
  padding: 3px 12px 3px 0;
  text-align: right;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 400;
}

.chart-note {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .pubcharts-row {
    grid-template-columns: 1fr;
  }

  .pub-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pub-stats li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

.chart-tip[hidden] {
  display: none;
}

/* Wordmark on inner pages: a gravitational waveform instead of the diamond. */
.wordmark .wm-wave {
  width: 28px;
  height: 14px;
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* Per year / cumulative switch above the charts. */
.view-switch {
  display: inline-flex;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--white);
}

.view-switch button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
}

.view-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.pubcharts-row[hidden] {
  display: none;
}


/* ---------- research: vision, program, chapters ---------- */

.vision blockquote {
  max-width: 58rem;
  margin: 8px auto 22px;
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: 1.2;
  color: var(--coral-ink);
}

.vision .intro {
  margin-bottom: 0;
}

.program-fig {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(16px, 3vw, 32px);
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.program-fig .scroll {
  overflow-x: auto;
}

.program-fig img {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.program-fig figcaption {
  max-width: 52rem;
  margin: 16px auto 0;
  text-align: justify;
  hyphens: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #5c584f;
}

.chapter-index {
  list-style: none;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}

.chapter-index a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  height: 100%;
  padding: 20px 22px;
  border-top: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease;
}

.chapter-index a:hover {
  background: var(--paper);
}

.chapter-index .n {
  grid-row: span 2;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 2.6rem;
  line-height: 0.9;
  color: var(--coral-deep);
}

.chapter-index b {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
}

.chapter-index b em {
  font-style: italic;
  color: var(--coral-deep);
}

.chapter-index a > span:last-child {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.chapter-head {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 7vw, 88px);
  background-color: #131313;
  background-image: repeating-radial-gradient(circle at 88% 60%, rgba(238, 125, 84, 0.13) 0 1px, transparent 1px 30px);
  color: #f2efe8;
}

.chapter-head .ch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: end;
}

.chapter-head .ch-num {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(6rem, 17vw, 14rem);
  line-height: 0.75;
  color: #ee7d54;
}

.chapter-head .label {
  color: #ee7d54;
}

.chapter-head h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.02;
  color: #f2efe8;
}

.chapter-head h2 em {
  font-style: italic;
  color: #ee7d54;
}

.chapter-head .ch-q {
  max-width: 44rem;
  margin: 18px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.4;
  color: #cfcac0;
}

.ch-intro {
  padding: clamp(40px, 6vw, 72px) 0 clamp(8px, 2vw, 24px);
}

.ch-intro .ch-text {
  max-width: 46rem;
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-2);
}

.ch-intro .ch-text strong {
  color: var(--ink);
  font-weight: 500;
}

.ch-intro.with-fig {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.ch-fig {
  margin: 0;
  padding: 16px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.ch-fig img {
  display: block;
  width: 100%;
  height: auto;
}

.ch-fig figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #5c584f;
}

.ch-fig figcaption b {
  color: #131313;
  font-weight: 500;
}

.next {
  margin: clamp(24px, 4vw, 48px) 0 clamp(64px, 9vw, 112px);
  padding: clamp(24px, 4vw, 44px);
  background: var(--white);
  border-top: 4px solid var(--coral);
  border-radius: 0 0 var(--radius) var(--radius);
}

.next h3 {
  margin: 6px 0 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  text-transform: none;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.1;
}

.next ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px clamp(24px, 4vw, 48px);
}

.next li {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.next li b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 860px) {
  .chapter-index,
  .next ul,
  .ch-intro.with-fig {
    grid-template-columns: 1fr;
  }

  .chapter-head .ch {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* subtitle under a research theme heading */
.theme .body .theme-sub {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--coral-deep);
}

/* software and data chips under a research theme */
.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.tool-chip:hover {
  border-color: var(--coral-deep);
}

.tool-chip code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral-deep);
}

.tool-chip span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* model, code and dataset names in research theme text */
code.tt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-weight: 600;
  color: var(--coral-deep);
}

/* prose version of a "Where it goes next" card */
.next .next-text {
  max-width: 52rem;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.6;
}

.next .next-text p + p {
  margin-top: 14px;
}

/* tall portrait plots: cap the width so the figure stays within one screen */
.theme figure img.tall {
  width: 100%;
  max-width: 520px;
  max-height: none;
}

/* figures open full size on tap or click */
a.fig-zoom {
  display: block;
  cursor: zoom-in;
}

/* collaborator map: on phones the pins are too small to tap, so offer a list by city instead */
.city-list {
  display: none;
  margin-top: 18px;
  text-align: left;
}

.city-list summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.city-list ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.city-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.city-list li b {
  font-weight: 500;
  color: var(--ink);
}

.city-list li .inst {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .city-list {
    display: block;
  }

  .world .pin .hit {
    r: 26;
  }
}

/* ---------- home: office-door photo under the About Me heading ---------- */
.about-photo {
  margin: clamp(24px, 4vw, 40px) 0 0;
  max-width: 340px;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.about-photo figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.about-photo figcaption b {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 860px) {
  .about-photo {
    max-width: 300px;
  }
}
