.section{margin:clamp(24px,6vw,48px) 0}
.list{list-style:none;padding:0;margin:0}
.item+.item{margin-top:var(--space-5)}
.item h3{margin:.2rem 0}
.item .bullets{margin:.4rem 0 0 0;padding-left:1.2rem}
.item .bullets li{margin:.25rem 0}
.toc{position:sticky;top:72px;border-left:1px solid var(--border);padding-left:var(--space-4)}
.toc a{display:block;padding:6px 0;color:var(--muted)}
.toc a.active{color:var(--link);font-weight:600}
.badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}

/* Timeline for education */
.timeline {
  position: relative;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-6);
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
  transform:translateX(-240%);
}

.timeline-item h3 {
  margin: 0 0 0.25rem;
}

.timeline-item .meta {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-badge {
  position: absolute;
  right: 0;
  top: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: var(--shadow-1);
}

.timeline--right {
  margin-left: 0;
  margin-right: 1.5rem;
  padding-left: 0;
  padding-right: 1.5rem;
}

.timeline--right::before {
  left: auto;
  right: 0;
}

.timeline--right .timeline-item {
  text-align: right;
}

.timeline--right .bullets {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0 0;
}

.timeline--right .bullets li {
  position: relative;
  margin: 0.25rem 0;
  padding-right: 1.25rem;
}

.timeline--right .bullets li::after {
  content: "•";
  position: absolute;
  right: 0;
  top: 0.35em;
  color: var(--accent);
  font-weight: 600;
  line-height: 1;
}

.timeline--right .timeline-badge {
  right: auto;
  left: 0;
}

.timeline--right .timeline-marker {
  left: auto;
  right: 0;
  transform: translateX(240%);
}

@media (max-width: 640px) {
  .timeline,
  .timeline--right {
    margin: 0 0 0 1.25rem;
    padding: 0 0 0 1.75rem;
  }

  .timeline::before,
  .timeline--right::before {
    left: 0;
    right: auto;
  }

  .timeline-item,
  .timeline--right .timeline-item {
    text-align: left;
  }

  .timeline-badge,
  .timeline--right .timeline-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
  }

  .timeline-marker,
  .timeline--right .timeline-marker {
    left: 0;
    right: auto;
    transform: translateX(-240%);
  }

  .timeline--right .bullets {
    list-style: disc;
    padding: 0 0 0 1.2rem;
    margin: 0.4rem 0 0 0;
  }

  .timeline--right .bullets li {
    padding-right: 0;
  }

  .timeline--right .bullets li::after {
    display: none;
  }
}

/* Contact reveal styling */
.contact-card details { cursor: default; }
.contact-summary {
  display: flex; gap: 8px; align-items: baseline;
  padding: 6px 0; cursor: pointer; user-select: none;
}
.contact-summary::marker { content: ""; } /* hide default marker in some browsers */

.contact-content { margin-top: 10px; }
.btn-sm {
  padding: 6px 10px;
  font-size: .9rem;
  border-radius: 8px;
  border: none;                  /* remove browser default border */
  background: var(--accent);     /* match your main buttons */
  color: var(--accent-contrast);
  cursor: pointer;
  transition: background .15s ease;
}
.btn-sm:hover,
.btn-sm:focus {
  background: var(--link-hover);
}

/* Make the card feel clickable without being gaudy */
.contact-card { transition: box-shadow .15s ease, transform .15s ease; }
.contact-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }

/* About / Bio */

/* About / Bio */
.about {
  overflow: hidden; /* contain floated image */
}

.about-figure {
  float: left;
  width: 220px;         /* set desired image width */
  margin: 0 var(--space-5) var(--space-5) 0; /* spacing right + bottom */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.about-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.about h2 { margin-top: 0; }
.about p { margin: 0 0 var(--space-4); }
.about .meta { margin-top: -4px; }
