/* Résumé: print-first layout sharing the site's tokens. US Letter. */
:root { --bg:#faf9f5; --ink:#141413; --ink-2:#3d3d3a; --muted:#696862; --rule:#e8e6dc; --accent:#5b8fb9; --serif:"Newsreader",Georgia,serif; --sans:"Instrument Sans",system-ui,sans-serif; }
/* Dark appearance: the sheet stays paper (it is the print document, and the PDF is made from it);
   only the desk around it and the toolbar go dark. The two dark blocks must stay identical. */
:root { --desk:#e9e7df; --tool-ink:var(--ink); --tool-bg:var(--bg); --tool-muted:var(--muted); --sheet-shadow:0 12px 40px rgba(20,20,19,.12); }
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --desk:#141413; --tool-ink:#faf9f5; --tool-bg:#141413; --tool-muted:#9b9991; --sheet-shadow:0 12px 40px rgba(0,0,0,.5); color-scheme:dark; }
}
@media screen {
  :root[data-theme="dark"] { --desk:#141413; --tool-ink:#faf9f5; --tool-bg:#141413; --tool-muted:#9b9991; --sheet-shadow:0 12px 40px rgba(0,0,0,.5); color-scheme:dark; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--sans); font-size: 10.5pt; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
dl { margin: 0; }
.sheet { background: var(--bg); width: 8.5in; margin: 24px auto; padding: .7in .75in .65in; box-shadow: var(--sheet-shadow); }

.head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 32px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.head h1 { font-family: var(--serif); font-weight: 400; font-size: 30pt; line-height: 1; letter-spacing: -.005em; }
.head .title { font-size: 11pt; color: var(--ink-2); margin-top: 6px; }
.head .contact { font-size: 9pt; color: var(--muted); text-align: right; line-height: 1.6; }
.head .contact a { color: var(--ink); }

.summary { padding: 14px 0 12px; font-size: 10.5pt; line-height: 1.5; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 20px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stats div { padding: 10px 0; }
.stats .num { font-family: var(--serif); font-size: 20pt; line-height: 1; }
.stats .label { font-size: 8.5pt; color: var(--muted); margin-top: 4px; line-height: 1.35; }

section { padding: 12px 0 4px; }
section h2 { font-size: 8.5pt; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--ink); break-after: avoid; }
.role { padding: 10px 0 8px; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.role:last-child { border-bottom: 0; }
.role-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.role-head, .role .org { break-after: avoid; }
.role .years { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 11pt; color: var(--muted); white-space: nowrap; }
.role h3 { font-family: var(--serif); font-weight: 400; font-size: 14pt; line-height: 1.15; }
.role h3 small { display: block; font-family: var(--sans); font-size: 9pt; color: var(--muted); margin-top: 2px; }
.role .org { font-size: 9.5pt; color: var(--muted); margin-top: 2px; }
.role .org strong { font-weight: 600; color: var(--ink); }
.role ul { margin-top: 6px; display: grid; gap: 3px; }
/* Native markers, not an absolutely positioned ::before: positioned bullets are painted after the in-flow text,
   which scrambled the PDF's text order for résumé parsers (every heading first, then every bullet). */
.role li { font-size: 9.8pt; line-height: 1.4; color: var(--ink-2); margin-left: 12px; list-style: disc; break-inside: avoid; }
.role li::marker { color: var(--accent); font-size: 7pt; }
.kv { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 0 14px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 9.5pt; break-inside: avoid; }
.kv:last-child { border-bottom: 0; }
.kv dt { font-weight: 600; color: var(--ink); }
.kv dd { margin: 0; color: var(--ink-2); }
.edu p { font-size: 9.8pt; color: var(--ink-2); padding: 6px 0; }


.toolbar { max-width: 8.5in; margin: 24px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.toolbar a { color: var(--tool-ink); display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--tool-ink); border-radius: 999px; padding: 8px 16px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar a:hover { background: var(--tool-ink); color: var(--tool-bg); }
.toolbar .back { border: 0; padding: 8px 0; color: var(--tool-muted); }
.toolbar .back:hover { background: none; color: var(--tool-ink); }
@page { size: Letter; margin: .42in .6in .4in; }
@media print {
  .toolbar { display:none; }
  body { background: #fff; font-size: 10pt; }
  .sheet { margin: 0; box-shadow: none; width: auto; min-height: 0; padding: 0; background: #fff; }
  .summary { padding: 9px 0 8px; }
  .stats div { padding: 7px 0; }
  .stats .num { font-size: 19pt; }
  section { padding: 7px 0 2px; }
  .role { padding: 6px 0 5px; }
  .role ul { margin-top: 4px; gap: 2px; }
  .role li { font-size: 9.3pt; line-height: 1.3; }
  .skills dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .kv { grid-template-columns: 96px minmax(0,1fr); gap: 0 12px; padding: 3px 0; font-size: 9pt; line-height: 1.3; }
  .edu p { font-size: 9pt; padding: 3px 0; }
}
@media screen and (max-width: 900px) {
  .sheet { width: auto; margin: 16px; padding: 24px; }
  .head { grid-template-columns: 1fr; }
  .head .contact { text-align: left; }
}
@media screen and (max-width: 540px) { .sheet { margin: 0; padding: 20px; } .stats { gap: 8px; } .stats .num { font-size: clamp(14px,4vw,20px); } .kv { grid-template-columns: 1fr; } .role-head { flex-wrap: wrap; gap: 3px 12px; } }
