/* ============================================================
   Design tokens
   Semantic tokens are defined per theme. The legacy names
   (--white, --blush, --rose-*) are kept as aliases because
   admin.html still uses them.
   ============================================================ */
/* SolaimanLipi (Regular & Bold) */
@font-face {
  font-family: 'SolaimanLipi';
  src: url('../fonts/solaimanlipi.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SolaimanLipi';
  src: url('../fonts/solaimanlipi-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Lowercase alias compatibility */
@font-face {
  font-family: 'solimanlipi';
  src: url('../fonts/solaimanlipi.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'solimanlipi';
  src: url('../fonts/solaimanlipi-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #fcf9fa;
  --surface: #ffffff;
  --surface-alt: #f8eef1;
  --border: #eed8df;
  --border-strong: #e2b9c6;

  /* Text */
  --ink: #2f1a24;
  --text: #4e3a43;
  --muted: #6b5560;

  /* Accent */
  --accent: #a8325e; /* links, icons, text on surfaces */
  --accent-hover: #86244a;
  --accent-fill: #a8325e; /* button / block backgrounds (white text) */
  --accent-fill-hover: #86244a;
  --accent-soft: #fbe6ec; /* badges */
  --accent-border: #e39ab0;
  --on-accent: #ffffff;

  /* Feedback (admin) */
  --ok-bg: #e7f6ec;
  --ok-fg: #1b7a3d;
  --err-bg: #fbe3ea;
  --err-fg: #86244a;

  /* Glass + elevation */
  --glass: rgba(252, 249, 250, 0.78);
  --overlay: rgba(47, 26, 36, 0.55);
  --shadow-sm:
    0 1px 2px rgba(47, 26, 36, 0.05), 0 2px 8px rgba(47, 26, 36, 0.04);
  --shadow-md: 0 10px 28px rgba(96, 30, 60, 0.1);
  --shadow-lg: 0 30px 80px rgba(47, 26, 36, 0.28);

  /* Type */
  --font-head: "SolaimanLipi", "solimanlipi", "Noto Sans Bengali", Georgia, "Times New Roman", serif;
  --font-body: "SolaimanLipi", "solimanlipi", "Nunito Sans", "Noto Sans Bengali", "Segoe UI", system-ui, sans-serif;
  --font-bangla: "SolaimanLipi", "solimanlipi", "Noto Sans Bengali", "Nunito Sans", system-ui, sans-serif;
  --font-bangla-second: "Hind Siliguri", "Noto Sans Bengali", "Nunito Sans", system-ui, sans-serif;

  /* Shape, layout, motion */
  --radius-lg: 22px;
  --radius-md: 14px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.2s;
  --t-med: 0.35s;

  /* Legacy aliases (admin.html) */
  --white: var(--surface);
  --blush: var(--surface-alt);
  --rose-200: var(--border);
  --rose-400: var(--accent-border);
  --rose-700: var(--accent);
  --rose-800: var(--accent-hover);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #141013;
  --surface: #1e181c;
  --surface-alt: #251d22;
  --border: #3a2e35;
  --border-strong: #56414c;

  --ink: #f6eff2;
  --text: #d9ccd2;
  --muted: #a99ba3;

  --accent: #ef92b2;
  --accent-hover: #f7b6cb;
  --accent-fill: #b83b6f;
  --accent-fill-hover: #cb4c81;
  --accent-soft: #3a2230;
  --accent-border: #8a4a68;

  --ok-bg: #16301f;
  --ok-fg: #7fd69c;
  --err-bg: #3a1f2a;
  --err-fg: #f7b6cb;

  --glass: rgba(20, 16, 19, 0.72);
  --overlay: rgba(0, 0, 0, 0.66);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-body);
  font-weight: 700;
}

/* Marcellus has no Bengali glyphs, so use a Bengali display font */
html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] .chamber h3,
html[lang="bn"] .qual-card dt {
  font-family: var(--font-bangla);
  font-weight: 600;
  line-height: 1.3;
}
p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--accent-border);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 96px 0;
}
.ph {
  color: var(--accent);
  font-weight: 600;
} /* placeholder text – remove when filled */

svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus {
  top: 12px;
  color: var(--on-accent);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn-sm {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-fill-hover);
  color: var(--on-accent);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.btn-light {
  background: #ffffff;
  color: #86244a;
}
.btn-light:hover {
  background: #fdf1f4;
  color: #86244a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

/* ============ Header (glass) ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  transition:
    border-color var(--t-med),
    box-shadow var(--t-med);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  order: 1;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-fill);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 17px;
  transition: transform var(--t-med) var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.05);
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.brand-text strong {
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small {
  color: var(--muted);
  font-size: 13px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  order: 2;
}
.header-actions {
  order: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.main-nav a:not(.btn) {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  transition: color var(--t-fast);
}
/* animated underline indicator */
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}
.main-nav a:not(.btn):hover,
.main-nav a.active {
  color: var(--accent);
}
.main-nav a:not(.btn):hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

/* Toggles */
.lang-toggle,
.theme-toggle,
.menu-toggle {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    border-color var(--t-fast),
    transform var(--t-fast) var(--ease);
}
.lang-toggle:hover,
.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--accent-border);
}
.lang-toggle:active,
.theme-toggle:active,
.menu-toggle:active {
  transform: scale(0.94);
}
.lang-toggle {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition:
    transform 0.5s var(--ease),
    opacity 0.3s;
}
.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-70deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(70deg) scale(0.5);
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.25s var(--ease),
    opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-role {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}
