/*
 * Brand layer — look & feel
 * ------------------------------------------------------------------
 * Loaded last (after main.css, block styles and site-overrides.css).
 * One system: tokens for colour, radius, shadow and type; every
 * component below consumes them. Some selectors are deliberately
 * heavier than ideal to beat older `!important` rules.
 * ------------------------------------------------------------------ */

:root {
	--bg: #f6f7f9;
	--surface: #ffffff;
	--surface-2: #eef1f5;
	--text-primary: #111318;
	--text-secondary: #5b6472;
	--border: #e3e6eb;
	--accent: #2f80ed;
	--accent-strong: #1c6ad8;
	--ink: #111318;
	--on-ink: #ffffff;
	--link: #1c6ad8;
	--link-hover: #1457b8;
	--link-visited: #1c6ad8;

	--r-sm: 10px;
	--r-md: 16px;
	--r-lg: 24px;

	--shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
	--shadow-md: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -8px rgba(16, 24, 40, 0.1);
	--shadow-lg: 0 2px 6px rgba(16, 24, 40, 0.04), 0 32px 64px -16px rgba(16, 24, 40, 0.2);

	--header-h: 78px;
	--section-y: clamp(4.5rem, 9vw, 7.5rem);

	--footer-bg: #0c0e13;
	--footer-text: rgba(255, 255, 255, 0.66);
	--footer-strong: #ffffff;
	--footer-line: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] {
	--bg: #0b0d12;
	--surface: #141820;
	--surface-2: #1b2029;
	--text-primary: #eef1f6;
	--text-secondary: #9aa4b2;
	--border: #262c37;
	--accent: #6aa8f7;
	--accent-strong: #8dbcf9;
	--ink: #eef1f6;
	--on-ink: #0b0d12;
	--link: #7db4f8;
	--link-hover: #a3cafb;
	--link-visited: #7db4f8;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
	--shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 32px 64px -16px rgba(0, 0, 0, 0.65);

	--footer-bg: #07080c;
	--footer-line: rgba(255, 255, 255, 0.07);
}

/* ------------------------------------------------------------------
 * Type
 * ------------------------------------------------------------------ */
html body {
	font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	background-color: var(--bg);
	color: var(--text-primary);
}

html body :is(h1, h2, h3, .wp-block-heading) {
	letter-spacing: -0.02em;
	text-wrap: balance;
}

html body p {
	text-wrap: pretty;
}

::selection {
	background: color-mix(in srgb, var(--accent) 24%, transparent);
}

/* Anchor targets land below the fixed header (direct links, no-JS). */
html body [id] {
	scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* Sections focused by the anchor scroll don't show a ring. */
html body [tabindex="-1"]:focus {
	outline: none;
}

/* ------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */
html[data-theme] body .bt-header-root.alignfull.has-surface-background-color {
	padding-top: 0.8rem !important;
	padding-bottom: 0.8rem !important;
	background-color: color-mix(in srgb, var(--surface) 80%, transparent) !important;
	border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
	border-radius: 0;
	box-shadow: none;
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
}

html[data-theme] body .bt-header-root.alignfull.has-surface-background-color.is-scrolled {
	padding-top: 0.55rem !important;
	padding-bottom: 0.55rem !important;
	background-color: color-mix(in srgb, var(--surface) 90%, transparent) !important;
	box-shadow: 0 10px 30px -18px rgba(16, 24, 40, 0.35);
}

html body .wp-site-blocks {
	padding-top: var(--header-h);
}

html body .header-container {
	gap: 1.75rem;
}

/* Same gutter as the content grid (the global padding reset strips it). */
html body .header-content-container.has-global-padding,
html body .bt-header-root .header-content-container {
	padding-left: 1.5rem !important;
	padding-right: 1.5rem !important;
}

@media (max-width: 768px) {
	html body .header-content-container.has-global-padding,
	html body .bt-header-root .header-content-container {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}
}

html body .header-logo {
	order: -1;
	flex: 0 0 auto;
	justify-content: flex-start;
}

html body .header-menu {
	flex: 1 1 auto;
}

html body .header-social {
	flex: 0 0 auto;
	gap: 0.85rem;
}

html body .header-menu-links {
	gap: 1.75rem;
	margin: 0 !important;
}

html body .header-menu-links a {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-secondary) !important;
	transition: color 200ms ease;
}

html body .header-menu-links a:hover,
html body .header-menu-links .current-menu-item > a,
html body .header-menu-links a[aria-current="page"] {
	color: var(--text-primary) !important;
}

/* Wordmark (rendered by inc/brand.php when no logo image is set). */
.bt-wordmark__link {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none !important;
	color: var(--text-primary) !important;
	outline-offset: 4px;
}

.bt-wordmark__mark {
	display: grid;
	place-items: center;
	width: 2.15rem;
	height: 2.15rem;
	border-radius: var(--r-sm);
	background: var(--ink);
	color: var(--on-ink);
	font-family: "Lexend", system-ui, sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: background-color 240ms ease, transform 240ms var(--ease-out, ease);
}

.bt-wordmark__name {
	font-family: "Lexend", system-ui, sans-serif;
	font-size: 1.02rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
	.bt-wordmark__link:hover .bt-wordmark__mark {
		background: var(--accent);
		color: #fff;
		transform: rotate(-4deg);
	}
}

/* Segmented controls: language and theme share one look. */
html body .lang-switcher__track,
html body .theme-toggle-buttons {
	padding: 3px;
	border-radius: 999px;
	background: var(--surface-2);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}

html body .lang-switcher__pill {
	padding: 0.32rem 0.75rem;
	font-size: 0.78rem;
}

html body .theme-toggle-btn {
	width: 30px;
	height: 30px;
	border-radius: 999px;
}

html body .theme-toggle-btn svg {
	width: 16px;
	height: 16px;
}

html body .theme-toggle-btn.active {
	background: var(--surface);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

html[data-theme="dark"] body .theme-toggle-btn.active {
	background: #2a303b;
}

html body .header-social .social-link,
html body .header-social .social-link svg {
	width: 18px !important;
	height: 18px !important;
}

html body .header-social .social-links {
	gap: 0.7rem;
}

html body .header-social .social-link svg,
html body .header-social .social-link svg * {
	fill: var(--text-secondary) !important;
	stroke: none !important;
	transition: fill 200ms ease;
}

html body .header-social .social-link:hover svg,
html body .header-social .social-link:hover svg * {
	fill: var(--text-primary) !important;
}

/* Contact button (inc/brand.php). */
.bt-header-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 2.5rem;
	padding: 0 1rem 0 1.15rem;
	border-radius: 999px;
	background: var(--ink);
	color: var(--on-ink) !important;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none !important;
	transition:
		background-color 200ms ease,
		color 200ms ease,
		transform var(--dur-press, 160ms) var(--ease-out, ease);
}

.bt-header-cta svg {
	transition: transform 240ms var(--ease-out, ease);
}

@media (hover: hover) and (pointer: fine) {
	.bt-header-cta:hover {
		background: var(--accent);
		color: #fff !important;
	}

	.bt-header-cta:hover svg {
		transform: translateX(2px);
	}
}

.bt-header-cta:active {
	transform: scale(0.97);
}

