/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.5;
  color: #333;
  margin: 0;
  background-color: #fff;
}

a {
  color: #527bbd;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

sup {
  font-size: 0.75em;
  vertical-align: super;
}

/* ===== Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #f0f0f0;
  padding: 15px 0;
  z-index: 1000;
}

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

.nav-logo {
  font-weight: bold;
  font-size: 1.2em;
  color: #527bbd;
  font-style: italic;
}

.nav-logo:hover {
  color: #2a4a8c;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  color: #555;
  font-size: 0.95em;
  position: relative;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #527bbd;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #527bbd;
  text-decoration: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 10px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
}

/* ===== Layout ===== */
#layout-content {
  max-width: 960px;
  margin: 30px auto;
  padding: 0 20px;
}

h1 {
  color: #222;
  font-size: 2em;
  font-style: normal;
  margin: 0 0 0.3em 0;
}

h2 {
  color: #527bbd;
  font-style: italic;
  margin-top: 1.6em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid #eaeaea;
  scroll-margin-top: 80px;
}

h3 {
  color: #527bbd;
  font-style: italic;
  margin-bottom: 0.4em;
}

p {
  margin: 0.5em 0;
}

.note {
  font-size: 0.9em;
  color: #666;
}

/* ===== Profile ===== */
.profile-container {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 1em;
}

.profile-info {
  flex: 2;
}

.profile-image {
  flex: 1;
  text-align: center;
}

.profile-photo {
  max-width: 240px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.social-links {
  margin-top: 12px;
}

.social-link {
  color: #527bbd;
  font-weight: 500;
}

.social-link:hover {
  color: #2a4a8c;
  border-bottom: 1px solid #2a4a8c;
  text-decoration: none;
}

@media (max-width: 768px) {
  .profile-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 20px;
  }
}

/* ===== Publication list ===== */
.pub-list {
  padding-left: 25px;
  margin: 0.5em 0;
}

.pub-list li {
  padding: 10px 8px;
  margin: 0 0 6px 0;
  border-bottom: 1px dotted #eaeaea;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.25s ease, transform 0.25s ease,
              border-left-color 0.25s ease, box-shadow 0.25s ease;
}

.pub-list li:hover {
  background: linear-gradient(to right, #f0f5ff, #fafcff);
  border-left-color: #b8d0ff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.06);
}

/* First-author highlight */
.pub-list li.first-author {
  background: linear-gradient(to right, #fffaf0, #ffffff 60%);
  border-left-color: #f1c40f;
}

.pub-list li.first-author:hover {
  background: linear-gradient(to right, #fff5dd, #fafcff);
  border-left-color: #e6b800;
  box-shadow: 0 4px 12px rgba(241, 196, 15, 0.15);
}

.pub-list li.first-author .pub-title::before {
  content: '★ ';
  color: #e6b800;
  font-size: 0.95em;
  margin-right: 2px;
}

.pub-title {
  font-weight: 500;
  color: #2a4a8c;
}

.pub-title:hover {
  color: #3498DB;
}

.pub-authors {
  font-size: 0.95em;
}

.pub-venue {
  color: #E74C3C;
  font-size: 0.95em;
}

/* ===== Buttons / badges ===== */
.btn {
  font-family: Georgia, serif;
  background-color: #D6EAF8;
  border: none;
  color: #022b6d;
  padding: 4px 9px;
  font-size: 0.88em;
  margin: 3px 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease,
              box-shadow 0.25s ease;
}

.btn a {
  color: inherit;
}

.btn a:hover {
  text-decoration: none;
}

.btn:hover {
  background-color: #AED6F1;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.badge {
  font-family: Georgia, serif;
  background-color: #F1948A;
  color: #fff;
  border: none;
  padding: 3px 8px;
  font-size: 0.85em;
  margin-left: 6px;
  border-radius: 4px;
  cursor: default;
  transition: background-color 0.25s ease;
}

.badge:hover {
  background-color: #E74C3C;
}

.award {
  font-family: Georgia, serif;
  background-color: #5DADE2;
  color: #fff;
  border: none;
  padding: 3px 8px;
  font-size: 0.85em;
  margin-left: 6px;
  border-radius: 4px;
  cursor: default;
  font-weight: bold;
  transition: background-color 0.25s ease;
}

.award:hover {
  background-color: #3498DB;
}

/* ===== Plain lists (mentoring/teaching/services) ===== */
.plain-list {
  list-style: disc;
  padding-left: 25px;
}

.plain-list li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}

ul li, ol li {
  line-height: 1.5;
}

#services ul li {
  padding: 3px 6px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.25s ease, transform 0.25s ease,
              border-left-color 0.25s ease;
}

#services ul li:hover {
  background: linear-gradient(to right, #f0f5ff, #fafcff);
  border-left-color: #b8d0ff;
  transform: translateX(4px);
}

/* ===== Education / Experience info list ===== */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0.5em 0;
}

.info-list > li {
  padding: 10px 10px;
  margin-bottom: 8px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: background 0.25s ease, transform 0.25s ease,
              border-left-color 0.25s ease, box-shadow 0.25s ease;
}

.info-list > li:hover {
  background: linear-gradient(to right, #f0f5ff, #fafcff);
  border-left-color: #b8d0ff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.06);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.info-main {
  font-weight: 600;
  color: #2a4a8c;
  font-size: 1.02em;
}

.info-sub {
  color: #444;
  font-style: italic;
}

.info-meta {
  color: #777;
  font-size: 0.9em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .info-row {
    flex-direction: column;
    gap: 2px;
  }
  .info-meta {
    font-size: 0.85em;
  }
}

/* ===== Visitors / ClustrMaps ===== */
.visitor-section {
  text-align: center;
  margin: 1em 0;
}

#clustrmaps-container {
  display: block;
  max-width: 600px;
  margin: 10px auto;
}

.visitor-counter {
  margin-top: 12px;
}

/* ===== Footer ===== */
.footer {
  margin-top: 40px;
  padding: 16px 0;
  border-top: 1px solid #eaeaea;
  text-align: center;
  font-size: 0.9em;
  color: #888;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
