/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
  background: #f9f7f4;
}

a { color: #5a3e8a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sidebar / nav ───────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100vh;
  background: #2c2c3a;
  color: #e8e4f0;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

#sidebar .profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #7c5cbf;
  display: block;
  margin: 0 auto 1.25rem;
  /* Placeholder color shown when image is missing */
  background: #4a3a6a;
}

#sidebar .name {
  font-size: 1.15rem;
  font-weight: bold;
  text-align: center;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

#sidebar .meta {
  font-size: 0.82rem;
  text-align: center;
  color: #b0a8c8;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

#sidebar .meta span {
  display: block;
}

#sidebar nav {
  margin-top: auto 0;
}

#sidebar nav ul {
  list-style: none;
}

#sidebar nav ul li {
  margin-bottom: 0.25rem;
}

#sidebar nav ul li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: #d4cce8;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
}

#sidebar nav ul li a:hover,
#sidebar nav ul li a.active {
  background: #5a3e8a;
  color: #fff;
  text-decoration: none;
}

#sidebar .contact-links {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #9088b0;
  text-align: center;
}

#sidebar .contact-links a {
  color: #a898d0;
}

/* ── Main content area ───────────────────────────────────────── */
#main {
  margin-left: 240px;
  min-height: 100vh;
  padding: 3rem 3.5rem;
  max-width: 900px;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  border-bottom: 2px solid #c8bfe0;
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.9rem;
  color: #2c2c3a;
  font-weight: normal;
}

/* ── Section headings ────────────────────────────────────────── */
h2 {
  font-size: 1.25rem;
  color: #3d2d6a;
  margin: 2rem 0 0.6rem;
  font-weight: bold;
}

h3 {
  font-size: 1.05rem;
  color: #2c2c3a;
  margin: 1.25rem 0 0.3rem;
}

p { margin-bottom: 1rem; }

ul, ol { margin: 0.5rem 0 1rem 1.5rem; }
li { margin-bottom: 0.3rem; }

/* ── About / home page ───────────────────────────────────────── */
.about-intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.about-intro img {
  width: 180px;
  height: 210px;
  object-fit: cover;
  border: 1px solid #c8bfe0;
  flex-shrink: 0;
  background: #ddd;
}

/* ── Research: publication list ─────────────────────────────── */
.pub-list { list-style: none; margin-left: 0; }

.pub-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e0daea;
}

.pub-list li:last-child { border-bottom: none; }

.pub-list .pub-title {
  font-style: italic;
  color: #2c2c3a;
}

.pub-list .pub-meta {
  font-size: 0.88rem;
  color: #666;
}

/* ── Teaching: course table ──────────────────────────────────── */
.course-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.course-table th {
  background: #2c2c3a;
  color: #e8e4f0;
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: normal;
}

.course-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e0daea;
  vertical-align: top;
}

.course-table tr:nth-child(even) td { background: #f0edf8; }

/* ── Responsive: collapse sidebar on small screens ───────────── */
@media (max-width: 700px) {
  #sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 1.25rem 1rem;
  }

  #sidebar nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  #main {
    margin-left: 0;
    padding: 1.5rem 1.25rem;
  }

  .about-intro { flex-direction: column; }
}
