:root {
  --ink: #1f2937;
  --muted: #5b6677;
  --line: #8fa0b8;
  --paper: #ffffff;
  --background: #f3f5f8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  font-family: "Times New Roman", "Songti SC", "SimSun", serif;
  font-size: 16px;
  letter-spacing: 0;
}

body {
  margin: 0;
}

a {
  color: #255f9b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.cv-page {
  width: min(960px, calc(100vw - 32px));
  margin: 32px auto;
  padding: 46px 58px 58px;
  background: var(--paper);
  box-shadow: 0 10px 38px rgba(31, 41, 55, 0.12);
}

.cv-header {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--line);
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
}

.identity h1 {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}

.identity {
  min-width: 0;
}

.headline {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  line-height: 1.35;
}

.summary-line,
.contact {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.45;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.contact span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--muted);
}

.headline,
.summary-line,
.contact {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cv-section {
  margin-top: 34px;
}

.cv-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 15px;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cv-section h2::after {
  content: "";
  height: 1.5px;
  flex: 1;
  background: var(--line);
}

p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 16.2px;
  line-height: 1.72;
}

.cv-item {
  margin-top: 20px;
}

.cv-item:first-of-type {
  margin-top: 0;
}

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

.item-head h3,
.item-head p,
.item-head time {
  margin: 0;
}

.item-head h3 {
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.item-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.item-head time {
  min-width: 150px;
  color: var(--muted);
  font-family: "Times New Roman", Georgia, serif;
  font-size: 16px;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

ul {
  margin: 9px 0 0;
  padding-left: 19px;
}

li {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 16.1px;
  line-height: 1.62;
}

.two-column {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
}

.compact {
  margin-top: 0;
}

@media (max-width: 980px) {
  html {
    background: var(--paper);
  }

  body {
    overflow-x: hidden;
  }

  .cv-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 28px 22px 42px;
    box-shadow: none;
    overflow-x: hidden;
  }

  .cv-header {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

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

  .identity h1 {
    font-size: 30px;
  }

  .headline {
    font-size: 17px;
  }

  .summary-line,
  .contact {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .contact {
    display: block;
  }

  .contact span {
    display: block;
  }

  .contact span + span::before {
    content: "";
    margin-right: 0;
  }

  .cv-section h2 {
    font-size: 19px;
  }

  p,
  li {
    font-size: 15.5px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .item-head {
    display: block;
  }

  .item-head time {
    display: block;
    min-width: 0;
    margin-top: 3px;
    text-align: left;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 8mm 10mm;
  }

  html,
  body {
    background: #fff;
  }

  .cv-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .cv-header {
    grid-template-columns: 86px 1fr;
    gap: 22px;
    align-items: center;
    padding-bottom: 15px;
  }

  .cv-section {
    margin-top: 15px;
    break-inside: auto;
  }

  .cv-item {
    break-inside: auto;
  }

  .identity h1 {
    font-size: 33px;
  }

  .headline {
    font-size: 19px;
  }

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

  .summary-line,
  .contact,
  p,
  li,
  .item-head p,
  .item-head time {
    font-size: 12.6px;
  }

  .contact {
    display: flex;
    gap: 4px 11px;
    margin-top: 9px;
  }

  .contact span {
    display: inline;
  }

  .contact span + span::before {
    content: "·";
    margin-right: 11px;
  }

  .cv-section h2 {
    font-size: 16px;
    margin-bottom: 7px;
  }

  .item-head h3 {
    font-size: 15px;
  }

  p {
    margin-bottom: 4.5px;
    line-height: 1.38;
  }

  li {
    margin-bottom: 2px;
    line-height: 1.35;
  }

  .cv-item {
    margin-top: 9px;
  }
}
