/* ==========================================================
   Page chrome (the documentation site around the resume)
   ========================================================== */
:root {
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --bg: #fafaf7;
  --card: #ffffff;
  --rule: #e5e5e0;
  --accent: #2a4365;
  --code-bg: #f3f3ee;
  --max: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 96px;
}

header.site-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

header.site-header h1 {
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

header.site-header p.tag {
  margin: 0;
  color: var(--muted);
}

section.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px 28px;
  margin: 24px 0;
}

section.card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

section.card h3 {
  margin: 20px 0 8px;
  font-size: 16px;
}

pre, code {
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

code.inline {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}

.copy-row button {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  background: white;
  border-radius: 6px;
  cursor: pointer;
}
.copy-row button:hover { background: var(--code-bg); }

textarea#json-input {
  width: 100%;
  min-height: 240px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  resize: vertical;
}

.btn-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

button.primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
}
button.primary:hover { filter: brightness(1.1); }

button.secondary {
  background: white;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}
button.secondary:hover { background: var(--code-bg); }

#status {
  margin-left: 8px;
  font-size: 13px;
  color: var(--muted);
}
#status.error { color: #b91c1c; }
#status.ok { color: #166534; }

a { color: var(--accent); }

ol, ul { padding-left: 22px; }

/* ==========================================================
   Resume preview (the DOM that becomes the PDF)
   This element is positioned offscreen but rendered (not
   display:none) so html2canvas can measure it.
   ========================================================== */
#resume-preview {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 794px; /* ~A4 width at 96dpi */
  background: white;
  color: #111;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.4;
  padding: 56px 64px;
}

#resume-preview .r-name {
  font-size: 26pt;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
#resume-preview .r-headline {
  font-size: 12pt;
  color: #444;
  margin: 0 0 10px;
  font-style: italic;
}
#resume-preview .r-contact {
  font-size: 10.5pt;
  color: #333;
  margin: 0 0 18px;
}
#resume-preview .r-contact span + span::before {
  content: " · ";
  color: #999;
}
#resume-preview h2.r-section {
  font-size: 11.5pt;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #222;
  padding-bottom: 3px;
  margin: 18px 0 8px;
}
#resume-preview .r-summary { margin: 0 0 6px; }
#resume-preview .r-entry { margin: 0 0 12px; page-break-inside: avoid; }
#resume-preview .r-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
#resume-preview .r-entry-title { font-weight: 700; }
#resume-preview .r-entry-sub { color: #444; font-style: italic; }
#resume-preview .r-entry-dates { color: #555; font-size: 10.5pt; white-space: nowrap; }
#resume-preview ul.r-bullets { margin: 4px 0 0; padding-left: 20px; }
#resume-preview ul.r-bullets li { margin: 2px 0; }
#resume-preview .r-skill-row { margin: 2px 0; }
#resume-preview .r-skill-row .cat { font-weight: 700; }
#resume-preview a { color: #111; text-decoration: none; }
