/*
Theme Name: JayLearning
Theme URI: https://jaylearning.com
Author: Jerrold (Jay) Pelupessy
Author URI: https://jaylearning.com
Description: Portfolio theme for Jay Pelupessy — Learning Experience Designer. Dark, single-accent, built on the JayLearning design system. Ships a Project custom post type with Format and Tools taxonomies, a four-tab case-study template, and a site-wide "Let's talk" contact badge. Editable content runs through Secure Custom Fields (free) or ACF.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jaylearning
Tags: portfolio, dark, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Fonts — self-hosted Plus Jakarta Sans (variable, 200–800)
   ========================================================================== */

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url('assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: italic;
	font-display: swap;
	font-weight: 200 800;
	src: url('assets/fonts/plus-jakarta-sans-latin-wght-italic.woff2') format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url('assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: italic;
	font-display: swap;
	font-weight: 200 800;
	src: url('assets/fonts/plus-jakarta-sans-latin-ext-wght-italic.woff2') format('woff2-variations');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   2. Design tokens — mirrored 1:1 from the JayLearning design system
   ========================================================================== */

:root {
	/* Base palette */
	--jl-base: #0E1621;
	--jl-surface: #1A2432;
	--jl-surface-alt: #151E2B;
	--jl-surface-raised: #202C3C;
	--jl-border: #283445;
	--jl-ink-body: #AEB9C7;
	--jl-ink-dim: #7C8A9C;
	--jl-ink-heading: #F3F6FA;
	--jl-emerald: #2FD08A;
	--jl-emerald-hover: #4FE0A1;
	--jl-on-emerald: #0B1119;

	/* Semantic aliases */
	--bg-page: var(--jl-base);
	--surface-card: var(--jl-surface);
	--surface-panel: var(--jl-surface-alt);
	--surface-raised: var(--jl-surface-raised);
	--border-line: var(--jl-border);
	--border-line-strong: #3d5470;
	--border-hover: var(--jl-emerald);
	--text-body: var(--jl-ink-body);
	--text-secondary: var(--jl-ink-dim);
	--text-heading: var(--jl-ink-heading);
	--accent: var(--jl-emerald);
	--accent-hover: var(--jl-emerald-hover);
	--text-on-accent: var(--jl-on-emerald);
	--link: var(--jl-emerald);

	/* Nav / translucency */
	--bg-nav: rgba(14, 22, 33, .78);
	--bg-pill: rgba(26, 36, 50, .92);
	--bg-scrim: rgba(8, 13, 20, .86);
	--bg-overlay: rgba(6, 10, 16, .94);
	--thumb-band-gradient: linear-gradient(135deg, #22344a 0%, #1b2a3c 45%, rgba(47, 208, 138, .16) 100%);

	/* Typography */
	--font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--fs-h1: 45px;
	--lh-h1: 1.1;
	--tr-h1: -0.03em;
	--fs-h2: 34px;
	--lh-h2: 1.15;
	--tr-h2: -0.02em;
	--fs-h3: 26px;
	--lh-h3: 1.2;
	--tr-h3: -0.02em;
	--fs-statement: 22px;
	--lh-statement: 1.4;
	--tr-statement: -0.01em;
	--fs-lede: 19px;
	--lh-lede: 1.55;
	--fs-card-title: 17px;
	--tr-card-title: -0.01em;
	--fs-body: 16px;
	--fs-body-sm: 15px;
	--lh-body: 1.6;
	--fs-label: 11px;
	--tr-label: 0.1em;
	--tr-label-wide: 0.12em;
	--fs-metric: 30px;
	--fw-regular: 400;
	--fw-medium: 500;
	--fw-statement: 450;
	--fw-button: 650;
	--fw-bold: 700;
	--fw-black: 800;

	/* Spacing & layout */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-7: 28px;
	--space-8: 36px;
	--space-9: 48px;
	--space-10: 60px;
	--container-max: 1000px;
	--container-pad: 28px;
	--section-pad-y: 60px;
	--nav-h: 66px;
	--grid-gap: 20px;

	/* Radius & elevation */
	--radius-button: 10px;
	--radius-card: 14px;
	--radius-panel: 16px;
	--radius-pill: 999px;
	--radius-tag: 6px;
	--border-1: 1px solid var(--border-line);
	--shadow-lift: 0 10px 30px rgba(3, 8, 14, .45);
	--shadow-badge: 0 18px 44px rgba(3, 8, 14, .7);
	--blur-nav: saturate(140%) blur(10px);

	/* Motion */
	--ease-out: cubic-bezier(.2, .7, .3, 1);
	--ease-entrance: cubic-bezier(.16, .84, .32, 1);
	--dur-fast: 120ms;
	--dur: 180ms;
	--dur-reveal: 600ms;
	--dur-reveal-slow: 900ms;
	--stagger: 80ms;
	--travel-reveal: 16px;
}

/* ==========================================================================
   3. Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg-page);
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
	color: var(--text-heading);
	font-weight: var(--fw-black);
	margin: 0;
	text-wrap: pretty;
}

h1 {
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
	letter-spacing: var(--tr-h1);
}

h2 {
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: var(--tr-h2);
}

h3 {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--tr-h3);
}

p {
	margin: 0 0 var(--space-4);
}

a {
	color: var(--link);
	text-decoration: none;
}

a:hover {
	color: var(--accent-hover);
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

button {
	font-family: inherit;
}

.jl-screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal;
}

.jl-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: var(--space-3) var(--space-5);
	background: var(--accent);
	color: var(--text-on-accent);
	font-weight: var(--fw-button);
	border-radius: 0 0 var(--radius-button) 0;
}

.jl-skip-link:focus {
	left: 0;
	text-decoration: none;
	color: var(--text-on-accent);
}

/* ==========================================================================
   4. Layout primitives
   ========================================================================== */

.jl-container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-pad);
}

.jl-section {
	padding: var(--section-pad-y) 0;
}

.jl-section--ruled {
	border-top: var(--border-1);
}

.jl-label {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-secondary);
	line-height: 1.3;
}

