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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #000000;
  font-family: 'Lato', Verdana, Helvetica, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #1772d0;
  text-decoration: underline;
}

/* Minimal top navigation bar */
.academic-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e6e6e6;
}

.academic-nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.academic-nav-sections {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.academic-nav-sections a {
  color: #333333;
  font-size: 14px;
}

.academic-nav-sections a:hover,
.academic-nav-sections a:focus {
  color: #1772d0;
  text-decoration: none;
}

.academic-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.academic-blog-btn {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #1772d0;
  border-radius: 4px;
  color: #1772d0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.academic-blog-btn:hover,
.academic-blog-btn:focus {
  background-color: #1772d0;
  color: #ffffff;
  text-decoration: none;
}

.academic-lang-link {
  color: #555555;
  font-size: 13.5px;
}

.academic-lang-link:hover,
.academic-lang-link:focus {
  color: #1772d0;
  text-decoration: none;
}

/* Main single-column container (Jon Barron style) */
.academic-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 44px;
}

/* Profile header: two-column split */
.academic-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0 18px;
}

.academic-profile-text {
  flex: 1 1 63%;
  min-width: 0;
}

.academic-name {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  color: #000000;
}

.academic-affiliation {
  margin: 0 0 16px;
  font-size: 13px;
  color: #707070;
  text-align: center;
}

.academic-profile-text p {
  margin: 0 0 12px;
}

.academic-goals {
  margin: -4px 0 12px;
  padding-left: 20px;
}

.academic-goals li {
  margin-bottom: 5px;
}

.academic-links {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
}

.academic-profile-photo {
  flex: 0 0 32%;
  max-width: 240px;
  text-align: center;
}

.academic-profile-photo img {
  display: block;
  width: 88%;
  max-width: 210px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  margin: 0 auto;
}

/* Content sections */
.academic-content hr {
  border: 0;
  border-top: 1px solid #dddddd;
  margin: 26px 0 20px;
}

.academic-content h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
  scroll-margin-top: 64px;
}

.academic-content p {
  margin: 0 0 10px;
}

.academic-content ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.academic-content li {
  margin-bottom: 8px;
}

/* Academic item blocks (publications & research projects) */
.academic-item {
  margin-bottom: 16px;
}

.academic-item:last-child {
  margin-bottom: 0;
}

.academic-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #000000;
  line-height: 1.45;
}

.academic-item-meta {
  font-size: 13.5px;
  color: #444444;
  margin-top: 2px;
}

.academic-item-venue {
  font-style: italic;
}

.academic-award-tag {
  color: #f09228;
  font-weight: 700;
}

.academic-item-links {
  margin: 4px 0 0;
  font-size: 13.5px;
}

/* Experience cards with lab logos (matching jianuocao.github.io) */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 12px;
}

.experience-entry {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.experience-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  padding: 12px 14px;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.experience-logo-card:hover,
.experience-logo-card:focus {
  transform: translateY(-1px);
  box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.22);
  text-decoration: none;
}

.experience-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.experience-details h4 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.experience-meta {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: #555555;
}

.experience-topics,
.experience-advisor {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.55;
  color: #111111;
}

.experience-advisor {
  margin-bottom: 0;
}

.academic-item-desc {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #222222;
}

.academic-date-tag {
  color: #f09228;
  font-weight: 700;
  margin-right: 6px;
}

.academic-news-list {
  margin: 0;
  padding-left: 20px;
}

.academic-news-list li {
  margin-bottom: 6px;
}

/* Right-aligned dates for Education and Honors lists */
.academic-list {
  list-style: disc;
  margin: 0;
  padding-left: 20px;
}

.academic-list li {
  margin-bottom: 8px;
  overflow: hidden;
}

.academic-list-year {
  float: right;
  color: #555555;
  margin-left: 16px;
  white-space: nowrap;
}

/* Footer */
.academic-footer {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid #eeeeee;
  text-align: right;
  font-size: 12.5px;
  color: #707070;
}

.academic-footer p {
  margin: 0;
}

/* Responsive layout */
@media (max-width: 640px) {
  .academic-nav-inner {
    padding: 10px 14px;
  }

  .academic-nav-sections {
    gap: 12px;
  }

  .academic-profile {
    flex-direction: column-reverse;
    gap: 20px;
    padding-top: 4px;
  }

  .academic-profile-photo {
    flex: none;
    max-width: 180px;
  }

  .academic-list-year {
    float: none;
    display: block;
    margin-left: 0;
    font-size: 12.5px;
  }

  .experience-entry {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .experience-logo-card {
    max-width: 220px;
    height: 100px;
  }
}
