/**
 * Single Team — bio profile page styles.
 *
 * Attached to: team CPT single views only (enqueued conditionally on
 * is_singular('team')). Mirrors the conditional-load pattern of
 * single-work.css.
 */

/* ==========================================================================
   Hero — 55/45 split, top-aligned. Copy column carries the role label,
   name, full bio (post-content), and optional Twitter link. Portrait sits
   in the right column anchored to the top so it doesn't drift inside a
   tall text column.
   ========================================================================== */

.ad-single-team__hero-text-inner {
	max-width: 36rem;
}

/* Portrait — fixed aspect so every team member's hero feels consistent.
   3:4 mirrors the existing team-grid card crop. !important is required
   because the post-featured-image block emits inline width/height attrs
   from the attached image's intrinsic size. */
.ad-single-team__photo img {
	aspect-ratio: 3 / 4 !important;
	object-fit: cover;
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0.25rem;
}

/* Bio sits inside the hero text column now. Native theme.json typography
   defaults handle paragraph color/size. */
.ad-single-team__bio {
	width: 100%;
}

/* Restore native block-gap rhythm inside the bio. global.css zeroes
   margins on every `.entry-content > *` so section-stacked pages don't
   compound section padding with paragraph margins; that reset also
   kills paragraph rhythm for text-heavy classic content like the bio
   (Mike's bio is 7 wpautop <p> tags). Mirrors the `.single-post .entry-content > * + *`
   restore rule in global.css, scoped here so the override only applies
   inside the bio container. */
.ad-single-team__bio > * + * {
	margin-block-start: var(--wp--style--block-gap);
}

.ad-single-team__social a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--tone-dark);
	padding-bottom: 0.15em;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.ad-single-team__social a:hover,
.ad-single-team__social a:focus-visible {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	text-decoration: none;
}

/* ==========================================================================
   Writing — list of every post the team member has authored.
   The query block emits <ul class="wp-block-post-template ad-single-team__articles">
   with <li> rows. Each <li> contains a group with class .ad-single-team__article
   that holds the post-title (isLink) and the post-date.

   Hover treatment mirrors .ad-about-awards__row: a subtle muted bg tint on
   the row + a cursor-following featured image driven by custom.js (it
   activates on any element with .has-card-link + [data-cursor-image]).
   The stretched <a> overlay is injected by ad_single_team_article_card_link()
   in functions.php.
   ========================================================================== */

/* Reset the post-template <ul>. UA reset — defeats browser <ul> margins. */
.ad-single-team__articles {
	list-style: none;
	padding-inline-start: 0;
	margin-block: 0;
}

/* Row separators — thin rule between every row, none above the first. */
.ad-single-team__articles > li {
	border-top: 1px solid var(--wp--preset--color--tone-dark);
}

.ad-single-team__articles > li:first-child {
	border-top: 0;
}

.ad-single-team__articles > li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--tone-dark);
}

/* Article row — relative for the stretched-link overlay; transition for the
   hover bg tint (matches .ad-about-awards__row). The .has-card-link class is
   injected by the render_block filter and provides position: relative + the
   pointer cursor via the global rule in custom.css. */
.ad-single-team__article {
	width: 100%;
	transition: background-color 0.25s ease;
}

.ad-single-team__article.has-card-link:hover {
	background-color: var(--wp--preset--color--muted) !important;
}

/* Stretched link — covers the whole row, sits above the post-title's inner
   <a> so the click target is consistent (both URLs are identical). z-index:2
   matches .ad-home-work__stretched-link. */
.ad-single-team__article-stretched-link {
	position: absolute;
	inset: 0;
	z-index: 2;
	text-decoration: none;
}

/* Title-as-link visual: present as a normal heading (primary color, no
   underline). The row's bg tint + cursor-image hover is the sole hover cue.
   :focus-visible keeps an accent outline for keyboard users. */
.ad-single-team__article-title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.ad-single-team__article-title a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.ad-single-team__article-title a:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Date column — keep it from forcing a strange wrap. */
.ad-single-team__article-date {
	white-space: nowrap;
	flex-shrink: 0;
}

/* Mobile: the wp:columns block already isStackedOnMobile, so the hero
   collapses naturally. Article rows stay readable as flex-wrap is on. */
@media (max-width: 781px) {
	.ad-single-team__article {
		flex-wrap: wrap !important;
	}
}

