:root {
  --resume-max-width: 80rem;
  --sidebar-width: 28rem;
  --font-body: "Open Sans", Arial, sans-serif;
  --font-heading: "Montserrat", Arial, sans-serif;
  --color-scheme: dark;
  --color-page-background: #000;
  --color-dark: #000;
  --color-text: #242424;
  --color-surface: #fff;
  --color-charcoal: #333;
  --color-sidebar-text: #f8f8f8;
  --color-muted-text: #5d5d5d;
  --color-tag-background: #666;
  --color-action-active: #666;
  --color-border: #999;
  --color-hover-background: #f2f2f2;
  --color-focus: #2867a5;
  --color-transparent: transparent;
  --radius-pill: 2.2rem;

  color-scheme: var(--color-scheme);
  font-family: var(--font-body);
  font-size: 62.5%;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-page-background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

.u-flex {
  display: flex;
}

.u-font-heading {
  font-family: var(--font-heading);
}

.u-uppercase {
  text-transform: uppercase;
}

.u-list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.u-pill {
  border-radius: var(--radius-pill);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-size: 1.3rem;
}

.resume {
  position: relative;
  max-width: var(--resume-max-width);
  margin: 0 auto;
  background: var(--color-surface);
}

.page-actions {
  position: absolute;
  top: 1.4rem;
  right: 1.7rem;

  align-items: center;

  gap: 0.4rem;
  z-index: 1;
  font-size: 1.2rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-border);
  color: var(--color-charcoal);
  background: var(--color-surface);
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.action-icon {
  display: none;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.share-button {
  display: none;
}

.language-switch {
  position: relative;
  isolation: isolate;
  align-items: center;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0;
  color: var(--color-charcoal);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.language-switch::before {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 1px;
  width: calc((100% - 2px) / 2);
  border-radius: inherit;
  background: var(--color-action-active);
  content: "";
  pointer-events: none;
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.language-switch[data-active-language="fr"]::before {
  transform: translateX(100%);
}

.language-switch[hidden] {
  display: none;
}

.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  min-width: 2.7rem;
  min-height: 2rem;
  padding: 0.3rem 0.6rem;
  border: 0;
  color: var(--color-charcoal);
  background: var(--color-transparent);
  font: inherit;
  line-height: 1.2;
  transition: color 180ms ease;
}

.language-switch[data-active-language="en"] .language-option[lang="en"],
.language-switch[data-active-language="fr"] .language-option[lang="fr"] {
  color: var(--color-surface);
}

.language-switch:disabled {
  cursor: wait;
}

.language-switch:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.action-button:hover {
  color: var(--color-surface);
  background: var(--color-action-active);
}

.action-button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.action-button:disabled {
  cursor: wait;
}

.sidebar {
  width: var(--sidebar-width);
  padding-top: 3rem;
  flex-shrink: 0;
  color: var(--color-sidebar-text);
  background: var(--color-charcoal);
  text-align: center;
}

.avatar {
  display: block;
  width: 16.5rem;
  height: 16.5rem;
  margin: 0 auto;
  border: 3px solid var(--color-sidebar-text);
  border-radius: 50%;
  object-fit: cover;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  padding: 3rem 0 1rem;
  font-size: 3.2rem;
  line-height: 3.2rem;
  font-weight: 600;
  letter-spacing: 0.4rem;
  white-space: nowrap;
}

.role {
  margin-bottom: 0.6rem;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2rem;
  white-space: nowrap;
}

.location {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 2px solid currentColor;
}

.sidebar-section {
  margin: 3rem 2rem;
}

.resume-section > h2 {
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid currentColor;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  color: var(--color-charcoal);
}

.sidebar-section p {
  margin-bottom: 0;
}

.main-content {
  min-width: 0;
  padding: 5rem 4rem;
}

.resume-section + .resume-section {
  margin-top: 2.8rem;
}

.entry {
  break-inside: avoid;
}

.entry + .entry {
  margin-top: 1.9rem;
}

.entry-header {
  display: block;
  margin-bottom: 0.6rem;
}

.entry-header h3 {
  margin-bottom: 0.2rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
}

.entry-date {
  margin-bottom: 0;
  color: var(--color-muted-text);
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.2rem;
  text-align: left;
}

.entry p {
  margin-bottom: 0.7rem;
}

.tags {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin: 0.8rem 0 0;
}

.tags li {
  padding: 0.1rem 0.6rem;
  border-radius: 1.1rem;
  color: var(--color-surface);
  background: var(--color-tag-background);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
  .language-switch::before,
  .language-option {
    transition: none;
  }
}

@media (max-width: 43.75rem) {
  .resume {
    flex-direction: column;
  }

  .sidebar {
    width: auto;
    flex-shrink: 1;
  }

  .sidebar,
  .main-content {
    padding: 2.5rem 2rem;
  }

  .page-actions {
    position: static;
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    margin-top: 2rem;
    gap: 0.8rem;
    font-size: 1.4rem;
  }

  .action-button {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 4rem;
    padding: 0.4rem 0.6rem;
  }

  body.supports-web-share #pdf-button {
    display: none;
  }

  body.supports-web-share .share-button {
    display: inline-flex;
  }

  .action-icon {
    display: block;
  }

  .language-switch {
    flex: 0 0 auto;
  }

  .language-option {
    min-width: 3.8rem;
    min-height: 3.8rem;
    padding: 0.4rem;
  }

  header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
  }

  .side-header {
    flex: 0 0 21rem;
    width: 21rem;
    margin-left: 1.5rem;
  }

  .avatar {
    margin: 0;
    width: 8rem;
    height: 8rem;
  }

  h1 {
    padding: 0;
    font-size: 2.7rem;
    line-height: 2.8rem;
    letter-spacing: 0.3rem;
  }

  .role {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 0.1rem;
  }

  .location {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-section {
    margin: 1rem 0 0;
  }

  .main-content {
    padding-top: 2.5rem;
  }
}

@media (max-width: 34rem) {
  .side-header {
    margin-left: 1.2rem;
  }

  .avatar {
    width: 6.4rem;
    height: 6.4rem;
  }

  h1 {
    font-size: 2.4rem;
    line-height: 2.6rem;
    letter-spacing: 0.2rem;
  }

  .role {
    font-size: 1.2rem;
  }
}

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

@media print {
  :root, .sidebar {
    background: var(--color-surface);
  }

  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .resume {
    max-width: none;
  }

  .sidebar {
    flex-basis: 30%;
    color: var(--color-dark);
    border-right: 1px solid;
  }

  .main-content {
    padding: 3rem;
    flex-basis: 70%;
  }

  .page-actions {
    display: none;
  }

  .tags li {
    color: var(--color-dark);
    border: 1px solid;
    background: none;
  }
}
