.site-role-badge {
	--site-role-rgb: 126, 144, 222;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 20px;
	padding: 2px 7px 2px 6px;
	border: 1px solid rgba(var(--site-role-rgb), .42);
	border-radius: 2px;
	color: rgb(var(--site-role-rgb));
	background: rgba(var(--site-role-rgb), .1);
	box-shadow: inset 2px 0 0 rgb(var(--site-role-rgb)), 0 0 9px rgba(var(--site-role-rgb), .08);
	font-size: 11px;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Center the visible uppercase letters, not the font's extra ascent/descent space.
   Keep accents and descenders unclipped, including when a long role wraps. */
.site-role-badge > span {
	display: block;
	min-width: 0;
	position: relative;
	top: .07em;
}

@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {
	.site-role-badge > span {
		top: 0;
		text-box-trim: trim-both;
		text-box-edge: cap alphabetic;
	}
}

.site-role-nickname,
.site-role-nickname[data-role-shimmer] {
	position: relative;
	display: inline-block;
	isolation: isolate;
	max-width: 100%;
	vertical-align: baseline;
	color: rgb(var(--site-role-rgb,126,144,222));
	font-weight: 400;
	text-shadow: 0 0 6px rgba(var(--site-role-rgb,126,144,222),calc(.56 * clamp(0,var(--site-role-shine,0),1))), 0 0 14px rgba(var(--site-role-rgb,126,144,222),calc(.28 * clamp(0,var(--site-role-shine,0),1)));
}

.site-role-nickname__text { position: relative; z-index: 1; display: block; overflow: inherit; text-overflow: inherit; }
.site-role-nickname__glow { display: none; }
.site-role-nickname__emoji {
	font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
	font-variant-emoji: emoji;
	font-weight: 400;
}
/* Share emoji metrics with the glow; only the foreground keeps native colors. */
.site-role-nickname__text > .site-role-nickname__emoji {
	color: #e5e5ef;
	-webkit-text-fill-color: currentColor;
}

/* The same moving gradient paints the glyphs and an aria-hidden blurred copy.
   No per-letter spans: kerning, Unicode names and text selection stay intact. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
	@media (prefers-reduced-motion: no-preference) {
		.site-role-nickname[data-role-shimmer="true"] { text-shadow: none; }
		.site-role-nickname[data-role-shimmer="true"] > :is(.site-role-nickname__text, .site-role-nickname__glow) {
			color: transparent;
			-webkit-text-fill-color: transparent;
			text-shadow: none;
			background-image: linear-gradient(90deg, rgb(var(--site-role-rgb)) 0%, rgb(var(--site-role-shimmer-rgb)) 50%, rgb(var(--site-role-rgb)) 100%);
			background-size: 200% 100%;
			background-position: 0% 0;
			background-repeat: repeat-x;
			background-origin: content-box;
			background-clip: text;
			-webkit-background-clip: text;
			animation: site-role-nickname-wave 4s linear infinite;
		}
		.site-role-nickname[data-role-shimmer="true"] > .site-role-nickname__glow {
			display: block;
			position: absolute;
			z-index: 0;
			inset: 0;
			padding: inherit;
			font: inherit;
			letter-spacing: inherit;
			white-space: inherit;
			text-overflow: inherit;
			overflow: hidden;
			filter: blur(3px);
			opacity: calc(.85 * clamp(0,var(--site-role-shine,0),1));
			pointer-events: none;
			user-select: none;
		}
	}
}
@keyframes site-role-nickname-wave {
	from { background-position: 0% 0; }
	to { background-position: 200% 0; }
}

.site-identity-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.site-project-slot { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; vertical-align: middle; }
.site-project-slot[hidden] { display: none; }
.site-project-badge {
	display: inline-flex; align-items: center; justify-content: center; position: relative; box-sizing: border-box;
	min-height: 22px; max-width: 100%; padding: 3px 7px; border: 0; border-left: 2px solid rgba(var(--site-role-rgb),.5); border-radius: 2px;
	color: rgb(var(--site-role-rgb)); background: rgba(var(--site-role-rgb),.1); box-shadow: 0 0 9px rgba(var(--site-role-rgb),.08); font-size: 11px; font-weight: 400; line-height: 1; text-decoration: none; text-shadow: none;
	transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.site-project-badge::before, .site-project-badge::after {
	content: ""; position: absolute; left: 0; right: 0; height: 1px; pointer-events: none;
	background: linear-gradient(to right, rgba(var(--site-role-rgb),.4), rgba(var(--site-role-rgb),0)) left / min(18px,25%) 1px no-repeat;
}
.site-project-badge::before { top: 0; }
.site-project-badge::after { bottom: 0; }
.site-project-badge > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
a.site-project-badge:hover, a.site-project-badge:focus-visible {
	color: #100c20; background-color: rgb(var(--site-role-rgb)); box-shadow: 0 0 12px rgba(var(--site-role-rgb),.2); text-decoration: none;
}
a.site-project-badge:focus-visible { outline: 1px solid rgb(var(--site-role-rgb)); outline-offset: 3px; }

.site-role-badge svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}
