/* The existing section-description owns the alignment with the Blog controls.
   Only the diagram participates in this grid. Neither page separator is resized. */
.resume-byline { container-type: inline-size; }
.resume-expertise {
  --hat-size: 1.42em;
  --mark-size: 1.5em;
  --hat-center: calc(var(--hat-size) / 2);
  --field-gap: 1.2em;
  --label-start: 2.04em;
  --wire-top: 1.55em;
  --wire-color: color-mix(in srgb, var(--color-text-secondary) 55%, var(--color-surface));
  display: grid;
  position: relative;
  grid-template-columns: repeat(3, max-content);
  gap: 0 var(--field-gap);
  max-width: 100%;
  color: var(--color-text-primary);
  text-align: start;
  line-height: 1.35;
}
.expertise-fields {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  grid-row: 1;
  gap: inherit;
  list-style: none;
  margin: 0;
  padding: 0;
}
.expertise-fields > li {
  position: relative;
  min-width: 0;
  padding-block-start: var(--label-start);
  font: inherit;
  font-weight: 500;
  line-height: 1.45;
  color: inherit;
  overflow-wrap: anywhere;
}
.expertise-first-word { white-space: nowrap; }
.expertise-hat {
  width: var(--hat-size);
  height: auto;
  vertical-align: -.17em;
  margin-inline-end: .34em;
  color: var(--color-text-secondary);
}
.expertise-analysis { --hat-left: var(--color-accent-hover); }
.expertise-software { --hat-left: var(--color-success); }
.expertise-test { --hat-left: var(--color-danger); --hat-right: var(--color-accent); }
.expertise-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.expertise-fields > li::before,
.expertise-software::after {
  content: "";
  position: absolute;
  top: var(--wire-top);
  height: calc(var(--label-start) - var(--wire-top) + .19em);
  pointer-events: none;
}
.expertise-analysis::before {
  left: var(--hat-center);
  right: calc(-1 * var(--field-gap) - var(--hat-center) + var(--mark-size) * .4);
  border: solid var(--wire-color);
  border-width: 1px 0 0 1px;
  border-top-left-radius: .3em;
}
.expertise-software::before { left: var(--hat-center); border-left: 1px solid var(--wire-color); }
.expertise-software::after {
  left: calc(var(--hat-center) + var(--mark-size) * .4);
  right: calc(-1 * var(--field-gap) - var(--hat-center));
  border: solid var(--wire-color);
  border-width: 1px 1px 0 0;
  border-top-right-radius: .3em;
}
.expertise-fields > .expertise-test::before { content: none; }
.expertise-anchor {
  position: absolute;
  grid-column: 2;
  grid-row: 1;
  top: 0;
  left: calc(var(--hat-center) - var(--mark-size) / 2);
  z-index: 2;
}
button.expertise-term,
button.expertise-term:is(:hover, :active, :focus) {
  display: inline-flex;
  align-items: center;
  gap: .04em;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
  cursor: help;
}
button.expertise-term:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.expertise-initial { display: none; }
.expertise-term svg { width: var(--mark-size); height: auto; align-self: flex-end; margin-bottom: .27em; flex: none; }
.expertise-term span { text-decoration: underline dotted var(--color-text-muted); text-underline-offset: .22em; }
.expertise-anchor .sync-badge-tip { max-width: min(24rem, calc(100vw - 24px)); padding: 4px 10px; line-height: 1.35; }
.expertise-anchor .sync-badge-tip strong { display: block; color: var(--color-text-primary); margin-bottom: .2em; }
@container (max-width: 38em) {
  .resume-expertise { width: min(100%, 30em); grid-template-columns: repeat(3, minmax(0, 1fr)); --field-gap: .7em; }
  .expertise-first-word { white-space: normal; }
}
/* At high zoom let whole labels flow beneath the definition. */
@container (max-width: 18em) {
  .resume-expertise { display: block; }
  .expertise-anchor { position: relative; display: inline-block; left: auto; }
  button.expertise-term, button.expertise-term:is(:hover, :active, :focus) { white-space: normal; text-align: start; }
  .expertise-initial { display: inline; }
  .expertise-term svg { display: none; }
  .expertise-fields { display: grid; grid-template-columns: 1fr; gap: .2em; }
  .expertise-fields > li { padding: 0; }
  .expertise-fields > li::before, .expertise-software::after { content: none; }
}