.hero h1 {
  font-size: clamp(2.375rem, 5.4vw, 4rem);
  letter-spacing: -0.01em;
}
.hero-degree {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}
.hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.hero-photo {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-photo img,
.photo-placeholder {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 210px 210px var(--radius-lg) var(--radius-lg);
  object-fit: cover;
}
.photo-placeholder {
  display: none; /* shown only via .hero-photo.no-photo */
  background: var(--surface-alt);
  color: var(--accent-hover);
  border: 1px solid var(--border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}
.hero-photo.no-photo .doctor-photo {
  display: none;
}
.hero-photo.no-photo .photo-placeholder {
  display: flex;
}
.photo-placeholder svg {
  width: 70px;
  height: 70px;
  stroke: var(--accent);
  stroke-width: 1.3;
}

.experience-badge {
  position: absolute;
  left: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
}
.experience-badge strong {
  font-family: var(--font-bangla);
  font-size: 38px;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
}
.experience-badge span {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

/* Page-load sequence (CSS only, runs once) */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes photo-in {
  from {
    opacity: 0;
    transform: scale(1.04);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
.hero-text > * {
  animation: rise 2.5s var(--ease) 0.1s both;
}
.about {
  animation: rise 2.5s var(--ease) 0.1s both;
}
.expertise {
  animation: rise 2.5s var(--ease) 0.1s both;
}
.qualifications {
  animation: rise 2.5s var(--ease) 0.1s both;
}
.chambers {
  animation: rise 2.5s var(--ease) 0.1s both;
}

.hero-text > :nth-child(1) {
  animation-delay: 0.025s;
}
.hero-text > :nth-child(2) {
  animation-delay: 0.03s;
}
.hero-text > :nth-child(3) {
  animation-delay: 0.031s;
}
.hero-text > :nth-child(4) {
  animation-delay: 0.029s;
}
.hero-text > :nth-child(5) {
  animation-delay: 0.037s;
}
.hero-photo img,
.photo-placeholder {
  animation: photo-in 2.5s var(--ease) 0.1s both;
}
.experience-badge {
  animation: rise 2.7s var(--ease) 0.7s both;
}

/* ============ Scroll reveal (classes added by main.js) ============ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s var(--ease) var(--d, 0ms),
    transform 0.6s var(--ease) var(--d, 0ms);
}

/* ============ About ============ */
.about {
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 56px;
}
.about h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}
.about-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  max-width: 44rem;
}

/* ============ Section heads ============ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.625rem);
}
.section-head h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: var(--accent);
}
.section-head p {
  color: var(--muted);
  max-width: 30em;
}

/* ============ Expertise ============ */
.expertise,
.chambers {
  background: var(--surface-alt);
}
.expertise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.expertise-list li {
  display: flex;
  gap: 16px;
  padding: 30px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--t-med);
}
.expertise-list li:hover {
  background: var(--surface-alt);
}
.expertise-list svg {
  width: 30px;
  height: 30px;
  margin-top: 2px;
  transition: transform var(--t-med) var(--ease);
}
.expertise-list li:hover svg {
  transform: scale(1.1) rotate(-4deg);
}
.expertise-list h3 {
  font-size: 19px;
  margin-bottom: 6px;
}
.expertise-list p {
  font-size: 16px;
  color: var(--muted);
}

/* ============ Cards (shared) ============ */
.expertise-list li,
.qual-card,
.chamber,
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    border-color var(--t-med);
}
.expertise-list li:hover,
.qual-card:hover,
.chamber:hover,
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

/* ============ Qualifications ============ */
.qual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.qual-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
}
.qual-card h2 {
  font-size: 1.75rem;
  margin-bottom: 20px;
}
.qual-card dl {
  margin: 0;
  display: flex;
  flex-direction: column;
}
/* Quick-facts block that fills the empty space in the shorter card */
.qual-highlights {
  margin-top: auto;
  padding-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.qual-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  border-radius: var(--radius-md, 14px);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition:
    transform var(--t-med) var(--ease),
    border-color var(--t-med);
}
.qual-stat:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}
.qual-stat strong {
  font-family: var(--font-head);
  font-size: 30px;
  line-height: 1.1;
  color: var(--accent);
}
.qual-stat span {
  font-size: 14px;
  color: var(--muted);
}
.qual-stat-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.qual-stat-wide svg {
  flex: none;
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}
.qual-stat-wide span {
  font-size: 15px;
  color: var(--ink);
}
.qual-card dl > div {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.qual-card dt {
  font-family: var(--font-head);
  font-size: 23px;
  color: var(--ink);
}
.qual-card dd {
  margin: 4px 0 0;
}
.qual-meta {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}
/* BMDC registration shown as a verified-credential badge */
.bmdc-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  background: var(--surface-alt);
  transition:
    transform var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
}
.bmdc-badge:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.bmdc-badge > svg {
  flex: none;
  width: 34px;
  height: 34px;
  stroke: var(--accent);
  stroke-width: 1.6;
}
.bmdc-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.bmdc-label {
  font-size: 13px;
  color: var(--muted);
}
.bmdc-num {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.bmdc-tag {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent-border);
  white-space: nowrap;
}

