:root {
  color-scheme: light;
  --ink: #202426;
  --muted: #677176;
  --link: #1f5e8c;
  --line: #dce2e5;
  --soft-line: #edf1f3;
  --wash: #f7f9fa;
  --card: #ffffff;
  --brick: #a95642;
  --green: #315f55;
  --gold: #b3a369;
  --teal: #178f8a;
  --blue: #003057;
  --nav-bg: rgba(255, 255, 255, 0.96);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf2f3;
  --muted: #a9b5ba;
  --link: #8ec7ff;
  --line: #344146;
  --soft-line: #263238;
  --wash: #151d20;
  --card: #0f1518;
  --brick: #e39a86;
  --green: #8bbeb2;
  --gold: #d3c17c;
  --teal: #72d6d0;
  --blue: #9dc8ff;
  --nav-bg: rgba(15, 21, 24, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--card);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1120px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
}

.nav-name {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.site-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  font-weight: 750;
}

.theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink);
  cursor: pointer;
}

.theme-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset -5px -3px 0 1px var(--ink);
}

:root[data-theme="dark"] .theme-icon {
  width: 30px;
  height: 30px;
  background: url("assets/sun-white.png") center / contain no-repeat;
  box-shadow: none;
}

.site-nav nav a {
  color: var(--muted);
}

.page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 44px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: start;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--soft-line);
}

.intro h1 {
  margin: 0 0 6px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1;
}

.intro h1 span {
  display: inline-block;
  margin-left: 8px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.45rem);
  font-weight: 900;
}

.subtitle {
  margin: 0 0 8px;
  color: var(--brick);
  font-size: 1.12rem;
  font-weight: 800;
}

.role {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

.intro-copy p {
  max-width: 680px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  border-bottom: 2px solid rgba(31, 94, 140, 0.22);
  color: var(--blue);
  font-size: 0.93rem;
  font-weight: 800;
}

.intro-card {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.portrait {
  display: block;
  width: 250px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(32, 36, 38, 0.12);
}

:root[data-theme="dark"] .portrait {
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.35);
}

.contact-mini {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.contact-mini p {
  margin: 0;
}

.contact-mini a {
  font-weight: 800;
}

.scholar-link {
  font-weight: 800;
}

.section {
  padding: 34px 0;
  border-bottom: 1px solid var(--soft-line);
}

.section h2 {
  margin: 0 0 18px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.2;
}

.section h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.section p {
  margin: 0 0 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 0.94rem;
}

.note-box {
  padding: 28px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.science-card {
  display: grid;
  grid-template-columns: 1fr 54px 1.1fr 54px 1fr;
  align-items: center;
  margin-top: 18px;
}

.science-node {
  display: grid;
  min-height: 112px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(49, 95, 85, 0.18);
  border-radius: 8px;
  background: var(--card);
  text-align: center;
}

.science-node strong {
  font-size: 0.95rem;
}

.science-node small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.science-link {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, rgba(49, 95, 85, 0.14), rgba(49, 95, 85, 0.7));
}

.science-link::after {
  position: absolute;
  top: 50%;
  right: -2px;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(49, 95, 85, 0.72);
  border-right: 2px solid rgba(49, 95, 85, 0.72);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.protein-ribbon {
  position: relative;
  width: 74px;
  height: 38px;
}

.protein-ribbon span {
  position: absolute;
  width: 40px;
  height: 16px;
  border: 3px solid var(--brick);
  border-color: var(--brick) transparent transparent transparent;
  border-radius: 50%;
}

.protein-ribbon span:nth-child(1) {
  left: 0;
  top: 2px;
  transform: rotate(-18deg);
}

.protein-ribbon span:nth-child(2) {
  left: 19px;
  top: 8px;
  border-color: var(--blue) transparent transparent transparent;
  transform: rotate(18deg);
}

.protein-ribbon span:nth-child(3) {
  left: 3px;
  top: 20px;
  border-color: var(--gold) transparent transparent transparent;
  transform: rotate(18deg);
}

.protein-ribbon span:nth-child(4) {
  left: 34px;
  top: 22px;
  border-color: var(--teal) transparent transparent transparent;
  transform: rotate(-18deg);
}

.ml-grid {
  display: grid;
  grid-template-columns: repeat(4, 11px);
  gap: 5px;
}

.ml-grid span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(23, 143, 138, 0.18);
}

.ml-grid span:nth-child(3n + 1) {
  background: rgba(169, 86, 66, 0.32);
}

.ml-grid span:nth-child(4n) {
  background: rgba(179, 163, 105, 0.44);
}

.agent-chip {
  position: relative;
  width: 70px;
  height: 44px;
  border: 2px solid rgba(49, 95, 85, 0.6);
  border-radius: 8px;
  background: rgba(49, 95, 85, 0.08);
}

.agent-chip::before,
.agent-chip::after {
  position: absolute;
  left: -9px;
  right: -9px;
  height: 2px;
  background: rgba(179, 163, 105, 0.7);
  content: "";
}

.agent-chip::before {
  top: 11px;
}

.agent-chip::after {
  bottom: 11px;
}

.agent-chip span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.agent-chip span:nth-child(1) {
  left: 14px;
  top: 11px;
}

.agent-chip span:nth-child(2) {
  left: 31px;
  top: 18px;
}

.agent-chip span:nth-child(3) {
  right: 14px;
  bottom: 11px;
}

.news-list,
.research-list,
.education-list {
  display: grid;
  gap: 18px;
}

.news-list article,
.research-list article,
.education-list article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.news-list time,
.research-list time,
.education-list time {
  color: var(--brick);
  font-size: 0.92rem;
  font-weight: 900;
}

.research-list article span {
  display: block;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
}

.education-list img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.education-list article {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}

.empty-state {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.text-list {
  margin: 0;
  padding-left: 20px;
}

.text-list li {
  margin-bottom: 10px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  font-weight: 800;
}

.visitor-map {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(220px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.visitor-widget {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(234, 243, 245, 0.9), rgba(255, 255, 255, 0.72) 60%),
    var(--card);
}

.visitor-map strong {
  display: block;
  margin-bottom: 6px;
}

.visitor-map p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 820px) {
  .site-nav {
    position: static;
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .intro,
  .visitor-map {
    grid-template-columns: 1fr;
  }

  .intro-card {
    justify-items: start;
  }

  .portrait {
    width: min(250px, 100%);
  }

  .science-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .science-link {
    width: 2px;
    height: 22px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(49, 95, 85, 0.14), rgba(49, 95, 85, 0.7));
  }

  .science-link::after {
    top: auto;
    right: auto;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .page {
    width: min(100% - 28px, 980px);
  }

  .intro h1 span {
    display: block;
    margin: 6px 0 0;
  }

  .news-list article,
  .research-list article,
  .education-list article {
    grid-template-columns: 1fr;
  }

  .note-box {
    padding: 20px;
  }
}
