/* ========================================
   Hanzhou Liu - Academic Portfolio CSS
   Combines libingzeng.github.io layout
   with xujiacong.github.io nav/pub design
   ======================================== */

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

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  padding-top: 48px; /* account for navbar */
  transition: background 0.3s, color 0.3s;
}

a {
  color: #527bbd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Navigation Bar (clean & compact, xujiacong style) --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8e8e8;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s;
}

.navbar .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar .nav-items {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.navbar .nav-items li a {
  color: #555;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  display: inline-block;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.navbar .nav-items li a:hover {
  color: #111;
  text-decoration: none;
}

.navbar .nav-items li a.active {
  color: #111;
  font-weight: 700;
}

.navbar .nav-items li.nav-brand a {
  font-size: 15px;
  font-weight: 600;
  color: #555;
  padding-left: 0;
  margin-right: 6px;
}

.navbar .nav-items li.nav-brand a:hover,
.navbar .nav-items li.nav-brand a.active {
  color: #111;
  font-weight: 700;
}

.navbar .nav-items li.theme-toggle {
  margin-left: auto;
}

.navbar .nav-items li.theme-toggle a {
  cursor: pointer;
  color: #666;
  font-size: 16px;
  padding: 8px 10px;
}

.navbar .nav-items li.theme-toggle a:hover {
  color: #111;
}

/* --- Main Container --- */
#main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 30px 60px;
}

/* --- Name Header --- */
.name {
  height: 64px;
  font-size: 230%;
  font-weight: bold;
  font-family: "Cavolini", "Caveat", "Segoe Print", "KaiTi", "楷体", cursive, sans-serif;
  color: rgb(0, 10, 30);
  margin-bottom: 10px;
}

/* --- Portrait & Bio Layout --- */
.portrait-wrap {
  float: left;
  margin-right: 30px;
  margin-bottom: 15px;
  width: 205px;
  text-align: center;
}

.portrait {
  border-radius: 6px;
  width: 205px;
  height: 256px;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease-in-out;
}

.portrait-motto {
  font-family: "STKaiti", "KaiTi", "楷体", "Georgia", serif;
  font-size: 17px;
  line-height: 1.6;
  color: #666;
  letter-spacing: 0.5px;
  margin-top: 10px;
  text-align: center;
}

.portrait-motto div {
  white-space: nowrap;
}

.bio_format {
  overflow: hidden;
  font-size: 110%;
  line-height: 28px;
  padding-top: 5px;
}

.bio_format p {
  margin-bottom: 12px;
}

.bio_format .seeking {
  color: #cc0000;
  font-weight: bold;
}

.interests-list {
  list-style-type: none;
  padding-left: 0;
  margin: 4px 0 12px 0;
}

.interests-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 4px;
  line-height: 26px;
}

.interests-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: #527bbd;
  font-weight: bold;
  font-size: 16px;
}

/* --- Social Links (chengkai-liu style) --- */
.social-links {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  background-color: #f8f9fa;
  color: #2c3e50;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  line-height: 1.4;
}

.social-btn i {
  font-size: 14px;
  color: inherit;
}

.social-btn span {
  font-size: 0.9rem;
  font-weight: 500;
  color: inherit;
}

.social-btn:hover {
  background-color: #527bbd;
  color: #ffffff !important;
  border-color: #527bbd;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.social-btn:hover i,
.social-btn:hover span {
  color: #ffffff !important;
}

/* --- Section Headers --- */
.category {
  font-size: 180%;
  font-weight: bold;
  color: rgb(0, 10, 30);
  display: block;
  margin-top: 40px;
}

hr.line {
  border: none;
  height: 2px;
  width: 100%;
  margin: 8px 0 20px;
  background-image: linear-gradient(to right, rgba(15,2,0,0.8), rgba(15,2,0,0.2), rgba(15,2,0,0.1), rgba(15,2,0,0.0));
}

/* --- News Section --- */
.news-box {
  border: solid 2px #ccc;
  border-radius: 4px;
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px 15px;
}

.item_content {
  list-style-type: none;
  padding: 0;
}

.item_content li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.highlight {
  color: red;
  font-weight: bold;
  font-size: 11px;
}

/* --- Work Experience & Education Sections (Libing Zeng style) --- */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.education-list .exp-item {
  align-items: center;
}

.exp-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 4px;
}

.exp-logo-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.exp-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.exp-content {
  flex: 1;
  min-width: 0;
}

