/* ==========================================================================
   Mohammad Rezoanul Hoque — personal academic site
   Design system: Playfair Display (display) + Inter (body)
   Brand: LSU purple #461D7C · gold #FDD023 · light default, dark toggle
   ========================================================================== */

:root {
  --bg: #faf9fb;
  --bg-alt: #f3f0f8;
  --card: #ffffff;
  --ink: #201a2e;
  --ink-2: #4c4560;
  --ink-3: #857e96;
  --accent: #461d7c;
  --accent-strong: #35155e;
  --accent-soft: rgba(70, 29, 124, 0.08);
  --accent-border: rgba(70, 29, 124, 0.18);
  --gold: #fdd023;
  --gold-ink: #7a5e00;
  --gold-soft: rgba(253, 208, 35, 0.18);
  --border: rgba(32, 26, 46, 0.1);
  --shadow: 0 6px 28px rgba(32, 26, 46, 0.09);
  --shadow-lg: 0 16px 48px rgba(32, 26, 46, 0.14);
  --nav-bg: rgba(250, 249, 251, 0.88);
  --ok: #1e7d4f;
  --ok-soft: rgba(30, 125, 79, 0.1);
  --info: #1d5fa8;
  --info-soft: rgba(29, 95, 168, 0.1);
  --warn-ink: #8a5a00;
  --warn-soft: rgba(216, 148, 0, 0.13);
}

[data-theme="dark"] {
  --bg: #14101c;
  --bg-alt: #191322;
  --card: #201a2e;
  --ink: #ede9f5;
  --ink-2: #b7b0c8;
  --ink-3: #837c95;
  --accent: #b99ce8;
  --accent-strong: #d0bdf1;
  --accent-soft: rgba(185, 156, 232, 0.12);
  --accent-border: rgba(185, 156, 232, 0.28);
  --gold: #fdd023;
  --gold-ink: #f3ca4a;
  --gold-soft: rgba(253, 208, 35, 0.14);
  --border: rgba(237, 233, 245, 0.1);
  --shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(20, 16, 28, 0.88);
  --ok: #5fc78f;
  --ok-soft: rgba(95, 199, 143, 0.13);
  --info: #77aede;
  --info-soft: rgba(119, 174, 222, 0.13);
  --warn-ink: #eab84f;
  --warn-soft: rgba(234, 184, 79, 0.13);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  transition: background 0.35s, color 0.35s;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, .display { font-family: "Playfair Display", Georgia, serif; }

img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Navigation ---------- */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.7rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand {
  font-family: "Playfair Display", serif;
  font-weight: 700; font-size: 1.12rem; color: var(--ink);
  display: flex; align-items: center; gap: 0.55rem; white-space: nowrap;
}
.brand:hover { color: var(--accent); }
.brand .fleur { color: var(--gold-ink); font-size: 1rem; }

.nav-right { display: flex; align-items: center; gap: 0.4rem; }

.nav-links { display: flex; align-items: center; gap: 0.15rem; }
.nav-links a {
  color: var(--ink-2); font-size: 0.9rem; font-weight: 500;
  padding: 0.38rem 0.75rem; border-radius: 8px;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.theme-toggle, .nav-burger {
  background: none; border: none; cursor: pointer;
  color: var(--ink-3); font-size: 1.05rem; padding: 0.42rem 0.55rem; border-radius: 8px;
}
.theme-toggle:hover, .nav-burger:hover { color: var(--accent); background: var(--accent-soft); }
.nav-burger { display: none; }

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: var(--nav-bg); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.2rem 1.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.8rem; }
}

main { max-width: 1080px; margin: 0 auto; padding: 5.6rem 1.5rem 3.5rem; }

/* ---------- Page headers ---------- */
.page-head { padding: 2.2rem 0 1rem; }
.page-head h1 { font-size: 2.3rem; font-weight: 700; line-height: 1.15; }
.page-head p.lede { color: var(--ink-2); max-width: 46rem; margin-top: 0.7rem; font-size: 1.02rem; }
.eyebrow {
  display: inline-block; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.6rem;
}

