:root {
  --ink: #171717;
  --muted: #666;
  --light: #f4f4ef;
  --line: #d8d8d0;
  --accent: #d6ff2f;
  --accent-dark: #1f2706;
  --paper: #fffdf7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #e8e8e2;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

body {
  padding: 24px;
}

.toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 18px;
}

.toolbar a,
.toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #222;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 700 13px/1 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.toolbar button {
  background: var(--accent);
  color: #111;
}

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 11mm 12mm 10mm;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(214, 255, 47, 0.08), transparent 31%),
    var(--paper);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.resume-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68mm;
  gap: 8mm;
  align-items: start;
  padding-bottom: 5mm;
  border-bottom: 2px solid var(--ink);
}

.identity {
  min-width: 0;
}

.header-side {
  min-width: 0;
}

.header-card {
  display: grid;
  grid-template-columns: 18mm 1fr;
  gap: 3mm;
  align-items: start;
  padding: 2.8mm;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.header-photo {
  overflow: hidden;
  border: 1px solid var(--ink);
  background: #eef0e8;
  aspect-ratio: 3 / 4;
}

.header-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.kicker {
  margin: 0 0 2mm;
  color: var(--accent-dark);
  font-size: 8.6px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: 31px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.045em;
}

h1 span {
  display: inline-block;
  margin-left: 2mm;
  padding: 0;
  background: none;
  color: #555;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

.role {
  margin: 2.3mm 0 0;
  color: #222;
  font-size: 12.5px;
  font-weight: 850;
}

.identity-summary {
  margin: 2mm 0 0;
  color: #444;
  font-size: 10px;
  line-height: 1.52;
}

.header-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6mm;
  margin-top: 2.3mm;
}

.header-highlights span {
  padding: 1.15mm 2mm;
  border: 1px solid #cfcfc4;
  background: #fff;
  color: #222;
  font-size: 8.8px;
  font-weight: 800;
  line-height: 1;
}

.contact-grid {
  display: grid;
  gap: 1.4mm;
}

.contact-row {
  display: grid;
  grid-template-columns: 9mm 1fr;
  gap: 2mm;
  align-items: start;
  padding-bottom: 1.4mm;
  border-bottom: 1px solid var(--line);
}

.contact-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.contact-row b {
  color: #666;
  font-size: 8.8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.contact-row span {
  color: #222;
  font-size: 9.4px;
  font-weight: 700;
  line-height: 1.42;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3mm;
  margin: 4.5mm 0;
}

.metrics article {
  padding: 3mm 3mm 2.8mm;
  border: 1px solid var(--line);
  background: #fff;
}

.metrics strong {
  display: block;
  margin-bottom: 1mm;
  color: #111;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metrics span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 58mm 1fr;
  gap: 7mm;
  align-items: start;
}

section {
  break-inside: avoid;
}

h2 {
  display: flex;
  align-items: center;
  gap: 2mm;
  margin: 0 0 2.5mm;
  color: #111;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

h2::before {
  flex: 0 0 4mm;
  height: 4mm;
  background: var(--accent);
  content: "";
}

.sidebar {
  display: grid;
  gap: 4.5mm;
}

.sidebar section {
  padding: 3.2mm;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.sidebar p,
.main-column p {
  margin: 0;
  color: #333;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8mm;
}

.tags span {
  padding: 1.5mm 2mm;
  border: 1px solid #c8c8be;
  background: #fff;
  color: #222;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.compact-list,
.award-list {
  display: grid;
  gap: 1.8mm;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.award-list li {
  color: #333;
  font-size: 9.6px;
  line-height: 1.42;
}

.award-list li {
  position: relative;
  padding-left: 3mm;
}

.award-list li::before {
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  content: "▸";
}

.main-column {
  display: grid;
  gap: 4.8mm;
}

.summary {
  padding: 4mm;
  border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, rgba(214, 255, 47, 0.25), rgba(255, 255, 255, 0.7));
}

.summary p {
  font-size: 11px;
}

.job {
  position: relative;
  padding: 0 0 4mm 5mm;
  border-left: 2px solid #111;
}

.job + .job {
  margin-top: 3.8mm;
}

.job::before {
  position: absolute;
  top: 1.5mm;
  left: -2.5mm;
  width: 3.8mm;
  height: 3.8mm;
  border: 1.5px solid #111;
  background: var(--accent);
  content: "";
}

.job-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6mm;
  align-items: start;
}

.job h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.job-head p {
  margin: 1mm 0 0;
  color: #555;
  font-size: 10px;
  font-weight: 700;
}

.job time {
  color: #111;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.job ul {
  display: grid;
  gap: 1.3mm;
  margin: 2.6mm 0 0;
  padding-left: 4mm;
}

.job li {
  padding-left: 0.5mm;
  color: #252525;
  font-size: 10.5px;
  line-height: 1.45;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5mm;
}

.project-grid article {
  min-height: 20mm;
  padding: 3mm;
  border: 1px solid var(--line);
  background: #fff;
}

.project-grid b {
  display: block;
  margin-bottom: 1.8mm;
  font-size: 11px;
}

.project-grid span {
  color: #555;
  font-size: 9px;
  line-height: 1.35;
}

.early-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5mm;
}

.early-grid article {
  padding: 3mm;
  border: 1px solid var(--line);
  background: #fff;
}

.early-grid article.wide {
  grid-column: 1 / -1;
}

.early-grid b {
  display: block;
  margin-bottom: 1.4mm;
  color: #111;
  font-size: 10px;
  line-height: 1.35;
}

.early-grid p {
  font-size: 9.4px;
  line-height: 1.45;
}

@media screen and (max-width: 900px) {
  body {
    padding: 0;
  }

  .toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0;
    padding: 10px;
    background: rgba(232, 232, 226, 0.92);
    backdrop-filter: blur(10px);
  }

  .sheet {
    width: 100%;
    min-height: auto;
    padding: 18px;
  }

  .resume-header,
  .content-grid,
  .job-head,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .header-card {
    grid-template-columns: 72px 1fr;
  }

  .early-grid {
    grid-template-columns: 1fr;
  }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
    padding: 0;
    background: #fff;
  }

  .toolbar {
    display: none;
  }

  .sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 0;
    padding: 9mm 10mm 8mm;
    box-shadow: none;
  }

  .sidebar {
    gap: 3.5mm;
  }

  .main-column {
    gap: 3.9mm;
  }

  .resume-header {
    grid-template-columns: minmax(0, 1fr) 66mm;
    gap: 7mm;
    padding-bottom: 4.4mm;
  }

  h1 {
    font-size: 29px;
  }

  .role {
    font-size: 12px;
  }

  .identity-summary {
    font-size: 9.6px;
  }

  .header-card {
    grid-template-columns: 17mm 1fr;
    gap: 2.6mm;
    padding: 2.4mm;
  }

  .contact-row span {
    font-size: 9px;
  }

  .sidebar section {
    padding: 2.8mm;
  }

  .metrics {
    margin: 4mm 0;
  }

  .job li {
    font-size: 10px;
  }

  .summary p {
    font-size: 10.6px;
  }

  .early-grid b {
    font-size: 9.6px;
  }

  .early-grid p {
    font-size: 9px;
    line-height: 1.4;
  }
}
