/* ==========================================================================
   PQC-Huanglab — shared stylesheet
   Huang Lab of Protein Quality Control · IMB, Nanjing University
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary: #5b2c83;        /* deep academic purple */
  --primary-dark: #452063;
  --primary-soft: #6d3a96;
  --primary-050: #f5f1f9;
  --gold: #b8862f;           /* scholarly gold accent */
  --ink: #1f2430;
  --body-color: #454b59;
  --muted: #7b8194;
  --line: #e6e2ee;
  --bg: #ffffff;
  --bg-soft: #f8f7fb;
  --footer-bg: #231b30;
  --shadow-sm: 0 2px 8px rgba(35, 27, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(35, 27, 48, 0.09);
  --radius: 12px;
  --font-serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-color);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.3;
}

a {
  color: var(--primary);
}

::selection {
  background: var(--primary);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 56px 0;
}

.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 34px);
}

.section-head .section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 9px 24px;
  transition: all 0.25s ease;
}

.btn-outline {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-mini {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 3px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft) 55%, var(--gold));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.brand-sub {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--primary);
  margin-top: 2px;
}

.brand-cn {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--body-color);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-list a:hover {
  color: var(--primary);
  background: var(--primary-050);
}

.nav-list a.active {
  color: var(--primary);
}

.nav-list a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Sub-page hero band
   ========================================================================== */
.page-hero {
  text-align: center;
  padding: 52px 0 44px;
  background: linear-gradient(180deg, var(--primary-050) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: clamp(28px, 4vw, 38px);
}

.page-lead {
  max-width: 620px;
  margin: 10px auto 0;
  font-size: 16.5px;
  color: var(--muted);
}

/* ==========================================================================
   Homepage — hero slider
   ========================================================================== */
.hero-section {
  padding: 28px 0 0;
}

.hero-slider {
  position: relative;
  height: clamp(240px, 36vw, 420px);
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slide.is-active img {
  animation: kenburns 8s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
  z-index: 5;
}

.hero-slider:hover .hero-arrow,
.hero-arrow:focus-visible {
  opacity: 1;
}

.hero-arrow:hover {
  background: #fff;
}

.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.is-active {
  width: 24px;
  background: #fff;
}

/* ==========================================================================
   Homepage — PI profile card
   ========================================================================== */
.profile-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 34px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px;
  box-shadow: var(--shadow-md);
}

.profile-photo {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.profile-name {
  font-size: 27px;
}

.profile-role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 4px 0 16px;
}

.profile-bio {
  margin-bottom: 22px;
}

/* ==========================================================================
   Homepage — news panels & friendly links
   ========================================================================== */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}

.panel-title {
  font-size: 20px;
}

.panel-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.panel-link:hover {
  color: var(--primary);
}

.panel-list {
  list-style: none;
}

.panel-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}

.panel-list li:last-child {
  border-bottom: none;
}

.news-chip {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.panel-list a {
  flex: 1;
  min-width: 0;
  color: var(--body-color);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-list a:hover {
  color: var(--primary);
}

/* Compact friendly-links strip (homepage, sits flush above the footer) */
.link-strip {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 16px 0;
}

.link-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
}

.link-strip-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 10px;
}

.link-strip-inner a {
  font-size: 13px;
  color: var(--body-color);
  text-decoration: none;
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-strip-inner a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-050);
}

.panel-empty {
  color: var(--muted);
  font-size: 14px;
}

/* Lab system entry (left) + links (right), one strip */
.links-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 32px;
}

.lab-system-block,
.developed-block {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: 12px;
}

.lab-system-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow 0.25s ease;
}

.lab-system-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.lab-system-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lab-system-link {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}

.lab-system-block:hover .lab-system-link,
.developed-block:hover .lab-system-link {
  color: var(--primary);
}

.lab-system-block:hover .lab-system-icon,
.developed-block:hover .lab-system-icon {
  box-shadow: 0 6px 16px rgba(91, 44, 131, 0.3);
}

