@font-face {
  font-family: 'Source Sans Pro CV';
  src: url('fonts/SourceSansPro-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans Pro CV';
  src: url('fonts/SourceSansPro-LightIt.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans Pro CV';
  src: url('fonts/SourceSansPro-Regular.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #191975;
  --symbol: #26267d;
  --link: #000066;
  --tag-border: #b7b7b7;
  --ink: #000;
  --paper: #fff;
  --backdrop: #a8a8a8;

  --angle-right: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20500%201000%22%3E%3Cpath%20transform%3D%22translate%280%2C875%29%20scale%281%2C-1%29%22%20d%3D%22M438%20342C456%20360%20457%20390%20438%20408L172%20674C154%20692%20124%20692%20106%20674L62%20629C44%20611%2044%20581%2062%20563L250%20375L62%20187C44%20169%2044%20138%2062%20120L106%2076C124%2058%20154%2058%20172%2076Z%22/%3E%3C/svg%3E");

  --page-w: 21cm;
  --margin-x: 1.5cm;
  --margin-top: 0.8cm;
  --margin-bottom: 1.5cm;
  --col-left: 2.5cm;
  --col-right: 14.8cm;
  --col-gap: 0.35cm;

  --fs-script: 7pt;
  --fs-footnote: 8pt;
  --fs-small: 9pt;
  --fs-normal: 10pt;
  --fs-large: 12pt;
  --fs-Large: 14.4pt;
  --fs-LARGE: 17.28pt;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 1.5rem 1rem;
  background: var(--backdrop);
  color: var(--ink);
  font-family: 'Source Sans Pro CV', 'Source Sans Pro', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: var(--fs-normal);
  line-height: 1.2;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) { :root { --backdrop: #23232b; } }
:root[data-theme='dark'] { --backdrop: #23232b; }
:root[data-theme='light'] { --backdrop: #a8a8a8; }

.sheet {
  width: var(--page-w);
  max-width: 100%;
  margin: 0 auto;
  padding: var(--margin-top) var(--margin-x) var(--margin-bottom);
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28), 0 8px 28px rgba(0, 0, 0, .22);
}

strong, b, th { font-weight: 600; }
em, i { font-style: italic; }

a {
  color: var(--link);
  text-decoration: none;
}
a:hover, a:focus-visible { text-decoration: underline; }

.sc { font-variant: small-caps; }

.sprite { display: none; }

.ic {
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex: none;
}
.ic-fw {
  display: inline-flex;
  width: 1.25em;
  justify-content: center;
  align-items: baseline;
}

.cv-header {
  display: flex;
  align-items: flex-start;
  gap: 0.12cm;
}
.hdr-main { flex: 1 1 auto; min-width: 0; }
.cv-header.has-photo .hdr-main {
  flex: 0 0 auto;
  width: calc(100% - 3.5cm - 2em);
}

.cv-photo {
  flex: none;
  width: 3.5cm;
  height: 3.5cm;
  border-radius: 50%;
  object-fit: cover;
}

.name {
  margin: 0;
  font-size: var(--fs-LARGE);
  font-weight: 300;
  line-height: 1.15;
  color: var(--accent);
}
.name .last {
  font-variant: small-caps;
  font-weight: 600;
}

.tagline {
  margin: .1em 0 0;
  font-size: var(--fs-large);
  font-weight: 600;
  color: var(--accent);
}

.social {
  margin-top: .9em;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.social td {
  padding: .12em 1em .12em 0;
  white-space: nowrap;
  vertical-align: baseline;
}
.social .sym, .social .ic-fw { color: var(--symbol); }
.social .ic-fw { margin-right: .5em; }
.social .ic-fw img {
  height: 1.2em;
  width: auto;
  max-width: 1.25em;
  vertical-align: -.25em;
}

.summary { margin: 1.74em 0 1em; }
.summary p { margin: 0 0 .55em; }
.summary p:last-child { margin-bottom: 0; }

.sec {
  display: flex;
  align-items: baseline;
  gap: .5em;
  margin: .9em 0 0;
  padding: 0 0 2pt;
  font-size: var(--fs-Large);
  font-weight: 300;
  font-variant: small-caps;
  color: var(--accent);
  border-bottom: .4pt solid var(--ink);
  line-height: 1.1;
}
.sec .ic { height: .82em; vertical-align: baseline; }
.sec + * { margin-top: .8em; }
.sec.g10 + * { margin-top: 1em; }

.keywords {
  border-collapse: collapse;
  width: 100%;
}
.keywords th {
  width: 4.4cm;
  padding: .06em .6em .06em 0;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}
.keywords td {
  padding: .06em 0;
  vertical-align: top;
}

.exp {
  display: grid;
  grid-template-columns: var(--col-left) 1fr;
  column-gap: var(--col-gap);
}

.exp-dates {
  text-align: right;
  font-weight: 600;
}
.exp-dates span { display: block; }
.exp-dates span + span { margin-top: .05em; }

.exp-body {
  border-left: .4pt solid var(--ink);
  padding: 0 0 .7em var(--col-gap);
}
.exp:last-child .exp-body { padding-bottom: 0; }
.exp-head { margin: 0 0 .05em; }
.exp-head img { height: .95em; vertical-align: -.2em; margin: 0 .15em; }

ul.fa {
  margin: 0;
  padding-left: 2em;
  list-style: none;
}
ul.fa > li {
  position: relative;
  margin: 0;
}
ul.fa > li::before {
  content: '';
  position: absolute;
  left: -1.05em;
  top: .30em;
  width: .5em;
  height: .72em;
  background: currentColor;
  -webkit-mask: var(--angle-right) no-repeat center / contain;
  mask: var(--angle-right) no-repeat center / contain;
}

.tags {
  margin: .34em 0 0;
  font-size: var(--fs-footnote);
  display: flex;
  flex-wrap: wrap;
  gap: .3em .34em;
}
.tag {
  border: .4pt solid var(--tag-border);
  border-radius: .5ex;
  padding: .16em .35em;
  line-height: 1.15;
  white-space: nowrap;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.4cm;
  align-items: start;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin: 0;
}
.project-head .dates { font-variant: small-caps; }
.project p { margin: 0; }
.project .links { margin-top: .32em; }
.project .desc { margin-top: .1em; text-align: justify; }

.edu {
  display: grid;
  grid-template-columns: var(--col-left) var(--col-right);
  column-gap: var(--col-gap);
  margin-bottom: .8em;
}
.edu:last-child { margin-bottom: 0; }
.edu .when { text-align: right; }
.edu .what > div { margin-bottom: .04em; }

.interests { border-collapse: collapse; }
.interests th {
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
  padding: 0 .5em 0 0;
}
.interests td { vertical-align: top; padding: 0; }

.flag {
  height: .78em;
  width: auto;
  vertical-align: -.02em;
  margin-right: .15em;
  border: .2pt solid rgba(0, 0, 0, .25);
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  body { background: #fff; padding: 0; }
  .sheet {
    width: auto;
    max-width: none;
    box-shadow: none;
    margin: 0;
  }
  a { color: var(--link); }
  .exp, .edu, .project, .keywords tr, .interests tr { break-inside: avoid; }
  .sec { break-after: avoid; }
}

@media screen and (max-width: 20cm) {
  body { padding: 0; }
  .sheet {
    width: 100%;
    padding: 1.2rem 1rem 2rem;
    box-shadow: none;
  }
  .cv-header { gap: .4em; }
  .social, .social tbody, .social tr, .social td { display: block; width: auto; }
  .social td {
    white-space: normal;
    padding: .12em 0;
    overflow-wrap: anywhere;
  }
  .exp, .edu {
    grid-template-columns: 1fr;
    row-gap: .2em;
  }
  .exp-dates {
    text-align: left;
    padding-right: 0;
  }
  .exp-dates span { display: inline; }
  .exp-dates span + span { margin: 0; }
  .exp-dates span + span::before { content: ' — '; }
  .exp-body { border-left: 0; padding-left: 0; }
  .edu .when { text-align: left; font-weight: 600; }
  .two-col { grid-template-columns: 1fr; row-gap: .6em; }
  .keywords, .keywords tbody, .keywords tr, .keywords th, .keywords td { display: block; width: auto; }
  .keywords th { text-align: left; padding: .5em 0 0; white-space: normal; }
  .interests, .interests tbody, .interests tr, .interests th, .interests td { display: block; }
  .interests th { text-align: left; padding: .5em 0 0; white-space: normal; }
}
