.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--s-4);
}

section {
  padding-block: var(--s-12);
}

.page-actions {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  z-index: 20;
  display: flex;
  gap: var(--s-1);
  align-items: center;
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
}

.theme-switch button {
  padding: 0.42rem 0.65rem;
  border: 0;
  border-radius: 2px;
  color: var(--color-text-muted);
  background: transparent;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.theme-switch button:hover {
  color: var(--color-text);
}

.theme-switch button[aria-pressed="true"] {
  color: var(--color-text);
  background: var(--color-surface-strong);
}

.pdf-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pdf-action:hover {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
  background: var(--color-surface-strong);
}

.eyebrow,
.summary-label,
.role-kicker {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: var(--s-12);
  align-items: end;
  min-height: 680px;
  padding-top: var(--s-16);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(3.8rem, 8vw, 7.2rem);
}

.hero__role {
  margin: var(--s-3) 0;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.hero__lead {
  max-width: 700px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  align-items: center;
  margin-top: var(--s-4);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.contact-link {
  color: var(--color-text);
}

.hero__summary {
  padding: var(--s-4);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--color-surface) 58%, transparent);
}

.summary-stats {
  margin: 0;
}

.summary-stats > div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: var(--s-2);
  align-items: baseline;
  padding-block: var(--s-2);
  border-top: 1px solid var(--color-border);
}

.summary-stats dt {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.55rem;
}

.summary-value--money {
  line-height: 1.15;
}

.summary-value__unit {
  display: block;
}

.summary-stats dd {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.summary-stat--team {
  position: relative;
}

.team-trigger {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--color-accent);
  background: transparent;
  font-family: var(--font-heading);
  font-size: inherit;
  cursor: pointer;
}

.info-mark {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.team-trigger:hover .info-mark,
.team-trigger[aria-expanded="true"] .info-mark {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.team-popover {
  position: absolute;
  top: calc(100% + var(--s-1));
  right: 0;
  z-index: 30;
  width: min(390px, calc(100vw - 3rem));
  padding: var(--s-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--r-lg);
  color: var(--color-text);
  background: var(--color-surface-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.summary-stat--team:hover .team-popover,
.summary-stat--team:focus-within .team-popover,
.summary-stat--team.is-open .team-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.team-popover__heading {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  align-items: baseline;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--color-border);
}

.team-popover__heading strong {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
}

.team-popover__heading span {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

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

.team-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--color-border);
}

.team-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.team-list span {
  color: var(--color-text);
}

.team-list small {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  text-align: right;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: var(--s-6);
  align-items: end;
  margin-bottom: var(--s-6);
}

.section-heading h2 {
  margin: 0;
}

.section-heading > p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.role-section {
  padding-top: var(--s-6);
}

.role-section .section-heading {
  margin-bottom: var(--s-6);
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-border-strong);
  border-bottom: 1px solid var(--color-border);
}

.role-tab {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  min-height: 72px;
  padding: var(--s-3);
  border: 0;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.role-tab:last-child {
  border-right: 0;
}

.role-tab span {
  color: var(--color-text-soft);
  font-family: var(--font-heading);
}

.role-tab:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 52%, transparent);
}

.role-tab[aria-selected="true"] {
  color: var(--color-text);
  background: var(--color-accent-soft);
}

.role-tab[aria-selected="true"] span {
  color: var(--color-accent);
}

.role-panels {
  border-bottom: 1px solid var(--color-border-strong);
}

.role-panel {
  padding: var(--s-8) var(--s-4);
  animation: reveal 0.25s ease;
}

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

.role-panel__headline {
  max-width: 880px;
  margin-bottom: var(--s-6);
}

.role-panel__headline h3 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
}

.role-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-8);
}

.role-panel__grid h4 {
  margin-bottom: var(--s-2);
  color: var(--color-text-muted);
}

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

.clean-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1rem;
  border-top: 1px solid var(--color-border);
}

.clean-list li::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
}

.impact-section {
  border-bottom: 1px solid var(--color-border);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--color-border-strong);
  border-left: 1px solid var(--color-border);
}

