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

:root {
  --accent: #2b6cb0;
  --accent-hover: #1a4971;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --tag-bg: #ebf4ff;
  --tag-text: #2b6cb0;
  --section-bg: #f7fafc;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: #fff;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 14px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-name:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-links a {
  margin-left: 28px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ===== Profile / About ===== */
.profile-section {
  display: flex;
  gap: 44px;
  padding: 52px 0 28px;
  align-items: flex-start;
}

.profile-left {
  flex-shrink: 0;
  text-align: center;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.social-links a i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.profile-right h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.affiliation {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.affiliation a {
  color: var(--text-muted);
}

.affiliation a:hover {
  color: var(--accent);
}

.email-display {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.email-display a {
  color: var(--text-muted);
}

.email-display a:hover {
  color: var(--accent);
}

.bio p {
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.research-interests {
  margin-top: 18px;
}

.interests-label {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.interest-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* ===== Section Headings ===== */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--accent);
  font-size: 1.2rem;
}

.section-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

/* ===== News ===== */
.news-list {
  list-style: none;
}

.news-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}

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

.news-date {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 80px;
  font-size: 0.85rem;
}

/* ===== Publications ===== */
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.pub-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

.pub-authors .me {
  font-weight: 700;
  text-decoration: underline;
  color: var(--text-primary);
}

.pub-venue {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff !important;
  transition: all 0.2s;
}

.pub-link:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.55rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateX(-4px);
}

.timeline-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.timeline-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Awards ===== */
.awards-list {
  list-style: none;
}

.awards-list li {
  padding: 0.5rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.awards-list .award-icon {
  color: #d69e2e;
  font-size: 1rem;
}

/* ===== Skills ===== */
.skills-group {
  margin-bottom: 1rem;
}

.skills-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  background: var(--section-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Visitor Map ===== */
.visitor-map {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.visitor-map > a,
.visitor-map > div {
  transform: scale(0.5);
  transform-origin: top center;
  margin-bottom: -95px;
}

.visitor-map {
  position: relative;
}

.visitor-map::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: #fff;
  z-index: 10;
}

/* ===== Footer ===== */
.footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Mobile-only elements (hidden on desktop) ===== */
.mobile-header {
  display: none;
}

.profile-header-bg {
  display: contents;
}

.inline-nav {
  display: none;
}

.social-links-mobile {
  display: none;
}

.mobile-about-heading {
  display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Show mobile header, hide desktop nav */
  .mobile-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #eef2f6;
    border-bottom: 1px solid var(--border);
    z-index: 200;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
  }

  .mobile-header .mobile-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #2c3e50;
  }

  .hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.4rem;
    color: #2c3e50;
    display: block;
  }

  /* Inline nav: hidden by default, shown in-body when hamburger toggled */
  .inline-nav {
    display: none;
    list-style: none;
    width: 100%;
    margin-top: 1rem;
  }

  .profile-section.nav-open .inline-nav {
    display: block;
  }

  .inline-nav li {
    margin-bottom: 0.15rem;
  }

  .inline-nav a {
    display: block;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
  }

  .inline-nav a:hover {
    background: rgba(43, 108, 176, 0.1);
    color: var(--accent);
  }

  nav {
    display: none;
  }

  /* Profile section */
  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 0;
    margin: 0 -24px;
    width: calc(100% + 48px);
  }

  /* Blue-gray background only for photo/name/social area */
  .profile-left {
    width: 100%;
    background: #eef2f6;
    padding: 16px 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: none;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
    border: 4px solid #fff;
    margin-bottom: 1.2rem;
  }

  .profile-right {
    width: 100%;
  }

  .profile-header-bg {
    display: block;
    background: #eef2f6;
    text-align: center;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .profile-section.nav-open .profile-header-bg {
    border-bottom: none;
  }

  .profile-right h1 {
    font-size: 1.35rem;
    margin-bottom: 0;
  }

  .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
  }

  .email-display {
    font-size: 0.8rem;
    margin-bottom: 0;
    padding-bottom: 1rem;
  }

  /* Hide desktop social links on mobile */
  .social-links {
    display: none;
  }

  .social-links-mobile {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    padding: 0;
    width: 100%;
  }

  .social-links-mobile a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--text-secondary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.25s;
  }

  .social-links-mobile a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.3);
  }

  /* Inline nav on blue-gray bg */
  .inline-nav {
    padding: 0.5rem 0 0;
    width: 100%;
  }

  .mobile-about-heading {
    display: flex;
    padding: 1.5rem 1.5rem 0;
    width: 100%;
    background: #fff;
  }

  .bio {
    padding: 0 1.5rem;
    width: 100%;
    background: #fff;
  }

  .bio p {
    text-align: left;
  }

  .research-interests {
    text-align: left;
    width: 100%;
    padding: 0 1.5rem 1.5rem;
    background: #fff;
  }

  .container {
    padding-top: 56px;
  }

  .news-list li {
    flex-direction: column;
    gap: 0.2rem;
  }
}
