/* -----------------------------------------------------------------------
   Team page (page-team.php) — full-bleed, no sidebar.
   RTL-first, logical properties only. Two canvases: a dark cinematic hero
   carrying the group portrait, then a light editorial roster where the long
   bios actually stay readable. Builds on the theme variables in style.css.
   ----------------------------------------------------------------------- */

.team-page {
	--team-ink: #0e1120;
	--team-ink-deep: #070a16;
	--team-tint: #6ebbe9;          /* accent tint that survives the dark canvas */
	--team-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--team-dur: 0.35s;
	--team-gap: clamp(3.5rem, 8vw, 7rem);

	display: grid;
	gap: var(--team-gap);
	/* Swallow .site-content's padding so the hero runs edge-to-edge from
	   the header down. */
	margin-block-start: calc(-1 * var(--shivuk-space));
	padding-block-end: var(--team-gap);
}

/* The roster earns a slightly wider canvas than the reading pages. */
.team-page .container {
	inline-size: 100%;
	max-inline-size: min(1240px, calc(100% - 2 * var(--shivuk-space)));
}

/* -----------------------------------------------------------------------
   Reveal-on-scroll. An animation rather than a transition so it never
   fights the hover transitions on the same elements. The hidden start
   state only exists when motion is allowed — reduced-motion visitors, and
   anyone without IntersectionObserver, see everything immediately.
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.team-page .js-reveal {
		opacity: 0;
	}

	.team-page .js-reveal.is-visible {
		animation: team-rise 0.7s var(--team-ease) both;
	}
}

@keyframes team-rise {
	from {
		opacity: 0;
		transform: translateY(28px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* -----------------------------------------------------------------------
   1. Hero
   ----------------------------------------------------------------------- */
.team-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 8vw, 6rem);
	background:
		radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.6px) 0 0 / 18px 18px,
		radial-gradient(60% 80% at 88% -10%, color-mix(in srgb, var(--shivuk-color-accent) 45%, transparent), transparent 62%),
		radial-gradient(55% 70% at 6% 108%, color-mix(in srgb, var(--shivuk-color-accent) 24%, transparent), transparent 62%),
		linear-gradient(168deg, var(--team-ink-deep), var(--team-ink) 88%);
	color: #ffffff;
}

/* Thin light seam where the hero meets the header — grounds the dark
   canvas against the light chrome above it. */
.team-hero::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	block-size: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

/* The accent focus ring disappears on the dark canvas. */
.team-hero *:focus-visible {
	outline-color: #ffffff;
}

.team-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

/* Glass pill, the same "live signal" language the podcast section uses. */
.team-hero__kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.team-hero__kicker::before {
	content: "";
	inline-size: 7px;
	block-size: 7px;
	border-radius: 50%;
	background: var(--team-tint);
	box-shadow: 0 0 10px var(--team-tint);
}

.team-hero__title {
	margin: 1.1rem 0 0;
	font-size: clamp(2.2rem, 5.5vw, 3.6rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
	background: linear-gradient(120deg, #ffffff 30%, var(--team-tint));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.team-hero__lead {
	margin: 1.1rem 0 0;
	max-inline-size: 46ch;
	color: rgba(255, 255, 255, 0.72);
	font-size: clamp(1rem, 1.6vw, 1.1rem);
	line-height: 1.75;
}

/* The group portrait sits in a frame tilted a hair off-axis, with an accent
   plate offset behind it — a print-layout gesture that keeps a plain press
   photo from reading like a stock rectangle. */
.team-hero__figure {
	margin: 0;
	position: relative;
}

.team-hero__frame {
	position: relative;
	border-radius: var(--shivuk-radius-lg);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
	transform: rotate(-1.2deg);
	transition: transform var(--team-dur) var(--team-ease);
}

.team-hero__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(200deg, transparent 55%, color-mix(in srgb, var(--shivuk-color-accent) 30%, transparent));
	pointer-events: none;
}

.team-hero__figure::before {
	content: "";
	position: absolute;
	inset-block: 1.25rem -1.25rem;
	inset-inline: -1.25rem 1.25rem;
	border-radius: var(--shivuk-radius-lg);
	border: 1px solid color-mix(in srgb, var(--team-tint) 45%, transparent);
	transform: rotate(2deg);
}

.team-hero__figure:hover .team-hero__frame {
	transform: rotate(0deg);
}

.team-hero__frame img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.team-hero__credit {
	margin-block-start: 1.5rem;
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.78rem;
	font-style: italic;
	line-height: 1.5;
	text-align: center;
}

/* -----------------------------------------------------------------------
   2. Roster
   ----------------------------------------------------------------------- */
.team-roster {
	display: grid;
	gap: clamp(3.5rem, 7vw, 6.5rem);
}

.team-member {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(1.75rem, 4.5vw, 3.5rem);
	align-items: start;
}

/* Every second profile mirrors, so the eye zig-zags down the page instead
   of tracking one straight column of portraits. */
.team-member:nth-child(even) {
	direction: ltr;
}

.team-member:nth-child(even) > * {
	direction: rtl;
}

/* Sticky: the face stays alongside the bio instead of scrolling away at the
   first paragraph. Offset clears the sticky header via the height that
   navigation.js measures onto :root. */
.team-member__portrait {
	position: sticky;
	inset-block-start: calc(var(--shivuk-header-h, 0px) + 1.5rem);
	border-radius: var(--shivuk-radius-lg);
	background: var(--shivuk-color-surface);
}

.team-member__portrait img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 20%;
	border-radius: var(--shivuk-radius-lg);
	box-shadow: var(--shivuk-shadow-lg);
	transition: transform var(--team-dur) var(--team-ease);
}

