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

body {
  font-family: "Georgia", serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

a { color: #2a5db0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.site-nav {
  border-bottom: 1px solid #ddd;
  padding: 0.8rem 0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #222;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #444;
  font-size: 0.95rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.nav-links a:hover,
.nav-links a.active { color: #2a5db0; text-decoration: none; border-bottom: 2px solid #2a5db0; padding-bottom: 2px; }

/* Main content */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Home page */
.home-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

.home-sidebar {
  text-align: center;
}

.profile-photo {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.sidebar-name {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.sidebar-title {
  font-size: 0.85rem;
  color: #444;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin-bottom: 0.1rem;
}

.sidebar-inst {
  font-size: 0.85rem;
  color: #666;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin-bottom: 1rem;
}

.sidebar-links {
  list-style: none;
  text-align: left;
  margin-top: 0.8rem;
  border-top: 1px solid #eee;
  padding-top: 0.8rem;
}

.sidebar-links li {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-label {
  width: 1.2rem;
  text-align: center;
  color: #555;
  font-style: normal;
  font-size: 0.8rem;
}

.home-bio p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* Section headings */
h2.section-title {
  font-size: 1.2rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  border-bottom: 2px solid #222;
  padding-bottom: 0.4rem;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Research table */
.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.research-table th {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 2px solid #222;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.research-table {
  table-layout: fixed;
}

.research-table th:first-child,
.research-table td:first-child { width: 50%; }

.research-table th:nth-child(2),
.research-table td:nth-child(2) { width: 15%; }

.research-table th:nth-child(3),
.research-table td:nth-child(3) { width: 18%; }

.research-table th:nth-child(4),
.research-table td:nth-child(4) { width: 5%; }

.research-table th:nth-child(5),
.research-table td:nth-child(5) { width: 12%; }

.research-table td {
  padding: 0.7rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.research-table tr:hover td { background: #fafafa; }

.paper-title { font-weight: 600; color: #222; }
.paper-title a { color: #2a5db0; }

.abstract-toggle {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: #2a5db0;
  cursor: pointer;
  background: none;
  border: 1px solid #2a5db0;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-family: inherit;
}

.abstract-toggle:hover { background: #f0f4ff; }

.abstract-text {
  display: none;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: #f8f9fa;
  border-left: 3px solid #2a5db0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #333;
}

.abstract-text.open { display: block; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag {
  font-size: 0.72rem;
  background: #eef2ff;
  color: #3a5ab0;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}

/* Status badges */
.status {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 600;
}
.status-rr { background: #fff3cd; color: #856404; }
.status-review { background: #d1ecf1; color: #0c5460; }
.status-progress { background: #f8d7da; color: #721c24; }

/* Extra links (PDF, replication) */
.paper-links { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.3rem; }
.paper-link {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #ccc;
  color: #444;
}
.paper-link:hover { background: #f0f0f0; text-decoration: none; }

/* Page headings */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.page-header p { color: #555; }

/* Teaching list */
.course-list { list-style: none; }
.course-list li { padding: 0.6rem 0; border-bottom: 1px solid #eee; }
.course-list .course-code { font-weight: 600; }
.course-list .course-institution { color: #666; font-size: 0.9rem; }

/* Data cards */
.data-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
}
.data-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.data-card p { font-size: 0.93rem; color: #444; margin-bottom: 0.6rem; }

/* News */
.news-list { list-style: none; padding: 0; margin: 0 0 0.5rem 0; }
.news-item { display: flex; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; font-size: 0.92rem; }
.news-date { color: #888; white-space: nowrap; min-width: 90px; }
.news-toggle { background: none; border: none; color: #2a5db0; font-size: 0.88rem; cursor: pointer; padding: 0.4rem 0; }
.news-toggle:hover { text-decoration: underline; }

/* Consulting */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.service-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.1rem 1.3rem;
}
.service-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: #444; }

.client-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.client { background: #f5f5f5; padding: 0.3rem 0.7rem; border-radius: 3px; font-size: 0.85rem; }

/* Footer */
.site-footer {
  border-top: 1px solid #ddd;
  padding: 1.2rem 1.5rem;
  text-align: center;
  font-size: 0.83rem;
  color: #666;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Responsive */
@media (max-width: 640px) {
  .home-grid { grid-template-columns: 1fr; }
  .profile-photo { max-width: 160px; }
  .nav-links { gap: 0.8rem; }
  .research-table { font-size: 0.84rem; }
}