section { padding: 2.4rem 0; }
section + section { border-top: 1px solid var(--border); }
section h2 { font-size: 1.7rem; font-weight: 600; margin-bottom: 1.5rem; }
.section-note { color: var(--ink-3); font-size: 0.9rem; margin-top: -1.1rem; margin-bottom: 1.4rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem; align-items: center; padding: 2.6rem 0 2.8rem;
}

.hero h1 { font-size: 2.9rem; font-weight: 700; line-height: 1.12; margin: 0.4rem 0 0.9rem; }

.hero .role { font-size: 1.08rem; font-weight: 600; color: var(--accent); }

.affil {
  display: flex; align-items: center; gap: 0.7rem; margin: 0.9rem 0 1.1rem; flex-wrap: wrap;
}
.affil-logo {
  display: block; width: 178px; aspect-ratio: 4 / 1; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(70, 29, 124, 0.25);
}
.affil-logo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.affil .affil-text { font-size: 0.92rem; color: var(--ink-2); }

.hero-bio { color: var(--ink-2); font-size: 1.02rem; max-width: 34rem; margin-bottom: 1.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  padding: 0.28rem 0.8rem; border-radius: 999px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.3rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.92rem; font-weight: 600; padding: 0.6rem 1.25rem; border-radius: 10px;
  border: 1px solid transparent; transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
[data-theme="dark"] .btn-primary { color: #14101c; }
.btn-outline { border-color: var(--accent-border); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-strong); }

.hero-contact { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.88rem; color: var(--ink-3); }
.hero-contact span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-contact a { color: var(--ink-3); }
.hero-contact a:hover { color: var(--accent); }

.portrait { justify-self: end; width: 100%; max-width: 360px; }
.portrait-frame { position: relative; }
.portrait-frame::before {
  content: ""; position: absolute; inset: -14px -14px 14px 14px;
  border-radius: 24px; z-index: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #6b3fa0 55%, var(--gold) 100%);
  opacity: 0.85;
}
.portrait img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 4.6;
  object-fit: cover; border-radius: 20px; display: block;
  box-shadow: var(--shadow-lg); background: var(--card);
}
.portrait figcaption {
  text-align: center;
  margin-top: 1.5rem; font-size: 0.85rem; color: var(--ink-3);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; text-align: center; padding-top: 1.6rem; }
  .hero h1 { font-size: 2.3rem; }
  .portrait { order: -1; margin: 0 auto; max-width: 280px; }
  .portrait::before { inset: -10px -10px 10px 10px; }
  .hero-bio { margin-left: auto; margin-right: auto; }
  .chips, .btn-row, .hero-contact, .affil { justify-content: center; }
}

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.15rem 1.3rem;
}
.stat .value {
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 1.9rem;
  font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.2;
}
.stat .label { font-size: 0.84rem; color: var(--ink-2); margin-top: 0.15rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums; padding-top: 0.12rem; white-space: nowrap;
}
.news-body { color: var(--ink-2); font-size: 0.95rem; }
.news-body strong { color: var(--ink); }
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: 0.15rem; } }

/* ---------- Card grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 1.5rem; transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.15rem;
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.35; }
.card p { font-size: 0.92rem; color: var(--ink-2); }
.card .card-links { margin-top: auto; padding-top: 0.9rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.22rem 0.6rem; border-radius: 6px; width: fit-content;
}
.badge-rr { background: var(--warn-soft); color: var(--warn-ink); }
.badge-review { background: var(--accent-soft); color: var(--accent); }
.badge-pub { background: var(--ok-soft); color: var(--ok); }
.badge-wp { background: var(--info-soft); color: var(--info); }
.badge-gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge-progress { background: var(--info-soft); color: var(--info); }

/* ---------- Publication cards ---------- */
.pub-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.3rem 1.4rem; margin-bottom: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pub-title { font-weight: 600; font-size: 1.04rem; line-height: 1.4; color: var(--ink); }
.pub-authors { font-size: 0.88rem; color: var(--ink-2); }
.pub-venue { font-size: 0.85rem; color: var(--ink-3); font-style: italic; }
.pub-desc { font-size: 0.9rem; color: var(--ink-2); margin-top: 0.25rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.pub-links a {
  font-size: 0.74rem; font-weight: 600; padding: 0.28rem 0.7rem;
  border: 1px solid var(--accent-border); border-radius: 6px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.pub-links a:hover { background: var(--accent-soft); }

.pub-feature {
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-soft), var(--card) 45%);
}

