/* Final visual polish requested during review. */

/* Homepage: compact portrait-first identity block. */
.home-hero {
  padding: 62px 0 60px;
}

.home-hero-inner {
  max-width: 1040px;
}

.home-hero-copy {
  max-width: 820px;
}

.home-hero-artwork {
  width: min(220px, 48vw);
  overflow: hidden;
  margin: 24px 0 26px;
  border: 1px solid #d8d8d8;
  border-radius: 18px;
  background: #ededed;
}

.home-hero-artwork img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.home-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
}

.site-body .home-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 4.35rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}

.site-body .home-chinese-name {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: 0.16em;
}

.site-body .home-role {
  margin-top: 24px;
}

.site-body .home-introduction {
  max-width: 760px;
}

/* The homepage now presents two research areas. */
.research-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Four concise destinations on the About page. */
.profile-link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Publication tags remain white; grey is used only as a rule. */
.publication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0 3px;
}

.publication-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.015em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Homepage publication list: compact rows with monochrome journal wordmarks. */
.selected-publications {
  gap: 5px;
}

.selected-publication {
  grid-template-columns: 142px minmax(0, 1fr) 155px 44px;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  border-radius: 8px;
}

.journal-mark {
  display: flex;
  min-height: 50px;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #111;
  color: #000;
  background: #fff;
  line-height: 1.05;
}

.journal-mark span {
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.journal-mark small {
  margin-top: 5px;
  color: inherit;
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.journal-mark-gigascience {
  color: #fff;
  border-color: #000;
  background: #000;
}

.journal-mark-gigascience span {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -0.04em;
}

.journal-mark-nature-reviews span {
  font-size: 0.82rem;
}

.selected-publication-main {
  min-width: 0;
}

.selected-publication .selected-publication-main h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.22;
}

.selected-publication > p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
}

.selected-publication > a {
  font-size: 0.72rem;
  text-align: right;
  white-space: nowrap;
}

.selected-publication .publication-tags {
  margin-bottom: 0;
}

/* Full publication page: closer to a bibliography than a card wall. */
.publication-year-group {
  gap: 18px;
  padding: 19px 0;
}

.publication-list {
  gap: 4px;
}

.publication-entry {
  padding: 9px 14px 9px 16px;
  border-radius: 7px;
}

.publication-entry::before {
  width: 3px;
  border-radius: 7px 0 0 7px;
}

.publication-entry .publication-venue {
  margin-bottom: 2px;
  font-size: 0.62rem;
  line-height: 1.25;
}

.publication-entry h3 {
  margin: 0 0 3px;
  font-size: 0.98rem;
  line-height: 1.24;
}

.publication-entry p {
  margin: 0 0 2px;
  font-size: 0.76rem;
  line-height: 1.34;
}

.publication-entry .publication-tags {
  margin: 4px 0 2px;
}

.publication-entry > a {
  display: inline-flex;
  margin-top: 1px;
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Research examples: image-first cards inspired by editorial social tiles. */
.research-paper-showcase {
  margin-top: 76px;
  padding-top: 52px;
  border-top: 1px solid var(--academic-line);
}

.research-paper-showcase .section-heading {
  margin-bottom: 30px;
}

.research-paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.research-paper-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  color: #000 !important;
  background: #fff;
  text-decoration: none;
}

.research-paper-card:hover {
  color: #000 !important;
  border-color: #000;
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.research-paper-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-bottom: 1px solid #d6d6d6;
  background: #ededed;
}

.research-paper-media img,
.research-paper-media object {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ededed;
}

.research-paper-media img {
  object-fit: cover;
  object-position: center;
  transition: transform 240ms ease;
}

.research-paper-card:hover .research-paper-media img {
  transform: scale(1.018);
}

.research-paper-media-pdf object {
  pointer-events: none;
}

.research-paper-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #000;
  background: #ededed;
  text-align: center;
}

.research-paper-fallback strong {
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
}

.research-paper-fallback span {
  margin-top: 8px;
  color: #000;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-paper-fallback small {
  margin-top: 14px;
  color: #000;
  font-size: 0.68rem;
  line-height: 1.4;
}

.research-paper-caption {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: #fff;
}

.research-paper-caption span {
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.research-paper-caption h3 {
  margin: 20px 0 0;
  color: #000 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.3;
}

@media (max-width: 960px) {
  .profile-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-publication {
    grid-template-columns: 125px minmax(0, 1fr) 120px;
  }

  .selected-publication > a {
    grid-column: 3;
  }

  .research-paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding: 48px 0 52px;
  }

  .home-hero-artwork {
    width: 180px;
    margin: 20px 0 22px;
    border-radius: 15px;
  }

  .site-body .home-hero-copy h1 {
    font-size: clamp(2.4rem, 12vw, 3.35rem);
  }

  .home-identity {
    display: block;
  }

  .site-body .home-chinese-name {
    margin-top: 8px;
  }

  .research-preview-grid,
  .profile-link-grid,
  .research-paper-grid {
    grid-template-columns: 1fr;
  }

  .selected-publication {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 11px 12px;
  }

  .journal-mark {
    width: min(170px, 100%);
    min-height: 44px;
  }

  .selected-publication > a {
    grid-column: 1;
    text-align: left;
  }

  .publication-year-group {
    gap: 8px;
    padding: 16px 0;
  }

  .publication-entry {
    padding: 9px 11px 9px 13px;
  }

  .research-paper-showcase {
    margin-top: 56px;
    padding-top: 40px;
  }

  .research-paper-media {
    aspect-ratio: 5 / 4;
  }

  .research-paper-caption {
    min-height: 0;
    padding: 16px;
  }

  .research-paper-caption h3 {
    margin-top: 12px;
  }
}