/* ------------------------------------------------------------------
 * Buttons: one primary style across blocks (ink pill, accent on hover)
 * ------------------------------------------------------------------ */
html body .bt-new-hero-home__cta,
html body .bt-services-offer__cta,
html body .bt-contact-section__submit {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0 1.4rem;
	border-radius: 999px;
	background: var(--ink);
	color: var(--on-ink) !important;
	font-family: "Instrument Sans", system-ui, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0;
	box-shadow: none;
	opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-new-hero-home__cta:hover,
	html body .bt-services-offer__cta:hover,
	html body .bt-contact-section__submit:hover {
		background: var(--accent);
		color: #fff !important;
		box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--accent) 70%, transparent);
	}
}

html body .bt-new-hero-home__cta svg {
	transition: transform 240ms var(--ease-out, ease);
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-new-hero-home__cta:hover svg {
		transform: translateX(3px);
	}
}

/* ------------------------------------------------------------------
 * Section headings: eyebrow + title share one scale
 * ------------------------------------------------------------------ */
html body .bt-skills-board__eyebrow,
html body .bt-services-offer__eyebrow,
html body .bt-hero-diamonds__subtitle,
html body .bt-project-board__eyebrow,
html body .bt-project-case__kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
	font-family: "Instrument Sans", system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--accent-strong);
}

html body .bt-skills-board__eyebrow::before,
html body .bt-services-offer__eyebrow::before,
html body .bt-hero-diamonds__subtitle::before,
html body .bt-project-board__eyebrow::before,
html body .bt-project-case__kicker::before {
	content: "";
	width: 1.25rem;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

html body .bt-skills-board__title,
html body .bt-services-offer__heading,
html body .bt-contact-section__title {
	font-family: "Lexend", system-ui, sans-serif;
	font-size: clamp(2.1rem, 4.2vw, 3.4rem);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -0.03em;
	color: var(--text-primary);
}

html body .bt-skills-board__lead,
html body .bt-services-offer__lead,
html body .bt-contact-section__description {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--text-secondary);
}

/* ------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------ */
html body .bt-new-hero-home {
	display: flex;
	flex-direction: column;
	min-height: calc(100svh - var(--header-h));
}

html body .bt-new-hero-home__backdrop {
	min-height: clamp(300px, 54svh, 640px);
}

html body .bt-new-hero-home__content {
	flex: 1 0 auto;
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

html body .bt-new-hero-home__intro-card {
	border-radius: var(--r-lg);
	border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
	background: var(--surface);
	box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] body .bt-new-hero-home__intro-card {
	background: var(--surface);
	border-color: var(--border);
}

html body .bt-new-hero-home__subtitle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding: 0.4rem 0.8rem 0.4rem 0.65rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	color: var(--accent-strong);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
}

html body .bt-new-hero-home__subtitle::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

html body .bt-new-hero-home__line--muted {
	color: var(--text-secondary);
}

html body .bt-new-hero-home__description {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--text-secondary);
	opacity: 1;
}

html body .bt-new-hero-home__cta-wrap {
	margin-top: 1.75rem;
}

/* Side cards become small tiles on desktop. */
@media (min-width: 1024px) {
	html body .bt-new-hero-home__cards {
		gap: 0.85rem;
	}

	html body .bt-new-hero-home__card {
		flex-direction: column;
		gap: 0.85rem;
		padding: 1.1rem 1.1rem 1.2rem;
		border-radius: var(--r-md);
		border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
		background: var(--surface);
		box-shadow: var(--shadow-sm);
	}
}

html body .bt-new-hero-home__card-title {
	font-size: 1rem;
	font-weight: 600;
}

html body .bt-new-hero-home__card-text {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* ------------------------------------------------------------------
 * Skills
 * ------------------------------------------------------------------ */
html body .bt-skills-board__specialty {
	margin-top: 0.5rem;
	padding: clamp(1.25rem, 2.5vw, 2rem);
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

html body .bt-skills-board__figure-num {
	letter-spacing: -0.04em;
}

html body .bt-skills-board__filter {
	padding: 0.5rem 1rem;
	border-color: var(--border);
	background: var(--surface);
	font-size: 0.85rem;
	font-weight: 500;
}

html body .bt-skills-board__filter.is-active {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--on-ink);
}

/* ------------------------------------------------------------------
 * Services
 * ------------------------------------------------------------------ */
html body .bt-services-offer__featured,
html body .bt-services-offer__card {
	border-radius: var(--r-lg);
}

html body .bt-services-offer__featured {
	padding: clamp(1.4rem, 2.4vw, 2rem);
	box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] body .bt-services-offer__featured {
	background: #182231;
	border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

html body .bt-services-offer__card {
	padding: 1.4rem 1.4rem 1.25rem;
	background: var(--surface);
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	box-shadow: var(--shadow-sm);
}

html body .bt-services-offer__icon {
	border-radius: var(--r-sm);
}

/* ------------------------------------------------------------------
 * Stats over photo
 * ------------------------------------------------------------------ */
html body .bt-experience-summary__main-card,
html body .bt-experience-summary__stat-card {
	border-radius: var(--r-lg);
}

/* ------------------------------------------------------------------
 * Contact: the form sits on its own card
 * ------------------------------------------------------------------ */
html body .bt-contact-section {
	padding-top: var(--section-y) !important;
	padding-bottom: 0 !important;
}

html body .bt-contact-section__grid {
	padding: clamp(1.5rem, 4vw, 3.5rem);
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-md);
}

html body .bt-contact-section__form {
	row-gap: 0.9rem;
}

html body .bt-contact-section__field input,
html body .bt-contact-section__field textarea {
	padding: 0.85rem 1rem;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--surface-2);
	color: var(--text-primary);
	font-size: 0.975rem;
	transition:
		border-color 200ms ease,
		box-shadow 200ms ease,
		background-color 200ms ease;
}

html body .bt-contact-section__field input::placeholder,
html body .bt-contact-section__field textarea::placeholder {
	color: var(--text-secondary);
}

html body .bt-contact-section__field input:focus,
html body .bt-contact-section__field textarea:focus {
	border-color: var(--accent);
	background: var(--surface);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

html[data-theme="dark"] body .bt-contact-section__field input,
html[data-theme="dark"] body .bt-contact-section__field textarea {
	border-color: transparent;
	color: var(--text-primary);
}

/* Filled fields replace the underline focus line. */
html body .bt-contact-section__field::after {
	display: none;
}

html body .bt-contact-section__submit {
	justify-self: start;
	margin-top: 0.4rem;
}

/* ------------------------------------------------------------------
 * Footer: dark closing band
 * ------------------------------------------------------------------ */
html[data-theme] body footer.wp-block-template-part .wp-block-group.alignfull.has-background,
html[data-theme] body .wp-block-group.alignfull.has-background:has(> .footer-content-container) {
	margin-top: var(--section-y) !important;
	padding-top: clamp(3rem, 6vw, 4.5rem) !important;
	padding-bottom: 2rem !important;
	background-color: var(--footer-bg) !important;
	color: var(--footer-text);
}

html body .footer-main {
	align-items: flex-start !important;
	gap: 2.5rem;
	padding-top: 0 !important;
	border-top: 0 !important;
}

html body .footer-right {
	order: -1;
	align-items: flex-start !important;
	gap: 1rem;
}

html body .footer-right .footer-social {
	margin: 0 !important;
}

html body .footer-menu .footer-menu-links,
html body .footer-menu ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
}

