/* buttons + links */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--s3);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: var(--fs-sm); }

/* thrust trace: the one animated moment, drawn once on load */
.trace { display: block; width: 100%; height: 72px; margin-top: var(--s6); overflow: visible; }
.trace path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* prose, bullets, meta */
.prose { max-width: 62ch; }
.prose p + p { margin-top: var(--s2); }
.meta { margin-top: 6px; color: var(--graphite); }

.bullets { margin-top: var(--s2); max-width: 62ch; }
.bullets li { position: relative; padding-left: 1.25rem; }
.bullets li + li { margin-top: 6px; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 0.55rem; height: 1px; background: var(--accent); }

.stack { margin-top: var(--s2); color: var(--graphite); }
.links { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin-top: var(--s1); }

/* research projects */
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s4); padding-bottom: var(--s6); }
.project + .project { padding-top: var(--s6); border-top: 1px solid var(--rule); }
.project:last-child { padding-bottom: 0; }
.project__figure { align-self: start; background: #fff; border: 1px solid var(--rule); border-radius: 2px; padding: var(--s1); }
.project__title, .role__title { font-size: var(--fs-lg); font-weight: 500; line-height: 1.2; text-wrap: balance; }
.project__text { margin-top: var(--s2); max-width: 60ch; }

@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; gap: var(--s2); }
}

/* experience timeline */
.role { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s4); padding-bottom: var(--s6); }
.role + .role { padding-top: var(--s6); border-top: 1px solid var(--rule); }
.role:last-child { padding-bottom: 0; }
.role__when { color: var(--graphite); padding-top: 0.45rem; }
.role__org { margin-top: 4px; color: var(--graphite); }
.role__sub { margin-top: var(--s2); font-weight: 600; }
.role__sub + .bullets { margin-top: 6px; }

@media (max-width: 820px) {
  .role { grid-template-columns: 1fr; gap: 4px; }
  .role__when { padding-top: 0; }
}

/* definition rows: skills, education, languages */
.rows > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s3); padding-block: var(--s2); border-top: 1px solid var(--rule); }
.rows > div:first-child { border-top: 0; padding-top: 0; }
.rows dt { font-family: var(--mono); font-size: var(--fs-sm); color: var(--graphite); padding-top: 0.25rem; }
.rows dd { max-width: 62ch; }

@media (max-width: 820px) {
  .rows > div { grid-template-columns: 1fr; gap: 4px; }
}

.subhead { margin: var(--s6) 0 var(--s2); font-size: var(--fs-md); font-weight: 500; }
.subhead:first-child { margin-top: 0; }

.pubs li { padding-block: var(--s2); border-top: 1px solid var(--rule); max-width: 66ch; }
.pubs li:first-child { border-top: 0; padding-top: 0; }
.pubs .meta { margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .trace path { animation: none; stroke-dashoffset: 0; }
  .btn { transition: none; }
}
