:root {
  --bg: #fafafa;
  --sidebar-bg: #fff;
  --text: #222;
  --text-muted: #555;
  --accent: #333;
  --border: #e0e0e0;
  --paper-thumb: #e8e8e8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Lato', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ----- Layout ----- */
.page {
  display: flex;
  min-height: 100vh;
}

/* ----- Sidebar ----- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar .name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}
.sidebar .title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0 1.25rem 0;
}
.sidebar .affiliation {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  transition: color 0.15s;
}
.sidebar nav a:hover {
  color: var(--text-muted);
}

/* ----- Hamburger (mobile) ----- */
.hamburger {
  display: none;
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  width: 2rem;
  height: 1.5rem;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 101;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(0.4rem) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ----- Main content ----- */
.main {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 3rem 4rem;
  max-width: 900px;
}

section {
  margin-bottom: 3.5rem;
}
section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

/* ----- Intro / Bio ----- */
.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
.intro .profile-img {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--paper-thumb);
}
.intro .bio {
  flex: 1;
}
.intro .bio p {
  margin: 0 0 1rem 0;
  color: var(--text);
}
.intro .contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.intro .contact a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.intro .contact a i {
  font-size: 1.1rem;
  width: 1.1rem;
  text-align: center;
}
.intro .contact a:hover {
  color: var(--text);
}

/* ----- Publications (thumbnail + details) ----- */
.paper {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.paper:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.paper-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  background: var(--paper-thumb);
  border-radius: 4px;
  object-fit: cover;
}
.paper-details .paper-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.35rem 0;
}
.paper-details .paper-authors,
.paper-details .paper-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}
.paper-details .paper-links {
  margin-top: 0.5rem;
}
.paper-details .paper-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1rem;
}
.paper-details .paper-links a:hover {
  color: var(--text);
}

/* ----- News ----- */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.news-list .date {
  flex-shrink: 0;
  color: var(--text-muted);
  width: 5.5rem;
}

/* ----- Teaching ----- */
.teaching-item {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* ----- Footer ----- */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
    padding: 4rem 1.5rem 3rem;
  }
  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .intro .contact {
    justify-content: center;
  }
  .paper {
    flex-direction: column;
    align-items: flex-start;
  }
  .paper-thumb {
    width: 100%;
    max-width: 200px;
    height: 100px;
  }
}