html body .footer-menu li {
	margin: 0;
}

html body .footer-menu a,
html body .footer-right p,
html body .footer-right a {
	font-size: 0.9rem;
	color: var(--footer-text) !important;
}

html body .footer-menu a:hover,
html body .footer-right a:hover {
	color: var(--footer-strong) !important;
}

html body footer .bt-wordmark__link {
	color: var(--footer-strong) !important;
}

html body footer .bt-wordmark__mark {
	background: #ffffff;
	color: #0c0e13;
}

html body footer .social-link svg,
html body footer .social-link svg * {
	fill: var(--footer-text) !important;
	stroke: none !important;
}

html body footer .social-link:hover svg,
html body footer .social-link:hover svg * {
	fill: var(--footer-strong) !important;
}

html body .footer-bottom {
	margin-top: clamp(2.5rem, 5vw, 3.5rem) !important;
	padding-top: 1.5rem;
	border-top: 1px solid var(--footer-line);
}

html body .footer-bottom p {
	color: var(--footer-text) !important;
	font-size: 0.82rem !important;
}

html body footer .wp-block-site-logo img {
	filter: brightness(0) invert(1);
}

/* ------------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------------ */
@media (max-width: 768px) {
	:root {
		--header-h: 104px;
	}

	html body .wp-site-blocks {
		padding-top: var(--header-h);
	}

	html body .header-container {
		flex-wrap: wrap;
		gap: 0.6rem 0.75rem;
	}

	html body .header-logo {
		order: 1;
		flex: 1 1 auto;
	}

	html body .header-social {
		order: 2;
		flex: 0 0 auto;
		justify-content: flex-end;
		gap: 0.5rem;
	}

	html body .header-menu {
		order: 3;
		flex: 1 1 100%;
		justify-content: flex-start;
		padding-left: 0 !important;
		padding-right: 0 !important;
		overflow-x: auto;
		scrollbar-width: none;
	}

	html body .bt-new-hero-home__backdrop {
		min-height: clamp(200px, 32svh, 320px);
	}

	html body .bt-new-hero-home__subtitle {
		border-radius: 10px;
		letter-spacing: 0.1em;
		line-height: 1.5;
	}

	html body .bt-new-hero-home__subtitle::before {
		display: none;
	}

	html body .header-menu-links {
		gap: 1.25rem;
	}

	html body .header-social .social-links {
		display: none !important;
	}

	html body .header-social > .wp-block-group {
		margin-left: 0 !important;
	}

	.bt-header-cta {
		height: 2.25rem;
		padding: 0 0.85rem;
		font-size: 0.82rem;
	}

	.bt-header-cta svg {
		display: none;
	}

	html body .bt-new-hero-home__cta {
		width: 100%;
		justify-content: center;
	}

	html body .footer-main {
		flex-direction: column;
	}

	/* The footer band runs edge to edge (a mobile rule pads root parts). */
	html body footer.wp-block-template-part {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

@media (max-width: 480px) {
	.header-logo .bt-wordmark__name {
		display: none;
	}

	html body .lang-switcher__pill {
		padding: 0.3rem 0.55rem;
	}
}

/* ==================================================================
 * INNER PAGES
 * ================================================================== */

/* ------------------------------------------------------------------
 * Page heroes (hero-home on Skills/Blog, single post hero)
 * ------------------------------------------------------------------ */
html body .bt-hero-home__title,
html body .bt-post-hero__title {
	font-weight: 600;
	letter-spacing: -0.025em;
	text-transform: none;
	line-height: 1.05;
}

html body .bt-post-hero__title {
	max-width: 22ch;
	font-size: clamp(2.2rem, 4.6vw, 3.75rem);
}

html body .bt-post-hero__title::after {
	width: 56px;
	height: 3px;
	border-radius: 3px;
	margin-top: 1.25rem;
}

html body .bt-post-hero__category a {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff !important;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
}

html body .bt-post-hero__meta {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
}

html body .bt-post-hero__overlay {
	background: linear-gradient(180deg, rgba(8, 10, 14, 0.25) 0%, rgba(8, 10, 14, 0.55) 55%, rgba(8, 10, 14, 0.85) 100%);
}

/* ------------------------------------------------------------------
 * Single post: reading column + editorial type
 * ------------------------------------------------------------------ */
html body.single .wp-block-post-content {
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
	font-size: 1.125rem;
	line-height: 1.8;
	color: color-mix(in srgb, var(--text-primary) 88%, var(--text-secondary));
	/* Long unbreakable runs (URLs, ASCII diagrams in paragraphs) must not
	 * push the page sideways on phones. */
	overflow-wrap: anywhere;
}

html body.single .wp-block-post-content > * {
	max-width: 44rem;
	margin-left: auto !important;
	margin-right: auto !important;
}

html body.single .wp-block-post-content > .alignwide,
html body.single .wp-block-post-content > .wp-block-gallery,
html body.single .wp-block-post-content > pre {
	max-width: 64rem;
}

html body.single .wp-block-post-content > .alignfull {
	max-width: none;
}

html body.single .wp-block-post-content > p,
html body.single .wp-block-post-content > ul,
html body.single .wp-block-post-content > ol {
	margin-top: 0;
	margin-bottom: 1.4em;
}

html body.single .wp-block-post-content :is(h2, h3, h4) {
	color: var(--text-primary);
	font-family: "Lexend", system-ui, sans-serif;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	scroll-margin-top: calc(var(--header-h) + 1rem);
}

html body.single .wp-block-post-content h2 {
	margin-top: 2.6em !important;
	margin-bottom: 0.7em !important;
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

html body.single .wp-block-post-content h3 {
	margin-top: 2em !important;
	margin-bottom: 0.6em !important;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
}

html body.single .wp-block-post-content :is(ul, ol) {
	padding-left: 1.3em;
}

html body.single .wp-block-post-content li {
	margin-bottom: 0.45em;
	padding-left: 0.2em;
}

html body.single .wp-block-post-content li::marker {
	color: var(--accent);
}

html body.single .wp-block-post-content strong {
	color: var(--text-primary);
	font-weight: 600;
}

html body.single .wp-block-post-content a {
	color: var(--accent-strong);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
	transition: text-decoration-color 200ms ease, color 200ms ease;
}

html body.single .wp-block-post-content a:hover {
	text-decoration-color: currentColor;
}

/* Pull quote: an accent quote mark leads, no side rule. */
html body.single .wp-block-post-content blockquote {
	margin-block: 2.5em;
	padding: 0;
	border: 0;
	font-family: "Lexend", system-ui, sans-serif;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.45;
	color: var(--text-primary);
}

html body.single .wp-block-post-content blockquote::before {
	content: "\201C";
	display: block;
	height: 0.55em;
	margin-bottom: 0.15em;
	color: var(--accent);
	font-size: 3.2em;
	line-height: 1;
}

html body.single .wp-block-post-content blockquote cite {
	display: block;
	margin-top: 0.8em;
	color: var(--text-secondary);
	font-family: "Instrument Sans", system-ui, sans-serif;
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0;
}

html body.single .wp-block-post-content :not(pre) > code {
	padding: 0.15em 0.4em;
	border-radius: 6px;
	background: var(--surface-2);
	font-size: 0.88em;
}

html body.single .wp-block-post-content pre {
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--r-md);
	background: #0f1218;
	color: #dfe6f0;
	font-size: 0.875rem;
	line-height: 1.6;
	overflow-x: auto;
}

html body.single .wp-block-post-content img {
	border-radius: var(--r-md);
}

html body.single .wp-block-post-content .wp-block-gallery img {
	border-radius: var(--r-sm);
}

html body.single .wp-block-post-content figcaption {
	margin-top: 0.6rem;
	color: var(--text-secondary);
	font-size: 0.875rem;
	text-align: center;
}

html body.single .wp-block-post-content hr {
	max-width: 6rem;
	margin-block: 3em;
	border: 0;
	border-top: 2px solid var(--border);
}

/* Comments: same column and the contact form's field style. */
html body.single .wp-block-comments {
	max-width: 44rem;
	margin: 0 auto clamp(3rem, 6vw, 5rem) !important;
	padding-top: 2.5rem;
	border-top: 1px solid var(--border);
}

html body.single .comment-reply-title,
html body.single .wp-block-comments-title {
	font-family: "Lexend", system-ui, sans-serif;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

html body.single .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid transparent !important;
	border-radius: 12px !important;
	background: var(--surface-2) !important;
	color: var(--text-primary);
	font: inherit;
	font-size: 0.975rem;
	transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

html body.single .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea):focus {
	outline: none;
	border-color: var(--accent) !important;
	background: var(--surface) !important;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

html body.single .comment-form label {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text-secondary);
}

html body.single .wp-block-post-comments-form input[type="submit"] {
	min-height: 3rem;
	padding: 0 1.4rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--ink) !important;
	color: var(--on-ink) !important;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease, transform var(--dur-press, 160ms) var(--ease-out, ease);
}

html body.single .wp-block-post-comments-form input[type="submit"]:hover {
	background: var(--accent) !important;
	color: #fff !important;
}

html body.single .wp-block-post-comments-form input[type="submit"]:active {
	transform: scale(0.97);
}

/* ------------------------------------------------------------------
 * Blog mosaic: separated rounded tiles, gradient captions
 * ------------------------------------------------------------------ */
html body .betocastelao-blog-mosaic {
	--bt-blog-mosaic-gap: 1rem;
}

html body .betocastelao-blog-mosaic__layout,
html body .betocastelao-blog-mosaic__layout--single {
	box-shadow: none;
}

html body .betocastelao-blog-mosaic .bt-blog-card--mosaic {
	border-radius: var(--r-lg);
	background: var(--surface-2);
	box-shadow: var(--shadow-sm);
	isolation: isolate;
	transition: transform 320ms var(--ease-out, ease), box-shadow 320ms var(--ease-out, ease);
}

/* A lone third tile spans the row instead of leaving an empty cell. */
html body .betocastelao-blog-mosaic :is(.betocastelao-blog-mosaic__grid, .betocastelao-blog-mosaic__layout) > p:empty {
	display: none;
}

html body .betocastelao-blog-mosaic__grid > :nth-child(3 of .bt-blog-card--mosaic):nth-last-child(1 of .bt-blog-card--mosaic) {
	grid-column: 1 / -1;
}

html body .betocastelao-blog-mosaic .bt-blog-card__mosaic-caption {
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	padding: 3.5rem 1.25rem 1.15rem !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: linear-gradient(180deg, rgba(8, 10, 14, 0) 0%, rgba(8, 10, 14, 0.62) 45%, rgba(8, 10, 14, 0.9) 100%) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-shadow: none !important;
}

html body .betocastelao-blog-mosaic .bt-blog-card--mosaic-featured .bt-blog-card__mosaic-caption {
	padding: 6rem 1.75rem 1.6rem !important;
}

html body .betocastelao-blog-mosaic .bt-blog-card__mosaic-date {
	margin-bottom: 0.35rem;
	color: rgba(255, 255, 255, 0.72) !important;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
}

html body .betocastelao-blog-mosaic .betocastelao-blog-card-title {
	color: #fff !important;
	font-size: clamp(0.95rem, 1.2vw, 1.1rem);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.25;
	text-transform: none;
}

html body .betocastelao-blog-mosaic .bt-blog-card--mosaic-featured .betocastelao-blog-card-title {
	font-size: clamp(1.35rem, 2.2vw, 1.9rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

html body .betocastelao-blog-mosaic .bt-blog-card__media-bg {
	transition: transform 600ms var(--ease-out, ease);
}

@media (hover: hover) and (pointer: fine) {
	html body .betocastelao-blog-mosaic .bt-blog-card--mosaic:hover {
		transform: translateY(-3px);
		box-shadow: var(--shadow-lg);
	}

	html body .betocastelao-blog-mosaic .bt-blog-card__mosaic-link:hover .bt-blog-card__media-bg {
		transform: scale(1.03);
	}
}

html body .betocastelao-blog-heading,
html body .betocastelao-blog-page-content h2 {
	font-family: "Lexend", system-ui, sans-serif;
	font-weight: 600;
	letter-spacing: -0.025em;
}

/* Archive / category / tag cards */
html body .bt-blog-card {
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform 320ms var(--ease-out, ease), box-shadow 320ms var(--ease-out, ease);
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-blog-card:hover {
		transform: translateY(-3px);
		box-shadow: var(--shadow-md);
	}
}

/* ------------------------------------------------------------------
 * Experience: hero + timeline as cards on a solid spine
 * ------------------------------------------------------------------ */
html body .bt-hero-diamonds__title {
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.04;
}

html body .bt-hero-diamonds__description {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--text-secondary);
}

html body .bt-experience-timeline__block-title {
	font-family: "Lexend", system-ui, sans-serif;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	font-weight: 600;
	letter-spacing: -0.025em;
}

html body .bt-experience-timeline__block-description {
	max-width: 46rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--text-secondary);
}

html body .bt-career-glance {
	border-radius: var(--r-lg) !important;
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent) !important;
	box-shadow: var(--shadow-sm) !important;
}