.jl-eyebrow {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--accent);
	line-height: 1.3;
}

.jl-lede {
	font-size: var(--fs-lede);
	line-height: var(--lh-lede);
	color: var(--text-body);
	text-wrap: pretty;
}

.jl-measure {
	max-width: 62ch;
}

/* ==========================================================================
   5. Buttons, tags, links
   ========================================================================== */

.jl-btn {
	font-family: inherit;
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-button);
	line-height: 1;
	padding: 13px 24px;
	border-radius: var(--radius-button);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	transition: filter var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.jl-btn:hover {
	text-decoration: none;
}

.jl-btn--primary {
	background: var(--accent);
	color: var(--text-on-accent);
}

.jl-btn--primary:hover {
	filter: brightness(1.08);
	color: var(--text-on-accent);
}

.jl-btn--ghost {
	background: transparent;
	color: var(--text-heading);
	border-color: var(--border-line);
}

.jl-btn--ghost:hover {
	border-color: var(--accent);
	color: var(--text-heading);
}

.jl-btn--block {
	width: 100%;
}

.jl-btn svg {
	flex: none;
}

.jl-tag {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label);
	line-height: 1;
	color: var(--text-secondary);
	border: var(--border-1);
	border-radius: var(--radius-tag);
	padding: 6px 10px;
	display: inline-flex;
	align-items: center;
}

.jl-tag--accent {
	color: var(--accent);
}

.jl-textlink {
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-medium);
	color: var(--accent);
	white-space: nowrap;
}

.jl-textlink--muted {
	color: var(--text-secondary);
}

.jl-textlink--muted:hover {
	color: var(--text-heading);
}

/* ==========================================================================
   6. Site header
   ========================================================================== */

.jl-header {
	position: sticky;
	top: 0;
	z-index: 10;
	min-height: var(--nav-h);
	background: var(--bg-nav);
	-webkit-backdrop-filter: var(--blur-nav);
	backdrop-filter: var(--blur-nav);
	border-bottom: var(--border-1);
}

.jl-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: var(--nav-h);
}

.jl-brand {
	display: flex;
	flex-direction: column;
	gap: 3px;
	text-decoration: none;
}

.jl-brand:hover {
	text-decoration: none;
}

.jl-brand__mark {
	color: var(--text-heading);
	font-weight: var(--fw-black);
	font-size: var(--fs-body);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.jl-brand__dot {
	color: var(--accent);
}

.jl-brand__tagline {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label);
	color: var(--accent);
	line-height: 1.2;
}

.jl-brand .custom-logo {
	max-height: 40px;
	width: auto;
}

.jl-nav {
	display: flex;
	gap: var(--space-6);
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-medium);
	flex: 0 0 auto;
}

.jl-nav ul {
	display: flex;
	gap: var(--space-6);
	list-style: none;
	margin: 0;
	padding: 0;
}

