:root {
  --bg: #ffffff;
  --text: #1a1d21;
  --body: #2f3438;
  --muted: #5f6368;
  --faint: #8a8f94;
  --line: #e3e5e8;
  --accent: #1a4f8a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a:hover {
  border-bottom-color: currentColor;
}

/* ---------- 布局 ---------- */

.layout {
  max-width: 1060px;
  margin: 0 auto;
  padding: 68px 40px 96px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 68px;
  align-items: start;
}

/* ---------- 左栏 ---------- */

.sidebar {
  position: sticky;
  top: 68px;
}

.avatar {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  border: 1px solid var(--line);
  background: #f4f5f6;
}

.name {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 20px 0 0;
  line-height: 1.2;
}

.role {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body);
}

.affil {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 14px;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

.contact dt {
  color: var(--faint);
}

.contact dd {
  margin: 0;
  color: var(--body);
  overflow-wrap: anywhere;
}

.contact a {
  color: var(--body);
}

.contact a:hover {
  color: var(--accent);
}

.status {
  margin: 22px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--accent);
  background: #f4f8fc;
  border-left: 2px solid var(--accent);
  padding: 9px 11px;
}

.lang-switch {
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  cursor: pointer;
}

.lang-switch span[data-lang-option].active {
  color: var(--accent);
  font-weight: 650;
}

.lang-switch .sep {
  margin: 0 6px;
  opacity: 0.45;
}

/* ---------- 右栏 ---------- */

.content section {
  margin-bottom: 52px;
}

.content section:last-of-type {
  margin-bottom: 0;
}

.content h2 {
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.content p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--body);
}

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

/* ---------- 项目条目 ---------- */

.entry {
  margin-bottom: 34px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.entry-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text);
}

.period {
  flex: none;
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.entry-intro {
  margin: 8px 0 0;
  font-size: 14.2px;
  line-height: 1.72;
  color: var(--body);
}

.entry-sub {
  margin: 5px 0 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--faint);
}

.entry-demo {
  margin: -6px 0 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--faint);
}

.entry-demo span {
  margin-right: 7px;
}

.entry-demo a {
  font-size: 12.5px;
  border-bottom: 1px solid rgba(26, 79, 138, 0.35);
}

.entry-demo a:hover {
  border-bottom-color: currentColor;
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--body);
}

.points li:last-child {
  margin-bottom: 0;
}

.points li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--faint);
}

.points strong,
.timeline strong {
  font-weight: 650;
  color: var(--text);
}

/* ---------- 时间线 ---------- */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 17px;
}

.timeline li:last-child {
  margin-bottom: 0;
}

.timeline .period {
  padding-top: 2px;
}

.timeline strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.55;
}

.timeline .detail {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 技能 ---------- */

.skills {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 11px 24px;
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.skills dt {
  color: var(--muted);
}

.skills dd {
  margin: 0;
  color: var(--body);
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--faint);
}

.site-footer a {
  color: var(--faint);
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding: 44px 22px 72px;
  }

  .sidebar {
    position: static;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }

  .name {
    font-size: 26px;
  }

  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }

  .skills {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .skills dt {
    margin-top: 10px;
  }

  .skills dt:first-of-type {
    margin-top: 0;
  }

  .entry-head {
    display: block;
  }

  .entry-head .period {
    display: block;
    margin-top: 2px;
  }
}

/* ---------- 打印 ---------- */

@media print {
  .layout {
    display: block;
    max-width: none;
    padding: 0;
    gap: 0;
  }

  .sidebar {
    position: static;
    margin-bottom: 28px;
  }

  .lang-switch {
    display: none;
  }

  .content section {
    margin-bottom: 28px;
    break-inside: avoid;
  }

  a {
    color: var(--text);
  }
}