/* Drop the dashed frames; the card carries the shape now. */
html body .bt-experience-timeline :is(.line-t, .line-b, .line-l, .line-r) {
	display: none !important;
}

html body .bt-experience-timeline__line {
	width: 2px;
	border-left: 0;
	background: var(--border);
}

html body .bt-experience-timeline__items {
	row-gap: 1.75rem;
}

html body .bt-experience-timeline__item {
	padding: 0;
	min-height: 0;
}

html body .bt-experience-timeline__line-dot {
	top: 2.15rem;
	width: 12px;
	height: 12px;
	background-color: var(--accent);
	box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent);
}

html body .bt-experience-timeline__content {
	padding: 1.5rem 1.6rem 1.35rem !important;
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	transition: transform 320ms var(--ease-out, ease), box-shadow 320ms var(--ease-out, ease);
}

@media (min-width: 768px) {
	/* Cards alternate sides, so consecutive rows can interlock. */
	html body .bt-experience-timeline__item + .bt-experience-timeline__item {
		margin-top: -4rem;
	}

	html body .bt-experience-timeline__item--left .bt-experience-timeline__content {
		margin-right: 2rem;
	}

	html body .bt-experience-timeline__item--right .bt-experience-timeline__content {
		margin-left: 2rem;
	}
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-experience-timeline__content:hover {
		transform: translateY(-3px);
		box-shadow: var(--shadow-md);
	}
}

