*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', serif;
  font-size: 16px;
  line-height: 1.75;
  color: #2a2a2a;
  background: #ffffff;
}

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

.page {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: #f4f4f4;
  border-right: 1px solid #ddd;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-section-label {
  font-family: 'Georgia', serif;
  font-size: 15px;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 3px solid #c0392b;
}

/* ── Nav ── */
.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.sidebar-nav > ul > li {
  border-bottom: 1px solid #ddd;
}
.sidebar-nav > ul > li > a {
  display: block;
  padding: 8px 4px;
  font-family: 'Georgia', serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #444;
  text-decoration: none;
}
.sidebar-nav > ul > li > a:hover { color: #c0392b; }
.sidebar-nav > ul > li > a.active { color: #c0392b; font-weight: 700; }

/* ── Publications sub-links ── */
.has-sub .sub-links {
  list-style: none;
  padding: 2px 0 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.has-sub .sub-links li a {
  font-size: 12px;
  color: #666;
  letter-spacing: 0;
  padding: 2px 4px;
  display: block;
}
.has-sub .sub-links li a:hover { color: #c0392b; text-decoration: underline; }

/* ── Contact ── */
.sidebar-contact {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}
.sidebar-contact a { color: #555; }
.sidebar-contact a:hover { color: #c0392b; text-decoration: underline; }

/* ── ORCID ── */
.orcid-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #555;
}
.orcid-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #A6CE39;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

/* ── Main ── */
.main {
  flex: 1;
  padding: 3rem 3.5rem;
  min-width: 0;
}

/* ── Homepage title ── */
.page-title {
  font-family: 'Georgia', serif;
  font-size: 52px;
  font-weight: 700;
  color: #2a2a2a;
  line-height: 1.15;
  margin-bottom: 2rem;
  letter-spacing: -1px;
}

/* ── Homepage: text LEFT 50%, photo RIGHT 50% — always ── */
.home-row {
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: flex-start;
  width: 100%;
}

.home-bio {
  width: 50%;
  min-width: 50%;
  max-width: 50%;
  padding-right: 2rem;
}

.home-bio p {
  font-size: 17px;
  line-height: 1.85;
  color: #2a2a2a;
  margin-bottom: 1.2rem;
}
.home-bio p:last-child { margin-bottom: 0; }

.home-photo-wrap {
  width: 50%;
  min-width: 50%;
  max-width: 50%;
}

.home-photo {
  width: 100%;
  height: 360px;
  border-radius: 4px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid #ddd;
  display: block;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2.5rem 0;
}

/* ── Section titles ── */
.main h1 {
  font-family: 'Georgia', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: #2a2a2a;
}

.section-title {
  font-family: 'Georgia', serif;
  font-size: 18px;
  font-weight: 700;
  color: #2a2a2a;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #ddd;
}

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-year {
  min-width: 90px;
  font-size: 13px;
  font-weight: 700;
  color: #888;
  padding-top: 2px;
}
.timeline-content .role { font-size: 15px; font-weight: 700; color: #2a2a2a; }
.timeline-content .place { font-size: 13px; color: #666; }
.timeline-content .flag { font-size: 12px; color: #999; margin-top: 1px; }

/* ── Research blocks ── */
.research-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}
.research-block:last-of-type { border-bottom: none; }
.era-label {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.5rem;
}
.research-block p { font-size: 16px; color: #2a2a2a; line-height: 1.8; }

/* ── Footer ── */
.footer-note {
  font-size: 12px;
  color: #bbb;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

/* ── Responsive: stack on small screens ── */
@media (max-width: 860px) {
  .page { flex-direction: column; }
  .sidebar {
    width: 100%;
    max-width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
  .main { padding: 2rem 1.5rem; }
  .page-title { font-size: 36px; }
  .home-row { flex-direction: column; }
  .home-bio, .home-photo-wrap {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding-right: 0;
  }
  .home-photo { height: 260px; }
}

/* ── Publication cards ── */
.pub-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
}
.pub-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #2a2a2a;
  transition: border-color 0.15s, background 0.15s;
}
.pub-card:hover {
  border-color: #c0392b;
  background: #fdf9f9;
  text-decoration: none;
}
.pub-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #c0392b;
  font-family: Georgia, serif;
}
.pub-card-sub {
  font-size: 13px;
  color: #777;
  margin-top: 3px;
}

/* ── Main page header with red line ── */
.main-header {
  margin-bottom: 2rem;
}
.main-header-label {
  font-family: 'Georgia', serif;
  font-size: 14px;
  color: #888;
  display: block;
  margin-bottom: 6px;
}
.main-header-line {
  height: 3px;
  background: #c0392b;
  width: 100%;
}
