/* Two-pane academic layout: dark fixed sidebar + horizontally arranged,
   independently scrolling section columns (collapses to one column on mobile). */
:root {
  --sidebar-w: 240px;
  --col-w: 560px;
  --side-bg: #2b303b;
  --side-fg: #788195;
  --side-hi: #ffffff;
  --text: #404040;
  --head: #333333;
  --navy: #1b4682;
  --link: #1a365e;
  --link-line: rgba(128, 0, 0, 0.3);
  --rule: #e8e8e8;
  --soft: #f6f7f9;
  --ecg: #c0392b;
  --ppg: #16876a;
  --llm: #5b4fc4;
  --dx: #1b4682;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Open Sans", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}
h1, h2, h3, h4 { font-family: Lato, -apple-system, system-ui, sans-serif; color: var(--head); }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { color: #800000; text-decoration-color: currentColor; }
img { max-width: 100%; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--side-bg); color: var(--side-fg);
  display: flex; flex-direction: column; z-index: 20;
}
.sidebar-top { text-align: center; padding: 36px 20px 8px; }
.avatar { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; object-position: top;
  border: 3px solid rgba(255,255,255,.15); display: block; margin: 0 auto; }
.name { color: #fff; font-weight: 300; font-size: 26px; margin: 18px 0 4px; letter-spacing: .5px; }
.tagline { font-size: 13px; line-height: 1.5; margin: 0; color: #9aa3b5; }
.menu-label { text-align: center; letter-spacing: 3px; text-transform: uppercase; font-size: 15px;
  margin: 30px 0 14px; font-family: Lato, sans-serif; color: #8d96a8; }
.menu { border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 22px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--side-fg); text-decoration: none; border-left: 2px solid transparent;
}
.menu a i { width: 16px; text-align: center; }
.menu a:hover { color: #cfd5e0; }
.menu a.active { color: var(--side-hi); border-left-color: var(--side-hi); background: rgba(255,255,255,.04); }
.social { margin-top: auto; display: flex; justify-content: center; gap: 8px; padding: 18px 10px;
  border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.08); }
.social a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px;
  background: rgba(255,255,255,.06); color: var(--side-fg); text-decoration: none; font-size: 13px; }
.social a:hover { color: #fff; background: rgba(255,255,255,.14); }
.menu-toggle { display: none; }

/* ---------- Section track ---------- */
.track {
  margin-left: var(--sidebar-w); height: 100vh;
  display: flex; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
}
.section {
  flex: 0 0 var(--col-w); height: 100vh; overflow-y: auto; scroll-behavior: smooth;
  border-right: 1px solid var(--rule);
}
.track.single .section { flex: 1 1 auto; max-width: 900px; }
.section-inner { padding: 36px 28px 60px; }
.section-num { font-family: Lato, sans-serif; color: var(--navy); font-size: 13px; margin: 0; letter-spacing: 1px; }
.section-title { font-size: 30px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 28px; line-height: 1.4; }
.section-title::after { content: ""; display: block; width: 44px; height: 3px; background: var(--navy); margin-top: 6px; }
.sub-title { font-size: 21px; text-transform: uppercase; letter-spacing: .3px; margin: 36px 0 12px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; }
.about-photo { width: 150px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.about-text p { margin: 0 0 12px; font-size: 15px; }
.about-links { text-align: center; font-weight: 600; font-size: 14px !important; margin-top: 8px !important; }
.about-links a { color: #333; text-decoration-color: rgba(0,0,0,.35); }
.dot { display: inline-block; width: 10px; height: 10px; border: 1.5px solid #333; border-radius: 50%; margin: 0 8px; vertical-align: -1px; }

.overview { margin: 30px 0 10px; }
.overview figcaption { text-align: center; font-style: italic; font-size: 13px; color: #777; margin-top: 8px; }
.pipeline { display: grid; grid-template-columns: 1fr 14px 1fr 14px 1fr 14px 1fr; align-items: stretch; gap: 4px;
  padding: 16px 12px; background: var(--soft); border-radius: 10px; position: relative; overflow: hidden; }
.pipeline::before { /* faint ECG trace behind the stages */
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cpath d='M0 36h50l5-5 5 5h10l4 8 6-34 6 40 4-14h22l10-7 10 7h23' fill='none' stroke='%23c0392b' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x center / 160px 60px;
}
.stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; padding: 10px 4px; border-radius: 8px; background: #fff; border: 1px solid var(--rule);
  transition: transform .15s, box-shadow .15s; }
.stage:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.stage i { font-size: 20px; margin-bottom: 6px; }
.stage b { font-size: 12.5px; line-height: 1.3; color: #333; }
.stage small { font-size: 10.5px; line-height: 1.35; color: #888; margin-top: 3px; }
.s-signal i { color: var(--ecg); } .s-evidence i { color: var(--ppg); }
.s-reason i { color: var(--llm); } .s-dx i { color: var(--dx); }
.arrow { display: grid; place-items: center; color: #bbb; font-size: 11px; position: relative; }

.callout { margin: 26px 0 0; padding: 16px 20px; background: #fdf0ee; border-left: 4px solid var(--navy);
  border-radius: 0 8px 8px 0; font-size: 15px; }
.callout b { color: var(--navy); }

.news { list-style: none; padding: 0; margin: 0; }
.news li { padding: 12px 0 12px 16px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.news-date { font-weight: 600; color: #333; margin-right: 4px; }

/* ---------- Research ---------- */
.banner-btn { display: block; background: var(--navy); color: #fff !important; text-decoration: none;
  font-family: Lato, sans-serif; font-weight: 700; padding: 16px 22px; border-radius: 6px; }
.banner-btn:hover { background: #163a6d; }
.banner-btn i { font-size: 12px; margin-left: 6px; }
.themes-head { font-size: 22px; margin: 30px 0 8px; }
.theme-index { list-style: none; padding: 0 0 0 24px; margin: 0 0 10px; }
.theme-index li { margin: 10px 0; font-weight: 600; font-family: Lato, sans-serif; }
.theme-index li::before { content: ""; display: inline-block; width: 9px; height: 9px; border: 1.5px solid #333; border-radius: 50%; margin-right: 10px; }
.theme-index a { color: var(--navy); }

.theme { margin-top: 38px; scroll-margin-top: 20px; }
.theme-title { font-size: 20px; margin: 0 0 4px; line-height: 1.35; }
.theme-blurb { font-size: 14px; color: #666; margin: 0 0 14px; }

.carousel { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.card { display: flex; flex-direction: column; flex: 0 0 100%; scroll-snap-align: start; border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 16px; background: #fff; }
.card-img { display: block; aspect-ratio: 2 / 1; margin: -4px -6px 12px; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid #f0f0f0; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.card-img:hover img { transform: scale(1.03); }
.venue { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; color: var(--navy);
  background: #e9eef6; border-radius: 3px; padding: 1px 8px; margin-bottom: 6px; }
.card-title { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.45; color: #222; text-decoration: none; }
.card-title:hover { color: var(--navy); }
.card-authors { font-size: 13px; color: #666; margin: 6px 0 4px; line-height: 1.5; }
.card-authors b { color: #222; }
.card-links { margin: auto 0 0; font-size: 13px; }
.card-links a { margin-right: 4px; }
.nav-arrows { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; }
.nav-arrows button { width: 34px; height: 34px; border: 0; border-radius: 4px; cursor: pointer; background: #222; color: #fff; }
.nav-arrows button:disabled { background: #ddd; color: #fff; cursor: default; }
.counter { font-size: 12px; color: #999; margin-right: 4px; }
.note { font-size: 12.5px; color: #888; margin-top: 30px; }

/* ---------- Experience ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.55; }
.when { font-size: 13px; font-weight: 600; color: var(--navy); padding-top: 2px; }
.timeline small { color: #777; }

/* ---------- Single-page prose (CV) ---------- */
.prose h1 { font-size: 22px; text-transform: uppercase; margin: 34px 0 10px; }
.prose h3 { font-size: 17px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; font-size: 15px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  body.menu-open .sidebar { transform: none; box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  .menu-toggle { display: grid; place-items: center; position: fixed; top: 12px; right: 12px; z-index: 30;
    width: 44px; height: 44px; border: 0; border-radius: 6px; background: var(--side-bg); color: #fff; font-size: 18px; }
  .track { margin-left: 0; height: auto; display: block; overflow: visible; }
  .section { height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--rule); }
  .section-inner { padding: 28px 16px 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: 140px; margin: 0 auto; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline .arrow { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .section, .slides { scroll-behavior: auto; }
  .stage, .card-img img { transition: none; }
}
