/* ==========================================================================
   HQDM: team member profile (Zach, Matt). v5: portrait in a glass mount with a cyan rim light from the right
   (the two-light system), role pill, name, LinkedIn, the opening section; Zach's bio as a scroll tab list
   (motion.js builds the sticky H3 list at >= 1024px), Matt's as one reading column under the name.
   ========================================================================== */
.hq-profile { display: grid; grid-template-columns: minmax(260px, 440px) minmax(0, 1fr); gap: clamp(40px, 7vw, 104px); align-items: start; padding-top: var(--hero-top); padding-bottom: var(--section); isolation: isolate; }
.hq-profile > * { max-width: none; margin: 0 !important; }
.hq-profile::before { content: ""; position: absolute; inset: 0 0 auto; height: 90%; background: radial-gradient(36% 56% at 18% 34%, rgba(113, 61, 223, .3), transparent 72%), radial-gradient(26% 40% at 38% 46%, rgba(58, 209, 255, .1), transparent 72%), radial-gradient(40% 50% at 78% 10%, rgba(151, 71, 255, .12), transparent 70%); z-index: -1; pointer-events: none; }

/* portrait: glass mount, violet light from the left, a cyan rim light on the right edge (photo itself unchanged) */
.hq-profile__media { position: relative; font-size: 1rem; padding: 10px; border-radius: var(--r-3); background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow), 0 40px 80px -40px rgba(0, 0, 0, .9), -40px 0 120px -50px rgba(151, 71, 255, .6), 36px 0 90px -46px rgba(58, 209, 255, .55); }
.hq-profile__media::before { content: ""; position: absolute; inset: -18% -22%; background: url("../../img/dots.webp") center / contain no-repeat; opacity: .14; z-index: -1; pointer-events: none; }
.hq-profile__media::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(105deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .03) 62%, rgba(103, 232, 249, .75) 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.hq-profile__photo { position: relative; margin: 0; overflow: hidden; border-radius: calc(var(--r-3) - 6px); }
.hq-profile__photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(270deg, rgba(103, 232, 249, .3), rgba(103, 232, 249, .06) 14%, transparent 30%); mix-blend-mode: screen; pointer-events: none; }
.hq-profile__photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0; filter: var(--photo-filter); }   /* phase 4 photo treatment */

/* head: role pill above the name (visual order only), LinkedIn, then the opening section as a lede */
.hq-profile__head { display: flex; flex-direction: column; align-items: flex-start; }
.hq-profile__head > * { margin: 0 !important; }
.hq-profile__head { container-type: inline-size; }
/* round 2 (Milan): the name is one line from the first paint. It never wraps; the size follows the column (container
   units), so the final layout exists before the web font arrives or the intro splits the heading into characters */
.hq-profile__head .hq-title { order: 1; font-size: min(var(--fs-display), 12.5cqi); line-height: 1.04; letter-spacing: -.028em; max-width: none; white-space: nowrap; }
.hq-profile__role {
	order: 0;
	margin-bottom: var(--sp-5) !important;
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	padding: 7px 14px 7px 12px;
	font-size: var(--fs-label);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--c-text);
	border-radius: var(--r-pill);
	background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)), rgba(28, 16, 56, .35);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -8px 16px -10px rgba(151, 71, 255, .5);
}
.hq-profile__role::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c4adff; box-shadow: 0 0 0 3px rgba(151, 71, 255, .22), 0 0 10px 1px rgba(151, 71, 255, .9); }
.hq-profile__social { order: 2; margin-top: var(--sp-6) !important; }
.hq-profile__linkedin {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	min-height: 44px;
	padding: 0 var(--sp-5) 0 var(--sp-4);
	border-radius: var(--r-pill);
	color: var(--c-text-strong);
	font-size: var(--fs-ui);
	font-weight: 500;
	text-decoration: none;
	box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .3);
	transition: background-color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease);
}
@media (hover: hover) { .hq-profile__linkedin:hover { color: var(--c-text-strong); background-color: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(221, 218, 231, .6); } }
.hq-profile__intro { order: 3; margin-top: var(--sp-8) !important; padding-top: var(--sp-6); border-top: 1px solid var(--c-line); max-width: var(--measure-prose); }
.hq-profile__intro > * { margin: 0 !important; }
.hq-profile__intro h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -.012em; }
.hq-profile__intro p { margin-top: var(--sp-4) !important; font-size: var(--fs-lead); line-height: 1.65; color: var(--c-text); }

/* bio without section headings (Matt): one centred reading column (no empty column beside it), the first
   paragraph a step larger as the lead-in */
.hq-bio-plain { max-width: var(--measure-prose) !important; padding-top: 0; font-size: var(--fs-prose); line-height: 1.75; color: var(--c-text); }
.hq-bio-plain > * { max-width: none; }
.hq-bio-plain > p:first-child { font-size: var(--fs-lead); line-height: 1.6; color: var(--c-text-strong); }

/* bio (Zach): one item per H3. With the tab list on (>= 1024px) the items sit in the right column; below that a
   plain reading column with hairlines between the items. */
.hq-profile-bio { padding-top: var(--section); }
.hq-bio { max-width: var(--wide); }
.hq-bio-item { max-width: var(--measure-prose); font-size: var(--fs-prose); line-height: 1.75; color: var(--c-text); }
.hq-bio-item > * { margin-top: 0; }
.hq-bio-item h3 { margin: 0 0 var(--sp-4); font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.014em; color: var(--c-text-strong); scroll-margin-top: 112px; }
.hq-bio-item p { margin: 0; }
.hq-bio-item p + p { margin-top: 1em !important; }
.hq-bio-item a { color: var(--c-text-strong); text-decoration-color: var(--cyan-35); text-underline-offset: .2em; }
@media (hover: hover) { .hq-bio-item a:hover { text-decoration-color: var(--c-cyan); } }
.hq-bio:not(.hq-tabs--on) > .hq-bio-item + .hq-bio-item { margin-top: var(--sp-7); padding-top: var(--sp-7); border-top: 1px solid rgba(255, 255, 255, .07); }
.hq-bio.hq-tabs--on .hq-tabs__nav { padding-top: 2px; }
.hq-bio.hq-tabs--on > .hq-bio-item h3 { padding-top: 2px; }
.hq-profile__gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-8) !important; font-size: 1rem; }
.hq-profile__gallery figure { margin: 0; padding: 6px; border-radius: var(--r-3); background: var(--glass-bg); box-shadow: var(--glass-shadow); }
.hq-profile__gallery img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: calc(var(--r-3) - 6px); }

@media (max-width: 900px) {
	.hq-profile { grid-template-columns: 1fr; gap: var(--sp-7); }
	.hq-profile__media { max-width: 320px; }
}
@media (max-width: 600px) { .hq-profile__media { max-width: none; } }   /* n15: the portrait fills the phone column */
@media (max-width: 600px) { .hq-profile__gallery { grid-template-columns: 1fr 1fr; } .hq-profile__gallery figure:last-child { grid-column: 1 / -1; } .hq-profile__gallery figure:last-child img { aspect-ratio: 16 / 10; } }