/* ============ Chambers ============ */
.chamber-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.chamber {
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.chamber h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.6875rem;
}
.chamber ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chamber li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chamber li svg {
  margin-top: 3px;
}
.map-link {
  font-weight: 700;
}

/* ============ Blog ============ */
.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 28px;
  font-family: var(--font-bangla-second);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  font-family: var(--font-bangla-second);
}
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
  font-family: var(--font-bangla-second);
}
.post-cat {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.post-date {
  color: var(--muted);
  font-family: var(--font-body);
}
.post-card h3 {
  font-size: 1.3125rem;
  line-height: 1.3;
  font-family: var(--font-bangla-second);
}
.post-card-excerpt {
  color: var(--muted);
  font-size: 16px;
  font-family: var(--font-bangla-second);
}
.post-card-link {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 6px 0 0;
  cursor: pointer;
  font-family: var(--font-bangla-second);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  transition:
    color var(--t-fast),
    transform var(--t-fast) var(--ease);
}
.post-card-link:hover {
  color: var(--accent-hover);
  transform: translateX(3px);
}
.blog-empty {
  color: var(--muted);
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.blog-pagination:empty {
  margin-top: 0;
}
.page-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast) var(--ease);
}
.page-btn:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--accent-border);
  transform: translateY(-1px);
}
.page-btn.active {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}
.page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.page-nav {
  color: var(--accent);
}