html body .bt-experience-timeline__dates {
	display: inline-flex;
	align-items: center;
	margin-bottom: 0.85rem;
	padding: 0.28rem 0.7rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	color: var(--accent-strong);
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: capitalize;
}

html body .bt-experience-timeline__header {
	margin-bottom: 0.6rem;
	text-transform: none;
	letter-spacing: 0;
}

html body .bt-experience-timeline__header h3 {
	margin: 0;
	color: var(--border);
	font-family: "Lexend", system-ui, sans-serif;
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.3;
}

html body .bt-experience-timeline__position {
	color: var(--text-primary);
	text-transform: none;
}

html body .bt-experience-timeline__title {
	display: inline;
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.95em;
	font-weight: 500;
	text-transform: none;
}

html body .bt-experience-timeline__description {
	color: var(--text-secondary);
	font-size: 0.95rem;
	line-height: 1.65;
}

html body .bt-experience-timeline__description li::marker {
	color: var(--accent);
}

/* ------------------------------------------------------------------
 * Portfolio
 * ------------------------------------------------------------------ */
html body .bt-project-board__empty {
	margin-top: 2rem;
	padding: clamp(2rem, 5vw, 3.5rem);
	border: 1px dashed var(--border);
	border-radius: var(--r-lg);
	background: var(--surface);
	color: var(--text-secondary);
	font-size: 1.05rem;
	text-align: center;
}

html body :is(.bt-project-board__title, .bt-project-case__title) {
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.04;
}

html body :is(.bt-project-board__feature, .bt-project-board__card) {
	border-radius: var(--r-lg);
}

/* ==================================================================
 * VISUAL + MOTION PASS 2
 * Keyframes shared by this section live at its end.
 * ================================================================== */

/* ------------------------------------------------------------------
 * Home hero: compact. The image band and statement share one screen.
 * ------------------------------------------------------------------ */
html body .bt-new-hero-home {
	display: block;
	min-height: 0;
}

html body .bt-new-hero-home__backdrop {
	min-height: clamp(240px, 38svh, 420px);
}

html body .bt-new-hero-home__content {
	margin-top: clamp(-11rem, -10vw, -3rem);
	padding-bottom: clamp(2rem, 4vw, 3rem);
}

html body .bt-new-hero-home__intro-card {
	max-width: min(46rem, 100%);
	padding: clamp(1.5rem, 2.2vw, 2.1rem) clamp(1.5rem, 2.4vw, 2.25rem);
}

html body .bt-new-hero-home__title {
	font-size: clamp(1.85rem, 3.2vw, 2.9rem);
	line-height: 1.06;
}

html body .bt-new-hero-home__description {
	font-size: 1rem;
	max-width: 38rem;
}

html body .bt-new-hero-home__cta-wrap {
	margin-top: 1.4rem;
}

@media (min-width: 1024px) {
	html body .bt-new-hero-home__row {
		flex-wrap: nowrap;
		align-items: flex-start;
	}

	html body .bt-new-hero-home__intro-card {
		flex: 0 1 44rem;
	}

	/* Tiles start right under the photo: the content row is pulled up by
	 * the same amount the card overlaps the image (see __content margin). */
	html body .bt-new-hero-home__cards-col {
		flex: 1 1 0;
		min-width: 0;
		margin-top: calc(clamp(3rem, 10vw, 11rem) + 1rem);
	}

	html body .bt-new-hero-home__cards {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.75rem;
		align-items: stretch;
	}

	html body .bt-new-hero-home__card {
		flex-direction: row;
		align-items: center;
		width: auto;
		max-width: none;
		gap: 0.9rem;
		padding: 0.9rem 1rem;
	}
}

/* Wide screens: the three tiles sit in one row of equal columns. */
@media (min-width: 1280px) {
	html body .bt-new-hero-home__cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.85rem;
	}

	html body .bt-new-hero-home__card {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.85rem;
		padding: 1.1rem 1.1rem 1.2rem;
	}
}


/* Side tiles respond to the pointer. */
html body .bt-new-hero-home__card {
	transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out), border-color 200ms ease;
}

html body .bt-new-hero-home__card-icon {
	transition: background-color 240ms ease, color 240ms ease, transform 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-new-hero-home__card:hover {
		transform: translateY(-4px);
		border-color: color-mix(in srgb, var(--accent) 30%, transparent);
		box-shadow: var(--shadow-md);
	}

	html body .bt-new-hero-home__card:hover .bt-new-hero-home__card-icon {
		background: var(--accent);
		color: #fff;
		transform: rotate(-8deg) scale(1.06);
	}
}

/* ------------------------------------------------------------------
 * Skills board (home + Skills page)
 * ------------------------------------------------------------------ */

/* Segmented filter with a sliding ink pill (indicator added by brand.js). */
html body .bt-skills-board__filters.has-indicator {
	position: relative;
	gap: 0;
	padding: 4px;
	border-radius: 999px;
	background: var(--surface-2);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}

html body .bt-skills-board__filters.has-indicator .bt-skills-board__filter {
	position: relative;
	z-index: 1;
	border: 0;
	background: transparent;
	color: var(--text-secondary);
}

html body .bt-skills-board__filters.has-indicator .bt-skills-board__filter.is-active {
	background: transparent;
	color: var(--on-ink);
}

.bt-skills-board__filter-indicator {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 0;
	z-index: 0;
	border-radius: 999px;
	background: var(--ink);
	box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.35);
}

.bt-skills-board__filters.is-ready .bt-skills-board__filter-indicator {
	transition: transform 420ms var(--ease-out), width 420ms var(--ease-out);
}

/* Core specialty becomes the dark feature card with glow. */
html body .bt-skills-board__specialty {
	position: relative;
	overflow: hidden;
	border-color: transparent;
	background: #111318;
	box-shadow: var(--shadow-md);
	color: #e9eef6;
}


html body .bt-skills-board__specialty > * {
	position: relative;
}

html body .bt-skills-board__specialty .bt-skills-board__label-title,
html body .bt-skills-board__specialty .bt-skills-board__figure-num,
html body .bt-skills-board__specialty .bt-skills-board__stat-name {
	color: #fff;
}

html body .bt-skills-board__specialty .bt-skills-board__num {
	color: #8dbcf9;
}

html body .bt-skills-board__specialty .bt-skills-board__label-text,
html body .bt-skills-board__specialty .bt-skills-board__figure-unit {
	color: rgba(233, 238, 246, 0.62);
}

html body .bt-skills-board__specialty .bt-skills-board__figure-num {
	font-size: clamp(3.4rem, 6vw, 5rem);
	color: #ffffff;
}

