/* ==========================================================
   Academic site — edit colors here
   ========================================================== */
:root {
  --accent: #0b3d91;          /* MBZUAI-style navy blue (links, buttons) */
  --gold: #f2b705;            /* MBZUAI-style yellow (highlights, badges) */
  --navy: #0a1f44;            /* deep navy for headings */
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --text: #1b2333;
  --muted: #5f6b80;
  --border: #e3e8f0;
  --max: 860px;
}
:root[data-theme="dark"] {
  --accent: #8db4ff;
  --gold: #f5c542;
  --navy: #ffffff;
  --bg: #0d1424;
  --bg-soft: #151f36;
  --text: #e6eaf2;
  --muted: #9aa5bb;
  --border: #253250;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  border-top: 4px solid var(--gold);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { color: var(--text); font-weight: 400; font-size: 1.05rem; }
.brand b { font-weight: 700; color: var(--navy); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); text-decoration: none; }
.nav-links a.active { font-weight: 600; box-shadow: inset 0 -3px 0 var(--gold); }
.icon-btn {
  background: none; border: 0; cursor: pointer; color: var(--text);
  padding: 6px; display: inline-flex; border-radius: 6px;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

@media (max-width: 680px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px 16px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Page header ---------- */
main { padding: 48px 0 32px; }
.page-title { font-size: 2.4rem; font-weight: 300; margin: 0 0 4px; letter-spacing: -.01em; }
.page-title b { font-weight: 700; color: var(--navy); }
.page-desc { color: var(--muted); margin: 0 0 32px; }
h2 {
  font-size: 1.35rem; font-weight: 600; margin: 48px 0 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  color: var(--navy); position: relative;
}
h2::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 44px; height: 3px; background: var(--gold); border-radius: 2px;
}

/* ---------- About ---------- */
.about { display: flex; gap: 36px; align-items: flex-start; }
.about-text { flex: 1; min-width: 0; }
.about-text p { margin: 0 0 1em; }
.profile { width: 260px; flex-shrink: 0; text-align: center; }
.profile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 53% top; border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.profile .affil { font-size: .88rem; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.socials a { color: var(--muted); display: inline-flex; }
.socials a:hover { color: var(--accent); }
.socials svg { width: 22px; height: 22px; }
.callout {
  background: var(--bg-soft); border-left: 4px solid var(--gold);
  padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: .95rem;
}
@media (max-width: 680px) {
  .about { flex-direction: column-reverse; align-items: center; }
  .profile { width: 180px; }
  .page-title { font-size: 2rem; }
}

/* ---------- Interests ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 0; }
.tags li {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--gold);
  border-radius: 999px; padding: 3px 12px; font-size: .88rem;
}

/* ---------- News ---------- */
.news { width: 100%; border-collapse: collapse; }
.news td { padding: 8px 0; vertical-align: top; border-bottom: 1px solid var(--border); }
.news tr:last-child td { border-bottom: 0; }
.news td.date { width: 92px; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; padding-top: 10px; }
.news-scroll { max-height: 340px; overflow-y: auto; padding-right: 6px; }

/* ---------- Publications ---------- */
.year { font-size: 1.1rem; color: var(--muted); font-weight: 600; margin: 32px 0 8px; }
.pub { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pub:last-child { border-bottom: 0; }
.badge {
  flex-shrink: 0; width: 96px; height: fit-content; text-align: center;
  background: var(--gold); color: #0a1f44; font-size: .72rem; font-weight: 700;
  padding: 4px 6px; border-radius: 4px; margin-top: 4px;
}
.pub-body { flex: 1; min-width: 0; }
.pub-title { font-weight: 600; line-height: 1.45; }
.pub-authors, .pub-venue { font-size: .92rem; }
.pub-authors .me { font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pub-venue { color: var(--muted); font-style: italic; }
.pub-links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.pub-links a, .pub-links button {
  font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--accent); background: transparent;
  border: 1px solid var(--accent); border-radius: 4px; padding: 1px 9px; cursor: pointer;
}
.pub-links a:hover, .pub-links button:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.pub-extra { display: none; margin-top: 10px; font-size: .9rem; }
.pub-extra.open { display: block; }
.pub-extra pre {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px; overflow-x: auto; font-size: .8rem; line-height: 1.5; margin: 0;
}
@media (max-width: 680px) {
  .pub { flex-direction: column; gap: 6px; }
}

/* ---------- Teaching / generic lists ---------- */
.entry { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.entry .what b { display: block; }
.entry .what span { color: var(--muted); font-size: .92rem; }
.entry .when { color: var(--muted); font-size: .9rem; white-space: nowrap; }
@media (max-width: 680px) { .entry { flex-direction: column; gap: 0; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: .85rem; text-align: center; }

/* ---------- Research interests (grouped cards) ---------- */
.interests { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.interest-card {
  background: var(--bg-soft); border: 1px solid var(--border); border-top: 3px solid var(--gold);
  border-radius: 10px; padding: 16px 18px;
}
.interest-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-weight: 700; color: var(--navy); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
}
.interest-icon {
  display: inline-flex; width: 30px; height: 30px; border-radius: 8px; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
}
:root[data-theme="dark"] .interest-icon { color: #0d1424; }
.interest-icon svg { width: 16px; height: 16px; }
.interest-card ul { list-style: none; margin: 0; padding: 0; }
.interest-card li { position: relative; padding: 4px 0 4px 18px; font-size: .95rem; line-height: 1.5; }
.interest-card li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}

/* ---------- News sub-lists ---------- */
.news-list { margin: 6px 0 2px; padding-left: 0; list-style: none; }
.news-list li { position: relative; padding: 3px 0 3px 18px; font-size: .94rem; line-height: 1.55; }
.news-list li::before {
  content: ""; position: absolute; left: 2px; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.news-scroll { max-height: none; }
