:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #20211f;
  --body: #474945;
  --muted: #777970;
  --line: #dedfd9;
  --accent: #176b5b;
}

* { box-sizing: border-box; }

html { background: #e8e8e4; }

body {
  margin: 0;
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 13px;
  line-height: 1.52;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }

.toolbar {
  width: min(900px, calc(100% - 32px));
  min-height: 58px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5e605a;
  font-size: 12px;
}

.download {
  padding: 9px 14px;
  border-radius: 999px;
  color: white;
  background: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.download:hover { background: #0e594c; }

.resume-sheet {
  width: min(900px, calc(100% - 32px));
  min-height: 1165px;
  margin: 0 auto 56px;
  padding: 56px 62px 42px;
  background: var(--paper);
  box-shadow: 0 18px 65px rgba(27, 30, 26, 0.10);
}

.resume-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -.04em;
}

h1 span {
  margin-left: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
}

.tagline { margin: 8px 0 0; color: var(--muted); }

address {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.section {
  position: relative;
  padding: 15px 0 0 112px;
}

.section h2 {
  position: absolute;
  top: 17px;
  left: 0;
  width: 92px;
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
}

.section p { margin: 0; }

.section > ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section > ul li { margin: 0; }

strong { color: var(--ink); font-weight: 680; }

.experience {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.experience + .experience { padding-top: 12px; }

.experience:last-child { padding-bottom: 0; border-bottom: 0; }

h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

h3 time {
  flex: none;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
}

.experience p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

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

li::marker { color: #a5a79f; }

@media (max-width: 680px) {
  .toolbar, .resume-sheet { width: 100%; }
  .toolbar { margin: 0; padding: 10px 18px; background: var(--paper); }
  .resume-sheet { min-height: 0; margin: 0; padding: 34px 22px; box-shadow: none; }
  .resume-header { grid-template-columns: 1fr; gap: 16px; }
  address { justify-items: start; }
  .section { padding-left: 0; padding-top: 20px; }
  .section h2 { position: static; width: auto; margin-bottom: 8px; }
  .section > ul { grid-template-columns: 1fr; }
  h3 { display: block; }
  h3 time { display: block; margin-top: 2px; }
}

@page { size: A4; margin: 13mm 15mm 12mm; }

@media print {
  html, body { background: white; }
  body { font-size: 9.6pt; line-height: 1.45; }
  .toolbar { display: none; }
  .resume-sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: white;
    box-shadow: none;
  }
  .resume-header { gap: 10mm; padding-bottom: 4.2mm; }
  .eyebrow { font-size: 8pt; }
  h1 { font-size: 26pt; }
  h1 span { font-size: 10.5pt; }
  .tagline { margin-top: 1.5mm; }
  address { font-size: 7.8pt; }
  .section { padding: 4mm 0 0 29mm; }
  .section h2 { top: 4.3mm; width: 24mm; font-size: 8pt; }
  .section > ul { grid-template-columns: 1fr; gap: .35mm; }
  .experience { padding-bottom: 2.8mm; break-inside: avoid; }
  .experience + .experience { padding-top: 2.8mm; }
  h3 { margin-bottom: .7mm; font-size: 9.6pt; }
  h3 time { font-size: 7.5pt; }
  .experience p { margin-bottom: .7mm; font-size: 8pt; }
  li { margin: .65mm 0; }
}