.lab-system-cn {
  font-size: 12.5px;
  color: var(--muted);
}

.lab-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 2px 12px;
  background: #fff;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .links-row {
    flex-direction: column;
    align-items: center;
  }

  .link-strip-inner {
    justify-content: center;
    margin-top: 0;
  }
}

/* Research directions overview */
.research-overview {
  max-width: 900px;
  margin: 0 auto 34px;
  background: linear-gradient(135deg, #faf8fc, var(--primary-050));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 36px;
  color: var(--body-color);
  box-shadow: var(--shadow-sm);
}

.overview-title {
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 8px;
}

.overview-lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.overview-list {
  list-style: none;
}

.overview-list li {
  position: relative;
  padding: 11px 0 11px 28px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
}

.overview-list li:last-child {
  border-bottom: none;
}

.overview-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 20px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ==========================================================================
   Research page
   ========================================================================== */
.research-card {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 38px 42px;
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: clamp(21px, 2.6vw, 27px);
  margin: 14px 0 18px;
}

.card-text {
  font-size: 16px;
  line-height: 1.85;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: var(--primary-050);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
}

.figure-frame {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.figure-frame img {
  width: 100%;
  display: block;
}

.figure-caption {
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  line-height: 1.65;
}

.figure-caption strong {
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}

/* Tool detail page */
.feature-list {
  list-style: none;
  margin: 16px 0 22px;
}

.feature-list li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Publications page
   ========================================================================== */
.pubs-list {
  list-style: none;
  max-width: 920px;
  margin: 0 auto;
}

.pub-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.pub-item:first-child {
  padding-top: 0;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-cover {
  flex: 0 0 84px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pub-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.pub-journal {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--primary-soft);
}

.pub-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 9px;
  line-height: 1.5;
}

.pub-title {
  font-size: 17.5px;
  margin-bottom: 5px;
}

.pub-title a {
  color: var(--ink);
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.pub-authors {
  font-size: 14px;
  color: var(--body-color);
  margin-bottom: 10px;
}

.pub-authors strong {
  color: var(--ink);
}

.pub-actions {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   Team page
   ========================================================================== */
.team-group {
  max-width: 960px;
  margin: 0 auto 46px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  margin-bottom: 22px;
}

.group-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Featured lead card (PI / lab manager) */
.team-lead {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.team-lead-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-050);
  box-shadow: 0 0 0 1px var(--line);
  flex-shrink: 0;
}

.team-lead-name {
  font-size: 22px;
}

.team-lead-role {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 4px 0 10px;
}

.team-lead-bio {
  font-size: 14.5px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 26px 18px;
  max-width: 860px;
  margin: 0 auto;
}

/* Photo-forward student card */
.member-card {
  text-align: center;
  padding: 4px 4px 8px;
  transition: transform 0.25s ease;
}

.member-card:hover {
  transform: translateY(-4px);
}

.member-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  padding: 3px;
  margin-bottom: 13px;
  transition: box-shadow 0.25s ease;
}

.member-card:hover .member-avatar {
  box-shadow: 0 8px 22px rgba(91, 44, 131, 0.28);
}

.member-name {
  font-size: 16px;
}

.member-role {
  display: inline-block;
  background: var(--primary-050);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 999px;
  margin: 6px 0;
}

.member-bio {
  font-size: 12.5px;
  color: var(--muted);
}

/* Alumni compact list */
.alumni-list {
  list-style: none;
  max-width: 620px;
  margin: 0 auto;
}

.alumni-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 6px;
  border-bottom: 1px dashed var(--line);
}

.alumni-item:last-child {
  border-bottom: none;
}

.alumni-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
}

.alumni-meta {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ==========================================================================
   News / Group life — timeline
   ========================================================================== */
.timeline {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
  border-left: 2px solid var(--line);
  padding-left: 30px;
  margin-left: 10px;
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
}

.timeline-date {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--primary);
  background: var(--primary-050);
  border-radius: 999px;
  padding: 2px 13px;
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}