.exp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 16px;
}

.exp-role {
  font-weight: bold;
  color: rgb(0, 10, 30);
  font-size: 17px;
}

.exp-org {
  color: #008B8B;
  font-weight: 600;
}

.exp-org em {
  font-style: normal;
}

.exp-date {
  margin-left: auto;
  color: #777;
  font-size: 14px;
  font-weight: 500;
}

.exp-advisor {
  color: #555;
  font-size: 14px;
  margin-top: 3px;
  margin-bottom: 6px;
}

.exp-desc {
  list-style-type: none;
  padding-left: 0;
  margin: 6px 0 0 0;
}

.exp-desc li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #444;
}

.exp-desc li::before {
  content: "•";
  position: absolute;
  left: 3px;
  color: #527bbd;
  font-weight: bold;
}

/* --- Paper Boxes (Featured Publications on Index) --- */
.paper-box {
  position: relative;
  display: flex;
  gap: 24px;
  margin-bottom: 30px;
  padding: 15px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #eee;
  transition: border-color 0.2s ease;
}

.paper-box:hover {
  z-index: 20;
}

.paper-box-image {
  position: relative;
  flex-shrink: 0;
  width: 260px;
}

.paper-box-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: center center;
  position: relative;
  z-index: 1;
}

.paper-box-image:hover {
  z-index: 50;
}

.paper-box-image:hover img {
  transform: scale(2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  z-index: 100;
  cursor: zoom-in;
}

/* --- Badges (chengkai-liu style) --- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: middle;
  line-height: 1.4;
  margin: 0 4px;
}

.badge-blue {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
}

.paper-box-image .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(21, 101, 192, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  border: none;
  backdrop-filter: blur(4px);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.paper-box-image:hover .badge {
  opacity: 0;
}

.paper-box-text {
  flex: 1;
}

.paper-box-text .paper-title {
  font-size: 17px;
  font-weight: bold;
  color: #527bbd;
  margin-bottom: 6px;
}

.paper-box-text .paper-title a {
  color: #527bbd;
}

.paper-box-text .paper-authors {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.paper-box-text .paper-links {
  font-size: 14px;
  margin-bottom: 8px;
}

.paper-box-text .paper-links a {
  margin-right: 8px;
  color: #527bbd;
  font-weight: 500;
}

.paper-box-text .paper-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* --- Simple list items (Education, Talks, Services) --- */
.section-list {
  list-style-type: none;
  padding: 0;
}

.section-list li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.section-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #555;
}

.section-list li strong {
  color: #333;
}

/* --- Publications Page (xujiacong style) --- */
.page-title {
  font-size: 200%;
  font-weight: bold;
  color: rgb(0, 10, 30);
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
}

.page-subtitle {
  font-size: 15px;
  color: #666;
  margin-bottom: 30px;
}

.publication {
  margin-bottom: 1.2em;
  line-height: 1.7;
  font-family: "Helvetica", "Arial", sans-serif;
  font-size: 16px;
  color: #333;
  padding-left: 20px;
  position: relative;
}

.publication::before {
  content: "•";
  color: #555;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.publication .authors {
  display: inline;
}

.publication .title {
  font-weight: bold;
  display: inline;
}

.publication .journal {
  font-style: italic;
  display: inline;
}

.publication .links {
  display: inline;
  margin-left: 6px;
}

.publication .links a {
  margin: 0 2px;
  font-size: 14px;
}

.publication .award {
  display: inline;
  color: #b8860b;
  font-weight: bold;
  font-size: 14px;
}

/* --- CV Page --- */
.cv-content {
  text-align: center;
  padding: 40px 0;
}

.cv-download-btn {
  display: inline-block;
  padding: 14px 32px;
  background: #527bbd;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
  margin: 20px 0 30px;
}

.cv-download-btn:hover {
  background: #3d5f8a;
  text-decoration: none;
  color: #fff;
}