/* ---------- Flagship project ---------- */
.flagship {
  border: 1px solid var(--accent-border); border-radius: 22px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.flagship-top {
  background: linear-gradient(120deg, #35155e, #461d7c 55%, #6b3fa0);
  color: #f4effc; padding: 2rem 2.2rem;
}
.flagship-top .badge-gold { background: rgba(253, 208, 35, 0.2); color: var(--gold); }
.flagship-top h3 { font-family: "Playfair Display", serif; font-size: 1.8rem; margin: 0.7rem 0 0.4rem; color: #ffffff; }
.flagship-top .tagline { color: #d9cdEE; font-size: 1rem; max-width: 40rem; }
.flagship-body { padding: 1.7rem 2.2rem 2rem; }
.flagship-body p { color: var(--ink-2); font-size: 0.97rem; max-width: 52rem; }
.flagship-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.4rem; }
.flagship-point { font-size: 0.86rem; color: var(--ink-2); display: flex; gap: 0.6rem; align-items: flex-start; }
.flagship-point i { color: var(--accent); margin-top: 0.25rem; }
@media (max-width: 860px) { .flagship-points { grid-template-columns: 1fr 1fr; } .flagship-top, .flagship-body { padding-left: 1.4rem; padding-right: 1.4rem; } }
@media (max-width: 560px) { .flagship-points { grid-template-columns: 1fr; } }

/* ---------- Teaching ---------- */
.course-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.course-card .meta { font-size: 0.86rem; color: var(--ink-3); }
.course-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.course-head h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.eval {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.86rem;
  background: var(--ok-soft); color: var(--ok);
  padding: 0.25rem 0.65rem; border-radius: 8px; white-space: nowrap;
}

/* ---------- Timeline / list rows ---------- */
.row-item { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.row-item:last-child { border-bottom: none; }
.row-item .row-title { font-weight: 600; }
.row-item .row-sub { color: var(--accent); font-size: 0.9rem; }
.row-item .row-note { color: var(--ink-3); font-size: 0.88rem; }

/* ---------- Resources ---------- */
.link-list { list-style: none; }
.link-list li { padding: 0.4rem 0; font-size: 0.93rem; }
.link-list li i { width: 1.4rem; color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { text-align: center; align-items: center; }
.contact-card .icon { margin: 0 auto 1rem; }
.contact-card a.main-link { font-weight: 600; font-size: 0.97rem; word-break: break-word; }

.cta-band {
  margin-top: 2.5rem; border-radius: 22px; padding: 2.4rem 2rem; text-align: center;
  background: linear-gradient(120deg, #35155e, #461d7c 55%, #6b3fa0); color: #f4effc;
}
.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { color: #d9cdee; margin-bottom: 1.4rem; }
.cta-band .btn-primary { background: var(--gold); color: #35155e; }
.cta-band .btn-primary:hover { background: #ffe067; color: #35155e; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 2.2rem 1.5rem; text-align: center; }
.footer-social { display: flex; justify-content: center; gap: 1.3rem; margin-bottom: 0.9rem; }
.footer-social a { color: var(--ink-3); font-size: 1.25rem; }
.footer-social a:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--ink-3); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .pub-card:hover, .btn-primary:hover { transform: none; }
}