.jl-nav a {
	color: var(--text-secondary);
	text-decoration: none;
	transition: color var(--dur-fast) var(--ease-out);
}

.jl-nav a:hover,
.jl-nav .current-menu-item > a,
.jl-nav .current_page_item > a,
.jl-nav .current-menu-parent > a {
	color: var(--text-heading);
	text-decoration: none;
}

/* ==========================================================================
   7. Project card
   ========================================================================== */

.jl-card {
	background: var(--surface-card);
	border: var(--border-1);
	border-radius: var(--radius-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.jl-card:hover,
.jl-card:focus-within {
	border-color: var(--accent);
	transform: translateY(-4px);
	box-shadow: var(--shadow-lift);
}

.jl-card__band {
	height: 110px;
	background: var(--thumb-band-gradient);
	background-size: cover;
	background-position: center;
	flex: none;
}

.jl-card__band img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jl-card__body {
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	flex: 1;
}

.jl-card__format {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label);
	color: var(--accent);
	line-height: 1.3;
}

.jl-card__title {
	font-size: var(--fs-card-title);
	letter-spacing: var(--tr-card-title);
	line-height: 1.3;
	font-weight: var(--fw-black);
	color: var(--text-heading);
	margin: 0;
}

.jl-card__title a {
	color: inherit;
	text-decoration: none;
}

.jl-card__title a:hover {
	color: inherit;
	text-decoration: none;
}

/* Whole-card click target without nesting interactive elements. */
.jl-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.jl-card__desc {
	margin: 0;
	font-size: var(--fs-body-sm);
	color: var(--text-secondary);
}

.jl-card__impact {
	margin-top: auto;
	padding-top: var(--space-4);
	border-top: var(--border-1);
	font-size: var(--fs-body-sm);
}

.jl-card__impact-label {
	color: var(--text-secondary);
	font-weight: var(--fw-bold);
}

.jl-card__impact-value {
	color: var(--text-body);
}

.jl-grid {
	display: grid;
	gap: var(--grid-gap);
}

.jl-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

.jl-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.jl-empty {
	border: 1px dashed var(--border-line);
	border-radius: var(--radius-card);
	padding: var(--space-9) var(--space-6);
	text-align: center;
	color: var(--text-secondary);
}

/* ==========================================================================
   8. Home — hero
   ========================================================================== */

.jl-hero {
	padding: 88px 0 72px;
}

.jl-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	gap: 0;
	align-items: center;
}

.jl-hero__text {
	display: flex;
	flex-direction: column;
	gap: 22px;
	position: relative;
	z-index: 1;
	padding-right: var(--space-6);
}

.jl-hero__title {
	margin: 0;
	max-width: 17ch;
}

.jl-hero__lede {
	margin: 0;
	max-width: 52ch;
}

.jl-hero__actions {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
	margin-top: var(--space-1);
}

.jl-graph {
	display: flex;
	justify-content: flex-end;
}

.jl-graph svg {
	display: block;
	width: 100%;
	height: auto;
	max-width: 300px;
	margin-left: auto;
	opacity: .6;
	transition: opacity var(--dur) var(--ease-out);
}

.jl-graph svg:hover {
	opacity: 1;
}

/* Orchestrated entrance — one sequence per page. */
@keyframes jl-reveal {
	from {
		opacity: 0;
		transform: translateY(var(--travel-reveal));
	}

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

[data-reveal] {
	animation: jl-reveal var(--dur-reveal) var(--ease-entrance) both;
}

[data-reveal='1'] {
	animation-delay: var(--stagger);
}

[data-reveal='2'] {
	animation-delay: calc(var(--stagger) * 2);
}

[data-reveal='3'] {
	animation-delay: calc(var(--stagger) * 3);
}

/* ==========================================================================
   9. Home — selected work & approach
   ========================================================================== */

.jl-sectionhead {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: var(--space-6);
	flex-wrap: wrap;
}

.jl-sectionhead__title {
	margin: var(--space-4) 0 0;
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--tr-h3);
}

.jl-work__grid {
	margin-top: 32px;
}

.jl-approach__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: start;
}

.jl-approach__statement {
	margin: var(--space-5) 0 0;
	max-width: 24ch;
	font-size: var(--fs-statement);
	font-weight: var(--fw-statement);
	line-height: var(--lh-statement);
	color: var(--text-heading);
	text-wrap: pretty;
}

.jl-approach__cta {
	margin-top: var(--space-6);
}

