.timeline {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.timeline-item {
  padding: 12px 16px 28px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-md);
  /* This element also carries .reveal (see js/reveal.js), which wants its own
     transition on opacity/transform. `transition` is a single property, so
     the two declarations can't merge across files - the later-loaded one
     would simply replace the earlier one. Folding everything this element
     needs into one declaration here avoids that: background-color/transform
     stay snappy for the hover effect, opacity gets the slower fade the
     reveal system uses everywhere else. */
  transition:
    background-color 200ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1);

  &:last-child {
    padding-bottom: 12px;
    border-bottom: none;
  }
  &:hover {
    background-color: rgba(15, 23, 42, 0.06);
    transform: translateX(6px);
  }
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;

  & h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 17px;
  }
}

.timeline-company {
  color: var(--accent-on-light);
  font-weight: 500;
}

.timeline-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-on-light) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-on-light) 25%, transparent);
  color: var(--accent-on-light);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.timeline-dates {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-on-light) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-on-light) 25%, transparent);
  font-size: 12px;
  color: var(--accent-on-light);
  white-space: nowrap;
}

.timeline-location {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-700);
}

.timeline-desc {
  margin-top: 10px;

  & a {
    color: var(--accent-on-light);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-on-light) 35%, transparent);

    &:hover {
      text-decoration-color: currentColor;
    }
  }
}