.impact-grid article {
  min-height: 160px;
  padding: var(--s-3);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.impact-grid strong {
  display: block;
  margin-bottom: var(--s-3);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
}

.impact-grid span {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.section-heading--solo {
  grid-template-columns: minmax(0, 1fr);
}

.experience-section {
  padding-bottom: 0;
}

.experience-list {
  border-top: 1px solid var(--color-border-strong);
}

.experience-list details {
  border-bottom: 1px solid var(--color-border);
}

.experience-list details:last-child {
  border-bottom: 0;
}

.experience-list summary {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  align-items: center;
  width: 100%;
  padding: var(--s-3) 0;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.experience-list summary::-webkit-details-marker {
  display: none;
}

.experience-list summary span:first-child {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.experience-list summary strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
}

.experience-list summary small {
  color: var(--color-text-muted);
}

.experience-list summary small:first-of-type {
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}

.details-mark {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--color-accent);
  transition: color 0.18s ease, opacity 0.18s ease;
}

.experience-list summary:hover .details-mark,
.experience-list summary:focus-visible .details-mark {
  opacity: 0.82;
}

.details-mark::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.details-mark::after {
  content: none;
}

details[open] .details-mark::before {
  top: 8px;
  transform: rotate(225deg);
}

.details-content {
  max-width: 840px;
  padding: 0 0 var(--s-3);
  color: var(--color-text-muted);
}

.details-content .role-period {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
  margin: var(--s-3) 0 var(--s-1);
  color: var(--color-text);
}

.details-content .role-period:first-child {
  margin-top: 0;
}

.details-content .role-period strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
}

.details-content .role-period span {
  color: var(--color-text-soft);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}

.details-content ul {
  margin-bottom: var(--s-2);
}

.details-content ul:last-child {
  margin-bottom: 0;
}

.capabilities-section {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.capability-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
}

.capability-columns h3 {
  margin-bottom: var(--s-2);
}

.capability-columns p {
  color: var(--color-text-muted);
}

.contact-section {
  max-width: 850px;
  margin: 0 auto;
  padding-block: var(--s-16);
  text-align: center;
}

.contact-section h2 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.contact-section p {
  max-width: 680px;
  margin: 0 auto var(--s-4);
  color: var(--color-text-muted);
}

.contact-button {
  display: inline-flex;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--r-md);
  background: var(--color-surface);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-4);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

@media (max-width: 820px) {
  .container {
    padding-inline: var(--s-3);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    min-height: auto;
    padding-top: var(--s-16);
  }

  .section-heading,
  .role-panel__grid {
    grid-template-columns: 1fr;
  }

  .role-tabs {
    grid-template-columns: 1fr;
  }

  .role-tab {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .role-tab:last-child {
    border-bottom: 0;
  }

  .impact-grid,
  .capability-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  section {
    padding-block: var(--s-8);
  }

  .page-actions {
    top: var(--s-2);
    right: var(--s-2);
  }

  .theme-switch button {
    padding-inline: 0.5rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .team-popover {
    position: fixed;
    top: auto;
    right: var(--s-2);
    bottom: var(--s-2);
    left: var(--s-2);
    width: auto;
    max-height: 70vh;
    overflow: auto;
  }

  .impact-grid,
  .capability-columns {
    grid-template-columns: 1fr;
  }

  .impact-grid article {
    min-height: 130px;
  }

  .role-panel {
    padding-inline: 0;
  }

  .experience-list summary strong {
    font-size: 1.15rem;
  }

  .footer {
    flex-direction: column;
  }
}

@media print {
  :root {
    --color-bg: #ffffff;
    --color-surface: #faf9f6;
    --color-surface-strong: #ffffff;
    --color-text: #242329;
    --color-text-muted: #716f76;
    --color-text-soft: #98959b;
    --color-border: #d8d4cb;
    --color-border-strong: #bdb8ae;
    --color-accent: #b65339;
    --color-accent-text: #ffffff;
    --color-accent-soft: #efe0da;
  }

  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    color: #242329;
    background: #fff;
    font-size: 10pt;
  }

  .page-actions,
  .role-tabs,
  .info-mark,
  .team-popover,
  .section-heading > p {
    display: none;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  section {
    padding-block: 18px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 24px;
    padding-top: 0;
  }

  .hero h1 {
    font-size: 38pt;
  }

  .hero__lead {
    font-size: 11pt;
  }

  .role-panel {
    padding: 18px 0;
  }

  .impact-grid article {
    min-height: 100px;
  }

  .experience-list details {
    break-inside: avoid;
  }

  .experience-list details:not([open]) .details-content {
    display: none;
  }

  .contact-section {
    padding-block: 30px;
  }

  .contact-section h2 {
    font-size: 24pt;
  }
}
