/* Profile sections shared by the homepage and publication archive. */
.profile-content,
.publication-list {
  --profile-ink: #202d3a;
  --profile-muted: #586572;
  --profile-line: #dce3e8;
  --profile-accent: #28657d;
}

.profile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  margin: 1.6rem 0 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--profile-line);
  border-bottom: 1px solid var(--profile-line);
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-nav a {
  color: var(--profile-muted);
  text-decoration: none;
}

.profile-nav a:hover {
  color: var(--profile-accent);
}

.profile-section {
  margin-top: 3rem;
}

.profile-section > .profile-section__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.4rem;
  padding: 0;
  border: 0;
  color: var(--profile-ink);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  scroll-margin-top: 2rem;
}

.profile-section__title::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  height: 1px;
  background: var(--profile-line);
}

.profile-timeline {
  margin-left: 0.3rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--profile-line);
}

.profile-entry {
  position: relative;
  margin: 0 0 1.55rem;
}

.profile-entry:last-child {
  margin-bottom: 0;
}

.profile-entry::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: calc(-1.25rem - 6px);
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--profile-accent);
  box-shadow: 0 0 0 2px #e6eff3;
}

.profile-entry__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  margin-bottom: 0.35rem;
}

.profile-entry__header h3 {
  margin: 0;
  color: var(--profile-ink);
  font-size: 1rem;
  line-height: 1.4;
}

.profile-entry p {
  margin: 0.15rem 0 0;
  color: var(--profile-muted);
  font-size: 0.87rem;
  line-height: 1.6;
}

.profile-entry p.profile-entry__date {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.profile-entry p.profile-entry__role {
  color: var(--profile-ink);
}

.profile-team-history {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--profile-line);
}

.profile-team + .profile-team {
  margin-top: 1.1rem;
}

.profile-team h4 {
  margin: 0;
  color: var(--profile-ink);
  font-size: 0.87rem;
  line-height: 1.5;
}

.profile-entry p.profile-entry__note {
  margin-top: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-left: 2px solid #c2d8e2;
  background: #f5f8fa;
  font-size: 0.8rem;
}

.publication-list > p:first-of-type {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  color: var(--profile-muted);
  font-size: 0.75rem;
}

.publication-list > h2 {
  margin: 2rem 0 1rem;
  padding: 0;
  border: 0;
  color: var(--profile-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-list > h3 {
  margin: 1.7rem 0 0.2rem;
  color: var(--profile-accent);
  font-size: 0.95rem;
  line-height: 1.4;
}

.publication-list > p {
  margin: 0;
  padding: 1.05rem 0;
  border-bottom: 1px solid #e9edf0;
  color: var(--profile-muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.publication-list > p > strong:first-child {
  color: var(--profile-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.publication-list > p > a {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.1rem 0.55rem;
  border: 1px solid #c6d9e2;
  border-radius: 3px;
  color: var(--profile-accent);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.publication-list > p > a:hover {
  background: #edf4f7;
  text-decoration: underline;
}

.profile-nav a:focus-visible,
.publication-list a:focus-visible {
  outline: 2px solid var(--profile-accent);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .profile-section {
    margin-top: 2.5rem;
  }

  .profile-section > .profile-section__title {
    font-size: 1.25rem;
  }

  .profile-entry__header {
    flex-direction: column;
  }

  .profile-nav {
    gap: 0.65rem 1rem;
    font-size: 0.8rem;
  }
}

@media print {
  .profile-nav {
    display: none;
  }

  .profile-entry,
  .publication-list > p {
    break-inside: avoid;
  }
}
