:root {
  --carbon: #17201e;
  --copper: #9d4428;
  --mineral: #a8b5b0;
  --mist: #dce3df;
  --muted: #52605c;
  --display: "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", "Aptos Narrow", sans-serif;
  --body: "Segoe UI Variable", "Aptos", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: light;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: white;
  color: var(--carbon);
  font-family: var(--body);
}

a {
  color: inherit;
}

.cv-page {
  width: 100%;
  min-height: 68rem;
  padding: clamp(2.5rem, 7vw, 4.5rem);
  background: white;
}

.cv-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--carbon);
}

.cv-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.6rem, 9vw, 6rem);
  letter-spacing: -0.055em;
  line-height: 0.82;
  text-transform: uppercase;
}

.cv-header p {
  max-width: 37rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.public-links {
  display: grid;
  align-content: end;
  gap: 0.1rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-align: right;
}

.public-links a {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 44px;
}

.cv-body {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(12rem, 0.7fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: 2.4rem;
}

.cv-block + .cv-block {
  margin-top: 2.5rem;
}

.cv-block h2 {
  margin: 0 0 1.2rem;
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cv-block > p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.cv-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-role {
  position: relative;
  padding-left: 1.6rem;
  padding-bottom: 1.4rem;
  border-left: 1px solid var(--mineral);
}

.cv-timeline-end {
  position: relative;
  padding-left: 1.6rem;
  border-left: 1px solid var(--mineral);
}

.cv-timeline-end::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: 0;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--copper);
}

.cv-timeline-end span {
  display: block;
  position: relative;
  top: -0.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.07em;
  text-align: right;
}

.cv-role::before {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 0.15rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid var(--copper);
  border-radius: 50%;
  background: white;
}

.cv-role-head {
  margin-bottom: 0.5rem;
}

.cv-role-period {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cv-role-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.cv-role-tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.07em;
  opacity: 0.6;
}

.cv-role-projects {
  display: grid;
  gap: 0.2rem;
}

.cv-entry {
  padding: 0.55rem 0;
}

.cv-entry + .cv-entry {
  border-top: 1px solid var(--mineral);
}

.cv-entry h4 {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  line-height: 1.25;
}

.cv-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.system-list,
.tag-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--mineral);
  font-size: 0.78rem;
}

.system-list li:last-child {
  border-bottom: 1px solid var(--mineral);
}

.system-list span {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list li {
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--mineral);
  font-family: var(--mono);
  font-size: 0.57rem;
  text-transform: uppercase;
}

.language-list {
  display: grid;
  gap: 0.25rem;
}

.edu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.edu-list li {
  padding-top: 0.5rem;
  border-top: 1px solid var(--mineral);
  font-size: 0.78rem;
  line-height: 1.35;
}

.edu-list li:first-child {
  padding-top: 0;
  border-top: none;
}

.cv-mentors .cv-mentor-note {
  margin: 2.5mm 0 0;
  color: var(--muted);
  font-size: 4.5pt;
  font-style: italic;
  line-height: 1.45;
  text-align: right;
}

.cv-mentors {
  display: block;
}

.cv-mentor-list {
  display: grid;
  gap: 1.5mm;
}

.cv-mentor {
  display: grid;
  grid-template-columns: 7mm minmax(0, 1fr);
  gap: 1.5mm;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.cv-mentor-portrait {
  display: grid;
  width: 7mm;
  height: 7mm;
  place-items: center;
  overflow: hidden;
  border: 0.25mm dashed var(--mineral);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 5pt;
}

.cv-mentor-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-mentor strong,
.cv-mentor small {
  display: block;
}

.cv-mentor strong {
  font-size: 6.5pt;
}

.cv-mentor small {
  margin-top: 0.5mm;
  color: var(--muted);
  font-size: 5pt;
  line-height: 1.25;
}

.placeholder-block {
  padding: 1rem;
  background: var(--mist);
}

.mock-footnote {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--carbon);
  color: var(--copper);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.no-script {
  max-width: 42rem;
  margin: 3rem auto;
  padding: 2rem;
}

@media (max-width: 600px) {
  .cv-page {
    min-height: 0;
    padding: 1.4rem;
  }

  .cv-header,
  .cv-body {
    grid-template-columns: 1fr;
  }

  .cv-header h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .public-links,
  .public-links a {
    justify-content: flex-start;
    text-align: left;
  }

  .cv-body {
    gap: 2.5rem;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .system-list li {
    grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
  }

  .cv-mentors {
    display: none;
  }
}

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

@media print {
  html,
  body {
    width: auto;
    max-width: none;
    overflow: visible;
  }

  .cv-page {
    width: auto;
    min-height: 0;
    padding: 0 14mm;
  }

  .cv-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8mm;
    padding-bottom: 5mm;
  }

  .cv-header h1 {
    font-size: 38pt;
  }

  .public-links,
  .public-links a {
    justify-content: flex-end;
    min-height: 0;
    text-align: right;
  }

  .cv-body {
    grid-template-columns: minmax(0, 1.65fr) minmax(42mm, 0.7fr);
    gap: 9mm;
    padding-top: 6mm;
  }

  .cv-block + .cv-block {
    margin-top: 3mm;
  }



  .cv-entry {
    padding: 1.5mm 0;
  }

  .cv-role + .cv-role {
    margin-top: 4mm;
  }

  /* Two-page layout: never split a project, a role header, or a listed system. */
  .cv-entry,
  .cv-role-head,
  .system-list li {
    break-inside: avoid;
  }
}
