:root {
  --ink: #1c1f22;
  --muted: #5b6169;
  --line: #dde1e5;
  --accent: #0f5c56;
  --surface: #ffffff;
  --page-bg: #eef0f2;
  color-scheme: light;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  color: var(--ink);
}

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

a:hover {
  text-decoration: underline;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

#print-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

#print-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sheet {
  max-width: 820px;
  margin: 32px auto 60px;
  padding: 48px 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(20, 24, 28, 0.06);
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.resume-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0;
  color: var(--ink);
}

.resume-header h1 .en-name {
  margin-left: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.target-role {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.meta-line {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.contact-line {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.contact-line .sep {
  margin: 0 8px;
  color: var(--line);
}

.header-photo {
  width: 92px;
  height: 122px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
  flex-shrink: 0;
}

.resume-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.resume-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resume-section h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.resume-section > p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: #33383d;
}

.entry {
  margin-bottom: 18px;
}

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

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

.entry-line strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.entry-time {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry-sub {
  margin: 3px 0 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.entry > p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #33383d;
}

.entry ul {
  margin: 0 0 8px;
  padding-left: 1.2rem;
}

.entry li {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.62;
  color: #33383d;
}

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

.entry .stack {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
}

.block-label {
  margin: 12px 0 5px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry .block-label:first-of-type {
  margin-top: 8px;
}

.result-list {
  margin: 0 0 4px;
  padding-left: 1.2rem;
}

.result-list li {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.62;
  color: #33383d;
}

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

.tag-row-plain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-chip {
  display: inline-flex;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f7f8;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.skill-list {
  display: grid;
  gap: 9px;
}

.skill-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
}

.skill-row dt {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.skill-row dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #33383d;
}

.award-list {
  margin: 0;
  padding-left: 1.2rem;
}

.award-list li {
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.65;
  color: #33383d;
}

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

@media (max-width: 720px) {
  .sheet {
    margin: 0;
    padding: 28px 20px;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .resume-header {
    flex-direction: column-reverse;
  }

  .header-photo {
    width: 76px;
    height: 100px;
  }

  .entry-line {
    flex-direction: column;
    gap: 2px;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .sheet {
    margin: 0;
    padding: 12mm 14mm;
    border: none;
    box-shadow: none;
    max-width: none;
  }

  .resume-section {
    break-inside: avoid;
  }

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