:root {
  color-scheme: light;
  --color-accent: #4a708b;
  --color-clemson-orange: #f56600;
  --color-text: #343a40;
  --color-muted: #59636b;
  --color-border: #e2e7eb;
  --content-width: 1000px;
  /* Shared sizes for all section headings and content. */
  --content-font-size: 18px;
  --section-title-font-size: 21px;
  --anchor-offset: 9rem;
  font-family: Optima, "Book Antiqua", "Palatino Linotype", Palatino,
    "Computer Modern Serif", "Latin Modern Roman", "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

body {
  margin: 0;
  color: var(--color-text);
  background: #fff;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #2f516a;
}

main a {
  color: #ed7d31;
}

main a:hover {
  color: #b85c1f;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 1rem;
  padding: 0.5rem 0.8rem;
  background: #fff;
  border: 1px solid var(--color-accent);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.site-brand {
  flex: 1;
  min-width: 0;
  text-decoration: none;
}

.brand-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.brand-tagline {
  display: block;
  max-width: 650px;
  margin-top: 0.4rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.site-nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="location"] {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

main {
  display: grid;
  grid-template-columns: minmax(1.5rem, 1fr) minmax(0, calc(var(--content-width) - 3rem)) minmax(1.5rem, 1fr);
  padding-bottom: 5rem;
  font-size: var(--content-font-size);
  line-height: 1.5;
}

main > section {
  grid-column: 2;
  min-width: 0;
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

main > section:last-child {
  border-bottom: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
}

h1,
h2 {
  color: var(--color-accent);
}

h2 {
  margin: 0 0 1.5rem;
  font-size: var(--section-title-font-size);
}

h3 {
  margin: 2rem 0 1rem;
}

h3,
h4 {
  font-size: 1em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.lab-intro {
  grid-column: 1 / -1;
  padding-top: 0;
  padding-bottom: clamp(3rem, 6vw, 4rem);
}

/* 首页 GIF 尺寸：修改下面的 width 和 max-width。 */
.earth-hero {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #000;
}

.earth-hero img,
.earth-hero video {
  display: block;
  width: 100%;
  height: auto;
}

.lab-intro-copy {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  color: #000;
  font-weight: 400;
  letter-spacing: normal;
  text-align: left;
  text-wrap: pretty;
}

.lab-intro .keep-together {
  white-space: nowrap;
}

#opening {
  min-height: calc(100vh - var(--anchor-offset) - 5rem);
}

#opening h3 {
  color: #ed7d31;
}

.people-group + .people-group {
  margin-top: 2.75rem;
}

.people-group .group-title {
  margin: 0 0 1.35rem;
  color: var(--color-muted);
  font-weight: 700;
}

.person {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.person img,
.member-photo {
  display: block;
  flex-shrink: 0;
  width: 145px;
  max-width: 100%;
  height: 145px;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
}

.person h4 {
  margin-top: 0.1rem;
  margin-bottom: 0.65rem;
}

.person p {
  margin-bottom: 0.35rem;
}

.person .role {
  font-weight: 700;
}

.person .department {
  color: var(--color-muted);
}

.members-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  max-width: 700px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.members-list li {
  margin: 0;
  padding: 0;
}

.member-photo {
  margin-bottom: 0.75rem;
}

.members-list h4 {
  margin: 0 0 0.4rem;
}

.members-list .role {
  color: var(--color-muted);
}

.alumni-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: disc;
}

.alumni-list li {
  margin: 0;
  padding: 0;
}

.alumni-list li + li {
  margin-top: 0.35rem;
}

.alumni-list strong,
.alumni-list .role,
.alumni-list .dates {
  color: var(--color-muted);
}

.alumni-list .dates {
  white-space: nowrap;
}

ol,
ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  padding-left: 0.25rem;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

li::marker {
  color: var(--color-muted);
}

li > ul {
  margin-top: 0.5rem;
}

li > ul li {
  margin-bottom: 0.3rem;
}

/* 论文配图宽度：调整第一列的 240px；手机上自动改为上下排列。 */
.publication {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem;
  padding: 1.75rem 0;
}

.publication + .publication {
  border-top: 1px solid var(--color-border);
}

.publication-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
}

.publication-image img,
.publication-image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-placeholder {
  flex-direction: column;
  gap: 0.65rem;
  border: 1px dashed #c5d1da;
  color: var(--color-muted);
  background: #f5f8fa;
}

.publication-details {
  min-width: 0;
}

.publication-title {
  margin: 0 0 0.65rem;
  color: var(--color-accent);
  line-height: 1.4;
}

.publication-title a {
  color: var(--color-accent);
  text-decoration: none;
}

.publication-title a:hover {
  color: #2f516a;
  text-decoration: underline;
}

.publication-authors,
.publication-venue {
  margin: 0 0 0.4rem;
}

.publication-venue {
  color: var(--color-muted);
}

.publication-award {
  margin: 0.65rem 0 0;
  color: #ed7d31;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.65rem 0 0;
}

@media (max-width: 800px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-brand {
    flex: auto;
    width: 100%;
  }

  .site-nav {
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  :root {
    font-size: 16px;
    --anchor-offset: 12rem;
  }

  .header-inner {
    padding-top: 0.8rem;
    padding-right: 1rem;
    padding-bottom: 0.6rem;
    padding-left: 1rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-tagline {
    font-size: 0.88rem;
  }

  .site-nav {
    gap: 1.5rem;
    font-size: 0.95rem;
  }

  main {
    grid-template-columns: minmax(1.25rem, 1fr) minmax(0, calc(var(--content-width) - 2.5rem)) minmax(1.25rem, 1fr);
  }

  .lab-intro-copy {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  main > section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .person {
    gap: 1.1rem;
  }

  .members-list {
    gap: 1.25rem;
  }

  .publication {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }

  .publication-image {
    max-width: 360px;
  }
}

@media (max-width: 360px) {
  .header-inner {
    gap: 0.5rem;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .site-nav {
    gap: 1.25rem;
    font-size: 0.9rem;
  }

  .members-list {
    grid-template-columns: 1fr;
  }
}

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