/* ==========================================================================
   Section-level expand / collapse
   Adds a small arrow button to the top-right of every .cv-section heading.
   Clicking it hides/shows everything in that section except the heading.
   ========================================================================== */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
}

.section-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.section-toggle-btn:hover,
.section-toggle-btn:focus-visible {
  background-color: rgba(0, 0, 0, 0.06);
}

.section-toggle-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.section-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.25s ease;
}

/* Arrow points down when expanded, rotates to point up-left (collapsed) */
.cv-section[data-collapsed="true"] .section-toggle-btn svg {
  transform: rotate(-90deg);
}

/* Smooth collapse using the CSS grid-rows trick — no JS height measuring */
.section-body-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease;
}

.section-body-wrap > .section-body {
  overflow: hidden;
  min-height: 0;
}

.cv-section[data-collapsed="true"] .section-body-wrap {
  grid-template-rows: 0fr;
}
