/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --bg: #e8edf2;
  --paper: #ffffff;
  --ink: #1b2430;
  --ink-soft: #3a4553;
  --muted: #586474;
  --accent: #00518b;
  --accent-strong: #003256;
  --rule: #dce3ea;
  --chip-bg: #eaf1f8;
  --chip-ink: #1f4466;
  --bar-a: #dbe7f2;
  --bar-b: #c8dbec;
  --focus: #00518b;
  --toolbar-bg: rgb(255 255 255 / 0.86);
  --shadow: 0 1px 2px rgb(0 30 60 / 0.06), 0 12px 40px rgb(0 30 60 / 0.08);

  --side-grad: linear-gradient(180deg, #003256 0%, #00518b 100%);
  --side-ink: #ffffff;
  --side-muted: rgb(255 255 255 / 0.84);

  --side-w: 31%;
  --timeline-top: 0px;
  --page-max: 1180px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #070d14;
    --paper: #0e1722;
    --ink: #e5ecf3;
    --ink-soft: #c3cedb;
    --muted: #97a6b7;
    --accent: #72b6ee;
    --accent-strong: #a9d3f6;
    --rule: #223142;
    --chip-bg: #172535;
    --chip-ink: #cfe2f4;
    --bar-a: #18293b;
    --bar-b: #1f3449;
    --focus: #8cc6f5;
    --toolbar-bg: rgb(14 23 34 / 0.86);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 40px rgb(0 0 0 / 0.35);
    --side-grad: linear-gradient(180deg, #001b30 0%, #003c69 100%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #070d14;
  --paper: #0e1722;
  --ink: #e5ecf3;
  --ink-soft: #c3cedb;
  --muted: #97a6b7;
  --accent: #72b6ee;
  --accent-strong: #a9d3f6;
  --rule: #223142;
  --chip-bg: #172535;
  --chip-ink: #cfe2f4;
  --bar-a: #18293b;
  --bar-b: #1f3449;
  --focus: #8cc6f5;
  --toolbar-bg: rgb(14 23 34 / 0.86);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 40px rgb(0 0 0 / 0.35);
  --side-grad: linear-gradient(180deg, #001b30 0%, #003c69 100%);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

main:focus,
.job-role:focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--accent);
  font-weight: 600;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Page & rows (mobile first: single column)
   ========================================================================== */

.page {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--paper);
  overflow-x: clip;
}

.content {
  padding-inline: 20px;
}

.side {
  padding-inline: 20px;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
  padding: 36px 20px 24px;
  background: linear-gradient(180deg, #003256 0%, #00426f 100%);
  color: var(--side-ink);
}

.hero .side,
.hero .content {
  padding: 0;
}

.photo {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
  background: #00294a;
}

.name {
  font-weight: 300;
  font-size: clamp(1.9rem, 7vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.headline {
  margin-top: 0.45em;
  font-weight: 700;
  font-size: 1.08rem;
}

.years {
  font-size: 1rem;
}

/* ---------- Intro: aside + about/skills/education ---------- */

.intro-side {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 24px;
  padding-block: 4px 28px;
  background: linear-gradient(180deg, #00426f 0%, #00518b 100%);
  color: var(--side-ink);
}

.side-title {
  font-weight: 400;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35em;
}

.side-list {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--side-muted);
}

.side-list a {
  color: var(--side-ink);
}

.side-list .strong {
  font-weight: 700;
}

.hero :focus-visible,
.intro-side :focus-visible {
  outline-color: #ffffff;
}

.intro-content {
  padding-top: 36px;
}

.block {
  padding-bottom: 40px;
}

.section-title {
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 0.9em;
}

.summary {
  color: var(--ink-soft);
  max-width: 68ch;
}

/* Skills */

.skills {
  display: grid;
  gap: 14px;
}

.skill dt {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.skill-text {
  display: none;
}

/* Tags */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.6;
}

.tags-muted li {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-weight: 400;
}

/* Education */

.education {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}

.edu-year {
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Experience ---------- */

.experience-head .side {
  display: none;
}

.job {
  padding-block: 26px;
  border-top: 1px solid var(--rule);
}

.experience-head + .job {
  border-top: 0;
  padding-top: 4px;
}

.job-side {
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.job-dates {
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.job-org {
  color: var(--ink-soft);
  font-weight: 500;
}

.job-role {
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.55em;
}

.job-summary {
  color: var(--ink-soft);
  max-width: 70ch;
}

.job-summary p + p {
  margin-top: 0.35em;
}

.job-tech {
  margin-top: 12px;
}

/* Details (expandable) */

.job-details {
  margin-top: 14px;
}

.job-details > summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  padding: 6px 12px 6px 8px;
  margin-left: -8px;
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.job-details > summary::-webkit-details-marker {
  display: none;
}

.job-details > summary:hover {
  background: var(--chip-bg);
}

.job-details > summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.job-details[open] > summary svg {
  transform: rotate(180deg);
}

.job-details .when-open,
.job-details[open] .when-closed {
  display: none;
}

.job-details[open] .when-open {
  display: inline;
}

.job-details .count {
  color: var(--muted);
  font-weight: 400;
}

.details-body {
  padding-top: 10px;
  animation: reveal 0.25s ease;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.highlights {
  display: grid;
  gap: 8px;
  max-width: 72ch;
  color: var(--ink-soft);
}

.highlights li {
  position: relative;
  padding-left: 1.4em;
}

.highlights li::before {
  content: '';
  position: absolute;
  left: 0.35em;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.projects {
  display: grid;
  gap: 18px;
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
}

.highlights + .projects {
  margin-top: 20px;
}

.project-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2em;
}

.project-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 70ch;
}

.bullets {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.bullets li {
  position: relative;
  padding-left: 1.3em;
}

.bullets li::before {
  content: '–';
  position: absolute;
  left: 0.2em;
  color: var(--muted);
}

.project .tags {
  margin-top: 8px;
}

.job {
  scroll-margin-top: 24px;
}

/* In timeline view, positions scroll in below the sticky frieze */
[data-view='timeline'] .job {
  scroll-margin-top: calc(var(--timeline-h, 180px) + var(--timeline-top, 0px) + 12px);
}

/* ---------- Footer ---------- */

.page-footer {
  padding-block: 28px 96px;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--muted);
}

.page-footer .side {
  display: none;
}

/* ==========================================================================
   Toolbar (JS only)
   ========================================================================== */

.toolbar {
  display: none;
}

/* Mobile: bottom, within thumb reach. Desktop: top right. */
.js .toolbar {
  position: fixed;
  z-index: 10;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--toolbar-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.seg {
  display: flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--chip-bg);
}

.seg button {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.seg button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--paper);
}

.tool {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.lang-switch {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.tool:hover,
.seg button:hover:not([aria-pressed='true']) {
  background: var(--chip-bg);
}

.tool svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool svg .fill {
  fill: currentColor;
}

.tool .i-collapse,
.tool[aria-pressed='true'] .i-expand {
  display: none;
}

.tool[aria-pressed='true'] .i-collapse {
  display: contents;
}

/* ==========================================================================
   Timeline view
   ========================================================================== */

.timeline-head {
  padding-top: 32px;
}

.timeline-head .side-title {
  color: var(--accent);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.timeline-hint {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 52ch;
}

/* Sticky frieze: stays in view while the positions scroll underneath */
.timeline {
  position: sticky;
  top: var(--timeline-top);
  z-index: 5;
}

.frieze-card {
  margin-top: 12px;
  border-block: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: 0 8px 16px -12px rgb(0 30 60 / 0.35);
}

.frieze-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-block: 18px 4px;
}

.frieze {
  min-width: 1080px;
  padding-inline: 24px;
}

.lane,
.axis {
  position: relative;
}

.lane-jobs {
  height: 68px;
}

.lane-jobs li {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from);
  width: calc(var(--to) - var(--from));
  padding-inline: 1px;
  container-type: inline-size;
}

.bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--bar-a);
  color: var(--ink);
  text-align: left;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

.lane-jobs li:nth-child(even) .bar {
  background: var(--bar-b);
}

.bar:hover {
  transform: translateY(-2px);
}

.bar[aria-current='true'],
.lane-jobs li .bar[aria-current='true'] {
  background: var(--accent);
  color: var(--paper);
}

.bar-org,
.bar-role {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-org {
  font-weight: 700;
  font-size: 0.78rem;
}

.bar-role {
  font-size: 0.7rem;
  opacity: 0.85;
}

/* Short periods: wrap the company name, drop the role */
@container (max-width: 100px) {
  .bar {
    padding-inline: 4px;
  }
  .bar-org {
    white-space: normal;
    text-overflow: clip;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .bar-role {
    display: none;
  }
}

.axis {
  height: 30px;
  margin-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.axis span {
  position: absolute;
  top: 0;
  left: var(--at);
  transform: translateX(-50%);
  padding-top: 8px;
}

.axis span::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  height: 6px;
  border-left: 1px solid var(--rule);
}

.lane-edu {
  height: calc(var(--rows, 1) * 22px + 8px);
}

/* One row per milestone, label to the right of its dot: labels never overlap */
.lane-edu li {
  position: absolute;
  top: calc(var(--row, 0) * 22px);
  left: var(--at);
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-6px);
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.lane-edu .is-before {
  transform: none;
}

.lane-edu .is-before .dot {
  border-style: dashed;
}

.lane-edu .dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--accent);
}

/* Timeline view: frieze + positions only (exclusive with the CV view) */

[data-view='timeline'] .intro,
[data-view='timeline'] .experience-head {
  display: none;
}

/* Brief highlight of the position reached from the frieze */
.job.is-flash .job-content {
  animation: flash 1.4s ease;
}

@keyframes flash {
  0%,
  30% {
    background: var(--chip-bg);
  }
  100% {
    background: transparent;
  }
}



/* Compact sticky frieze on phones */
@media (max-width: 899px) {
  .frieze-scroll {
    padding-block: 10px 0;
  }
  .lane-jobs {
    height: 52px;
  }
  .axis {
    height: 24px;
    margin-top: 6px;
  }
  .axis span {
    padding-top: 5px;
  }
  .lane-edu {
    height: calc(var(--rows, 1) * 18px + 4px);
  }
  .lane-edu li {
    top: calc(var(--row, 0) * 18px);
    font-size: 0.68rem;
  }
}

/* ==========================================================================
   Small tablets
   ========================================================================== */

@media (min-width: 560px) {
  .hero {
    flex-wrap: nowrap;
    padding-inline: 28px;
  }
  .photo {
    width: 128px;
    height: 128px;
  }
  .content,
  .side {
    padding-inline: 28px;
  }
  .skill {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 12px;
    align-items: baseline;
  }
  .skill dt {
    margin-bottom: 0;
  }
}

/* ==========================================================================
   Desktop: two columns, gradient sidebar (as in the Word CV)
   ========================================================================== */

@media (min-width: 900px) {
  .page::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--side-w);
    background: var(--side-grad);
  }

  .row {
    position: relative;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }

  .side {
    padding-inline: 28px;
    color: var(--side-ink);
  }

  .content {
    padding-inline: 44px 56px;
  }

  .side :focus-visible {
    outline-color: #ffffff;
  }

  .js .toolbar {
    top: 12px;
    bottom: auto;
    left: auto;
    right: max(12px, calc((100vw - var(--page-max)) / 2 + 16px));
    transform: none;
  }

  .page-footer {
    padding-bottom: 40px;
  }

  /* Hero */
  .hero {
    padding: 112px 0 40px;
    background: none;
    color: var(--ink);
  }

  .hero .side {
    display: flex;
    justify-content: flex-end;
    padding-inline: 28px;
  }

  .hero .content {
    padding-inline: 44px 56px;
    align-self: center;
  }

  .photo {
    width: 200px;
    height: 200px;
    border-radius: 2px;
  }

  .name {
    color: var(--accent);
  }

  /* Intro, with sidebar blocks aligned to their main-column section */
  .intro {
    padding-top: 28px;
  }

  .intro-side {
    display: block;
    padding-block: 0;
    background: none;
    text-align: center;
  }

  .side-block + .side-block {
    margin-top: 40px;
  }

  .side-title {
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: 0.03em;
    margin-bottom: 0.7em;
  }

  .intro-content {
    padding-top: 0;
  }

  .block {
    padding-bottom: 52px;
  }

  @supports (grid-template-rows: subgrid) {
    .intro {
      grid-template-rows: repeat(3, auto);
    }
    .intro-side,
    .intro-content {
      display: grid;
      grid-row: 1 / span 3;
      grid-template-rows: subgrid;
    }
    .side-block + .side-block {
      margin-top: 0;
    }
  }

  /* Experience: dates and company in the sidebar */
  .experience-head .side {
    display: block;
  }

  .experience-head {
    padding-top: 12px;
  }

  .job {
    border-top: 0;
    padding-block: 0 48px;
  }

  .experience-head + .job {
    padding-top: 0;
  }

  .job-side {
    margin: 0;
    padding-top: 0.32rem;
    text-align: right;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .job-dates {
    color: var(--side-ink);
  }

  .job-org {
    color: var(--side-muted);
  }

  .projects {
    margin-left: 2.5rem;
  }

  .page-footer .side {
    display: block;
  }

  .page-footer {
    border-top: 0;
  }

  /* Timeline: header in both columns, frieze as a full-width sticky card */
  .timeline-head .side {
    padding-top: 0.15rem;
    text-align: right;
  }

  .timeline-head .side-title {
    color: var(--side-ink);
    font-size: 1.25rem;
    letter-spacing: 0.03em;
  }

  .timeline-head {
    padding-top: 40px;
  }

  :root {
    --timeline-top: 66px; /* sticky frieze sits below the toolbar */
  }

  .timeline {
    padding-inline: 28px;
  }

  /* Fade the content scrolling between the toolbar and the frieze */
  .timeline::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: calc(-1 * var(--timeline-top));
    left: var(--side-w);
    right: 0;
    height: calc(var(--timeline-top) + 32px);
    background: linear-gradient(var(--paper) 75%, transparent);
    pointer-events: none;
  }

  .frieze-card {
    margin-top: 20px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .frieze {
    min-width: 1000px;
    padding-inline: 14px;
  }

  [data-view='timeline'] .experience {
    padding-top: 36px;
  }
}

@media (min-width: 1220px) {
  body {
    padding-block: 32px;
  }
  .page {
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: clip; /* not hidden: it would break the sticky frieze */
  }
}

/* ==========================================================================
   Print: A4, everything expanded, light colours (mirrors the Word CV)
   ========================================================================== */

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

@media print {
  :root,
  :root[data-theme] {
    --bg: #ffffff;
    --paper: #ffffff;
    --ink: #000000;
    --ink-soft: #1a1a1a;
    --muted: #8a8a8a;
    --accent: #00518b;
    --rule: #dddddd;
    --side-grad: linear-gradient(180deg, #003256 0%, #00518b 100%);
    --side-w: 33%;
    color-scheme: light;
  }

  html {
    font-size: 9.2pt;
    scroll-behavior: auto;
  }

  /* French runs ~10% longer than English: keep the 4-page layout */
  html:lang(fr) {
    font-size: 9pt;
  }

  body {
    background: transparent;
    padding: 0;
    line-height: 1.38;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .toolbar,
  .skip-link,
  .timeline,
  .timeline-head,
  .job-details > summary,
  .page-footer {
    display: none !important;
  }

  .page {
    max-width: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  /* Gradient column repeated on every printed page */
  .page::before {
    content: '';
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--side-w);
    background: var(--side-grad);
  }

  .row {
    position: relative;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }

  .side {
    padding-inline: 8mm 6mm;
    color: #ffffff;
  }

  .content {
    padding-inline: 7mm 12mm;
  }

  .hero {
    padding: 34mm 0 10mm;
    background: none;
    color: var(--ink);
  }

  .hero .side {
    display: flex;
    justify-content: flex-end;
    padding-inline: 0 6mm;
  }

  .hero .content {
    align-self: center;
    padding-inline: 7mm 12mm;
  }

  .photo {
    width: 40mm;
    height: 40mm;
    border-radius: 0;
  }

  .name {
    color: var(--accent);
    font-size: 26pt;
  }

  .headline {
    font-size: 11pt;
  }

  .years {
    font-size: 11pt;
  }

  .intro {
    grid-template-rows: repeat(3, auto);
  }

  .intro-side,
  .intro-content {
    display: grid;
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
    padding-top: 0;
    background: none;
  }

  .intro-side {
    text-align: center;
  }

  .side-title {
    font-size: 13pt;
    margin-bottom: 0.6em;
  }

  .side-list {
    color: #ffffff;
  }

  .section-title {
    font-size: 13pt;
    margin-bottom: 1em;
  }

  .block {
    padding-bottom: 12mm;
  }

  .skill {
    display: block;
  }

  .skill dt,
  .skill .tags {
    display: none;
  }

  .skill-text {
    display: inline;
  }

  .skills {
    gap: 0;
  }

  .experience {
    break-before: page;
  }

  .experience-head {
    padding-top: 14mm;
  }

  .experience-head .side {
    display: block;
  }

  /* Cloned top padding: a position continuing on a new page keeps its breathing room */
  .job {
    border: 0;
    padding: 6mm 0 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .experience-head + .job {
    padding-top: 0;
  }

  .job-side {
    margin: 0;
    padding-top: 0.25rem;
    text-align: right;
    font-size: 9.4pt;
  }

  .job-dates,
  .job-org {
    color: #ffffff;
  }

  .job-role {
    font-size: 13pt;
    break-after: avoid;
  }

  .job-content > *:not(.job-details) {
    break-inside: avoid;
  }

  .job-details {
    margin-top: 0;
  }

  .details-body {
    padding-top: 0;
    animation: none;
  }

  .highlights {
    gap: 0;
    margin-left: 2.2em;
  }

  .highlights li::before {
    background: #000000;
  }

  .highlights li,
  .project {
    break-inside: avoid;
  }

  .project {
    padding-top: 2.5mm;
  }

  .projects {
    margin: 0 0 0 3.5em;
    padding: 0;
    border: 0;
    gap: 0;
  }

  .project-desc,
  .bullets {
    font-size: inherit;
  }

  /* Tech lists as plain grey text, like the original */
  .tags-muted {
    display: block;
  }

  .tags-muted li {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--muted);
    font-size: inherit;
    font-weight: 400;
  }

  .tags-muted li + li::before {
    content: ', ';
  }

  /* Tech after highlights, as in the original */
  .job-content {
    display: flex;
    flex-direction: column;
  }

  .job-tech {
    order: 1;
    margin: 0.2em 0 0;
  }

  .job-content:has(.highlights) .job-tech {
    margin-left: 3.6em;
  }

  .project .tags {
    margin-top: 0.1em;
  }

  a {
    text-decoration: none;
  }

  [data-view='timeline'] .intro,
  [data-view='timeline'] .experience-head {
    display: grid;
  }
}
