/* Custom overrides for Qunzhong Wang's homepage */

/* Widen profile card so name & university stay on one line */
#profile-namecard.profile-wrapper {
  width: 800px;
  position: relative;
  z-index: 5;
}

#my-name,
#my-title {
  white-space: nowrap;
}

/* Shorter profile card: reduce padding */
#profile-namecard .profile-col {
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Social media centered under name/school, ensure clickable */
.social-media {
  text-align: center;
  margin-top: 8px;
  position: relative;
  z-index: 10;
}
.social-media .icon-button {
  position: relative;
  z-index: 11;
  pointer-events: auto;
}

/* Shorter cover section */
.cover {
  height: 260px;
}
@media screen and (max-width: 600px) {
  .cover {
    height: 340px;
  }
}

@media screen and (max-width: 800px) {
  #profile-namecard.profile-wrapper {
    width: calc(90% - 30px);
  }
  #my-name,
  #my-title {
    white-space: normal;
  }
}

/* Publication teaser images: 95% fill in the frame box */
.pub-left > .intro-img.frame {
  box-sizing: border-box;
  padding: 0.5%;
}

/* Publication domain filters */
.pub-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pub-filter-btn {
  padding: 6px 14px;
  border: 1px solid #9b3022;
  background: white;
  color: #9b3022;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}
.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: #9b3022;
  color: white;
}

/* Publications: vertical stacking (up to down) */
.pub-slider {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pub-slider .pub.hidden {
  display: none !important;
}

/* Publications: confined scrollable window (like Awards) */
.pub-container {
  max-height: 800px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.pub-container::-webkit-scrollbar {
  width: 6px;
}
.pub-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.pub-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.pub-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Space between Publications and Awards */
#awards.awards {
  margin-top: 35px;
}

/* Awards: confined scrollable window (like News) */
.awards-container {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.awards-container::-webkit-scrollbar {
  width: 6px;
}
.awards-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.awards-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.awards-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Pinned CMO award row */
.award-pinned {
  /* background: linear-gradient(90deg, rgba(155, 48, 34, 0.18) 0%, rgba(155, 48, 34, 0.06) 50%, transparent 100%); */
  border-left: 3px solid rgba(155, 48, 34, 0.5);
}
.award-pinned td {
  padding-top: 6px !important;
  padding-bottom: 10px !important;
}

/* Education icons: consistent sizing, CUHK thicker/bolder */
.edu-icon {
  width: 100%;
  max-width: 100px;
  height: auto;
  object-fit: contain;
}
.edu-icon-cuhk {
  filter: contrast(1) drop-shadow(0 0 0.5px rgba(0,0,0,0.4));
  min-width: 80px;
}

/* Timeline CUHK icon: make wider (shield is tall/narrow) */
.timeline-icon-cuhk {
  width: 52px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: center;
}

/* Education table alignment */
table .edu-icon {
  display: block;
  margin: 0 auto;
}

/* GPA and Rank badges (red/blue badge style) */
.edu-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}
.gpa-badge {
  display: inline-block;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 0.9em;
  border-radius: 6px;
  color: #b31b1b;
  background-color: #f0f0f0;
}
.rank-badge {
  display: inline-block;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 0.9em;
  border-radius: 6px;
  color: #0047ab;
  background-color: #f0f0f0;
}
.transcript-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 0.9em;
  border-radius: 6px;
  color: #000;
  background-color: #f0f0f0;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.transcript-badge:hover {
  background-color: #e5e5e5;
  color: #000;
  text-decoration: none;
}
.transcript-badge i {
  font-size: 0.95em;
}

/* Resume button - compact icon style */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9em;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.resume-btn i {
  font-size: 0.95em;
}
.resume-btn:hover {
  background-color: #e5e5e5;
  color: #333;
  text-decoration: none;
}

/* PhD seeking statement */
.phd-seek {
  font-size: 1.1em;
  color: #c41e3a;
  background-color: #fff0f3;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 3px solid #c41e3a;
  margin-top: 16px;
}

/* Footer: 3-column layout for pageview widget */
.footer-col-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-col-1 { flex: 0 1 auto; }
.footer-col-2 { flex: 1 1 140px; }
.footer-col-3 { flex: 0 1 auto; }
.pageview-widget {
  min-height: 120px;
  min-width: 140px;
  transform: scale(0.8);
  transform-origin: center center;
}
.pageview-widget object,
.pageview-widget iframe {
  max-width: 100%;
  min-height: 80px;
}