.timeline-body h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.timeline-body p {
  font-size: 15px;
}

.timeline-body .btn-mini {
  margin-top: 10px;
}

.timeline-photo {
  display: block;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 12px;
}

.timeline-note {
  max-width: 820px;
  margin: 26px 0 0 42px;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 26px;
  align-items: stretch;
  max-width: 1060px;
  margin: 0 auto;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  border-color: var(--primary-soft);
  box-shadow: var(--shadow-md);
}

.info-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-head .info-title {
  margin-bottom: 0;
}

.info-title {
  font-size: 20px;
}

.info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 15px;
}

.info-label {
  flex: 0 0 96px;
  font-weight: 600;
  color: var(--ink);
}

.info-value {
  flex: 1;
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

.info-card .btn-mini {
  margin-top: 10px;
}

/* Embedded map card */
.map-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
}

.map-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--body-color);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.map-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.map-frame {
  flex: 1;
  min-height: 480px;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.map-toolbar-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: auto;
}

.getting-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-note {
  font-size: 13px;
  color: var(--body-color);
}

/* ==========================================================================
   Event detail page
   ========================================================================== */
.detail-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.detail-back {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.detail-back:hover {
  color: var(--primary);
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.detail-title {
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.35;
  margin-bottom: 20px;
}

.detail-cover {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 24px;
}

.detail-body p {
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 15px;
}

.detail-body .btn-mini {
  margin-top: 4px;
}

.detail-missing {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 30px 0 10px;
}

.detail-missing p {
  color: var(--muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   Footer — two-line, centered academic style
   ========================================================================== */
.site-footer {
  position: relative;
  background: var(--footer-bg);
  color: #b7aecb;
  font-size: 13px;
  margin-top: 0;
  padding: 15px 0 13px;
}

.site-footer::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft) 55%, var(--gold));
}

.footer-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  text-align: center;
}

.footer-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 2px;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  margin-right: 2px;
}

.footer-sep {
  color: #6f6488;
}

.footer-line1 a {
  color: #cfc6e0;
  text-decoration: none;
}

.footer-line1 a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-line2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 26px;
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: #8f86a6;
}

.visit-stats {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.visit-stats[hidden] {
  display: none;
}

.visit-stats strong {
  color: #fff;
  font-weight: 600;
}

.visit-sep {
  opacity: 0.5;
  margin: 0 2px;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.float-buttons {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.float-buttons button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(91, 44, 131, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.float-buttons button.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.float-buttons button:hover {
  background: var(--primary-dark);
}

/* ==========================================================================
   Scroll-reveal animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* Lightbox (click a compressed image to view the original) */
img[data-full] {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(23, 16, 34, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 6px 0 14px;
  }

  body.nav-open .site-nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 2px;
    padding: 8px 24px 0;
  }

  .nav-list a {
    padding: 12px 12px;
  }

  .nav-list a.active::after {
    display: none;
  }

  .nav-list a.active {
    background: var(--primary-050);
  }

  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    max-width: 260px;
    margin: 0 auto;
    display: block;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 40px 0;
  }

  .brand-cn {
    display: none;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-title {
    font-size: 18px;
  }

  .page-hero {
    padding: 40px 0 34px;
  }

  .research-card {
    padding: 26px 20px;
  }

  .pub-item {
    flex-direction: column;
    gap: 12px;
  }

  .pub-cover {
    flex-basis: auto;
    width: 72px;
    height: 96px;
  }

  .team-lead {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .timeline {
    padding-left: 22px;
  }

  .timeline-item::before {
    left: -29px;
  }

  .info-card {
    padding: 22px 20px;
  }

  .info-label {
    flex-basis: 84px;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }

  .brand-sub {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide {
    transition: none;
  }

  .hero-slide.is-active img {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .member-card,
  .btn,
  .btn-mini,
  .link-chips a {
    transition: none;
  }
}
