:root {
  --resume-ink: #050505;
  --resume-paper: #ffffff;
  --resume-rule: #111111;
  --resume-muted: #3a3a3a;
  --resume-page-bg: #ecefed;
}

body[theme='dark'] {
  --resume-page-bg: #111412;
}

.resume-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.2rem) 0 clamp(2rem, 4vw, 4rem);
  color: var(--resume-ink);
}

.resume-page,
.resume-page * {
  box-sizing: border-box;
}

.resume-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0 auto 1rem;
  width: min(100%, 960px);
}

.resume-toolbar a {
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  color: var(--blog-text);
  background: var(--blog-surface);
  padding: 0.42rem 0.72rem;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
}

.resume-toolbar a:hover,
.resume-toolbar a:focus-visible {
  border-color: var(--blog-link);
  color: var(--blog-link-hover);
}

.resume-sheet {
  width: min(100%, 960px);
  min-height: 1358px;
  margin: 0 auto;
  padding: 56px 56px 58px;
  background: var(--resume-paper);
  box-shadow: 0 8px 24px rgb(16 22 18 / 0.12);
  font-family: "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 19.5px;
  line-height: 1.58;
  letter-spacing: 0;
}

.resume-sheet a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.resume-section {
  position: relative;
  margin-top: 12px;
  padding-top: 0;
}

.resume-section:first-child {
  margin-top: 0;
}

.resume-heading {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 15px;
}

.resume-heading span {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 2px 12px 3px;
  background: var(--resume-ink);
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.resume-heading::after {
  content: "";
  height: 1.5px;
  flex: 1;
  background: var(--resume-rule);
}

.resume-profile {
  display: grid;
  grid-template-columns: 1.05fr 1.3fr 156px;
  column-gap: 44px;
  align-items: start;
  padding: 4px 34px 0 12px;
}

.resume-info-list {
  display: grid;
  gap: 2px;
  margin: 0;
}

.resume-info-list div,
.resume-line {
  margin: 0;
}

.resume-photo {
  width: 148px;
  aspect-ratio: 180 / 224;
  object-fit: cover;
  justify-self: end;
}

.resume-emphasis {
  font-weight: 800;
}

.resume-education-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 0.9fr;
  column-gap: 28px;
  row-gap: 5px;
}

.resume-education-grid,
.resume-body {
  padding: 0 0 0 0;
}

.resume-wide {
  grid-column: 1 / -1;
}

.resume-two {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  column-gap: 28px;
}

.resume-p {
  margin: 0 0 3px;
}

.resume-project {
  margin-bottom: 4px;
}

.resume-label {
  font-weight: 800;
}

.resume-title-strong {
  font-weight: 800;
}

.resume-note {
  color: var(--resume-muted);
}

@media (max-width: 760px) {
  .resume-page {
    padding: 1rem 0 2rem;
  }

  .resume-toolbar {
    justify-content: flex-start;
    padding: 0 0.75rem;
  }

  .resume-sheet {
    width: calc(100% - 1rem);
    min-height: 0;
    padding: 28px 22px 34px;
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.68;
  }

  .resume-heading {
    margin-bottom: 12px;
  }

  .resume-heading span {
    min-height: 32px;
    padding: 2px 9px;
    font-size: 20px;
  }

  .resume-profile {
    grid-template-columns: 1fr 112px;
    gap: 10px 18px;
    padding: 0;
  }

  .resume-info-list {
    gap: 0;
  }

  .resume-info-list:nth-child(2) {
    grid-column: 1 / 2;
  }

  .resume-photo {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 108px;
  }

  .resume-education-grid,
  .resume-two {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }
}

@media (max-width: 420px) {
  .resume-toolbar {
    flex-wrap: wrap;
  }

  .resume-sheet {
    padding: 22px 16px 28px;
  }

  .resume-profile {
    grid-template-columns: 1fr;
  }

  .resume-photo {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    width: 96px;
  }
}

@media print {
  body,
  body[theme='dark'] {
    background: #ffffff;
  }

  .header,
  .footer,
  #fixed-buttons,
  .resume-toolbar {
    display: none !important;
  }

  .main,
  .container,
  .resume-page {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .resume-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 14mm 13mm 14mm;
    box-shadow: none;
    font-size: 14.4pt;
  }
}
