/* ==========================================================================
   SKILLS SECTION - css/sections/skills.css

   Groups of skills from js/sections/skills.js. Skills with a stated level get a
   progress bar; tag-only tools get a dashed tag instead, because a 0% bar would
   invent a number the dataset does not contain.
   ========================================================================== */

/* ---- Toolbar ---- */
.skills-toolbar {
  margin-block-end: var(--spacing-lg);
}

/* ---- Groups ---- */
.skills-groups {
  display: grid;
  gap: var(--spacing-2xl);
}

.skills-group__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: var(--font-weight-semibold);
}

.skills-group__text {
  margin: 0.2rem 0 var(--spacing-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Fixed-minimum tracks rather than flex percentages: skill cards keep a
   readable width at every viewport instead of shrinking with the text. */
.skills-list {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Skill card ---- */
.skill {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.skill__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

.skill__name {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
}

.skill__level {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.skill__text {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.skill__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin: var(--spacing-sm) 0 0;
  padding: 0;
  list-style: none;
}

.skill__tag {
  padding: 0.05rem 0.45rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-full);
}

/* A single-select filter does not need the full content width. */
.skills-toolbar .filter {
  max-inline-size: 20rem;
}

/* ---- Skill icon tile ----
   A 28px tile keeps the name on one line with its badges. The letter fallback
   uses the same box so a mixed list has one baseline. */
.skill__head {
  flex-wrap: wrap;
}

.skill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 28px;
  block-size: 28px;
  flex-shrink: 0;
  color: var(--color-secondary);
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.skill__icon svg {
  inline-size: 16px;
  block-size: 16px;
}

.skill__icon--letter {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

/* Badges in the head must not be pushed onto their own line by the level label;
   the level is the only element that may take the remaining space. */
.skill__level {
  margin-inline-start: auto;
}