/* ============================================================
   Akbar Research Group — CSE, BUET
   Editorial academic theme · Fraunces + Archivo
   ============================================================ */

:root {
  --paper: #f8f5ee;
  --card: #fffdf8;
  --ink: #24211a;
  --ink-soft: #5d564a;
  --ink-faint: #8b8272;
  --maroon: #8a2a2e;
  --maroon-deep: #57191d;
  --maroon-wash: #f3e4e0;
  --gold: #b4882b;
  --line: #e4dccb;
  --line-soft: #ece5d6;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(36, 33, 26, 0.05), 0 12px 32px -18px rgba(36, 33, 26, 0.28);
  --wrap: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--maroon); color: var(--paper); }

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

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

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

/* ---------- typography ---------- */
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--maroon); }
.eyebrow .no { color: var(--ink-faint); font-weight: 500; }

.sec { padding: 84px 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 42px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 42px); }
.sec-head .lede { color: var(--ink-soft); max-width: 560px; margin-top: 10px; }

/* ---------- header ---------- */
.topbar { height: 4px; background: linear-gradient(90deg, var(--maroon-deep), var(--maroon) 55%, var(--gold)); }

.site-head {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(248, 245, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-t { font-family: var(--display); line-height: 1.02; color: var(--ink); }
.brand-t b { display: block; font-size: 19px; font-weight: 650; letter-spacing: 0.01em; }
.brand-t span { display: block; font-family: var(--body); font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  position: relative;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding: 10px 14px;
  text-decoration: none !important;
  border-radius: 6px;
  transition: color 0.2s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--maroon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-nav a.is-active { color: var(--maroon); }

.nav-toggle { display: none; border: 1px solid var(--line); background: var(--card); width: 44px; height: 44px; border-radius: 8px; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); transition: 0.25s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 60px; align-items: center; padding: 88px 0 76px; }

.hero h1 { font-size: clamp(38px, 5.2vw, 60px); font-weight: 620; margin: 14px 0 20px; }
.hero h1 em { font-style: italic; color: var(--maroon); font-weight: 520; }
.hero .sub { color: var(--ink-soft); font-size: 18px; max-width: 540px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none !important;
  border: 1.5px solid var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--maroon-deep); border-color: var(--maroon-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); transform: translateY(-2px); }
.btn .ar { transition: transform 0.2s; }
.btn:hover .ar { transform: translateX(3px); }

/* portrait */
.portrait { position: relative; max-width: 380px; justify-self: end; }
.portrait .frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.6;
  background: var(--maroon-wash);
}
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); transition: filter 0.4s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.portrait:hover .frame img { filter: saturate(1.05); transform: scale(1.025); }
.portrait::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--maroon);
  border-radius: 10px;
  z-index: -1;
}
.portrait figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- stats band ---------- */
.stats-band { background: var(--ink); color: var(--paper); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 26px; border-left: 1px solid rgba(248, 245, 238, 0.14); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 620; color: #f4e6c3; }
.stat b i { font-style: normal; color: var(--gold); }
.stat span { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(248, 245, 238, 0.62); }

/* ---------- cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 26px 24px;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6cbb2; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; }
.card .num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.card .icon { width: 40px; height: 40px; margin-bottom: 16px; color: var(--maroon); }
.card a.more { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 13.5px; font-weight: 600; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 13px;
  font-weight: 550;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  transition: 0.2s;
}
a.chip:hover { border-color: var(--maroon); color: var(--maroon); text-decoration: none; transform: translateY(-2px); }

/* ---------- publications (home preview) ---------- */
.pubmini { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 22px 4px; border-top: 1px solid var(--line-soft); }
.pubmini:last-child { border-bottom: 1px solid var(--line-soft); }
.pubmini .yr { font-family: var(--display); font-size: 22px; font-weight: 620; color: var(--maroon); }
.pubmini h3 { font-size: 18.5px; line-height: 1.3; margin-bottom: 6px; }
.pubmini .meta { color: var(--ink-faint); font-size: 14px; }
.pubmini .meta em { color: var(--ink-soft); font-style: italic; }

/* ---------- citations chart ---------- */
.chart-sec { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#citeChart { width: 100%; height: auto; display: block; }
#citeChart .bar { fill: #c9b98f; transition: fill 0.3s; }
#citeChart .bar:hover, #citeChart .bar.hot { fill: var(--maroon); }
#citeChart .axis { font-family: var(--body); font-size: 12px; fill: var(--ink-faint); }
.chart-note { font-size: 13px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(36px, 4.6vw, 54px); margin: 12px 0 14px; }
.page-hero .lede { color: var(--ink-soft); max-width: 640px; font-size: 17.5px; }

/* ---------- people ---------- */
.pi-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.pi-facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); margin-top: 26px; }
.pi-facts div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line-soft); font-size: 14.5px; }
.pi-facts div:first-child { border-top: 0; }
.pi-facts dt { color: var(--ink-faint); font-weight: 550; letter-spacing: 0.05em; }
.pi-facts dd { text-align: right; }

