:root {
  --ink:    #111;
  --soft:   #444;
  --mute:   #888;
  --rule:   #e6e6e6;
  --bg:     #fff;
  --bg-alt: #fafafa;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
          Arial, sans-serif;

  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:    #e8e8e8;
    --soft:   #b8b8b8;
    --mute:   #888;
    --rule:   #2a2a2a;
    --bg:     #111;
    --bg-alt: #161616;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, dt, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
b, strong { font-weight: 600; color: var(--ink); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--ink); }

/* ============================================================ */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 28px 80px;
}

/* ============================================================
   Header
============================================================ */
.head { margin-bottom: 40px; }

.head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.logos {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logos img {
  height: 28px;
  width: auto;
  display: block;
  /* 暗色模式下让彩色 logo 不那么刺眼 */
  opacity: 0.95;
}
@media (prefers-color-scheme: dark) {
  .logos img { opacity: 0.85; }
}

.name {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.name-en {
  font-size: 16px;
  font-weight: 400;
  color: var(--mute);
  margin-left: 10px;
}

.tagline {
  font-size: 15px;
  color: var(--soft);
  margin-bottom: 4px;
}
.affiliation {
  font-size: 14px;
  color: var(--mute);
  margin-bottom: 14px;
}

.meta {
  font-size: 14px;
  color: var(--soft);
}
.meta .sep {
  color: var(--rule);
  margin: 0 8px;
  user-select: none;
}

/* lang button */
.lang-btn {
  background: none;
  border: 1px solid var(--rule);
  color: var(--soft);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.lang-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ============================================================
   Sections
============================================================ */
section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
}

/* ============================================================
   Education
============================================================ */
.edu-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 4px;
}
.edu-row b { font-weight: 600; }
.date {
  color: var(--mute);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   Bullet highlights
============================================================ */
.bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--soft);
}
.bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--mute);
}
.bullets li strong {
  color: var(--ink);
  margin-right: 4px;
}
.bullets li strong::after { content: "："; color: var(--mute); }
[lang="en"] .bullets li strong::after { content: ":"; margin-right: 4px; }
.bullets li b { color: var(--ink); }

/* ============================================================
   Projects
============================================================ */
.project {
  margin-bottom: 22px;
}
.project:last-child { margin-bottom: 0; }

.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.proj-head h3 {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.project dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 14px;
  row-gap: 4px;
  font-size: 14px;
  line-height: 1.75;
}
.project dt {
  color: var(--mute);
  font-size: 13px;
  white-space: nowrap;
  padding-top: 1px;
}
.project dt::after { content: "："; }
[lang="en"] .project dt::after { content: ":"; }
.project dd { color: var(--soft); }
.project dd b { color: var(--ink); }

@media (max-width: 560px) {
  .project dl { grid-template-columns: 1fr; row-gap: 1px; }
  .project dt { margin-top: 6px; }
  .project dt:first-of-type { margin-top: 0; }
}

/* ============================================================
   Skills
============================================================ */
.skills {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 18px;
  row-gap: 8px;
  font-size: 14px;
}
.skills dt {
  color: var(--mute);
  font-size: 13px;
  white-space: nowrap;
}
.skills dt::after { content: "："; }
[lang="en"] .skills dt::after { content: ":"; }
.skills dd { color: var(--soft); }

@media (max-width: 560px) {
  .skills { grid-template-columns: 1fr; row-gap: 2px; }
  .skills dt { margin-top: 6px; }
  .skills dt:first-of-type { margin-top: 0; }
}

/* ============================================================
   Summary
============================================================ */
section p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--soft);
}

/* ============================================================
   Footer
============================================================ */
.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--mute);
}
.foot .sep { margin: 0 8px; color: var(--rule); }

/* ============================================================
   Print
============================================================ */
@media print {
  .lang-btn, .foot { display: none; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  section { page-break-inside: avoid; }
}