.jl-principles {
	display: grid;
	gap: var(--space-5);
}

.jl-principle {
	border-top: var(--border-1);
	padding-top: var(--space-4);
}

.jl-principle__title {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--accent);
	line-height: 1.3;
}

.jl-principle p {
	margin: var(--space-2) 0 0;
	max-width: 62ch;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

/* ==========================================================================
   10. Work index
   ========================================================================== */

.jl-index {
	padding: 72px 0 0;
}

.jl-index__title {
	margin: 18px 0 0;
	max-width: 20ch;
}

.jl-index__intro {
	margin: var(--space-5) 0 0;
	max-width: 56ch;
}

.jl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: 28px;
}

.jl-chip {
	font-family: inherit;
	font-size: 12px;
	font-weight: var(--fw-bold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 7px 14px;
	border-radius: var(--radius-tag);
	cursor: pointer;
	background: none;
	border: var(--border-1);
	color: var(--text-secondary);
	text-decoration: none;
	line-height: 1.3;
	transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.jl-chip:hover {
	color: var(--text-heading);
	text-decoration: none;
}

.jl-chip.is-active {
	border-color: var(--accent);
	color: var(--accent);
}

.jl-index__results {
	border-top: var(--border-1);
	margin-top: 44px;
	padding: 44px 0 var(--section-pad-y);
}

.jl-card.is-hidden {
	display: none;
}

/* ==========================================================================
   11. Case study
   ========================================================================== */

.jl-case {
	padding: 40px 0 0;
}

.jl-case__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-4);
	flex-wrap: wrap;
}

.jl-case__buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.jl-case__format {
	margin-top: 32px;
}

.jl-case__title {
	margin: 18px 0 0;
	max-width: 22ch;
}

.jl-case__meta {
	margin: 18px 0 0;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--text-secondary);
}

.jl-tabsection {
	border-top: var(--border-1);
	margin-top: 40px;
}

/* The tab section reserves a fixed band at the top for the hint to float in. The hint
   is absolutely positioned inside it, so dismissing it moves nothing — the tabs sit
   where they will always sit, from first paint onwards. */
.jl-tabsection .jl-container {
	position: relative;
	padding-top: 62px;
}

/* The hint is transient — it fades in once, then dismisses itself on first tab use —
   so it carries a brighter border and a raised surface to be noticed while it is there. */
.jl-tabhint {
	position: absolute;
	top: 0;
	left: var(--container-pad);
	display: inline-flex;
	margin-bottom: 0;
	padding: 10px var(--space-4);
	border: 1px solid var(--border-line-strong);
	border-radius: var(--radius-card);
	background: var(--surface-raised);
	box-shadow: var(--shadow-lift);
	font-size: var(--fs-body-sm);
	line-height: 1.5;
	color: var(--text-heading);
	animation: jl-reveal var(--dur-reveal) var(--ease-entrance) calc(var(--stagger) * 2) both;
	transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.jl-tabhint::after {
	content: '';
	position: absolute;
	left: 26px;
	bottom: -7px;
	width: 12px;
	height: 12px;
	background: var(--surface-raised);
	border-right: 1px solid var(--border-line-strong);
	border-bottom: 1px solid var(--border-line-strong);
	transform: rotate(45deg);
}

/* Dismissed: fade out, then the template's JS takes it out of the flow. Only opacity
   and transform animate — the layout change itself is instant, never tweened. */
.jl-tabhint.is-dismissed {
	opacity: 0;
	transform: translateY(-4px);
	pointer-events: none;
}

.jl-tabhint[hidden] {
	display: none;
}

.jl-tabs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-bottom: var(--border-1);
}

.jl-tabs[data-count='1'] {
	grid-template-columns: 1fr;
}

.jl-tabs[data-count='2'] {
	grid-template-columns: repeat(2, 1fr);
}

.jl-tabs[data-count='3'] {
	grid-template-columns: repeat(3, 1fr);
}

.jl-tab {
	font-family: inherit;
	text-align: left;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: var(--space-5) var(--space-5) 18px 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 7px;
	transition: border-color var(--dur) var(--ease-out);
}

.jl-tab__num {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-secondary);
	transition: color var(--dur) var(--ease-out);
}

.jl-tab__label {
	font-size: var(--fs-body);
	font-weight: var(--fw-button);
	letter-spacing: -0.01em;
	color: var(--text-secondary);
	transition: color var(--dur) var(--ease-out);
}