.cv-embed {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.cv-embed iframe {
  border: none;
  display: block;
}

.cv-fallback {
  margin-top: 15px;
  font-size: 14px;
  color: #888;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 14px;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

/* --- Clearfix --- */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar .nav-inner {
    padding: 0 15px;
  }

  .navbar .nav-items li a {
    padding: 8px 8px;
    font-size: 14px;
  }

  .navbar .nav-items li.nav-brand a {
    font-size: 15px;
    margin-right: 4px;
  }

  #main {
    padding: 20px 15px 40px;
  }

  .name {
    font-size: 150%;
    height: auto;
    margin-bottom: 15px;
  }

  .portrait-wrap {
    float: none;
    display: block;
    margin: 0 auto 20px;
  }

  .bio_format {
    margin-left: 0;
    font-size: 100%;
  }

  .paper-box {
    flex-direction: column;
  }

  .paper-box-image {
    width: 100%;
  }

  .paper-box-image:hover img {
    transform: scale(1.15);
  }

  .category {
    font-size: 150%;
  }
}

/* --- Dark Mode --- */
body.dark-mode {
  background: #1a1a2e;
  color: #e0e0e0;
}

body.dark-mode .navbar {
  background: rgba(26, 26, 46, 0.92);
  border-bottom-color: #2e2e4a;
}

body.dark-mode .navbar .nav-items li a {
  color: #aaa;
}

body.dark-mode .navbar .nav-items li a:hover {
  color: #fff;
}

body.dark-mode .navbar .nav-items li a.active {
  color: #fff;
}

body.dark-mode .navbar .nav-items li.nav-brand a {
  color: #fff;
}

body.dark-mode .navbar .nav-items li.theme-toggle a {
  color: #aaa;
}

body.dark-mode .navbar .nav-items li.theme-toggle a:hover {
  color: #fff;
}

body.dark-mode a {
  color: #7aa2d4;
}

body.dark-mode .name {
  color: #e8e8e8;
}

body.dark-mode .bio_format .seeking {
  color: #ff6b6b;
}

body.dark-mode .portrait-motto {
  color: #aaa;
}

body.dark-mode .interests-list li::before {
  color: #7aa2d4;
}

body.dark-mode .category {
  color: #e8e8e8;
}

body.dark-mode hr.line {
  background-image: linear-gradient(to right, rgba(200,200,220,0.7), rgba(200,200,220,0.2), rgba(200,200,220,0.05), rgba(200,200,220,0.0));
}

body.dark-mode .news-box {
  border-color: #444;
  background: #16213e;
}

body.dark-mode .exp-role {
  color: #e8e8e8;
}

body.dark-mode .exp-org {
  color: #48d1cc;
}

body.dark-mode .exp-date {
  color: #aaa;
}

body.dark-mode .exp-advisor {
  color: #bbb;
}

body.dark-mode .exp-desc li {
  color: #ccc;
}

body.dark-mode .exp-desc li::before {
  color: #7aa2d4;
}

body.dark-mode .badge-blue {
  background-color: #1a365d;
  color: #90caf9;
  border-color: #2b4c7e;
}

body.dark-mode .paper-box {
  background: #16213e;
  border-color: #2a2a4a;
}

body.dark-mode .paper-box-image:hover img {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

body.dark-mode .paper-box-text .paper-title a {
  color: #7aa2d4;
}

body.dark-mode .paper-box-text .paper-authors {
  color: #aaa;
}

body.dark-mode .paper-box-text .paper-desc {
  color: #999;
}

body.dark-mode .paper-box-text .paper-links a {
  color: #7aa2d4;
}

body.dark-mode .section-list li {
  color: #ccc;
}

body.dark-mode .section-list li::before {
  color: #888;
}

body.dark-mode .page-title {
  color: #e8e8e8;
}

body.dark-mode .page-subtitle {
  color: #aaa;
}

body.dark-mode .publication {
  color: #ccc;
}

body.dark-mode .publication::before {
  color: #888;
}

body.dark-mode .publication .links a {
  color: #7aa2d4;
}

body.dark-mode .publication .award {
  color: #daa520;
}

body.dark-mode .social-btn {
  background-color: #242c44;
  color: #ffffff;
  border-color: #3e4c70;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

body.dark-mode .social-btn i,
body.dark-mode .social-btn span {
  color: #ffffff;
}

body.dark-mode .social-btn:hover {
  background-color: #3d6fa5;
  color: #ffffff !important;
  border-color: #527bbd;
  box-shadow: 0 2px 8px rgba(82, 123, 189, 0.4);
}

body.dark-mode .cv-download-btn {
  background: #3d6fa5;
}

body.dark-mode .cv-download-btn:hover {
  background: #527bbd;
}

body.dark-mode .cv-embed {
  border-color: #444;
}

body.dark-mode .footer {
  color: #666;
  border-top-color: #333;
}

