/* Research Page — Miaomiao Li
   Rewritten 2026-03-22 */

/* === 1. Reset === */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0; padding: 0; }
button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }

/* === 2. Custom Properties === */
:root {
  --accent: #C44D58;
  --accent-nav: #E34F00;
  --text: #000;
  --nav-height: 60px;
  --content-max-width: 860px;
}

/* === 3. Base / Typography === */
body {
  color: var(--text);
  background-image: url("https://mangaedt-bkt.oss-cn-shenzhen.aliyuncs.com/img/background.jpg");
  background-position: 0 0;
  background-repeat: no-repeat;
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
}

/* Hide scrollbar (all browsers) */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* === 4. Header / Navigation === */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding-top: 22px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
}

#headerNav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 40px;
  height: 100%;
}

#navLinks {
  display: flex;
  align-items: center;
  gap: 25px;
}

.navItem {
  font-size: 18px;
  font-family: "Temporarium", serif;
  cursor: pointer;
  transition: all 0.2s;
}

.navItem a {
  font-size: 18px;
  font-family: "Temporarium", serif;
  color: var(--text);
}

.navItem a:hover {
  border-bottom: 1px solid var(--accent);
}

/* Higher specificity so the orange border persists even on hover */
.navItem.active a,
.navItem.active a:hover {
  border-bottom: 1px solid var(--accent-nav);
}

#navIdentity {
  display: flex;
  align-items: center;
  margin-left: 25px;
}

#navAvatar {
  padding-left: 27px;
  margin-right: 10px;
  border-left: 1px solid #999;
}

#navAvatar img {
  border: 1px solid #E3E3E3;
  border-radius: 10px;
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.4);
  width: 26px;
  height: 26px;
}

#navUserName {
  font-size: 19px;
  font-family: "Open Sans Condensed", "Segoe UI", "Ubuntu Condensed", sans-serif;
}

#hamburger {
  display: none;
  font-size: 24px;
  color: var(--text);
}

/* === 5. Page Content === */
#content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 100px 20px 60px;
}

/* === 6. Page Title & Bio === */
#pageTitle {
  color: var(--accent);
  font-family: "Open Sans Condensed", sans-serif;
  font-size: 36px;
  margin-bottom: 8px;
}

#pageBio {
  font-family: "Temporarium", serif;
  font-size: 18px;
  color: #555;
  margin-bottom: 40px;
}

/* === 7. Section Labels === */
.section-label {
  font-family: "Open Sans Condensed", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #999;
  margin-bottom: 20px;
}

/* === 8. Featured Project Cards === */
.project-card {
  display: flex;
  gap: 24px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 24px 24px 12px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.85);
  transition: box-shadow 0.2s;
}

.project-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.card-image {
  flex-shrink: 0;
  width: 220px;
}

.card-media-img,
.card-media-video {
  width: 100%;
  border-radius: 4px;
  background: #f0f0f0;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.venue-tag {
  display: inline-block;
  font-size: 12px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid #999;
  border-radius: 3px;
  color: #555;
}

.year-tag {
  font-size: 13px;
  color: #888;
  font-family: "Open Sans", sans-serif;
}

.card-title {
  font-family: "Open Sans", sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-authors {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}

.card-venue {
  display: none;
}

.card-tldr {
  font-family: "Temporarium", serif;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 14px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-links a,
.card-links .bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Temporarium", serif;
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #444;
  transition: all 0.15s;
}

.card-links a:hover,
.card-links .bibtex-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === 9. Full Publication List === */
#publist-section {
  margin-top: 50px;
  position: relative;
}

.publist-wrapper {
  display: flex;
  gap: 32px;
}

.publist {
  flex: 1;
  min-width: 0;
}

.pub-entry {
  font-family: "Temporarium", serif;
  font-size: 14px;
  color: #444;
  margin-bottom: 14px;
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid #e0e0e0;
}

.pub-entry:hover {
  border-left-color: var(--accent);
}

.pub-title {
  font-style: italic;
}

.pub-links a {
  font-size: 12px;
  color: var(--accent);
  margin-left: 4px;
}

.pub-links a:hover {
  text-decoration: underline;
}

/* === 10. Year Nav === */
.year-nav {
  position: sticky;
  top: 100px;
  flex-shrink: 0;
  width: 60px;
  align-self: flex-start;
}

.year-nav a {
  display: block;
  font-family: "Temporarium", serif;
  font-size: 15px;
  color: #bbb;
  padding: 4px 0;
  text-align: center;
  transition: color 0.2s;
  border-left: 2px solid transparent;
}

.year-nav a:hover {
  color: #555;
}

.year-nav a.active {
  color: var(--accent);
  font-weight: 700;
  border-left-color: var(--accent);
}

/* === 11. BibTeX Modal === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-family: "Open Sans Condensed", sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
}

.modal-close:hover {
  color: #333;
}

.modal-bibtex {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.modal-status {
  font-size: 14px;
  color: #28a745;
  text-align: center;
}

/* === 12. Hamburger Menu === */
#navLinks.open { display: flex; }

/* === 13. Responsive Media Queries === */

/* Tablet: 560-1023px — links only, no avatar/name */
@media (max-width: 1023px) {
  #navIdentity {
    display: none;
  }

  #headerNav {
    padding: 0 20px;
  }
}

/* Mobile: < 560px — hamburger menu */
@media (max-width: 559px) {
  #headerNav {
    justify-content: space-between;
    padding: 0 16px;
  }

  #hamburger {
    display: block;
    order: 2;
    font-size: 28px;
  }

  #navLinks {
    display: none;
    position: absolute;
    top: calc(var(--nav-height) + 22px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    padding: 16px 0;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20;
  }

  #navLinks.open {
    display: flex;
  }

  #navLinks .navItem {
    padding: 12px 24px;
    width: 100%;
  }

  /* Show name label on left side */
  #navIdentity {
    display: flex;
    margin-left: 0;
    order: 1;
  }

  #navAvatar {
    display: none;
  }

  #navUserName {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 0 4px #fff,
                 0 0 10px #fff,
                 0 0 20px rgba(255, 255, 255, 0.5);
  }

  /* Research-specific mobile rules */
  .project-card {
    flex-direction: column;
  }

  .card-image {
    width: 100%;
  }

  .year-nav {
    display: none;
  }

  #content {
    padding-top: 80px;
  }
}
