@font-face {
  font-family: "QiuHongKai";
  /* src: url("./江西拙楷.ttf") format("truetype");
   */
  /* src: url("./演示秋鸿楷.ttf") format("truetype");
   */
  /* src: url("./联盟起艺卢帅正锐黑体.ttf") format("truetype"); */

  src: url("./cfont.ttf") format("truetype");

   font-style: normal;
  font-weight: normal;
  font-display: swap;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5fbfb;
  --bg-elev: #ffffff;
  --bg-soft: #edf6f7;
  --text: #102326;
  --text-muted: #4c666b;
  --border: rgba(28, 90, 98, 0.14);
  --accent: #5c9fa9;
  --accent-strong: #3f7f89;
  --accent-soft: rgba(92, 159, 169, 0.12);
  --shadow: 0 12px 36px rgba(16, 35, 38, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1618;
  --bg-elev: #121e20;
  --bg-soft: #152326;
  --text: #e6f3f4;
  --text-muted: #9bb2b6;
  --border: rgba(122, 173, 180, 0.16);
  --accent: #6ea9b2;
  --accent-strong: #8bc1ca;
  --accent-soft: rgba(110, 169, 178, 0.14);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}
:root {
  color-scheme: light dark;
  --bg: #f5fbfb;
  --bg-elev: #ffffff;
  --bg-soft: #edf6f7;
  --text: #102326;
  --text-muted: #4c666b;
  --border: rgba(28, 90, 98, 0.14);
  --accent: #5c9fa9;
  --accent-strong: #3f7f89;
  --accent-soft: rgba(92, 159, 169, 0.12);
  --shadow: 0 12px 36px rgba(16, 35, 38, 0.08);
  --maxw: 1140px;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d1618;
    --bg-elev: #121e20;
    --bg-soft: #152326;
    --text: #e6f3f4;
    --text-muted: #9bb2b6;
    --border: rgba(122, 173, 180, 0.16);
    --accent: #6ea9b2;
    --accent-strong: #8bc1ca;
    --accent-soft: rgba(110, 169, 178, 0.14);
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(92, 159, 169, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(92, 159, 169, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 2rem), var(--maxw));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.theme-toggle {
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.muted-link:hover,
.muted-link:focus-visible {
  color: var(--accent-strong);
}

.hero {
  padding: 5rem 0 2rem;
}

.hero-main,
.section-card {
  padding: 1.6rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo-slot {
  width: 168px;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 22px;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  margin-bottom: 0.95rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.95rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.lead {
  font-size: 1.08rem;
  max-width: 68ch;
}

.hero-actions,
.tag-row,
.inline-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #f7fbfb;
  border-color: transparent;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

main { padding-bottom: 4rem; }
section { padding: 1rem 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.list {
  display: grid;
  gap: 0.9rem;
}

.item {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

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

.meta,
.inline-links {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tag-row { margin-top: 1rem; }

.tag {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.news-list {
  display: grid;
  gap: 0.9rem;
}

.news-item {
  padding: 1rem;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.news-item time {
  display: block;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.muted-link {
  color: var(--accent-strong);
}

.footer {
  padding: 2rem 0 3.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .photo-slot {
    width: 148px;
  }

  .span-12,
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .theme-toggle {
    align-self: flex-start;
  }
  .nav {
    padding: 0.85rem 0;
    align-items: start;
    flex-direction: column;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero-main,
  .section-card {
    padding: 1.2rem;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

/* Approved graphite, blue, and antique-gold palette. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0e8;
  --bg-elev: #fffdf7;
  --bg-soft: #e9e4d8;
  --text: #182330;
  --text-muted: #5f6872;
  --border: rgba(35, 53, 71, .18);
  --accent: #315e87;
  --accent-strong: #214b72;
  --accent-soft: rgba(49, 94, 135, .11);
  --shadow: 0 12px 36px rgba(31, 39, 49, .08);
  --band: #e3dfd4;
  --grid-line: rgba(49, 74, 98, .09);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-elev: #12161d;
  --bg-soft: #191e27;
  --text: #c8ad73;
  --text-muted: #a9a39a;
  --border: rgba(116, 151, 187, .24);
  --accent: #5f87ad;
  --accent-strong: #bfa264;
  --accent-soft: rgba(69, 111, 151, .18);
  --shadow: 0 14px 40px rgba(0, 0, 0, .38);
  --band: #0e141d;
  --grid-line: rgba(77, 111, 145, .12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #080a0f;
    --bg-elev: #12161d;
    --bg-soft: #191e27;
    --text: #c8ad73;
    --text-muted: #a9a39a;
    --border: rgba(116, 151, 187, .24);
    --accent: #5f87ad;
    --accent-strong: #bfa264;
    --accent-soft: rgba(69, 111, 151, .18);
    --shadow: 0 14px 40px rgba(0, 0, 0, .38);
    --band: #0e141d;
    --grid-line: rgba(77, 111, 145, .12);
  }
}

:root[data-theme="dark"] .site-header {
  background: rgba(8, 10, 15, .82);
  border-bottom-color: rgba(191, 162, 100, .24);
}

:root[data-theme="dark"] .card { border-color: rgba(116, 151, 187, .26); }
:root[data-theme="dark"] .hero-main { border-left-color: #bfa264; }
:root[data-theme="dark"] .btn-primary { background: #bfa264; color: #090b10; border-color: #bfa264; }
:root[data-theme="dark"] .btn-primary:hover { background: #cbb175; }
:root[data-theme="dark"] .tag { color: #b8a478; border-color: rgba(191, 162, 100, .25); }

/* Technical blueprint refresh */
:root {
  --maxw: 1180px;
  --radius: 0;
  --grid-line: rgba(64, 145, 158, 0.10);
  --band: #dceff0;
}

:root[data-theme="light"] {
  --bg: #f3f9f8;
  --bg-elev: rgba(255,255,255,.76);
  --bg-soft: #e4f1f1;
  --text: #102f3d;
  --text-muted: #4e6e7b;
  --border: #a9cbd1;
  --accent: #087f96;
  --accent-strong: #087f96;
  --accent-soft: rgba(8,127,150,.10);
  --shadow: none;
  --band: #dceff0;
  --grid-line: rgba(77,145,156,.13);
}

:root[data-theme="dark"] {
  --bg: #071723;
  --bg-elev: rgba(11,34,48,.78);
  --bg-soft: #0b2b3a;
  --text: #e8f7ff;
  --text-muted: #92adbd;
  --border: #31576a;
  --accent: #3ee8ff;
  --accent-strong: #3ee8ff;
  --accent-soft: rgba(62,232,255,.10);
  --shadow: none;
  --band: #0b2b3a;
  --grid-line: rgba(23,49,67,.34);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:#071723;--bg-elev:rgba(11,34,48,.78);--bg-soft:#0b2b3a;--text:#e8f7ff;
    --text-muted:#92adbd;--border:#31576a;--accent:#3ee8ff;--accent-strong:#3ee8ff;
    --accent-soft:rgba(62,232,255,.10);--shadow:none;--band:#0b2b3a;--grid-line:rgba(23,49,67,.34)
  }
}

body {
  font-family: "Courier New", ui-monospace, monospace;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px);
  background-size: 32px 32px;
  letter-spacing: .015em;
}

.site-header {
  background: color-mix(in srgb,var(--bg) 72%,transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.nav { min-height: 78px; }
.brand { font-size: 1.55rem; font-weight: 900; letter-spacing: -.055em; }
.nav-actions { margin-left: auto; }
.nav-links { gap: 1.6rem; }
.nav-links a { font-size: .92rem; font-weight: 700; }
.theme-toggle { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; display:grid; place-items:center; background:var(--bg-elev); color:var(--accent-strong); font-size:1.2rem; }

.hero { padding: 4.8rem 0 3.2rem; }
.card { border-radius: 0; box-shadow: none; backdrop-filter: blur(5px); }
.hero-main { padding: 2rem; border-left: 4px solid var(--accent); }
.hero-layout { grid-template-columns: 210px 1fr; gap: 2.4rem; align-items:center; }
.photo-slot,.photo-slot img { width:210px; border-radius:0; }
h1,h2,h3 { text-transform: uppercase; font-weight: 500; }
h1 { font-size:clamp(3.2rem,7vw,6.2rem); letter-spacing:-.075em; line-height:.9; }
h2 { letter-spacing:-.055em; }
.name-lockup { display:flex; min-width:0; flex-direction:column; align-items:flex-start; gap:.7rem; }
.name-lockup h1 { margin:0; }
.chinese-name {
  color:var(--accent-strong);
  display:inline-block;
  font-family:"QiuHongKai",STKaiti,KaiTi,cursive;
  font-size:clamp(1.8rem,3.15vw,2.7rem);
  font-weight:normal;
  line-height:.95;
  letter-spacing:.04em;
}
.hero-content { width:100%; margin-top:2rem; }
.section-card h2 { font-weight: 800; }
#publications .item h3,
#publications .item h3 a { font-weight: 800; text-transform: none; }
#education .item h3 { font-weight: 800; text-transform: none; }
#teaching .span-6:nth-child(2) .item h3 { font-weight: 800; }
#awards .item h3 { font-weight: 800; text-transform: none; }
#awards .award-amount { color: var(--accent-strong); font-weight: 800; }
.lead { max-width: 74ch; }
.btn,.tag { border-radius:0; }
.btn-primary { color:#00131c; }
.tag { font:700 .72rem/1.2 "Courier New",monospace; letter-spacing:.06em; text-transform:uppercase; }

section { padding: 3rem 0; }
main > section:nth-of-type(even) { position:relative; }
main > section:nth-of-type(even)::before { content:""; position:absolute; inset:0; z-index:-1; background:var(--band); border-block:1px solid var(--border); }
.section-card { padding:2rem; }
.item { padding:1.25rem 0; }
.meta { color:var(--accent-strong); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.muted-link { text-decoration-thickness:1px; text-underline-offset:4px; }
.muted-link:hover { text-decoration:underline; }
.footer { border-top:1px solid var(--border); }

@media (max-width: 720px) {
  .brand { font-size:1.3rem; }
  .nav { flex-direction:row; align-items:center; }
  .nav-actions { width:auto; }
  .nav-links { display:none; }
  .hero-layout { grid-template-columns:110px minmax(0,1fr); gap:1.25rem; }
  .photo-slot,.photo-slot img { width:110px; }
  h1 { font-size:clamp(2.4rem,12vw,3.5rem); }
  .chinese-name { font-size:1.65rem; }
}

/* Approved main color scheme. Keep these overrides last. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0e8;
  --bg-elev: #fffdf7;
  --bg-soft: #e9e4d8;
  --text: #182330;
  --text-muted: #5f6872;
  --border: rgba(35, 53, 71, .18);
  --accent: #315e87;
  --accent-strong: #214b72;
  --accent-soft: rgba(49, 94, 135, .11);
  --shadow: 0 12px 36px rgba(31, 39, 49, .08);
  --band: #e3dfd4;
  --grid-line: rgba(49, 74, 98, .09);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-elev: #12161d;
  --bg-soft: #191e27;
  --text: #c8ad73;
  --text-muted: #a9a39a;
  --border: rgba(116, 151, 187, .24);
  --accent: #5f87ad;
  --accent-strong: #bfa264;
  --accent-soft: rgba(69, 111, 151, .18);
  --shadow: 0 14px 40px rgba(0, 0, 0, .38);
  --band: #0e141d;
  --grid-line: rgba(77, 111, 145, .12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #080a0f;
    --bg-elev: #12161d;
    --bg-soft: #191e27;
    --text: #c8ad73;
    --text-muted: #a9a39a;
    --border: rgba(116, 151, 187, .24);
    --accent: #5f87ad;
    --accent-strong: #bfa264;
    --accent-soft: rgba(69, 111, 151, .18);
    --shadow: 0 14px 40px rgba(0, 0, 0, .38);
    --band: #0e141d;
    --grid-line: rgba(77, 111, 145, .12);
  }
}

:root[data-theme="dark"] .site-header { background: rgba(8,10,15,.82); border-bottom-color: rgba(191,162,100,.24); }
:root[data-theme="dark"] .card { border-color: rgba(116,151,187,.26); }
:root[data-theme="dark"] .hero-main { border-left-color: #bfa264; }
:root[data-theme="dark"] .btn-primary { background:#bfa264; color:#090b10; border-color:#bfa264; }
:root[data-theme="dark"] .btn-primary:hover { background:#cbb175; }
:root[data-theme="dark"] .tag { color:#b8a478; border-color:rgba(191,162,100,.25); }
:root[data-theme="dark"] .photo-slot img { filter:saturate(.72) contrast(1.06); }

:root[data-theme="light"] .btn-primary,
:root:not([data-theme]) .btn-primary { background:var(--text); color:var(--bg-elev); border-color:var(--text); }
:root[data-theme="light"] .btn-primary:hover,
:root[data-theme="light"] .btn-primary:focus-visible { background:var(--accent-strong); border-color:var(--accent-strong); color:#fff; }

/* Compact news strip. */
#news {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
#news > h2 {
  margin-bottom: .45rem;
  padding-bottom: .25rem;
  font-size: 1.45rem;
  font-weight: 800;
  border-bottom: 0;
}
#news .list {
  grid-template-columns: 1fr;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  height: 7rem;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  touch-action: pan-x;
  cursor: grab;
}
#news .list:active { cursor: grabbing; }
.news-track { display: grid; gap: 0; will-change: transform; }
#news .list::-webkit-scrollbar { width: 8px; height: 8px; }
#news .list::-webkit-scrollbar-track { background: transparent; }
#news .list::-webkit-scrollbar-thumb { background: transparent; }
#news .list:hover,
#news .list:focus,
#news .list:focus-within { scrollbar-color: var(--accent) var(--bg-soft); }
#news .list:hover::-webkit-scrollbar-track,
#news .list:focus::-webkit-scrollbar-track { background: var(--bg-soft); }
#news .list:hover::-webkit-scrollbar-thumb,
#news .list:focus::-webkit-scrollbar-thumb { background: var(--accent); }
#news .item {
  grid-template-columns: 1fr;
  gap: 0;
  padding: .2rem 0;
  min-height: 1.75rem;
  min-width: max-content;
  white-space: nowrap;
  border: 0 !important;
}
#news .item h3 { font-size: .92rem; margin: 0; }
#news .item p {
  grid-column: auto;
  font-size: .78rem;
  line-height: 1.35;
}
#news .meta { font-size: .68rem; }
.advisor-link { color: var(--accent-strong); font-weight: 700; }
.advisor-link:hover,
.advisor-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  #news .item { padding: .2rem 0; min-height: 1.75rem; }
}