/* Blog post modal */
body.modal-open {
  overflow: hidden;
}
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.post-modal[hidden] {
  display: none;
}
.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade 0.3s ease both;
}
.post-modal-panel {
  position: relative;
  font-family: var(--font-bangla-second);
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.4s var(--ease) both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.post-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--accent-hover);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    transform var(--t-fast) var(--ease);
}
.post-modal-close:hover {
  background: var(--border);
  transform: rotate(90deg);
}
.post-meta {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  font-family: var(--font-bangla-second);
}
.post-modal-panel h2 {
  font-family: var(--font-bangla-second) !important;
  font-size: clamp(1.625rem, 3.4vw, 2.125rem);
  margin-bottom: 20px;
}
.post-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 65ch;
  font-family: var(--font-bangla-second);
}
.post-body h3 {
  font-family: var(--font-bangla-second);
  font-size: 19px;
  margin-top: 6px;
}
.post-body ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-body a {
  font-weight: 700;
}

/* ============ Contact ============ */
.contact-box {
  background: var(--accent-fill);
  color: #ffffff;
  border-radius: 28px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-md);
}
.contact-box h2 {
  color: #ffffff;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  margin-bottom: 10px;
}
.contact-box p {
  color: #fbe3ea;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}
.contact-box .btn {
  flex-shrink: 0;
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity var(--t-med),
    transform var(--t-med) var(--ease),
    visibility var(--t-med),
    border-color var(--t-fast);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.back-to-top:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ============ Theme switch: smooth colour transition ============ */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    fill 0.35s ease,
    stroke 0.35s ease,
    box-shadow 0.35s ease !important;
}

/* ============ Tablet (≤ 960px) ============ */
@media (max-width: 960px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 24px;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.25s,
      transform 0.3s var(--ease),
      visibility 0.25s;
  }
  .main-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .main-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
  }
  .main-nav a:not(.btn)::after {
    display: none;
  }
  .main-nav.open a {
    animation: rise 0.4s var(--ease) both;
  }
  .main-nav.open a:nth-child(2) {
    animation-delay: 0.04s;
  }
  .main-nav.open a:nth-child(3) {
    animation-delay: 0.08s;
  }
  .main-nav.open a:nth-child(4) {
    animation-delay: 0.12s;
  }
  .main-nav.open a:nth-child(5) {
    animation-delay: 0.16s;
  }
  .main-nav.open a:nth-child(6) {
    animation-delay: 0.2s;
  }
  .main-nav .btn {
    margin-top: 16px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-photo {
    order: -1;
  }
  .hero-photo img,
  .photo-placeholder {
    max-width: 100%;
  }
  .experience-badge {
    left: calc(50% - 200px);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .expertise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
  }
}

/* ============ Mobile (≤ 600px) ============ */
@media (max-width: 600px) {
  :root {
    --header-h: 68px;
  }
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 18px;
  }
  .section {
    padding: 64px 0;
  }

  .header-actions {
    gap: 8px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .brand-text strong {
    font-size: 14px;
  }
  .brand-text small {
    font-size: 12px;
  }
  .lang-toggle {
    padding: 8px 12px;
  }
  .main-nav {
    padding: 8px 18px 24px;
  }

  .hero {
    padding: 40px 0 64px;
  }
  .hero-text {
    text-align: center;
    align-items: center;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-photo {
    flex-direction: column;
    align-items: center;
  }
  .hero-photo img,
  .photo-placeholder {
    max-width: 100%;
  }
  .experience-badge {
    position: static;
    margin-top: -36px;
  }

  .expertise-list {
    grid-template-columns: 1fr;
  }
  .expertise-list li {
    padding: 22px 20px;
  }

  .qual-grid,
  .chamber-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .qual-card,
  .chamber {
    padding: 26px 22px;
  }
  .post-modal {
    padding: 0;
  }
  .post-modal-panel {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    padding: 60px 22px 40px;
  }

  .contact-box {
    padding: 32px 24px;
    border-radius: 22px;
  }
  .contact-box .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Very small phones: keep the header actions on one line */
@media (max-width: 400px) {
  .brand-text {
    display: none;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
  .btn:hover,
  .chamber:hover,
  .post-card:hover {
    transform: none;
  }
}
