/* Resume styles: one sheet, screen first, then @media print for paper. */

:root {
  --ink: #111;
  --muted: #555;
  --rule: #111;
  --paper: #fff;
  --desk: #eef0f3;
  --link-line: #777;
  --serif: "Latin Modern Roman", "CMU Serif", "Computer Modern Serif", Charter,
    "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 15px/1.4 var(--serif);
}

/* The "sheet": US Letter proportions on wide screens, full width on phones. */
.page {
  max-width: 8.5in;
  margin: 24px auto;
  padding: 0.5in 0.55in;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

a {
  color: inherit;
  text-decoration: underline dotted var(--link-line);
  text-underline-offset: 2px;
}
a:hover { text-decoration-style: solid; }

/* ---------- header ---------- */
.masthead { text-align: center; position: relative; }
.masthead h1 {
  margin: 0 0 6px;
  font-size: 2.4em;
  font-weight: normal;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}
.contact {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  font-size: 0.93em;
}
.languages { margin-top: 2px; }

.print-button {
  position: absolute;
  top: 0;
  right: 0;
  font: inherit;
  font-size: 0.8em;
  padding: 4px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
}

.tagline { margin: 0 0 8px; font-size: 1.1em; font-style: italic; }
.note { margin-top: 10px; color: var(--muted); }

/* ---------- sections ---------- */
h2 {
  margin: 14px 0 6px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--rule);
  font-size: 1.2em;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}
h3 { margin: 0; font-size: 1em; }
section > p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.skills { padding-left: 24px; }
.skills li { margin-bottom: 3px; }

.entry { margin-bottom: 6px; break-inside: avoid; }

/* A row puts a title left and a date or place right, like LaTeX tabular* */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 16px;
}
.row > :last-child:not(:first-child) { margin-left: auto; text-align: right; }
.sub { padding-left: 10px; font-style: italic; font-size: 0.93em; }

.when { white-space: nowrap; font-size: 0.95em; }

/* ---------- Highlights / Full resume ---------- */
/* Both views are in the HTML; while Highlights is picked, anything marked .more is hidden, on screen and on paper.
   A browser without :has() shows the full resume. */
.page:has(#view-brief:checked) .more { display: none; }
.view-switch {
  display: inline-flex;
  margin: 10px 0 0;
  padding: 0;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 0.85em;
  overflow: hidden;
}
.view-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.view-switch label { padding: 3px 12px; cursor: pointer; background: #fafafa; }
.view-switch label + label { border-left: 1px solid #bbb; }
.view-switch input { position: absolute; opacity: 0; pointer-events: none; }
.view-switch label:has(input:checked) { background: var(--ink); color: var(--paper); }
.view-switch label:has(input:focus-visible) { outline: 2px solid #4a7dff; outline-offset: -2px; }

.bullets { padding-left: 24px; margin-top: 1px; }
.bullets li { position: relative; margin-bottom: 1px; }
.bullets li::before {
  content: "•";
  position: absolute;
  left: -13px;
}

.circles { padding-left: 24px; }
.circles li { position: relative; margin-bottom: 2px; }
.circles li::before {
  content: "◦";
  position: absolute;
  left: -15px;
}

.chevrons { padding-left: 24px; }
.chevrons li { position: relative; }
.chevrons li::before {
  content: "»";
  position: absolute;
  left: -15px;
}
.chevrons em { font-size: 0.93em; }

/* ---------- the "leave your details" form on the public profile ---------- */
.gate { max-width: 26em; margin: 22px auto 0; }
.gate .sent { padding: 10px 12px; background: #eef7ee; border: 1px solid #9c9; border-radius: 6px; }
/* A field people never see; a bot that fills every input fills this one too. */
.gate .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gate form { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.gate label { display: flex; flex-direction: column; gap: 4px; }
.gate input { font: inherit; padding: 6px 8px; border: 1px solid #999; border-radius: 4px; }
.gate input[aria-invalid="true"] { border-color: #b00020; }
.gate .error { color: #b00020; font-size: 0.9em; }
.gate button {
  font: inherit;
  padding: 7px 14px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .page { margin: 0; padding: 20px 16px; box-shadow: none; }
  .masthead h1 { font-size: 2em; margin-top: 28px; }
  .print-button { right: 0; }
  .row > :last-child:not(:first-child) { margin-left: 0; text-align: left; }
  .when { white-space: normal; }
}

/* ---------- paper ---------- */
@page {
  size: letter;
  margin: 0.45in 0.5in;
}

@media print {
  html, body { background: none; }
  body { font-size: 10pt; line-height: 1.25; }
  .page {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .print-button, .view-switch { display: none; }
  a { color: inherit; }
  h2 { margin: 9pt 0 4pt; break-after: avoid; }
  h3 { break-after: avoid; }
  .entry, .skills li, .circles li { break-inside: avoid; }
}
