/* ===== Design tokens ===== */
:root {
  --blue: #2c5aa0;
  --blue-2: #3d7de0;
  --blue-deep: #1e4278;
  --blue-soft: #e9f1fc;
  --coral: #ff6b6b;
  --text: #454b56;
  --heading: #232935;
  --muted: #9096a1;
  --bg: #fbfcfe;
  --surface: #ffffff;
  --soft: #f4f6fa;
  --border: #e9ecf2;
  --nav-bg: rgba(251, 252, 254, 0.82);
  --grad: linear-gradient(135deg, #3d7de0 0%, #2c5aa0 100%);
  --grad-soft: linear-gradient(135deg, #eef4fe 0%, #e6eefc 100%);
  --shadow-sm: 0 1px 3px rgba(24, 39, 75, 0.05);
  --shadow: 0 4px 18px rgba(24, 39, 75, 0.07);
  --shadow-hover: 0 12px 34px rgba(24, 39, 75, 0.13);
  --radius: 14px;
  --radius-lg: 20px;
  --max-content: 1180px;
  --sidebar-w: 300px;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 15% -8%, #eaf2ff 0%, rgba(234, 242, 255, 0) 60%),
    radial-gradient(900px 460px at 100% 0%, #f3ecff 0%, rgba(243, 236, 255, 0) 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--blue-deep); }
strong { color: var(--heading); font-weight: 600; }
img { max-width: 100%; display: block; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(24, 39, 75, 0.06);
}
.navbar-inner {
  max-width: calc(var(--max-content) + var(--sidebar-w) + 60px);
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--heading);
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(61, 125, 224, 0.15);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  opacity: .78;
  transition: opacity .18s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: width .24s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { opacity: 1; color: var(--blue); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--heading);
  cursor: pointer;
}

/* ===== Layout ===== */
.layout {
  max-width: calc(var(--max-content) + var(--sidebar-w) + 60px);
  margin: 0 auto;
  padding: 40px 28px 64px;
}

/* ===== Hero: profile + About side by side ===== */
.hero {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 48px;
  align-items: stretch;
  margin-bottom: 28px;
}
.hero .section { margin-bottom: 0; }
.hero #about { display: flex; flex-direction: column; }
.hero .about-card { flex: 1; }
.hero-right { display: flex; flex-direction: column; gap: 16px; }
.hero-right #about { flex: 1; }
#research .sb-interests { justify-content: flex-start; margin-bottom: 0; }

/* ===== Sidebar (as a floating card) ===== */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 22px 24px;
  text-align: center;
}
.avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 18px;
  display: block;
  background: var(--soft);
  border: 4px solid #fff;
  box-shadow:
    0 0 0 5px rgba(61, 125, 224, 0.12),
    0 10px 26px rgba(24, 39, 75, 0.16);
}
.sb-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 6px;
  letter-spacing: .2px;
}
.sb-title {
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 5px;
  line-height: 1.5;
}
.sb-affil { font-size: 14px; margin-bottom: 15px; color: var(--text); }
.sb-quote {
  position: relative;
  background: var(--grad-soft);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-style: italic;
  color: #566;
  margin: 0 0 15px;
  text-align: left;
  border: 1px solid rgba(61, 125, 224, 0.1);
}
.sb-location { font-size: 13px; color: var(--text); margin-bottom: 14px; }
.sb-location i { color: var(--blue); margin-right: 5px; }
.sb-email { font-size: 13px; margin-bottom: 16px; word-break: break-all; }
.sb-email a { color: var(--text); }
.sb-email a:hover { color: var(--blue); }
.sb-email i { color: var(--blue); margin-right: 6px; }

.sb-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin-bottom: 20px;
}
.tag {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(61, 125, 224, 0.14);
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.tag:hover { background: var(--grad); color: #fff; transform: translateY(-2px); }

.sb-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: 4px;
}
.sb-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--heading);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all .2s ease;
}
.sb-social a:hover {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(44, 90, 160, 0.32);
}

/* ===== Sections ===== */
.section { margin-bottom: 46px; scroll-margin-top: 82px; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  letter-spacing: .2px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
  margin-left: 4px;
}
.section-title .emoji {
  font-size: 20px;
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad-soft);
  border: 1px solid rgba(61, 125, 224, 0.12);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.about-card p { margin: 0 0 12px; }
.about-card p:last-child { margin-bottom: 0; }

/* ===== News ===== */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px 15px 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .22s ease, transform .22s ease;
}
.news-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .22s ease;
}
.news-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-item:hover::before { opacity: 1; }
.news-date {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--blue);
  font-size: 13.5px;
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}
.news-content { flex: 1; }
.news-hidden { display: none; }
.show-all-btn {
  align-self: center;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(61, 125, 224, 0.14);
  border-radius: 20px;
  padding: 7px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.show-all-btn:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-1px); }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 20px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--coral);
  font-weight: 700;
  font-size: 11px;
}

/* ===== Publications ===== */
.pub-list { display: flex; flex-direction: column; gap: 18px; }
.pub-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s ease, transform .22s ease;
}
.pub-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pub-thumb {
  width: 100%;
  height: auto;
  align-self: start;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  transition: transform .3s ease;
}
.pub-item:hover .pub-thumb { transform: scale(1.02); }
.pub-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 6px;
  line-height: 1.4;
  transition: color .18s ease;
}
.pub-item:hover .pub-title { color: var(--blue); }
.pub-authors { font-size: 13.5px; margin: 0 0 4px; }
.pub-venue { font-size: 13px; color: var(--muted); margin: 0 0 9px; }
.pub-venue b { color: var(--blue); font-weight: 600; }
.pub-abstract { font-size: 13.5px; color: #666c78; margin: 0 0 11px; }
.pub-tags { margin-bottom: 8px; }
.pub-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(255, 107, 107, 0.1);
  color: var(--coral);
  font-weight: 700;
  font-size: 11px;
  margin-right: 8px;
}
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(61, 125, 224, 0.14);
  transition: all .18s ease;
}
.pub-links a:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-1px); }

/* ===== Education / Honors ===== */
.edu-list, .honor-list, .exp-list { display: flex; flex-direction: column; gap: 12px; }
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s ease, transform .22s ease;
}
.row-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.row-main .row-title { font-weight: 600; color: var(--heading); font-size: 15.5px; }
.row-main .row-sub { font-size: 13.5px; color: var(--muted); }
.row-period {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  background: var(--blue-soft);
  padding: 3px 12px;
  border-radius: 20px;
}

/* ===== Beyond ===== */
.beyond-card { display: flex; flex-wrap: wrap; gap: 12px; }
.hobby {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 17px;
  font-size: 14px;
  font-weight: 500;
  color: var(--heading);
  transition: all .18s ease;
}
.hobby:hover { background: var(--grad); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(44, 90, 160, 0.28); }
.hobby:hover i { color: #fff; }
.hobby i { color: var(--blue); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 900px) {
  .layout {
    padding: 26px 18px 48px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 28px; opacity: 1; }
  .nav-toggle { display: block; }
  .pub-item { grid-template-columns: 1fr; }
  .pub-thumb { height: auto; }
}