html body .bt-skills-board__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .bt-skills-board__tag {
	margin: 0;
	padding: 0.38rem 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(233, 238, 246, 0.88);
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.2;
	transition: background-color 200ms ease, border-color 200ms ease, transform 240ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-skills-board__tag:hover {
		border-color: color-mix(in srgb, var(--accent) 70%, transparent);
		background: color-mix(in srgb, var(--accent) 30%, transparent);
		transform: translateY(-2px);
	}
}

html.bt-js body .bt-skills-board__specialty.is-visible .bt-skills-board__tag {
	animation: bt-pop-in 520ms var(--ease-out) backwards;
}

html body .bt-skills-board__tag:nth-child(1) { animation-delay: 350ms; }
html body .bt-skills-board__tag:nth-child(2) { animation-delay: 400ms; }
html body .bt-skills-board__tag:nth-child(3) { animation-delay: 450ms; }
html body .bt-skills-board__tag:nth-child(4) { animation-delay: 500ms; }
html body .bt-skills-board__tag:nth-child(5) { animation-delay: 550ms; }
html body .bt-skills-board__tag:nth-child(6) { animation-delay: 600ms; }
html body .bt-skills-board__tag:nth-child(n + 7) { animation-delay: 650ms; }

/* Group columns become cards. */
html body .bt-skills-board__columns {
	gap: 1rem;
	padding-top: 1rem;
	border-top: 0;
}

html body .bt-skills-board__column {
	padding: 1.25rem 1.25rem 1.1rem;
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out), border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	html body .bt-skills-board__column:hover {
		transform: translateY(-3px);
		border-color: color-mix(in srgb, var(--accent) 25%, transparent);
		box-shadow: var(--shadow-md);
	}
}

html body .bt-skills-board__column .bt-skills-board__row,
html body .wp-block-group .bt-skills-board__column .bt-skills-board__rows li {
	flex-wrap: wrap;
	row-gap: 0.4rem;
	padding: 0.55rem 0;
	border-top: 0;
}

/* Experience meter: fills when its column reveals (width from PHP --bt-meter). */
.bt-skills-board__meter {
	position: relative;
	flex: 1 0 100%;
	height: 4px;
	overflow: hidden;
	border-radius: 4px;
	background: var(--surface-2);
}

.bt-skills-board__meter::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--accent);
	transform: scaleX(var(--bt-meter, 0));
	transform-origin: left center;
	transition: transform 1100ms var(--ease-out);
	transition-delay: calc(250ms + var(--row-i, 0) * 70ms);
}

.bt-js .bt-skills-board__column:not(.is-visible) .bt-skills-board__meter::after {
	transform: scaleX(0);
}

/* ------------------------------------------------------------------
 * Services
 * ------------------------------------------------------------------ */
/* Featured card: flat ink surface; the cursor spotlight is retired. */
html body .bt-services-offer__featured {
	background: #111318;
}

html body .bt-services-offer__card::before,
html body .bt-services-offer__featured::before {
	display: none;
}

/* Icons pop in after their card reveals. */
html.bt-js body .bt-services-offer__card.is-visible .bt-services-offer__icon,
html.bt-js body .bt-services-offer__featured.is-visible .bt-services-offer__icon {
	animation: bt-icon-pop 700ms var(--ease-out) backwards;
	animation-delay: calc(var(--bt-reveal-delay, 0ms) + 250ms);
}

/* Featured checklist ticks in one by one. */
html.bt-js body .bt-services-offer__featured.is-visible .bt-services-offer__checks li {
	animation: bt-slide-in 600ms var(--ease-out) backwards;
}

html body .bt-services-offer__checks li:nth-child(1) { animation-delay: 380ms; }
html body .bt-services-offer__checks li:nth-child(2) { animation-delay: 460ms; }
html body .bt-services-offer__checks li:nth-child(3) { animation-delay: 540ms; }
html body .bt-services-offer__checks li:nth-child(4) { animation-delay: 620ms; }
html body .bt-services-offer__checks li:nth-child(n + 5) { animation-delay: 700ms; }

/* Process: an accent line runs across the four steps; numbers sit in rings. */
html body .bt-services-offer__steps {
	position: relative;
	padding-top: 1.6rem;
	border-top-color: var(--border);
}

html body .bt-services-offer__steps::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	transform-origin: left center;
	transition: transform 1500ms var(--ease-in-out) 200ms;
}

.bt-js .bt-services-offer__steps:not(.is-visible)::before {
	transform: scaleX(0);
}

html body .bt-services-offer__step-num {
	display: inline-block;
	width: 1.9rem;
	height: 1.9rem;
	line-height: calc(1.9rem - 3px);
	text-align: center;
	margin-right: 0.55rem;
	border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
	border-radius: 50%;
	background: var(--surface);
	color: var(--accent-strong);
	font-size: 0.72rem;
	font-weight: 700;
	vertical-align: middle;
}

/* ------------------------------------------------------------------
 * Page heroes (Skills / Blog hero-home, single post)
 * ------------------------------------------------------------------ */
html.bt-js body .bt-hero-home[data-bt-scroll-reveal] {
	opacity: 1;
	transform: none;
	transition: none;
}

html body .bt-hero-home__overlay {
	background: linear-gradient(90deg, rgba(8, 10, 14, 0.86) 0%, rgba(8, 10, 14, 0.55) 50%, rgba(8, 10, 14, 0.25) 100%) !important;
	opacity: 1 !important;
}

html body .bt-hero-home__bg,
html body .bt-post-hero__bg {
	animation: bt-kenburns 1800ms var(--ease-out) both;
}

html.bt-js body .bt-hero-home__title,
html.bt-js body .bt-post-hero__title {
	animation: bt-rise-in 900ms var(--ease-out) 150ms backwards;
}

html.bt-js body .bt-hero-home__description,
html.bt-js body .bt-post-hero__meta {
	animation: bt-rise-in 900ms var(--ease-out) 320ms backwards;
}

html.bt-js body .bt-post-hero__category {
	animation: bt-rise-in 800ms var(--ease-out) 60ms backwards;
}

html body .bt-hero-home__title::after,
html body .bt-post-hero__title::after {
	transform-origin: left center;
	animation: bt-bar-draw 800ms var(--ease-in-out) 700ms backwards;
}

/* ------------------------------------------------------------------
 * Experience: diamonds hero
 * ------------------------------------------------------------------ */
html body .bt-hero-diamonds__diamond {
	transition:
		opacity 700ms ease,
		transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
		translate 600ms var(--ease-out);
}

html body .bt-hero-diamonds {
	position: relative;
	isolation: isolate;
	overflow-x: clip;
}


/* Photos drift slowly inside their frames. */
html body .bt-hero-diamonds__img {
	animation: bt-drift 16s ease-in-out infinite alternate;
}

html body .bt-hero-diamonds__diamond--a .bt-hero-diamonds__img { animation-duration: 12s; animation-delay: -3s; }
html body .bt-hero-diamonds__diamond--b .bt-hero-diamonds__img { animation-duration: 14s; animation-delay: -6s; }
html body .bt-hero-diamonds__diamond--c .bt-hero-diamonds__img { animation-duration: 11s; animation-delay: -1s; }

/* Small diamonds float on their own rhythm. */
html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__diamond:not(.bt-hero-diamonds__diamond--main) .bt-hero-diamonds__diamond-inner {
	animation: bt-float 6s ease-in-out 1.2s infinite alternate;
}

