:root {
  --bg: #FFFFFF;
  --ink: #161616;
  --muted: #5F5F5F;
  --line: #E4E4E4;
  --wash: #F5F5F5;
  --accent: #1E4FBF;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111111;
  --ink: #EDEDED;
  --muted: #A3A3A3;
  --line: #2C2C2C;
  --wash: #1A1A1A;
  --accent: #8AB4F8;
  color-scheme: dark;
}
html[lang="bn"] {
  --serif: "Tiro Bangla", "Noto Serif Bengali", "Kalpurush", serif;
  --sans: "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.05rem; line-height: 1.7; }
html[lang="bn"] body { font-size: 1.125rem; line-height: 1.9; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 1.25rem; gap: 1rem; flex-wrap: wrap; }
.top .name { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.top .tools { display: flex; align-items: center; gap: 1.25rem; }
.top nav { display: flex; gap: 1.4rem; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .97rem; }
.top nav a:hover { color: var(--accent); text-decoration: underline; }
.top .lang { color: var(--ink); text-decoration: none; font-size: .93rem; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .85rem; line-height: 1.7; }
.top .lang:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn { appearance: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 2.25rem; height: 2.25rem; border-radius: 50%; cursor: pointer; padding: 0; display: grid; place-items: center; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn svg { width: 1.1rem; height: 1.1rem; }
.theme-btn .i-sun { display: none; }
.theme-btn[data-mode="dark"] .i-sun { display: block; }
.theme-btn[data-mode="dark"] .i-moon { display: none; }

/* hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.hero-grid:has(.portrait) { grid-template-columns: minmax(0, 1fr) 280px; align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 4.6rem); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .6rem; }
html[lang="bn"] .hero h1 { line-height: 1.35; letter-spacing: 0; }
.hero .role { font-size: 1.3rem; margin: 0 0 1.25rem; color: var(--accent); font-weight: 500; }
.hero .summary { max-width: 38rem; margin: 0 0 1.75rem; color: var(--muted); font-size: 1.12rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1.2rem; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: .98rem; border: 1px solid var(--ink); line-height: 1.5; }
.btn .ico { width: 1.1rem; height: 1.1rem; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.ghost { color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; font-weight: 500; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 6px; background: var(--wash); }

/* sections */
.sec { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); }
.sec > h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.3; margin: 0 0 2rem; }
.about { max-width: 44rem; margin: 0; }
.entry { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 3rem; padding-block: 1.6rem; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry .when { color: var(--muted); font-size: .95rem; padding-top: .3rem; }
.entry h3 { font-size: 1.15rem; font-weight: 600; margin: 0; line-height: 1.5; }
.entry .org { margin: 0 0 .6rem; color: var(--muted); }
.entry ul { margin: 0; padding-left: 1.1rem; }
.entry li { margin-bottom: .35rem; max-width: 46rem; }
.entry p.note { margin: .6rem 0 0; color: var(--muted); font-size: .97rem; max-width: 46rem; }
.entry .tag { display: inline-block; font-size: .85rem; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 0 .65rem; margin-left: .5rem; vertical-align: .1em; line-height: 1.6; font-weight: 400; }

.bag { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem 3rem; margin: 0; }
.bag dt { font-weight: 600; margin-bottom: .1rem; }
.bag dd { margin: 0; color: var(--muted); }
.cert { margin-top: 2.5rem; max-width: 44rem; }
.cert h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .5rem; }
.cert ul { margin: 0; padding-left: 1.1rem; }
.cert li { margin-bottom: .3rem; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--wash); }
.gallery figure:nth-child(2) img { object-position: 60% 90%; }
.beyond { max-width: 44rem; margin: 0; }

/* contact */
.mail-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.mail-row .ico { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.mail { font-family: var(--serif); font-size: clamp(1.4rem, 3.4vw, 2rem); overflow-wrap: anywhere; }
.lead { color: var(--muted); max-width: 36rem; margin: 0 0 1.5rem; }
.ico { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.links { list-style: none; padding: 0; margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); column-gap: 2.5rem; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a { display: grid; grid-template-columns: 1.35rem 1fr auto; align-items: center; gap: .9rem; padding: .9rem .25rem; text-decoration: none; color: var(--ink); }
.links a .ico { color: var(--muted); }
.links a:hover { color: var(--accent); background: var(--wash); }
.links a:hover .ico { color: var(--accent); }
.links b { font-weight: 500; white-space: nowrap; }
.links a span { color: var(--muted); font-size: .93rem; direction: ltr; white-space: nowrap; }

footer { padding-block: 2rem 3rem; color: var(--muted); font-size: .93rem; border-top: 1px solid var(--line); }

@media (max-width: 800px) {
  .hero-grid:has(.portrait) { grid-template-columns: 1fr; }
  .portrait { max-width: 240px; order: -1; }
  .entry { display: block; }
  .entry .when { padding: 0 0 .25rem; }
  .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top .tools { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; }
  .top nav { gap: .5rem 1rem; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
