:root {
  --bg: #ffffff;
  --text: #222;
  --text-mid: #444;
  --text-light: #666;
  --text-muted: #999;
  --accent: #1557b0;
  --accent-hover: #0d3d80;
  --border: #e5e5e5;
  --sidebar-bg: #f8f8f6;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Outfit', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Top Nav ── */
/* nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
} */
 /* ── Top Nav ── */
nav {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: .75rem 2rem;
}
.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: #f0f0ec;
  border-radius: 12px;
}
.nav-links { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; }
.nav-links a {
  font-size: .84rem;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  padding-bottom: 2px;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

/* ── Two-column Home Layout ── */
.home-layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Left Sidebar ── */
/* ── Left Sidebar ── */
.sidebar {
  position: sticky;
  top: 70px;
  background: #f0f0ec;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
}
.sidebar .photo-frame {
  width: 75%;
  margin: 0 auto;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--border);
}
/* .sidebar .photo-frame {
  width: 75%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eef5, #f0eeea);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
} */
.sidebar .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar .photo-frame .initials {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent);
  opacity: .35;
}
.sidebar .photo-caption {
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .5rem;
}
.sidebar .sidebar-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
  letter-spacing: -.02em;
}
.sidebar .sidebar-title {
  font-size: .85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: .15rem;
}

/* Sidebar social icons */
.sidebar-social {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
/* 

*/
.sidebar-social a {
  display: inline-flex;
  align-items: center;
  color: var(--text-mid);
  padding: .4rem;
  transition: all .2s;
}
.sidebar-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.sidebar-social a svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Sidebar News */
/* Sidebar News */
.sidebar-news {
  margin-top: 1.5rem;
  padding: 1.25rem 1.25rem;
  background: #f0f0ec;
  border-radius: 14px;
}
.sidebar-news h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .75rem;
}
.sidebar-news-list { list-style: none; }
.sidebar-news-list li {
  padding: .4rem 0;
  font-size: .82rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.sidebar-news-list li + li { border-top: 1px solid rgba(0,0,0,.04); }
.sidebar-news-list .news-date {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: .1rem;
}
.news-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  margin-top: .4rem;
  padding: .2rem 0;
  border: none;
  background: none;
  font-family: var(--sans);
}
.news-toggle:hover { text-decoration: underline; }
.news-older { display: none; }
.news-older.open { display: block; }

/* ── Right Main Content ── */
/* ── Right Main Content ── */
.main-content {
  min-width: 0;
  background: #f0f0ec;
  border-radius: 16px;
  padding: 2rem 2rem;
}
/* .main-content {
  min-width: 0;
} */
.main-content .about-text {
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.8;
}
.main-content .about-text a { font-weight: 500; }
.main-content .about-text + .about-text { margin-top: .75rem; }

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── Section titles ── */
.section-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
  color: var(--text);
}

/* ── Publications ── */
.pub-item { padding: .75rem 0; }
.pub-item + .pub-item { border-top: 1px solid rgba(0,0,0,.04); }
.pub-item h3 { font-size: .88rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.pub-item h3 a { color: var(--text); }
.pub-item h3 a:hover { color: var(--accent); }
.pub-authors { font-size: .8rem; color: var(--text-light); margin-top: .2rem; line-height: 1.55; }
.pub-authors .me { font-weight: 600; color: var(--text); }
.pub-venue { font-size: .78rem; color: var(--text-muted); font-style: italic; margin-top: .15rem; }
.pub-links { margin-top: .35rem; display: flex; gap: .6rem; }
.pub-links a { font-size: .76rem; font-weight: 500; color: var(--accent); }

/* ── Single-column container for sub-pages ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Page Header (for sub-pages) ── */
.page-header {
  padding: 2.5rem 0 1.5rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.page-header p {
  font-size: .92rem;
  color: var(--text-light);
  margin-top: .25rem;
}

/* ── Research ── */
.research-item { padding: .75rem 0; }
.research-item + .research-item { border-top: 1px solid rgba(0,0,0,.04); }
.research-item h3 { font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.research-item .r-meta { font-size: .82rem; color: var(--text-light); margin-top: .15rem; }
.research-item p { font-size: .85rem; color: var(--text-mid); margin-top: .3rem; line-height: 1.6; }

/* ── Teaching ── */
.teach-item { padding: 1rem 0; }
.teach-item + .teach-item { border-top: 1px solid rgba(0,0,0,.04); }
.teach-item h3 { font-size: .92rem; font-weight: 600; color: var(--text); }
.teach-item .t-meta { font-size: .82rem; color: var(--text-light); margin-top: .15rem; }
.teach-item p { font-size: .85rem; color: var(--text-mid); margin-top: .3rem; line-height: 1.6; }

/* ── Projects ── */
.project-item { padding: 1rem 0; }
.project-item + .project-item { border-top: 1px solid rgba(0,0,0,.04); }
.project-item h3 { font-size: .92rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.project-item .p-tech { font-size: .76rem; color: var(--accent); margin-top: .2rem; font-weight: 500; }
.project-item p { font-size: .85rem; color: var(--text-mid); margin-top: .3rem; line-height: 1.6; }
.project-item .p-supervisor { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; font-style: italic; }

/* ── Education ── */
.edu-item { display: flex; justify-content: space-between; padding: .75rem 0; }
.edu-item + .edu-item { border-top: 1px solid rgba(0,0,0,.04); }
.edu-item h3 { font-size: .95rem; font-weight: 600; }
.edu-degree { font-size: .85rem; color: var(--text-mid); margin-top: .1rem; }
.edu-gpa { font-family: var(--mono); font-size: .82rem; color: var(--accent); white-space: nowrap; align-self: center; }

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.skill-group h3 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.skill-group p { font-size: .88rem; color: var(--text-mid); line-height: 1.6; }

/* ── Awards ── */
.award-list { list-style: none; }
.award-list li {
  padding: .45rem 0;
  font-size: .88rem;
  color: var(--text-mid);
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.award-list li + li { border-top: 1px solid rgba(0,0,0,.04); }
.award-list li::before {
  content: '\25C6';
  color: var(--accent);
  font-size: .5rem;
  flex-shrink: 0;
}

/* ── Visitor Map ── */
/* /* ── Visitor Map ── */
.visitor-map {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  text-align: center;
  width: 100%;
}

*/
.visitor-map h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: .75rem;
}

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

/* ── Home footer spans full width ── */
.home-footer {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem 0;
  }
  .sidebar {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .sidebar .photo-frame { width: 180px; }
  .sidebar-news { width: 100%; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .76rem; }
  .container { padding: 0 1.25rem; }
  .edu-item { flex-direction: column; gap: .15rem; }
}

/* ── Fade-in animation ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.sidebar { animation: fadeIn .5s ease both; }
.main-content { animation: fadeIn .5s ease both; animation-delay: .15s; }
.page-header, section { animation: fadeIn .5s ease both; }
section:nth-of-type(2) { animation-delay: .1s; }
section:nth-of-type(3) { animation-delay: .15s; }
section:nth-of-type(4) { animation-delay: .2s; }