.bio p { color: var(--ink-soft); margin-bottom: 16px; max-width: 640px; }
.bio p b { color: var(--ink); }

.edu { margin: 30px 0 8px; }
.edu-item { display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.edu-item .deg-yr { font-family: var(--display); font-size: 24px; font-weight: 620; color: var(--maroon); }
.edu-item h3 { font-size: 17.5px; }
.edu-item p { color: var(--ink-faint); font-size: 14.5px; }

.person-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.person { text-align: center; padding: 28px 18px 24px; }
.person .ava {
  width: 74px; height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 620;
  color: var(--maroon-deep);
  background: linear-gradient(145deg, #f0dfc8, var(--maroon-wash));
  border: 1px solid #e2cfc4;
}
.person h3 { font-size: 17px; margin-bottom: 3px; }
.person p { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- research page ---------- */
.area-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.area { padding: 30px 28px 26px; }
.area ul { margin: 12px 0 0 2px; list-style: none; }
.area li { color: var(--ink-soft); font-size: 14.5px; padding: 5px 0 5px 20px; position: relative; }
.area li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

/* ---------- publications page ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 4px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--body); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px;
  transition: 0.2s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.search-box { flex: 1; min-width: 220px; max-width: 380px; position: relative; }
.search-box input {
  width: 100%;
  font-family: var(--body); font-size: 14.5px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px 11px 42px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(138, 42, 46, 0.12); }
.search-box svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); }
.pub-count { font-size: 13.5px; color: var(--ink-faint); margin-left: auto; white-space: nowrap; }

.pub-year {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 620;
  color: var(--maroon);
  margin: 44px 0 6px;
  display: flex; align-items: center; gap: 16px;
}
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.pub { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; padding: 20px 6px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.pub .idx { font-family: var(--display); font-size: 16px; color: var(--ink-faint); padding-top: 3px; }
.pub h3 { font-size: 17.5px; line-height: 1.35; font-weight: 600; margin-bottom: 5px; }
.pub .auth { font-size: 14.5px; color: var(--ink-soft); }
.pub .auth b { color: var(--ink); font-weight: 620; }
.pub .venue { font-size: 14.5px; color: var(--ink-faint); margin-top: 3px; }
.pub .venue em { color: var(--ink-soft); }
.pub .venue a { font-weight: 600; font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; }
.pub .tag {
  font-size: 11px; font-weight: 650;
  letter-spacing: 0.13em; text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 4px;
}
.tag-j { color: #1f5c3d; background: #e2efe4; }
.tag-c { color: #1e4a70; background: #e0ebf3; }
.tag-p { color: #6b4a12; background: #f3ead4; }

.empty-note { padding: 60px 0; text-align: center; color: var(--ink-faint); font-size: 15.5px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: start; }
.c-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.c-item { display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 20px 22px; border-top: 1px solid var(--line-soft); }
.c-item:first-child { border-top: 0; }
.c-item svg { width: 22px; height: 22px; color: var(--maroon); margin-top: 2px; }
.c-item h3 { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--body); font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.c-item p, .c-item a { font-size: 15.5px; line-height: 1.5; }
.c-item .small { font-size: 13.5px; color: var(--ink-faint); }
.map-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; filter: saturate(0.85) contrast(0.98); }
.join-note { background: var(--maroon-wash); border: 1px solid #e6ccc5; border-radius: 10px; padding: 26px 28px; margin-top: 26px; }
.join-note h3 { font-size: 20px; margin-bottom: 8px; color: var(--maroon-deep); }
.join-note p { font-size: 15px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: rgba(248, 245, 238, 0.72); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; padding: 60px 0 46px; }
.site-foot h4 { font-family: var(--display); color: var(--paper); font-size: 17px; margin-bottom: 14px; font-weight: 600; }
.site-foot p { font-size: 14.5px; line-height: 1.7; }
.site-foot ul { list-style: none; }
.site-foot li { padding: 4px 0; }
.site-foot a { color: rgba(248, 245, 238, 0.72); font-size: 14.5px; }
.site-foot a:hover { color: #f4e6c3; }
.foot-bar { border-top: 1px solid rgba(248, 245, 238, 0.12); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 13px; color: rgba(248, 245, 238, 0.45); }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.foot-brand svg { width: 34px; height: 34px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-in { grid-template-columns: 1fr; gap: 48px; padding: 64px 0; }
  .portrait { justify-self: start; }
  .pi-grid { grid-template-columns: 1fr; gap: 40px; }
  .pi-grid .portrait { max-width: 320px; }
  .contact-grid { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid rgba(248, 245, 238, 0.14); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 10px 20px 18px;
    gap: 2px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 10px; font-size: 15.5px; }
  .site-nav a::after { display: none; }
  .site-nav a.is-active { color: var(--maroon); background: var(--maroon-wash); }
  .grid-3, .area-grid, .grid-2 { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: repeat(2, 1fr); }
  .sec { padding: 60px 0; }
  .pub { grid-template-columns: 40px 1fr; }
  .pub .tag { grid-column: 2; justify-self: start; }
  .pub-count { margin-left: 0; width: 100%; }
}