.jl-tab[aria-selected='true'] {
	border-bottom-color: var(--accent);
}

.jl-tab[aria-selected='true'] .jl-tab__num {
	color: var(--accent);
}

.jl-tab[aria-selected='true'] .jl-tab__label {
	color: var(--text-heading);
}

.jl-panels {
	padding: 44px 0 var(--section-pad-y);
}

.jl-panel[hidden] {
	display: none;
}

.jl-rows {
	display: grid;
	gap: 28px;
}

.jl-row {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: var(--space-6);
}

.jl-row--ruled {
	border-top: var(--border-1);
	padding-top: 28px;
}

.jl-row__label {
	padding-top: var(--space-1);
}

.jl-row p {
	margin: 0;
	max-width: 62ch;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.jl-triple {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--grid-gap);
}

.jl-triple--ruled {
	border-top: var(--border-1);
	padding-top: 28px;
}

.jl-step__title {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--accent);
	line-height: 1.3;
}

.jl-step p {
	margin: 10px 0 0;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.jl-metric__value {
	font-size: var(--fs-metric);
	font-weight: var(--fw-black);
	letter-spacing: -0.02em;
	color: var(--accent);
	line-height: 1.05;
}

.jl-metric__label {
	margin-top: var(--space-2);
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-secondary);
}

.jl-taglist {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

/* ==========================================================================
   12. Artefact carousel
   ========================================================================== */

/* Splide injects its arrows and pagination as children of the mount, so the mount is
   the positioning context for the absolutely-placed arrows. */
.jl-carousel {
	position: relative;
}

.jl-carousel__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-6);
}

.jl-carousel__frame {
	position: relative;
	margin-top: var(--space-5);
	border: var(--border-1);
	border-radius: var(--radius-panel);
	overflow: hidden;
}

.jl-slide {
	height: 420px;
	background: var(--thumb-band-gradient);
	display: flex;
	align-items: flex-end;
	padding: var(--space-6);
	position: relative;
}

.jl-slide img,
.jl-slide video,
.jl-slide iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	display: block;
}

/* Captions sit over arbitrary screenshots, so they run in heading white on a scrim
   rather than secondary grey — over a bright image the old treatment lost its contrast. */
.jl-slide__caption {
	position: relative;
	z-index: 1;
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-heading);
}

.jl-slide--media .jl-slide__caption {
	background: var(--bg-scrim);
	-webkit-backdrop-filter: var(--blur-nav);
	backdrop-filter: var(--blur-nav);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-tag);
	pointer-events: none;
}

/* The whole image is the zoom target, as a real button so it is keyboard-reachable. */
.jl-slide__zoom {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	display: block;
}

.jl-slide__zoom:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: -4px;
}

.jl-slide--launch {
	background: var(--surface-panel);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-4);
	text-align: center;
}

.jl-slide--launch p {
	margin: 0;
}

.jl-slide__heading {
	max-width: 34ch;
	font-size: var(--fs-statement);
	font-weight: var(--fw-statement);
	line-height: var(--lh-statement);
	color: var(--text-heading);
}

.jl-slide__note {
	font-size: var(--fs-body-sm);
	color: var(--text-secondary);
}

.jl-carousel .splide__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: var(--radius-button);
	border: var(--border-1);
	background: var(--bg-nav);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--text-heading);
	font-size: var(--fs-body);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: border-color var(--dur) var(--ease-out);
	opacity: 1;
	padding: 0;
}

.jl-carousel .splide__arrow:hover:not(:disabled) {
	border-color: var(--accent);
}

.jl-carousel .splide__arrow:disabled {
	opacity: .4;
	cursor: default;
}

.jl-carousel .splide__arrow--prev {
	left: var(--space-4);
}

/* splide-core carries no arrow styling at all, so the chevron needs its colour, its
   size and — since Splide ships one glyph and mirrors it — its flip set here. Without
   this the arrows render as oversized solid-black chevrons both pointing right. */
.jl-carousel .splide__arrow svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.jl-carousel .splide__arrow--prev svg {
	transform: scaleX(-1);
}

.jl-carousel .splide__arrow--next {
	right: var(--space-4);
}

.jl-carousel .splide__pagination {
	display: flex;
	gap: 6px;
	margin: var(--space-4) 0 0;
	padding: 0;
	list-style: none;
	position: static;
}

.jl-carousel .splide__pagination__page {
	height: 4px;
	width: 6px;
	border: 0;
	padding: 0;
	border-radius: 2px;
	background: var(--border-line);
	cursor: pointer;
	transition: width var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}

