/* ==========================================================================
   Expertise panel
   ==========================================================================
   The contents of the Expertises menu. Rendered twice: inside the desktop
   mega-menu and inside the mobile <details>. One stylesheet, one markup
   shape, so the two can never drift apart.

   Ported from ExpertisePanel in web/components/site/navbar.tsx.
   ========================================================================== */

.expertise-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.expertise-panel__cols {
  display: grid;
  column-gap: 2.5rem;
  row-gap: 1rem;
}

@media (min-width: 768px) {
  .expertise-panel__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.expertise-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Quiet column heading. Sentence case, tracked slightly open, never caps. */
.section-label {
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--subtle-foreground);
}

.expertise-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Negative inline margin lets the hover background bleed past the text
   without the column itself getting wider. */
.expertise-item {
  display: flex;
  margin-inline: -0.5rem;
  align-items: flex-start;
  gap: 0.625rem;
  border-radius: var(--radius-md);
  padding: 0.375rem 0.5rem;
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  font-weight: var(--text-body-sm-weight);
  color: var(--foreground);
  transition: background-color 150ms ease, color 150ms ease;
}

.expertise-item:hover {
  background-color: var(--background-subtle);
  color: var(--brand);
}

.expertise-item__icon {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--subtle-foreground);
  transition: color 150ms ease;
}

.expertise-item:hover .expertise-item__icon { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .expertise-item,
  .expertise-item__icon { transition: none; }
}

/* A dot, not a word. The label it stands for is in the adjacent
   .visually-hidden span, so a screen reader hears "Nouveau" and a sighted
   reader sees a mark that does not crowd the row. */
.expertise-item__badge {
  margin-left: 0.25rem;
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  transform: translateY(-0.375rem);
  border-radius: var(--radius-full);
  background-color: var(--brand);
  vertical-align: top;
}

.expertise-panel__rule {
  border: 0;
  border-top: 1px solid var(--border-subtle);
}

.expertise-panel__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--radius-full);
  background-color: var(--background-subtle);
  padding: 0.25rem 0.625rem;
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--text-label-weight);
  text-decoration: none;
  color: var(--muted-foreground);
  transition: background-color 150ms ease, color 150ms ease;
}

.chip:hover {
  background-color: var(--background-muted);
  color: var(--foreground);
}

.chip__icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--subtle-foreground);
  transition: color 150ms ease;
}

.chip:hover .chip__icon { color: var(--foreground); }

/* Technology chips are the same shape with a smaller mark, and they take
   their own brand colour on hover. The colour comes from
   components/tech-chip-colours.css. */
.tech-chip .chip__icon {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--muted-foreground);
}

.tech-chip:hover .chip__icon { color: var(--tech-colour, var(--foreground)); }

@media (prefers-reduced-motion: reduce) {
  .chip, .chip__icon { transition: none; }
}
