:root {
  --accent: #2557a7;
  --accent-dark: #163d75;
  --text: #1d2530;
  --text-muted: #5b6472;
  --border: #e4e8ee;
  --bg: #fbfbfd;
  --card-bg: #ffffff;
  --sidebar-w: 270px;
  --topnav-h: 60px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  padding-top: var(--topnav-h);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- Top Nav ---------------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: rgba(251, 251, 253, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.topnav__inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topnav__brand {
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.topnav__brand:hover { text-decoration: none; color: var(--accent); }
.topnav__links {
  display: flex;
  gap: 24px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.topnav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 800px) {
  .topnav__toggle { display: block; }
  .topnav__links {
    position: fixed;
    top: var(--topnav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .topnav__links.open { display: flex; }
  .nav-link { padding: 10px 0; border-bottom: 1px solid var(--border); }
}

/* ---------------- Layout ---------------- */
.layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: calc(var(--topnav-h) + 32px);
}

.content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; flex: none; width: 100%; }
}

/* ---------------- Profile Card ---------------- */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}

.avatar {
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: linear-gradient(135deg, var(--accent), #6da3e8);
  color: #fff;
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.profile-name {
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  font-size: 1.35rem;
  margin: 0 0 2px;
}
.profile-alt-name {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.profile-role {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-links {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.87rem;
}
.profile-links li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
}
.profile-links li > i {
  width: 16px;
  margin-top: 2px;
  color: var(--accent);
  text-align: center;
  flex-shrink: 0;
}
.profile-links a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
  min-width: 0;
}
.profile-links a i {
  width: 16px;
  margin-top: 2px;
  color: var(--accent);
  text-align: center;
  flex-shrink: 0;
}
.profile-links a span { word-break: break-word; min-width: 0; }
.profile-links a:hover { color: var(--accent); }

/* ---------------- Sections ---------------- */
.section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--topnav-h) + 16px);
}

.section__title {
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section__emoji { margin-right: 6px; }

.section__subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent-dark);
}

.section p { margin: 0 0 14px; color: var(--text); }
.section .note { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }

.section p.highlight-note { font-weight: 700; color: #c0392b; }

/* ---------------- News ---------------- */
.news-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-height: 380px;
  overflow-y: auto;
}
.news-box ul { margin: 0; padding-left: 18px; }
.news-box li { margin-bottom: 10px; font-size: 0.93rem; }
.news-date { color: var(--accent); font-weight: 600; margin-right: 4px; }

/* ---------------- Publications ---------------- */
.paper-box {
  display: flex;
  gap: 20px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.paper-box:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.paper-box__image {
  flex: 0 1 50%;
  max-width: 300px;
  min-width: 180px;
  height: 160px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 3px 3px 6px #888;
  background: #fff;
  border: 1px solid var(--border);
}
.paper-box__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
  display: block;
}
.paper-box__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.paper-box__badge {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(2px);
}

.paper-box__tag {
  background: #fdecea;
  color: #e0433d;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  border: 1px solid #f5b7b1;
}

.paper-box__text { flex: 1; min-width: 0; }
.paper-box__title { font-weight: 700; font-size: 1.02rem; margin: 0 0 6px; }
.paper-box__title a { color: var(--text); }
.paper-box__title a:hover { color: var(--accent); }
.paper-box__links { margin: 0 0 8px; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-muted); }
.paper-box__links .paper-box__tag { margin-left: 4px; }
.paper-box__authors { margin: 0 0 10px; font-size: 0.88rem; color: var(--text-muted); }
.paper-box__text ul { margin: 0; padding-left: 20px; }
.paper-box__text li { margin-bottom: 6px; font-size: 0.9rem; }

.badge-iclr { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.badge-acl { background: linear-gradient(135deg, #d97706, #fbbf24); }
.badge-emnlp { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.badge-cvpr { background: linear-gradient(135deg, #dc2626, #f87171); }
.badge-neurips { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.badge-icml { background: linear-gradient(135deg, #16a34a, #4ade80); }
.badge-interspeech { background: linear-gradient(135deg, #db2777, #f472b6); }
.badge-review { background: linear-gradient(135deg, #6b7280, #9ca3af); }

@media (max-width: 640px) {
  .paper-box { flex-direction: column; }
  .paper-box__image { width: 100%; max-width: 100%; min-width: 0; height: 180px; }
}

/* ---------------- Timeline (Experience / Education) ---------------- */
.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  margin-bottom: 26px;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.timeline-item__title-group { flex: 1; min-width: 0; }
.timeline-item__title { font-weight: 700; font-size: 1rem; }
.timeline-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}
.timeline-item__date { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.timeline-item__location { font-size: 0.92rem; color: var(--text-muted); white-space: nowrap; margin-top: 2px; }
.timeline-item__sub { font-style: italic; color: var(--text-muted); font-size: 0.9rem; margin: 2px 0 8px; }
.timeline-item ul { margin: 0; padding-left: 20px; }
.timeline-item li { margin-bottom: 6px; font-size: 0.92rem; }

/* ---------------- Plain lists ---------------- */
.plain-list { padding-left: 20px; margin: 0 0 8px; }
.plain-list li { margin-bottom: 6px; font-size: 0.93rem; }

/* ---------------- Footer ---------------- */
.footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