html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__diamond--b .bt-hero-diamonds__diamond-inner { animation-duration: 7.5s; }
html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__diamond--c .bt-hero-diamonds__diamond-inner { animation-duration: 5.5s; }

html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__subtitle {
	animation: bt-rise-in 800ms var(--ease-out) 100ms backwards;
}

html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__title {
	animation: bt-rise-in 900ms var(--ease-out) 200ms backwards;
}

html body .bt-hero-diamonds.is-visible .bt-hero-diamonds__description {
	animation: bt-rise-in 900ms var(--ease-out) 340ms backwards;
}

/* ------------------------------------------------------------------
 * Experience: career bar + timeline
 * ------------------------------------------------------------------ */
html body .bt-career-glance__seg {
	transform-origin: left center;
	transition: transform 800ms var(--ease-out);
}

.bt-js .bt-career-glance:not(.is-visible) .bt-career-glance__seg {
	transform: scaleX(0);
}

html body .bt-career-glance__seg:nth-child(2) { transition-delay: 90ms; }
html body .bt-career-glance__seg:nth-child(3) { transition-delay: 180ms; }
html body .bt-career-glance__seg:nth-child(4) { transition-delay: 270ms; }
html body .bt-career-glance__seg:nth-child(5) { transition-delay: 360ms; }
html body .bt-career-glance__seg:nth-child(6) { transition-delay: 450ms; }
html body .bt-career-glance__seg:nth-child(7) { transition-delay: 540ms; }
html body .bt-career-glance__seg:nth-child(n + 8) { transition-delay: 630ms; }

html body .bt-career-glance__labels {
	transition: opacity 700ms ease 500ms;
}

.bt-js .bt-career-glance:not(.is-visible) .bt-career-glance__labels {
	opacity: 0;
}

/* Accent line fills the spine as you read (--bt-tl set by brand.js). */
html body .bt-experience-timeline__line::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 2px;
	background: var(--accent);
	transform: scaleY(var(--bt-tl, 0));
	transform-origin: top center;
}

/* Cards arrive from their own side. */
html body .bt-experience-timeline__item {
	transition:
		opacity 700ms var(--ease-out),
		transform 900ms var(--ease-out);
}

html body .bt-experience-timeline__item--left:not(.is-visible) {
	transform: translate3d(-40px, 12px, 0);
}

html body .bt-experience-timeline__item--right:not(.is-visible) {
	transform: translate3d(40px, 12px, 0);
}

html body .bt-experience-timeline__item.is-visible .bt-experience-timeline__line-dot {
	animation: bt-dot-in 700ms var(--ease-out) 250ms backwards;
}

/* ------------------------------------------------------------------
 * Blog tiles: staggered entrance (class set by brand.js)
 * ------------------------------------------------------------------ */
.bt-js .bt-tile:not(.is-in) {
	opacity: 0;
}

.bt-js .bt-tile.is-in {
	animation: bt-rise-in 800ms var(--ease-out) var(--bt-tile-delay, 0ms) backwards;
}

/* Side-entrance offsets must never widen the page. */
html body .bt-experience-timeline {
	overflow-x: clip;
}

@media (max-width: 767px) {
	html body .bt-experience-timeline__item--left:not(.is-visible),
	html body .bt-experience-timeline__item--right:not(.is-visible) {
		transform: translate3d(0, 20px, 0);
	}
}

/* Phone header: keep language, theme and contact on one row. */
@media (max-width: 480px) {
	html body .header-social {
		flex-wrap: nowrap !important;
		gap: 0.4rem;
	}

	html body .lang-switcher__pill {
		padding: 0.28rem 0.5rem;
		font-size: 0.72rem;
	}

	html body .theme-toggle-btn {
		width: 26px;
		height: 26px;
	}

	.bt-header-cta {
		height: 2.1rem;
		padding: 0 0.75rem;
		font-size: 0.78rem;
	}
}

/* ------------------------------------------------------------------
 * Keyframes
 * ------------------------------------------------------------------ */
@keyframes bt-pop-in {
	from {
		opacity: 0;
		transform: translate3d(0, 8px, 0) scale(0.92);
	}
}

@keyframes bt-icon-pop {
	from {
		opacity: 0;
		transform: scale(0.6) rotate(-14deg);
	}
}

@keyframes bt-slide-in {
	from {
		opacity: 0;
		transform: translate3d(-10px, 0, 0);
	}
}

@keyframes bt-kenburns {
	from {
		opacity: 0;
		scale: 1.1;
	}
	to {
		opacity: 1;
		scale: 1;
	}
}

@keyframes bt-bar-draw {
	from { transform: scaleX(0); }
}

@keyframes bt-drift {
	from { scale: 1.02; translate: -1.5% 1%; }
	to { scale: 1.1; translate: 1.5% -1%; }
}

@keyframes bt-float {
	from { translate: 0 0; }
	to { translate: 0 -10px; }
}

@keyframes bt-dot-in {
	0% { scale: 0; }
	60% { scale: 1.35; }
	100% { scale: 1; }
}

/* ------------------------------------------------------------------
 * Reduced motion: no loops, everything at rest and visible.
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	html body .bt-hero-diamonds__img,
	html body .bt-hero-diamonds .bt-hero-diamonds__diamond-inner,
	html body .bt-hero-home__bg,
	html body .bt-post-hero__bg {
		animation: none !important;
	}

	.bt-skills-board__meter::after,
	html body .bt-career-glance__seg,
	html body .bt-services-offer__steps::before {
		transition: none;
	}

	.bt-js .bt-skills-board__column:not(.is-visible) .bt-skills-board__meter::after {
		transform: scaleX(var(--bt-meter, 0));
	}

	.bt-js .bt-career-glance:not(.is-visible) .bt-career-glance__seg,
	.bt-js .bt-services-offer__steps:not(.is-visible)::before {
		transform: none;
	}

	html body .bt-experience-timeline__item--left:not(.is-visible),
	html body .bt-experience-timeline__item--right:not(.is-visible) {
		transform: none;
	}

	.bt-js .bt-tile.is-in {
		animation: bt-fade-in 300ms ease backwards;
	}
}

/* ==================================================================
 * SINGLE POST: WIDE TEXT, AUTOMATIC TABLE OF CONTENTS, COMMENTS
 * (ToC + back-to-top built by assets/brand.js; reading time in
 * inc/blog-template.php)
 * ================================================================== */

/* Text follows the site's width: 64rem column, larger type. */
html body.single .wp-block-post-content {
	padding-top: clamp(2rem, 4vw, 3rem);
	font-size: 1.15rem;
	line-height: 1.8;
}

html body.single .wp-block-post-content > * {
	max-width: 64rem;
}

html body.single .wp-block-post-content > .alignwide,
html body.single .wp-block-post-content > .wp-block-gallery,
html body.single .wp-block-post-content > pre {
	max-width: 72rem;
}

html body.single .wp-block-post-content > :first-child {
	margin-top: 0 !important;
}

html body.single .wp-block-post-content > h2 {
	margin-top: 2em !important;
	font-size: clamp(1.7rem, 2.6vw, 2.25rem);
}

