/* Profile page: a person profile in the layout of a university staff page.
   Photo on the left, a grey box with name, research training and contact,
   then a sticky row of section tabs. Uses the tokens from style.css. */

.profile { padding-bottom: clamp(64px, 9vw, 112px); }

.profile-crumbs {
  font-size: 13px;
  color: var(--ink-mute);
  padding: 28px 0 26px;
}
.profile-crumbs a { color: var(--ink-mute); }
.profile-crumbs a:hover { color: var(--ink); }
.profile-crumbs span { color: var(--ink); }
.profile-crumbs a + span::before { content: "›"; margin: 0 10px; color: var(--ink-faint); }

/* ---------- Head: photo + grey box ---------- */
.profile-head {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0 40px;
  align-items: start;
}
.profile-head__photo { margin: 0; }
.profile-head__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-section);
}
.profile-head__photo figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-faint);
}
.profile-head__box {
  margin-top: 32px;
  padding: clamp(28px, 3.4vw, 44px);
  background: var(--bg-section);
  border-radius: var(--radius);
}
.profile-head__name {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.profile-head__role {
  margin-top: 10px;
  font-size: 17px;
  color: var(--ink-soft);
}
.profile-head__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 40px;
  margin-top: 40px;
}
.profile-head__cols > div + div {
  border-left: 1px solid var(--line);
  padding-left: 40px;
}
.profile-head__cols h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.profile-plain { list-style: none; }
.profile-plain li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.profile-contact { list-style: none; }
.profile-contact li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.profile-contact svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(2px);
}
.profile-contact a { color: var(--accent); white-space: nowrap; }
.profile-contact svg.profile-contact__orcid { fill: #a6ce39; stroke: none; }
.profile-contact__orcid text { fill: #fff; font: 700 10px/1 var(--font-sans); }
.profile-contact a:hover { text-decoration: underline; }

/* ---------- Sticky section tabs ---------- */
.profile-tabs {
  position: sticky;
  top: var(--nav-h, 63px);
  z-index: 40;
  margin-top: 56px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-faint);
}
.profile-tabs ul {
  display: flex;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs ul::-webkit-scrollbar { display: none; }
.profile-tabs a {
  display: block;
  padding: 16px 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.profile-tabs a:hover { color: var(--ink); border-bottom-color: var(--line); }
.profile-tabs a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Sections ---------- */
.profile-body {
  max-width: 780px;
  margin: 0 auto;
}
.profile-sec {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--line-faint);
  scroll-margin-top: calc(var(--nav-h, 63px) + 64px);
}
.profile-sec:last-child { border-bottom: 0; }
.profile-sec h2 {
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.profile-sec p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.profile-sec p:last-child { margin-bottom: 0; }
.profile-list { list-style: none; }
.profile-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.profile-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}
.profile-list b { font-weight: 600; color: var(--ink); }
.profile-list a { color: var(--accent); }
.profile-list a:hover { text-decoration: underline; }
.profile-note {
  margin-top: 20px;
  font-size: 15px !important;
  color: var(--ink-mute) !important;
}

/* ---------- Small screens ---------- */
@media (max-width: 1100px) {
  .profile-head__cols { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
  .profile-head__cols > div + div {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
}
@media (max-width: 860px) {
  .profile-head { grid-template-columns: 1fr; }
  .profile-head__photo { width: min(280px, 100%); }
  .profile-head__box { margin-top: 20px; }
  .profile-head__cols { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
  .profile-head__cols > div + div {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .profile-tabs { margin-top: 40px; }
  .profile-tabs a { font-size: 14px; padding: 14px 10px 12px; }
  .profile-list li, .profile-sec p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-tabs a { transition: none; }
}

@media print {
  .nav, .profile-tabs, .footer { display: none; }
  .profile-head__box { background: none; padding: 0; }
}
