/* ============================
   RESET & BASE
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:    #00369f;
  --accent-lt: #e8eef9;
  --text:      #2a2a2a;
  --muted:     #6c757d;
  --border:    #dee2e6;
  --bg:        #fff;
  --sidebar-w: 260px;
  --nav-h:     52px;
  --font:      "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  --radius:    4px;
  --trans:     .2s ease-in-out;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  background: linear-gradient(135deg, #e0eaff, #f0e6ff, #dff5f0, #e8f4ff, #fde8ff);
  background-size: 400% 400%;
  animation: gradientFlow 12s ease infinite;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--trans); }
a:hover { color: #001f5e; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: disc; padding-left: 1.4em; }
li { margin-bottom: .3em; }

/* ============================
   TOP NAV
   ============================ */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: none;
  display: flex; align-items: center;
}
.nav-inner {
  max-width: 100%; margin: 0 auto; padding: 0 12%;
  width: 100%; display: flex; align-items: center; gap: 2rem;
}
.nav-brand { font-weight: 700; font-size: 1rem; color: var(--text); white-space: nowrap; }
.nav-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.nav-links a { font-size: .88rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ============================
   LAYOUT
   ============================ */
.page-wrapper {
  max-width: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 2rem;
  padding: 2rem 12% 5rem;
  align-items: start;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  text-align: center;
}
.avatar-wrap { margin-bottom: 1rem; }
.avatar-wrap img {
  width: 140px; height: 140px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 16px rgba(0,54,159,0.15);
  margin: 0 auto;
}
.sidebar-name  { font-size: 1.15rem; font-weight: 700; margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .05em; }
.sidebar-title { font-size: .82rem; color: var(--muted); margin-bottom: .1rem; }
.sidebar-org   { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }
.sidebar-bio   { font-size: .82rem; text-align: left; color: #555; margin-bottom: 1rem;
                 border-top: 1px solid rgba(0,0,0,0.08); padding-top: .75rem; }
.sidebar-meta  { font-size: .8rem; color: var(--muted); text-align: left; margin-bottom: 1rem; }
.sidebar-meta span { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.social-links  { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: .5rem; }
.social-links a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,54,159,0.08); color: var(--accent);
  font-size: .82rem; transition: background var(--trans), color var(--trans);
}
.social-links a:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ============================
   MAIN CONTENT — no cards
   ============================ */
.main-content {
  min-width: 0;
  padding: 2rem 1rem;
  background: transparent !important;
}

.section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Sections — no borders, just spacing */
.section { margin-bottom: 3.5rem; }
.section:last-child { margin-bottom: 0; }
.section + .section { margin-top: 1rem; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid rgba(0, 54, 159, 0.25);
}
.section-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.section-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .75rem; color: var(--muted); cursor: pointer; padding: .15rem .5rem;
  transition: all var(--trans);
}
.section-toggle:hover { background: var(--accent-lt); color: var(--accent); border-color: var(--accent); }
.section-body.collapsed { display: none; }
.section-body { padding-bottom: 1rem; }

/* ============================
   PAPER BOX
   ============================ */
.paper-box {
  display: flex; gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
.paper-box:last-child { border-bottom: none; padding-bottom: 0; }
.paper-thumb {
  flex: 0 0 180px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #f5f5f5;
  display: flex; align-items: center; justify-content: center; min-height: 110px;
}
.paper-thumb img { width: 180px; height: 120px; object-fit: cover; }
.paper-thumb-placeholder {
  width: 180px; height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: .75rem; gap: .4rem;
}
.paper-thumb-placeholder svg { opacity: .35; }
.paper-info { flex: 1; min-width: 0; }
.paper-title { font-size: .98rem; font-weight: 700; margin-bottom: .3rem; }
.paper-authors { font-size: .84rem; color: var(--muted); margin-bottom: .2rem; }
.paper-authors strong { color: var(--text); }
.paper-venue { font-size: .81rem; color: var(--muted); font-style: italic; margin-bottom: .45rem; }
.paper-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.badge {
  display: inline-block; padding: .12em .5em;
  font-size: .7rem; font-weight: 700; border-radius: 3px;
  background: var(--accent); color: #fff; white-space: nowrap;
}
.badge.oral   { background: #c0392b; }
.badge.poster { background: #27ae60; }
.badge.survey { background: #8e44ad; }
.paper-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.paper-links a {
  font-size: .76rem; font-weight: 600; padding: .18rem .55rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  color: var(--accent); transition: all var(--trans);
}
.paper-links a:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ============================
   TIMELINE (Education)
   ============================ */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 1.2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.5rem; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-year   { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: .1rem; }
.timeline-degree { font-size: .95rem; font-weight: 700; }
.timeline-school { font-size: .84rem; color: var(--muted); }

/* ============================
   SERVICE / TEACHING rows
   ============================ */
.service-list { padding-left: 0; list-style: none; }
.service-list li {
  padding: .4rem 0; border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: .9rem; display: flex; align-items: baseline; gap: .5rem;
}
.service-list li:last-child { border-bottom: none; }
.service-tag {
  flex: 0 0 auto; font-size: .7rem; font-weight: 700; color: var(--muted);
  background: rgba(0,0,0,0.05); border-radius: 3px; padding: .1em .4em; white-space: nowrap;
}

/* ============================
   AWARDS
   ============================ */
.award-item { padding: .45rem 0; border-bottom: 1px solid rgba(0,0,0,0.07); font-size: .9rem; }
.award-item:last-child { border-bottom: none; }
.award-year { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .page-wrapper { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 1rem 3rem; }
  .sidebar { position: static; }
  .main-content { padding: 1.5rem; }
  .paper-box { flex-direction: column; }
  .paper-thumb, .paper-thumb-placeholder, .paper-thumb img { width: 100%; flex: unset; }
  .nav-links { gap: .8rem; }
}
