:root {
  --ink: #1a1a2e;
  --muted: #6e7491;
  --subtle: #f4f4f9;
  --surface: #ffffff;
  --line: #d8d8e8;
  --accent: #6A5ACD;
  --accent-dark: #584BAA;
  --warm: #9370DB;
  --shadow: 0 14px 34px rgba(23, 33, 43, 0.1);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfd 0%, #f7f9fa 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(220, 226, 232, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #1c8e5f);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Mobile nav toggle button */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle .bar + .bar { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] .bar:first-child { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:last-child { transform: translateY(-7px) rotate(-45deg); }

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-dark);
  background: rgba(11, 120, 115, 0.09);
}

.hero {
  min-height: 60vh;
  display: grid;
  align-items: center;
  padding: 72px max(24px, calc((100vw - var(--max)) / 2));
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(10, 24, 33, 0.82) 0%, rgba(10, 24, 33, 0.62) 42%, rgba(10, 24, 33, 0.2) 100%),
    url("fudan-campus.jpg") center center / cover no-repeat;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8be0d7;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 3.55rem;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 580px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.12);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 62px 24px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.35fr);
  gap: 46px;
}

.intro-grid h2,
.section-heading h2,
.split-feature h2,
.member-card h2,
.research-block h2,
.patents h2 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1.88rem;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 700;
}

.intro-copy p,
.split-feature p,
.member-copy p,
.research-block p,
.page-hero p,
.plain-list li {
  color: var(--muted);
}

.intro-copy p:first-child,
.research-block p:first-of-type {
  margin-top: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

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

.card {
  min-height: 214px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.055);
}

.card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(23, 33, 43, 0.12); }

.card-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 850;
}

.card h3,
.news-list h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
  line-height: 1.32;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.split-feature,
.profile {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 390px);
  align-items: center;
  gap: 48px;
}

.split-feature img,
.profile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.text-link {
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.news-band {
  padding-top: 56px;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.news-list article {
  padding: 20px;
  border-left: 4px solid var(--accent);
  background: var(--subtle);
}

.news-list time {
  display: block;
  margin-bottom: 8px;
  color: var(--warm);
  font-weight: 800;
}

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 62px 24px 34px;
}

.page-hero {
  background: linear-gradient(180deg, rgba(11,120,115,0.03), rgba(10,24,33,0.01));
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(23, 33, 43, 0.03);
}

.compact-hero {
  max-width: 860px;
}

.page-hero h1 {
  max-width: 820px;
  color: var(--ink);
  font-size: 2.62rem;
}

.page-hero p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 14px;
  font-size: 1rem;
}

.research-layout {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.research-block {
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(260px, 1fr);
  align-items: center;
  gap: 30px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(23, 33, 43, 0.045);
}

.research-figure {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
}

.research-block p {
  margin: 10px 0 0;
}

.figure-note {
  color: var(--accent-dark) !important;
  font-size: 0.88rem;
  font-weight: 650;
}

.people-section {
  padding-top: 24px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.member-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.055);
}

.member-card img {
  width: 128px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  background: var(--subtle);
}

.member-card h2 {
  font-size: 1.28rem;
  font-weight: 700;
}

.member-copy p {
  margin: 10px 0 0;
}

.member-details {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.member-details div {
  display: grid;
  gap: 2px;
}

.member-details dt {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.88rem;
}

.member-details dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--accent-dark);
  font-weight: 850;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.publication-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  counter-reset: publications;
  list-style: none;
}

.publication-list li {
  counter-increment: publications;
  position: relative;
  padding: 22px 22px 22px 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.publication-list li { transition: transform .16s ease, box-shadow .16s ease; }
.publication-list li:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(23,33,43,0.06); }

.publication-list li::before {
  content: counter(publications, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 23px;
  color: var(--warm);
  font-weight: 850;
  font-size: 0.84rem;
}

.publication-list p {
  margin: 0;
  color: #303b45;
}

.publication-list a {
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

.featured-publication {
  border-left: 5px solid var(--accent) !important;
}

.plain-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-left: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 28px;
}

.gallery-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px max(24px, calc((100vw - var(--max)) / 2));
  color: rgba(255, 255, 255, 0.78);
  background: #17212b;
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  /* collapse/expand nav on small screens */
  .nav-toggle { display: inline-flex; }
  .site-nav { display: block; width: 100%; max-height: 0; overflow: hidden; transition: max-height .28s ease; }
  .site-nav.open { max-height: 600px; }

  .site-nav a { display: block; padding: 10px 12px; margin: 6px 0; border-radius: 6px; }

  .hero {
    min-height: 64vh;
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 3rem;
  }

  .intro-grid,
  .research-cards,
  .split-feature,
  .news-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .split-feature img,
  .profile img {
    max-width: 430px;
  }

  .research-block,
  .member-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .member-card img {
    width: 132px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .site-header {
    padding: 12px 18px;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }

  .hero,
  .section,
  .page-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.45rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1.05rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .intro-grid h2,
  .section-heading h2,
  .split-feature h2,
  .member-card h2,
  .research-block h2,
  .patents h2 {
    font-size: 1.75rem;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 6px;
  }


  .member-card { transition: transform .16s ease, box-shadow .16s ease; }
  .member-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(23,33,43,0.06); }
  .publication-list li {
    padding: 20px;
  }

  .publication-list li::before {
    position: static;
    display: block;
    margin-bottom: 10px;
  }

  .site-footer {
    flex-direction: column;
    padding-left: 18px;
    padding-right: 18px;
  }
}
