:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #202a34;
  background: #edf0f3;
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; }
.toolbar {
  max-width: 960px;
  margin: 24px auto 12px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
button, .linkedin-button {
  padding: 10px 18px;
  border: 1px solid #284c67;
  border-radius: 0;
  background: #284c67;
  color: white;
  font: inherit;
  cursor: pointer;
}
button:hover, .linkedin-button:hover { background: #18374e; }
.linkedin-button { margin-right: auto; color: white; text-decoration: none; }
#theme-toggle { width: 9rem; flex-shrink: 0; white-space: nowrap; }
a { color: #284c67; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #b66a18; outline-offset: 4px; }
.cv {
  max-width: 960px;
  margin: 0 auto 48px;
  padding: 52px 64px 60px;
  background: #fff;
  border-top: 5px solid #284c67;
}
.cv-header { padding-bottom: 24px; border-bottom: 1px solid #bbc5ce; }
h1 {
  margin: 0 0 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: normal;
  letter-spacing: -0.025em;
}
.cv-header p { margin: 0; }
.separator { margin: 0 8px; color: #687786; }
section { margin-top: 30px; }
h2 {
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #cdd5dc;
  color: #284c67;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
}
h3 { margin: 0 0 4px; font-size: 1.0625rem; line-height: 1.45; }
p { margin: 0 0 12px; }
ul { margin: 10px 0 0; padding-left: 21px; }
li { padding-left: 3px; margin-bottom: 6px; }
.job + .job { margin-top: 26px; }
.job h3 + p { color: #52606c; font-size: 0.9375rem; }
.job h3 + p em { font-style: normal; }
code { font-size: 0.95em; }

/* Screen-only theme rules leave printed documents in the light palette. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    color: #e3e9ef;
    background: #111820;
  }
  [data-theme="dark"] .cv { background: #1b2530; border-top-color: #9ec9eb; }
  [data-theme="dark"] .cv-header { border-bottom-color: #485866; }
  [data-theme="dark"] h2 { color: #9ec9eb; border-bottom-color: #485866; }
  [data-theme="dark"] a { color: #9ec9eb; }
  [data-theme="dark"] .separator,
  [data-theme="dark"] .job h3 + p { color: #b5c2ce; }
  [data-theme="dark"] button,
  [data-theme="dark"] .linkedin-button {
    color: #e3e9ef;
    background: #29465c;
    border-color: #9ec9eb;
  }
  [data-theme="dark"] button:hover,
  [data-theme="dark"] .linkedin-button:hover { background: #365b77; }
  [data-theme="dark"] :focus-visible { outline-color: #f0bc75; }
}

@media (max-width: 640px) {
  .toolbar { margin: 16px 20px; }
  .cv { margin-bottom: 0; padding: 30px 22px 40px; }
  h1 { font-size: 2.25rem; }
  .cv-header a { display: block; width: fit-content; overflow-wrap: anywhere; }
  .separator { display: none; }
}

@page { size: auto; margin: 16mm; }
@media print {
  :root { color-scheme: light; background: white; color: black; font-size: 10pt; line-height: 1.4; }
  .toolbar { display: none; }
  .cv { max-width: none; margin: 0; padding: 0; border: 0; }
  .cv-header { padding-bottom: 12pt; }
  h1 { font-size: 25pt; }
  h2 { color: black; margin-bottom: 8pt; }
  h3 { font-size: 11pt; }
  section { margin-top: 16pt; }
  p { margin-bottom: 7pt; }
  li { margin-bottom: 3pt; break-inside: avoid; }
  ul { margin-top: 6pt; }
  .job + .job { margin-top: 14pt; }
  .job h3 + p { color: #333; font-size: 10pt; }
  h1, h2, h3, .job h3 + p { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  a { color: inherit; text-decoration: none; }
  .cv-header a { display: inline; }
  .separator { display: inline; }
}
