/* A restrained rhythm: paragraph < attachment < chapter. */
:root {
  --space-paragraph: 12px;
  --space-story-card: 24px;
  --space-story: 56px;
  --text-secondary: #6a6a6a;
  --ease-ui: cubic-bezier(.23, 1, .32, 1);
}
#career-timeline > .timeline:has(.company-open) { padding-bottom: var(--space-story); }
.timeline:has(.company-open) .content > p {
  margin: 0;
  line-height: 1.55;
  text-wrap: pretty;
}
.timeline:has(.company-open) .content > p + p { margin-top: var(--space-paragraph); }
#career-timeline > .timeline:not(:has(.company-open)) .content > p:has(+ p) { margin-bottom: var(--space-paragraph); }
.timeline:has(.company-open) .content > p:has(+ .company-card-wrap) { margin-bottom: var(--space-story-card); }
.content > p + .company-card-wrap { margin-top: 0; }
.company-open .card-title { text-wrap: pretty; }
.company-open .card-desc { color: var(--text-secondary); line-height: 1.45; }
.hero .statement { color: #737373; }
.hero .intro > p:first-child { color: #858585; }
.education-badge span span, .site-footer { color: var(--text-secondary); }

/* Feedback stays on the control; the existing artwork springs stay independent. */
.cv-actions .cv-call {
  font-weight: 500;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms var(--ease-ui);
}
.cv-actions .cv-call:active { transform: scale(.98); }
.cv-actions .cv-file:active { background: #efefef; border-color: #d6d6d6; }
.company-open:active { background: #ededed; }
.timeline-reverse:active { background: #ebebeb; }
#company-dialog .company-close { width: 44px; height: 44px; top: 12px; right: 18px; }

@media (min-width: 761px) and (max-width: 1000px) {
  #company-dialog .company-detail ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --space-story-card: 20px; --space-story: 48px; }
  .hero nav .rail-links > a { display: inline-flex; align-items: center; min-height: 32px; }
  #company-dialog .company-close { top: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-load-state="ready"] :is(.portrait, .intro > *, .rail-links, main > .row, .site-footer),
  html[data-load-state="ready"] #career-timeline > .row { animation-duration: 300ms; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-actions .cv-call { transition: none; }
  .cv-actions .cv-call:active { transform: none; }
}