.team-member:hover .team-member__portrait img {
	transform: translateY(-6px);
}

.team-member__body {
	padding-block-start: clamp(1rem, 3vw, 2.5rem);
}

.team-member__role {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: var(--shivuk-color-accent-soft);
	color: color-mix(in srgb, var(--shivuk-color-accent) 82%, #0c2f4c);
	font-size: 0.8rem;
	font-weight: 700;
}

.team-member__name {
	margin: 0.9rem 0 0;
	font-size: clamp(1.85rem, 4vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

/* Accent rule under the name, the same signature the section titles carry. */
.team-member__name::after {
	content: "";
	display: block;
	inline-size: 52px;
	block-size: 3px;
	margin-block-start: 0.7rem;
	border-radius: 2px;
	background: var(--shivuk-color-accent);
}

.team-member__position {
	margin: 0.9rem 0 0;
	color: var(--shivuk-color-text);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.5;
}

/* Personal details as chips — they read as data, not prose, so they get
   pulled out of the bio paragraph and set as their own row. */
.team-member__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 1.1rem 0 0;
	padding: 0;
	list-style: none;
}

.team-member__facts li {
	padding: 0.28rem 0.7rem;
	border: 1px solid var(--shivuk-color-border);
	border-radius: 999px;
	background: var(--shivuk-color-bg);
	color: var(--shivuk-color-muted);
	font-size: 0.82rem;
}

.team-member__bio {
	margin-block-start: 1.4rem;
	color: var(--shivuk-color-text);
	font-size: 1.02rem;
	line-height: 1.85;
}

.team-member__bio p {
	margin: 0;
}

.team-member__bio p + p {
	margin-block-start: 1em;
}

/* Education pulled out as a footnote card — an inline sentence at the end
   of three paragraphs is the first thing a reader's eye skips. */
.team-member__education {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.25rem 0.85rem;
	margin: 1.75rem 0 0;
	padding: 1.1rem 1.25rem;
	border-radius: var(--shivuk-radius);
	border: 1px solid var(--shivuk-color-border);
	border-inline-start: 3px solid var(--shivuk-color-accent);
	background: var(--shivuk-color-surface);
}

.team-member__education-icon {
	grid-row: span 2;
	display: grid;
	place-items: center;
	inline-size: 34px;
	block-size: 34px;
	border-radius: 50%;
	background: var(--shivuk-color-accent-soft);
	color: var(--shivuk-color-accent);
}

.team-member__education-icon svg {
	inline-size: 19px;
	block-size: 19px;
}

.team-member__education-label {
	align-self: end;
	color: var(--shivuk-color-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.team-member__education-text {
	color: var(--shivuk-color-muted);
	font-size: 0.92rem;
	line-height: 1.6;
}

/* -----------------------------------------------------------------------
   3. Editor content appended below the roster
   ----------------------------------------------------------------------- */
.team-extra .entry-content {
	max-inline-size: 760px;
	margin-inline: auto;
	font-size: 1.02rem;
	line-height: 1.85;
}

/* -----------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */
@media (max-width: 900px) {
	.team-hero__inner {
		grid-template-columns: 1fr;
	}

	/* Portrait first on narrow screens — the photo is the hook. */
	.team-hero__figure {
		order: -1;
	}

	.team-member {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		gap: 1.5rem;
	}
}

@media (max-width: 700px) {
	.team-member,
	.team-member:nth-child(even) {
		grid-template-columns: 1fr;
		direction: rtl;
	}

	/* Sticky is meaningless once the portrait is a full-width band above
	   the text — it would pin the photo over the bio as it scrolls. */
	.team-member__portrait {
		position: relative;
		inset-block-start: auto;
		max-inline-size: 320px;
	}

	.team-member__portrait img {
		aspect-ratio: 1;
	}

	.team-member__body {
		padding-block-start: 0;
	}

	.team-member__education {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.team-member__education-icon {
		grid-row: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.team-hero__frame,
	.team-member__portrait img {
		transition: none;
	}

	.team-hero__figure:hover .team-hero__frame,
	.team-member:hover .team-member__portrait img {
		transform: none;
	}

	.team-hero__frame {
		transform: rotate(-1.2deg);
	}
}