html body.single .wp-block-post-content > hr,
html body.single .wp-block-post-content > .wp-block-separator {
	max-width: 64rem !important;
	margin-block: 2.75em !important;
	border: 0 !important;
	border-top: 1px solid var(--border) !important;
	opacity: 1;
}

/* Lead: when the article opens with a paragraph, it reads larger. */
html body.single .wp-block-post-content > p:first-child {
	font-size: 1.35rem;
	line-height: 1.6;
	color: var(--text-primary);
}

/* ------------------------------------------------------------------
 * Table of contents
 * ------------------------------------------------------------------ */
html body .bt-toc {
	max-width: 64rem;
	margin: clamp(2rem, 4vw, 3rem) auto 0;
	border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
	border-radius: var(--r-md);
	background: var(--surface);
}

html body .bt-toc__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	color: var(--text-primary);
	font-family: "Lexend", system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

html body .bt-toc__title::-webkit-details-marker {
	display: none;
}

html body .bt-toc__title::after {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 240ms var(--ease-out);
}

html body .bt-toc[open] .bt-toc__title::after {
	transform: rotate(-135deg) translateY(-2px);
}

html body .bt-toc__list {
	margin: 0;
	padding: 0 1.25rem 1rem !important;
	list-style: none !important;
	counter-reset: bt-toc;
}

html body .bt-toc__list li {
	margin: 0;
	padding: 0;
	list-style: none !important;
	counter-increment: bt-toc;
}

html body .bt-toc__list li::marker {
	content: none;
}

html body .bt-toc__list a {
	display: flex;
	gap: 0.7rem;
	padding: 0.5rem 0 0.5rem 0.9rem;
	border-left: 2px solid var(--border);
	color: var(--text-secondary) !important;
	font-size: 0.95rem;
	line-height: 1.45;
	text-decoration: none !important;
	transition: color 200ms ease, border-color 200ms ease;
}

html body .bt-toc__list a::before {
	content: counter(bt-toc, decimal-leading-zero);
	flex: none;
	color: color-mix(in srgb, var(--text-secondary) 75%, transparent);
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.85;
}

html body .bt-toc__list a:hover {
	color: var(--text-primary) !important;
}

html body .bt-toc__list a.is-active {
	border-left-color: var(--accent);
	color: var(--text-primary) !important;
	font-weight: 500;
}

html body .bt-toc__list a.is-active::before {
	color: var(--accent);
}

/* Same gutter as the post text (post-content carries 1.5rem / 1rem). */
html body.single .bt-toc {
	margin-left: 1.5rem !important;
	margin-right: 1.5rem !important;
}

html body.single .wp-block-comments {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

@media (max-width: 768px) {
	html body.single .bt-toc {
		margin-left: 1rem !important;
		margin-right: 1rem !important;
	}

	html body.single .wp-block-comments {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

/* Desktop: sticky sidebar on the site's left edge, text beside it.
 * Comments start on the same line as the text. */
@media (min-width: 1180px) {
	html body.single .bt-has-toc {
		display: grid;
		grid-template-columns: 14rem minmax(0, 64rem);
		justify-content: start;
		column-gap: 3rem;
	}

	html body.single .bt-has-toc > .wp-block-post-content {
		grid-column: 2;
		grid-row: 1;
		min-width: 0;
		max-width: none !important;
		margin: 0 !important;
	}

	html body.single .bt-has-toc > .wp-block-post-content > * {
		max-width: none;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	html body .bt-has-toc > .bt-toc {
		grid-column: 1;
		grid-row: 1;
		align-self: start;
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		max-height: calc(100vh - var(--header-h) - 4rem);
		/* Inner padding keeps glyphs off the scrollport edge (overflow clips
		 * ink); the margin gives it back so the text stays on the gutter. */
		margin: clamp(2rem, 4vw, 3rem) 0 0 calc(1.5rem - 6px) !important;
		padding-left: 6px;
		overflow-y: auto;
		border: 0;
		background: transparent;
		scrollbar-width: thin;
	}

	html body .bt-has-toc > .bt-toc .bt-toc__title {
		padding: 0 0 0.85rem;
		color: var(--text-secondary);
		font-family: "Instrument Sans", system-ui, sans-serif;
		font-size: 0.78rem;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		cursor: default;
	}

	html body .bt-has-toc > .bt-toc .bt-toc__title::after {
		display: none;
	}

	html body .bt-has-toc > .bt-toc .bt-toc__list {
		padding: 0 !important;
	}

	html body .bt-has-toc > .bt-toc .bt-toc__list a {
		font-size: 0.875rem;
	}

	html body.bt-post-has-toc .wp-block-comments {
		max-width: 64rem;
		margin-left: calc(14rem + 3rem) !important;
		margin-right: auto !important;
	}
}

/* ------------------------------------------------------------------
 * Comments: same width as the text, roomier form
 * ------------------------------------------------------------------ */
html body.single .wp-block-comments {
	max-width: 64rem;
	padding-top: 3rem;
}

html body.single .comment-reply-title,
html body.single .wp-block-comments-title {
	margin-bottom: 0.5rem;
	font-size: clamp(1.6rem, 2.4vw, 2rem);
}

html body.single .comment-notes,
html body.single .logged-in-as {
	max-width: none;
	margin: 0 0 1.75rem;
	color: var(--text-secondary);
	font-size: 1rem;
}

html body.single .comment-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem 1.25rem;
}

html body.single .comment-form > p {
	margin: 0;
}

html body.single .comment-form > :is(.comment-notes, .logged-in-as, .comment-form-comment, .comment-form-cookies-consent, .form-submit) {
	grid-column: 1 / -1;
}

html body.single .comment-form label {
	display: block;
	margin-bottom: 0.45rem;
	color: var(--text-primary);
	font-size: 0.95rem;
	font-weight: 500;
}

html body.single .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
	padding: 1rem 1.15rem;
	font-size: 1.05rem;
}

html body.single .comment-form textarea {
	min-height: 11rem;
}

html body.single .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

html body.single .comment-form-cookies-consent label {
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.92rem;
	font-weight: 400;
}

html body.single .wp-block-post-comments-form input[type="submit"] {
	min-height: 3.25rem;
	padding: 0 1.75rem !important;
	font-size: 1rem;
}

@media (max-width: 720px) {
	html body.single .comment-form {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
 * Back to top
 * ------------------------------------------------------------------ */
.bt-back-top {
	position: fixed;
	right: clamp(1rem, 2.5vw, 2rem);
	bottom: clamp(1rem, 2.5vw, 2rem);
	z-index: 900;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
	border-radius: 50%;
	background: var(--surface);
	color: var(--text-primary);
	box-shadow: var(--shadow-md);
	cursor: pointer;
	opacity: 0;
	transform: translate3d(0, 12px, 0);
	pointer-events: none;
	transition:
		opacity 240ms ease,
		transform 320ms var(--ease-out),
		background-color 200ms ease,
		color 200ms ease;
}

.bt-back-top.is-shown {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
	.bt-back-top:hover {
		background: var(--ink);
		color: var(--on-ink);
	}
}

.bt-back-top:active {
	transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
	.bt-back-top {
		transform: none;
		transition: opacity 200ms ease;
	}

	html body .bt-toc__title::after {
		transition: none;
	}
}
