:root {
  --page-width: 1122px;
  --page-height: 1588px;
  --blue: #2563b8;
  --navy: #1e416d;
  --ink: #202833;
  --muted: #637083;
  --line: #8bb2df;
  --soft-blue: #f0f5fb;
  --soft-pink: #fff1f3;
  --soft-gray: #f5f7fa;
}

@font-face {
  font-display: swap;
  font-family: "EB Garamond Local";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/eb-garamond-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "EB Garamond Local";
  font-style: normal;
  font-weight: 600;
  src: url("./assets/fonts/eb-garamond-semibold.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "EB Garamond Local";
  font-style: normal;
  font-weight: 700;
  src: url("./assets/fonts/eb-garamond-bold.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: "EB Garamond Local", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.42;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resume-book {
  width: 100%;
}

.resume-page {
  background: #fff;
  box-shadow: none;
  min-height: 100vh;
  margin: 0 auto;
  overflow: visible;
  padding: 46px max(54px, calc((100vw - 1180px) / 2));
  width: 100%;
}

.profile-header {
  margin-bottom: 13px;
}

.profile-header h1 {
  font-family: "PingFang SC", sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0 0 8px;
}

.profile-header p {
  margin: 3px 0;
}

.contact-row {
  font-size: 16px;
}

.headline,
.identity-row {
  font-weight: 800;
}

.education-row {
  font-size: 16px;
}

.resume-section h2 {
  border-bottom: 2px solid var(--line);
  color: var(--blue);
  font-family: "PingFang SC", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.12;
  margin: 10px 0 7px;
  padding-bottom: 4px;
}

.section-lead {
  color: var(--navy);
  font-weight: 800;
  margin: 0 0 14px;
}

.feature-project h3,
.project-block h3 {
  color: var(--navy);
  font-family: "EB Garamond Local", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
}

.feature-project h3 {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
}

.feature-project h3 span {
  color: #ed9d00;
  font-size: 14px;
}

ul {
  margin: 0;
  padding-left: 21px;
}

li {
  margin: 5px 0;
  padding-left: 1px;
}

li::marker {
  color: #111;
}

.role-card {
  margin-top: 14px;
}

.role-heading {
  align-items: center;
  background: var(--soft-gray);
  border-radius: 6px;
  display: grid;
  font-family: "EB Garamond Local", "PingFang SC", sans-serif;
  font-size: 18px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  line-height: 1.2;
  min-height: 44px;
  padding: 4px 11px;
}

.role-card-bytedance .role-heading {
  background: linear-gradient(90deg, #edf3ff 0%, #f2fcfd 100%);
  border-left: 5px solid #3c8cff;
}

.role-card-bilibili .role-heading {
  background: #fff0f5;
  border-left: 5px solid #fb7299;
}

.role-card-kuaishou .role-heading {
  background: #fff1eb;
  border-left: 5px solid #ff4906;
}

.role-card-meituan .role-heading {
  background: #fff8d8;
  border-left: 5px solid #ffc300;
}

.role-card-etongxue .role-heading {
  background: var(--soft-blue);
  border-left: 4px solid var(--blue);
}

.role-heading img {
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.logo-chip {
  align-items: center;
  background: transparent;
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.logo-chip img {
  height: 34px;
  width: 34px;
}

.role-card-bytedance .logo-chip img {
  height: 35px;
  width: 40px;
}

.role-card-bilibili .logo-chip img {
  height: 38px;
  width: 38px;
}

.role-card-kuaishou .logo-chip img,
.role-card-meituan .logo-chip img {
  height: 39px;
  width: 39px;
}

.role-card-etongxue .logo-chip img {
  height: 35px;
  width: 35px;
}

.role-heading strong {
  font-weight: 600;
}

.role-heading span:last-child {
  color: #303744;
  font-weight: 600;
}

.brand-mark {
  align-items: center;
  background: var(--blue);
  border-radius: 7px;
  color: #fff;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.project-block {
  margin-top: 11px;
}

.project-block + .project-block {
  margin-top: 15px;
}

.project-block ul {
  padding-left: 21px;
}

.tech-line {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.project-meta {
  color: #303744;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.project-intro {
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 6px;
  text-align: justify;
}

.page-two-section {
  margin-top: 0;
}

.compact-section {
  margin-top: 18px;
}

.standalone-project {
  margin-top: 11px;
}

.standalone-project h3 a {
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  margin-left: 8px;
}

.closing-list {
  padding-left: 21px;
}

.closing-list li {
  margin: 6px 0;
}

.demo-note {
  border-top: 1px dashed #bdc5d1;
  color: var(--muted);
  font-family: "PingFang SC", sans-serif;
  font-size: 11px;
  margin: 16px 0 0;
  padding-top: 7px;
  text-align: center;
}

.open-source-page {
  height: auto;
  min-height: 100vh;
  overflow-x: auto;
}

.open-source-header {
  margin-bottom: 13px;
  text-align: left;
}

.open-source-header h1 {
  margin: 0 0 8px;
}

.open-source-header h1 a {
  color: var(--blue);
  text-decoration: none;
}

.open-source-header .identity-row {
  margin: 10px 0 0;
}

.back-button {
  align-items: center;
  background: #fff;
  border: 1px solid #b8c7d8;
  border-radius: 4px;
  color: var(--navy);
  display: inline-flex;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  padding: 7px 12px;
  text-decoration: none;
}

.back-button:hover {
  background: var(--soft-blue);
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

.open-source-section h2 a {
  color: inherit;
  text-decoration: none;
}

.open-source-section h2 a:hover {
  text-decoration: none;
}

.open-source-section {
  margin-top: 25px;
}

.project-brief {
  align-items: baseline;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  white-space: nowrap;
}

.project-brief p {
  color: var(--navy);
  font-weight: 800;
  margin: 0;
}

.project-brief strong {
  color: var(--navy);
  font-weight: 650;
}

.source-group {
  display: block;
  margin-top: 18px;
}

.source-group h3 {
  background: var(--soft-blue);
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 10px;
  padding: 7px 10px;
}

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

.source-list li {
  align-items: baseline;
  border-bottom: 1px solid #e1e6ed;
  display: grid;
  gap: 12px 30px;
  grid-template-columns: 90px 250px minmax(0, 1fr);
  line-height: 1.6;
  margin: 0;
  padding: 13px 10px;
  white-space: nowrap;
}

.source-list li:first-child {
  padding-top: 12px;
}

.source-list li:last-child {
  border-bottom: 0;
}

.source-list a,
.source-links {
  font-size: 13px;
  font-weight: 650;
}

.source-list strong {
  color: var(--ink);
  font-weight: 650;
}

.source-list span:last-child {
  color: var(--muted);
}

.technical-summary {
  display: block;
  line-height: 1.65;
  margin: 0;
  padding-left: 21px;
}

.technical-summary li {
  border-bottom: 0;
  list-style-position: outside;
  margin: 6px 0;
  padding: 0 0 0 1px;
  white-space: nowrap;
}

.technical-summary strong {
  color: var(--navy);
}

.compact-source-group {
  margin-top: 24px;
}

@media (max-width: 1120px) {
  .resume-book {
    width: 100%;
  }

  .resume-page {
    height: auto;
    min-height: 0;
    padding: 30px 26px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .open-source-header h1 {
    font-size: 26px;
  }

  .source-list li {
    grid-template-columns: 90px 250px minmax(390px, 1fr);
  }
}

@media print {
  @page {
    margin: 0;
    size: 1122px 1588px;
  }

  body {
    background: #fff;
  }

  .resume-book {
    margin: 0;
  }

  .resume-page {
    break-after: page;
    box-shadow: none;
    margin: 0;
    page-break-after: always;
  }

  .resume-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