.jl-carousel .splide__pagination__page.is-active {
	width: 20px;
	background: var(--accent);
}

/* ==========================================================================
   12b. Lightbox — full-size carousel images
   ==========================================================================
   Built by main.js on first use. The carousel crops its slides to a 420px band, so
   this is where an artefact is actually read: the image shows uncropped, with its
   caption, and the arrows page through the other images in the same carousel. */

.jl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 72px var(--space-9);
	background: var(--bg-overlay);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity var(--dur) var(--ease-out);
}

.jl-lightbox.is-open {
	opacity: 1;
}

.jl-lightbox[hidden] {
	display: none;
}

.jl-lightbox__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-5);
	max-width: 100%;
	max-height: 100%;
}

.jl-lightbox__figure img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 200px);
	object-fit: contain;
	border: var(--border-1);
	border-radius: var(--radius-panel);
	background: var(--surface-panel);
}

.jl-lightbox__caption {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-heading);
	text-align: center;
	max-width: 62ch;
}

.jl-lightbox__counter {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-secondary);
}

/* Same chrome as the carousel arrows, so the two read as one control language. */
.jl-lightbox__btn {
	position: absolute;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-button);
	border: var(--border-1);
	background: var(--bg-nav);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: var(--text-heading);
	font-size: var(--fs-body);
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: border-color var(--dur) var(--ease-out);
}

.jl-lightbox__btn:hover {
	border-color: var(--accent);
}

.jl-lightbox__btn[hidden] {
	display: none;
}

.jl-lightbox__close {
	top: var(--space-6);
	right: var(--space-6);
}

.jl-lightbox__prev,
.jl-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.jl-lightbox__prev {
	left: var(--space-6);
}

.jl-lightbox__next {
	right: var(--space-6);
}

body.jl-lightbox-open {
	overflow: hidden;
}

@media (max-width: 760px) {
	.jl-lightbox {
		padding: 64px var(--space-4);
	}

	.jl-lightbox__prev {
		left: var(--space-3);
	}

	.jl-lightbox__next {
		right: var(--space-3);
	}
}

/* ==========================================================================
   13. About
   ========================================================================== */

.jl-about {
	padding: var(--space-9) 0 0;
}

.jl-about__intro {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: var(--space-9);
	align-items: center;
}

/* Circular portrait, matching the contact badge's avatar so the same upload reads as
   the same shape in both places. The frame is square so the circle stays a circle. */
.jl-photo {
	border: var(--border-1);
	border-radius: 50%;
	background: var(--thumb-band-gradient);
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 14px;
	overflow: hidden;
	position: relative;
}

.jl-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jl-about__title {
	margin: 18px 0 0;
	max-width: 20ch;
}

.jl-about__lede {
	margin: 22px 0 0;
	max-width: 56ch;
}

.jl-about__section {
	border-top: var(--border-1);
	padding: 44px 0;
}

.jl-about__section--first {
	margin-top: var(--section-pad-y);
}

.jl-about__story {
	display: grid;
	gap: var(--space-4);
	max-width: 62ch;
}

.jl-about__story p {
	margin: 0;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.jl-about__story p:last-child {
	margin-bottom: 0;
}

.jl-do__title {
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--accent);
	line-height: 1.3;
}

.jl-do p {
	margin: 10px 0 0;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.jl-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.jl-footer {
	border-top: var(--border-1);
	padding: var(--space-8) 0;
}

.jl-footer__inner {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-6);
	flex-wrap: wrap;
	font-size: var(--fs-body-sm);
	color: var(--text-secondary);
}

.jl-footer__name {
	color: var(--text-heading);
	font-weight: var(--fw-black);
}

/* ==========================================================================
   15. "Let's talk" contact badge
   ========================================================================== */

.jl-badge {
	position: fixed;
	left: 28px;
	bottom: 28px;
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
}

.jl-badge__card {
	width: 372px;
	max-width: calc(100vw - 32px);
	border: var(--border-1);
	border-radius: var(--radius-panel);
	background: var(--surface-raised);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	box-shadow: var(--shadow-badge);
}

.jl-badge__card[hidden] {
	display: none;
}

.jl-badge__head {
	display: flex;
	gap: 14px;
	align-items: center;
}

.jl-badge__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex: none;
	background: var(--thumb-band-gradient);
	border: var(--border-1);
	overflow: hidden;
}

