/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #f8f9fa;
}

a {
  color: #1a5276;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Sidebar Navigation */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #1b2a4a;
  color: #fff;
  padding: 2rem 0;
  overflow-y: auto;
  z-index: 100;
}

.nav-header {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 1rem;
}

#sidebar ul {
  list-style: none;
}

#sidebar li {
  margin: 0;
}

#sidebar a {
  display: block;
  padding: 0.6rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

#sidebar a:hover,
#sidebar a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

/* Main Content */
main {
  margin-left: 240px;
  padding: 3rem 4rem 2rem;
  max-width: 960px;
}

section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

section:last-of-type {
  border-bottom: none;
}


h1 {
  font-size: 2rem;
  color: #1b2a4a;
  margin-bottom: 0.3rem;
}

.subtitle {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.university-name {
  font-size: 1.3rem;
  color: #1b2a4a;
}

h2 {
  font-size: 1.5rem;
  color: #1b2a4a;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #1b2a4a;
}

h3 {
  font-size: 1.15rem;
  color: #2c3e50;
  margin: 1.5rem 0 0.75rem;
}

h4 {
  font-size: 1rem;
  color: #444;
  margin: 1rem 0 0.5rem;
}

p {
  margin-bottom: 0.8rem;
}

/* Contact Info */
.contact-info {
  background: #eef2f7;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 0;
}

#about {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.about-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.about-text {
  flex: 1;
}

.profile-pic {
  width: 140px;
  height: auto;
  border-radius: 6px;
  flex-shrink: 0;
  align-self: flex-end;
}

.contact-info p {
  margin: 0;
}

/* Document Links */
.doc-links {
  list-style: none;
  padding: 0;
}

.doc-links li {
  margin-bottom: 0.75rem;
}

.doc-link {
  display: inline-block;
  background: #1b2a4a;
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s;
}

.doc-link:hover {
  background: #2c4270;
  text-decoration: none !important;
}

.placeholder {
  color: #999;
  font-style: italic;
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* Teaching Tables */
.teaching-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.teaching-table th,
.teaching-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.teaching-table th:nth-child(1),
.teaching-table td:nth-child(1) {
  white-space: nowrap;
  width: 1%;
}

.teaching-table th:nth-child(2),
.teaching-table td:nth-child(2) {
  white-space: nowrap;
  width: 1%;
}

.teaching-table th {
  background: #eef2f7;
  color: #1b2a4a;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.teaching-table tr:hover {
  background: #f5f7fa;
}

.materials-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.4rem;
}

.materials-list li::before {
  content: "\2022\00a0";
}

.materials-list li {
  display: inline;
}

/* Publication List */
.pub-list {
  padding-left: 2.5rem;
}

.pub-list li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.pub-list a {
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

.badge, .pub-tag {
  display: inline-block;
  background: #eef2f7;
  color: #1b2a4a;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 600;
  border: 1px solid #1b2a4a;
}

/* Collapsible Abstracts */
.pub-abstract {
  margin-top: 0.4rem;
}

.pub-abstract summary {
  cursor: pointer;
  color: #1a5276;
  font-weight: 600;
  font-size: 0.9rem;
}

.pub-abstract summary:hover {
  text-decoration: underline;
}

.pub-abstract p {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f5f7fa;
  border-left: 3px solid #1b2a4a;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

.pub-link {
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

/* Undergraduate Research List */
.undergrad-list {
  list-style: none;
  padding: 0;
}

.undergrad-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
  line-height: 1.6;
}

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

.year-range {
  display: inline-block;
  float: right;
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Grant */
.grant {
  background: #eef2f7;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  border-left: 4px solid #1b2a4a;
  line-height: 1.8;
}

/* Mentoring lists */
#mentoring ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

#mentoring li {
  margin-bottom: 0.3rem;
}

/* Footer */
footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-header {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
    font-size: 1rem;
    margin-right: 1rem;
  }

  #sidebar ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    gap: 0.25rem;
  }

  #sidebar li {
    margin: 0;
  }

  #sidebar a {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

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

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .university-name {
    font-size: 1.1rem;
  }

  .about-header {
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
  }

  .profile-pic {
    width: 120px;
  }

  /* Stack teaching table for mobile */
  .teaching-table,
  .teaching-table thead,
  .teaching-table tbody,
  .teaching-table tr,
  .teaching-table th,
  .teaching-table td {
    display: block;
    width: 100%;
  }

  .teaching-table thead {
    display: none;
  }

  .teaching-table tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
  }

  .teaching-table td {
    padding: 0.2rem 0;
    border-bottom: none;
  }

  .teaching-table td:nth-child(1) {
    font-weight: 600;
    color: #1b2a4a;
    width: auto;
    white-space: normal;
  }

  .teaching-table td:nth-child(2) {
    width: auto;
    white-space: normal;
  }

  .pub-list {
    padding-left: 1.5rem;
  }

  .pub-abstract p {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}