.jl-badge__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jl-badge__identity {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.jl-badge__name {
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-black);
	color: var(--text-heading);
}

.jl-badge__note {
	font-size: 14px;
	color: var(--text-secondary);
}

.jl-badge__close {
	background: none;
	border: 0;
	color: var(--text-secondary);
	font-size: var(--fs-body-sm);
	cursor: pointer;
	padding: 0;
	line-height: 1;
	align-self: flex-start;
	transition: color var(--dur-fast) var(--ease-out);
}

.jl-badge__close:hover {
	color: var(--text-heading);
}

.jl-badge__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.jl-badge__buttons .jl-btn {
	width: 100%;
	padding: 11px var(--space-4);
}

.jl-badge__pill {
	font-family: inherit;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-2) var(--space-5) var(--space-2) var(--space-2);
	border-radius: var(--radius-pill);
	border: var(--border-1);
	background: var(--bg-pill);
	-webkit-backdrop-filter: var(--blur-nav);
	backdrop-filter: var(--blur-nav);
	cursor: pointer;
	transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.jl-badge__pill:hover {
	border-color: var(--accent);
	transform: translateY(-3px);
}

.jl-badge__pill-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	flex: none;
	background: var(--thumb-band-gradient);
	border: var(--border-1);
	overflow: hidden;
}

.jl-badge__pill-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jl-badge__pill-label {
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-bold);
	color: var(--text-heading);
}

/* ==========================================================================
   16. Editor output — .entry-content (page.php / single.php)
   ========================================================================== */

.jl-entry {
	padding: var(--space-9) 0 var(--section-pad-y);
}

.jl-entry__header {
	margin-bottom: var(--space-8);
}

.jl-entry__meta {
	margin-top: var(--space-4);
	font-size: var(--fs-body-sm);
	color: var(--text-secondary);
}

.jl-entry__thumb {
	margin: var(--space-8) 0;
	border: var(--border-1);
	border-radius: var(--radius-panel);
	overflow: hidden;
}

.jl-entry__thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-content {
	max-width: 68ch;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.entry-content > * + * {
	margin-top: var(--space-5);
}

.entry-content h2 {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--tr-h3);
	margin-top: var(--space-9);
}

.entry-content h3 {
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin-top: var(--space-8);
}

.entry-content h4 {
	font-size: var(--fs-body);
	margin-top: var(--space-6);
}

.entry-content p {
	margin: 0;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25em;
	margin: 0;
}

.entry-content li + li {
	margin-top: var(--space-2);
}

.entry-content blockquote {
	margin: 0;
	padding-left: var(--space-5);
	border-left: 2px solid var(--accent);
	color: var(--text-heading);
	font-size: var(--fs-lede);
	line-height: var(--lh-lede);
	font-weight: var(--fw-statement);
}

.entry-content blockquote cite {
	display: block;
	margin-top: var(--space-3);
	font-size: var(--fs-body-sm);
	font-style: normal;
	color: var(--text-secondary);
}

.entry-content img,
.entry-content figure img {
	border-radius: var(--radius-card);
	display: block;
}

.entry-content figure {
	margin: 0;
}

.entry-content figcaption {
	margin-top: var(--space-3);
	font-size: var(--fs-label);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
	color: var(--text-secondary);
}

.entry-content hr {
	border: 0;
	border-top: var(--border-1);
	margin: var(--space-9) 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-body-sm);
}

.entry-content th,
.entry-content td {
	text-align: left;
	padding: var(--space-3) var(--space-4);
	border-bottom: var(--border-1);
}

.entry-content th {
	color: var(--text-heading);
	font-weight: var(--fw-bold);
	font-size: var(--fs-label);
	text-transform: uppercase;
	letter-spacing: var(--tr-label-wide);
}

.entry-content code,
.entry-content pre {
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
	font-size: 14px;
}

.entry-content pre {
	background: var(--surface-panel);
	border: var(--border-1);
	border-radius: var(--radius-card);
	padding: var(--space-5);
	overflow-x: auto;
}

.entry-content .wp-caption,
.entry-content .alignwide,
.entry-content .alignfull {
	max-width: 100%;
}

.entry-content .alignleft {
	float: left;
	margin: 0 var(--space-5) var(--space-4) 0;
}

.entry-content .alignright {
	float: right;
	margin: 0 0 var(--space-4) var(--space-5);
}

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* Archive / pagination */
.jl-postlist {
	display: grid;
	gap: var(--space-8);
}

.jl-postlist__item {
	border-top: var(--border-1);
	padding-top: var(--space-6);
}

.jl-postlist__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.jl-postlist__title {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--tr-h3);
}

.jl-postlist__title a {
	color: var(--text-heading);
}

.jl-postlist__title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.navigation.pagination {
	margin-top: var(--space-9);
	border-top: var(--border-1);
	padding-top: var(--space-6);
}

.navigation.pagination .nav-links {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
	font-size: var(--fs-body-sm);
	font-weight: var(--fw-bold);
}

.navigation.pagination .page-numbers {
	padding: 6px 12px;
	border: var(--border-1);
	border-radius: var(--radius-tag);
	color: var(--text-secondary);
}

.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers.current {
	border-color: var(--accent);
	color: var(--accent);
	text-decoration: none;
}

/* Search form */
.jl-search {
	display: flex;
	gap: var(--space-2);
	max-width: 420px;
}

.jl-search input[type='search'] {
	flex: 1;
	font-family: inherit;
	font-size: var(--fs-body-sm);
	padding: 12px var(--space-4);
	border-radius: var(--radius-button);
	border: var(--border-1);
	background: var(--surface-panel);
	color: var(--text-heading);
}

.jl-search input[type='search']::placeholder {
	color: var(--text-secondary);
}

/* ==========================================================================
   17. Prose — multi-paragraph plain-text fields
   ==========================================================================
   These fields are plain textareas, so a blank line is the author's only way to
   start a new paragraph. The wrapper carries the type styling and the paragraphs
   inherit it; the rules here only restore the spacing between them, and they sit
   after the section rules above so they win the specificity tie against
   `.jl-row p`, `.jl-step p` and friends. */

.jl-prose p {
	margin: 0 0 var(--space-4);
}

.jl-prose p:last-child {
	margin-bottom: 0;
}

/* The gap that used to live on the first paragraph now belongs to the wrapper. */
.jl-principle .jl-prose {
	margin-top: var(--space-2);
}

.jl-step .jl-prose,
.jl-do .jl-prose {
	margin-top: 10px;
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1024px) and (orientation: portrait) {
	.jl-graph {
		display: none;
	}
}

@media (max-width: 900px) {
	.jl-graph svg {
		margin-left: 0;
	}

	.jl-hero__grid {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	}
}

@media (max-width: 760px) {
	.jl-hero__grid,
	.jl-approach__grid {
		grid-template-columns: 1fr;
		gap: var(--space-8);
	}

	.jl-hero__text {
		padding-right: 0;
	}

	.jl-graph {
		display: none;
	}

	.jl-grid--3,
	.jl-grid--2 {
		grid-template-columns: 1fr;
	}

	.jl-tabs {
		grid-template-columns: 1fr 1fr;
	}

	.jl-row,
	.jl-about__intro,
	.jl-triple {
		grid-template-columns: 1fr;
		gap: var(--space-3);
	}

	.jl-about__intro {
		gap: var(--space-8);
	}

	.jl-photo {
		max-width: 300px;
	}

	.jl-badge {
		left: var(--space-4);
		bottom: var(--space-4);
	}

	.jl-brand__tagline {
		font-size: 9.5px;
		letter-spacing: 0.06em;
		line-height: 1.3;
		max-width: 170px;
		white-space: normal;
	}

	.jl-slide {
		height: 300px;
	}

	/* Narrow screens wrap the hint to two or three lines, and a fixed band cannot know
	   how tall it will be — so below this width it returns to normal flow. The tabs
	   still shift when it dismisses here, which is the lesser evil against a bubble
	   overlapping the tabs it is pointing at. */
	.jl-tabsection .jl-container {
		padding-top: 0;
	}

	.jl-tabhint {
		position: static;
		margin-bottom: 18px;
	}
}

@media (max-width: 640px) {
	.jl-container {
		padding-left: var(--space-5);
		padding-right: var(--space-5);
	}

	.jl-nav,
	.jl-nav ul {
		gap: var(--space-4);
		font-size: 14px;
	}

	h1 {
		font-size: clamp(32px, 9vw, 44px);
	}

	.jl-hero {
		padding: 56px 0 48px;
	}

	.jl-badge__buttons {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   19. Reduced motion — mandatory branch
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: var(--dur-fast) !important;
	}

	[data-reveal] {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.jl-card:hover {
		transform: none;
	}

	.jl-badge__pill:hover {
		transform: none;
	}
}
