/* AI Experts: archive cards + profile pages. Loaded only where used.
   Fixed dark Samurai palette and geometry. */
.ex-archive, .ex-profile, .ex-shortcode {
	--ex-accent: var(--c-crimson, #d7263d); --ex-radius: 16px; --ex-ink: #eef0f4; --ex-muted: #abb4c0;
	--ex-line: #29323b; --ex-soft: #151c23; --ex-card: #10171c;
	--ex-shadow: 0 1px 2px rgb(16 18 27 / 6%), 0 14px 34px -14px rgb(16 18 27 / 22%);
}
.ex-archive a, .ex-profile a { color: inherit; }
.ex-badge, .ex-tags li, .ex-chips li, .ex-filters a { line-height: 1.2; }

/* ---------- Archive header ---------- */
.ex-head { padding-block: clamp(2rem, 6vw, 4rem) 1.25rem; }
.ex-head--hero { color: #fff; background: radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--ex-accent) 45%, #0b0b0f), transparent 60%), linear-gradient(135deg, #0b0b0f, #1c1d27); border-block-end: 4px solid var(--ex-accent); }
.ex-head__title { margin: .25rem 0 .5rem; font-size: clamp(2rem, 5vw + 1rem, 3.75rem); letter-spacing: -.02em; }
.ex-head__intro { max-inline-size: 62ch; font-size: 1.1rem; opacity: .85; }
.ex-head__intro p { margin-block: 0 .75em; }
.ex-head__count { margin: 0 0 1.25rem; opacity: .8; }
.ex-head__count strong { color: var(--ex-accent); font-size: 1.15em; }
.ex-head--hero .ex-head__count strong { color: #fff; }
.ex-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; opacity: .8; margin-block-end: .5rem; }
.ex-crumbs a { text-decoration: none; }
.ex-crumbs a:hover { text-decoration: underline; }

.ex-search { position: relative; display: flex; align-items: center; max-inline-size: 460px; margin-block-end: 1rem; }
.ex-search .icon { position: absolute; inset-inline-start: 1rem; opacity: .55; color: var(--ex-ink); pointer-events: none; }
.ex-search input { inline-size: 100%; padding: .85rem 1rem; padding-inline-start: 2.75rem; border: 1px solid transparent; border-radius: 999px; background: #fff; color: var(--ex-ink); font: inherit; box-shadow: 0 6px 20px rgb(0 0 0 / 14%); }
.ex-search input:focus { outline: 3px solid color-mix(in srgb, var(--ex-accent) 55%, transparent); }
.ex-search input[type="search"] { padding-inline:1rem 6rem; }
.ex-search button { position:absolute; inset-block-start:50%; transform:translateY(-50%); display:grid; place-items:center; inline-size:44px; block-size:44px; padding:0; border:0; border-radius:50%; background:transparent; color:inherit; cursor:pointer; }
.ex-search button[hidden] { display:none; }
.ex-search__submit { inset-inline-end:.35rem; }
.ex-search__clear { inset-inline-end:3.1rem; }
.ex-search button .icon { position:static; opacity:1; inline-size:19px; block-size:19px; }
.ex-search button:focus-visible { outline:2px solid currentColor; outline-offset:-3px; }
.ex-search button:hover { background:rgb(127 127 127 / 15%); }

.ex-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.ex-filters a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border: 1px solid var(--ex-line); border-radius: 999px; background: rgb(255 255 255 / 70%); color: var(--ex-ink); font-weight: 600; font-size: .9rem; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.ex-filters a span { padding: 0 .45rem; border-radius: 999px; background: var(--ex-soft); font-size: .75rem; }
.ex-filters a:hover { border-color: var(--ex-accent); }
.ex-filters a[aria-current="true"] { background: var(--ex-accent); border-color: var(--ex-accent); color: #fff; }
.ex-filters a[aria-current="true"] span { background: rgb(255 255 255 / 25%); color: #fff; }

/* ---------- Grid + cards ---------- */
.ex-body { padding-block: 2rem 4rem; }
.ex-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ex-cols-1 { --cols: 1; } .ex-cols-2 { --cols: 2; } .ex-cols-3 { --cols: 3; } .ex-cols-4 { --cols: 4; }
@media (max-width: 1100px) { .ex-cols-3, .ex-cols-4 { --cols: 2; } }
@media (max-width: 640px) { .ex-grid { --cols: 1 !important; } }
.ex-empty { padding: 3rem 0; text-align: center; color: var(--ex-muted); font-size: 1.1rem; }

/* Expert directory: an editorial “spotlight” rather than a generic card grid. */
body.post-type-archive-expert { background-color:#0b1118; background-image:linear-gradient(180deg,rgb(8 14 20 / 66%),rgb(8 14 20 / 84%) 42%,rgb(8 14 20 / 93%)),var(--ex-archive-bg,none); background-position:center,center top; background-size:cover,min(100vw,1440px) auto; background-repeat:no-repeat; background-attachment:fixed; }
body.post-type-archive-expert .site-footer--cinema { margin-block-start:0; background:linear-gradient(180deg,rgb(8 14 20 / 72%),rgb(8 14 20 / 90%)); }
body.post-type-archive-expert .footer-scene { display:none; }
.ex-archive { position:relative; overflow:hidden; color:#edf2f7; background-color:#0b1118; background-image:linear-gradient(180deg,rgb(8 14 20 / 66%),rgb(8 14 20 / 84%) 42%,rgb(8 14 20 / 93%)),var(--ex-archive-bg,none); background-position:center,center top; background-size:cover,min(100vw,1440px) auto; background-repeat:no-repeat; background-attachment:scroll,fixed; }
.ex-archive .ex-head--hero { position:relative; isolation:isolate; overflow:hidden; padding-block:clamp(3.25rem,7vw,6rem) 2.25rem; border:0; background:radial-gradient(ellipse at 84% 8%,rgb(215 38 61 / 18%),transparent 38%),linear-gradient(125deg,rgb(17 28 39 / 50%),rgb(11 17 24 / 24%)); }
.ex-archive .ex-head--hero::after { content:""; position:absolute; z-index:-1; inset-block-start:-10rem; inset-inline-start:-8rem; inline-size:30rem; aspect-ratio:1; border:1px solid rgb(255 255 255 / 5%); border-radius:50%; box-shadow:0 0 0 3rem rgb(255 255 255 / 1.3%),0 0 0 6rem rgb(255 255 255 / .8%); pointer-events:none; }
.ex-archive .ex-head--hero > .container { position:relative; display:grid; grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr); align-items:end; column-gap:clamp(2rem,7vw,7rem); }
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) { grid-template-columns:minmax(0,1fr); justify-items:center; text-align:center; }
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) .ex-crumbs { justify-content:center; }
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) .ex-head__title,
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) .ex-head__intro,
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) .ex-filters { grid-column:1; justify-self:center; }
.ex-archive .ex-head--hero > .container:not(:has(.ex-search)) .ex-filters { justify-content:center; }
.ex-archive .ex-crumbs { grid-column:1; grid-row:1; margin-block:0 .5rem; }
.ex-archive .ex-head__title { grid-column:1; grid-row:2; max-width:12ch; margin-block:.25rem .65rem; font-size:clamp(2.8rem,7vw,5.4rem); line-height:1.02; letter-spacing:-.045em; }
.ex-archive .ex-head__intro { grid-column:1; grid-row:3; max-width:48ch; color:#bac6d2; font-size:1rem; line-height:1.8; }
.ex-archive .ex-search { grid-column:2; grid-row:2 / span 3; inline-size:100%; max-inline-size:460px; justify-self:start; align-self:center; margin:0; }
.ex-archive .ex-search input { min-height:56px; padding-inline:3rem 1.25rem; border-color:rgb(255 255 255 / 12%); background:#18232e; color:#f5f7fa; box-shadow:0 18px 42px rgb(0 0 0 / 24%); }
.ex-archive .ex-search input[type="search"] { padding-inline:1.25rem 6rem; }
.ex-archive .ex-search input::placeholder { color:#9aa8b6; }
.ex-archive .ex-search .icon { color:#b7c3d0; }
.ex-archive .ex-filters { grid-column:1; grid-row:4; justify-self:start; margin-block-start:1.15rem; }
.ex-archive .ex-filters a { border-color:rgb(255 255 255 / 15%); background:rgb(7 13 19 / 48%); color:#d7e0e9; backdrop-filter:blur(10px); }
.ex-archive .ex-filters a span { background:rgb(255 255 255 / 9%); color:#d7e0e9; }
.ex-archive .ex-filters a[aria-current="true"] { border-color:#d7263d; background:#d7263d; color:#fff; }
.ex-archive .ex-body { position:relative; min-height:32rem; padding-block:clamp(2rem,5vw,4rem) 5rem; background:linear-gradient(180deg,rgb(8 14 20 / 20%),rgb(8 14 20 / 46%)); }
.ex-archive .ex-grid:has(> .ex-card:only-child) { grid-template-columns:minmax(0,1fr); max-inline-size:1060px; margin-inline:auto; }
.ex-archive .ex-grid > .ex-card:only-child { display:grid; grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr); align-items:stretch; min-block-size:390px; border-color:#354554; border-radius:22px; background:linear-gradient(135deg,#17232e,#101820 72%); box-shadow:0 30px 80px -44px rgb(0 0 0 / 85%),inset 0 1px 0 rgb(255 255 255 / 5%); }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__photo { min-block-size:100%; aspect-ratio:auto; background:#131c25; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__photo .ex-photo { object-position:center 30%; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__body,
.ex-archive .ex-grid > .ex-card:only-child.ex-card--glass .ex-card__body { z-index:auto; justify-content:center; margin:0; padding:clamp(1.5rem,4vw,3.25rem); border:0; border-radius:0; background:transparent; box-shadow:none; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__name { font-size:clamp(2rem,4vw,3.3rem); }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__role { color:#d2dce6; font-size:1rem; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__summary { max-width:48ch; margin-block-start:1.25rem; color:#aebbc8; font-size:.95rem; line-height:1.85; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__btn { margin-block-start:2rem; padding-block-start:1rem; color:#e4ebf2; }
.ex-archive .ex-grid > .ex-card:only-child .ex-card__arrow { inline-size:36px; block-size:36px; flex-basis:36px; border-color:rgb(215 38 61 / 35%); background:rgb(215 38 61 / 10%); }
.ex-archive .ex-empty { color:#aab6c3; }
@media(max-width:760px) {
 .ex-archive .ex-head--hero > .container { grid-template-columns:minmax(0,1fr); gap:.5rem; }
 .ex-archive .ex-head__title,.ex-archive .ex-head__intro,.ex-archive .ex-search,.ex-archive .ex-filters { grid-column:1; }
 .ex-archive .ex-crumbs { grid-row:1; }
 .ex-archive .ex-head__title { grid-row:2; }
 .ex-archive .ex-head__intro { grid-row:3; }
 .ex-archive .ex-search { grid-row:4; max-inline-size:none; margin-block:1.25rem .5rem; }
 .ex-archive .ex-filters { grid-row:5; margin-block-start:.5rem; }
 .ex-archive .ex-grid > .ex-card:only-child { grid-template-columns:minmax(0,1fr); }
 .ex-archive .ex-grid > .ex-card:only-child .ex-card__photo { aspect-ratio:16 / 10; min-block-size:0; }
 .ex-archive .ex-grid > .ex-card:only-child .ex-card__body,
 .ex-archive .ex-grid > .ex-card:only-child.ex-card--glass .ex-card__body { padding:1.5rem; }
}

/* Shared portrait, status and tag primitives, also used on profiles. */
.ex-ratio-4-5 { aspect-ratio: 4 / 5; } .ex-ratio-1-1 { aspect-ratio: 1; } .ex-ratio-3-4 { aspect-ratio: 3 / 4; } .ex-ratio-16-10 { aspect-ratio: 16 / 10; }
.ex-photo { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.ex-photo--initials { display: grid; place-items: center; font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 800; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 46%), hsl(calc(var(--h) + 45) 70% 28%)); }
.ex-badges { position: absolute; inset-block-start: .75rem; inset-inline-start: .75rem; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.ex-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; background: rgb(11 11 15 / 72%); color: #fff; font-size: .72rem; font-weight: 700; backdrop-filter: blur(6px); }
.ex-badge .icon { inline-size: .95em; block-size: .95em; color: #fbbf24; fill: #fbbf24; }
.ex-badge--avail i { inline-size: .5rem; block-size: .5rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgb(34 197 94 / 60%); animation: ex-pulse 2s infinite; }
@keyframes ex-pulse { 70% { box-shadow: 0 0 0 7px rgb(34 197 94 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0%); } }
.ex-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.ex-tags li { padding: .25rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--ex-accent) 10%, transparent); color: var(--ex-accent); font-size: .76rem; font-weight: 700; }
.ex-tags--links a { display: block; padding: 0; text-decoration: none; color: inherit; }

/* ---------- Stars ---------- */
.ex-stars { position: relative; display: inline-block; direction: ltr; color: #d4d7e0; letter-spacing: 2px; font-size: .95em; line-height: 1; }
.ex-stars::before, .ex-stars span::before { content: "★★★★★"; }
.ex-stars span { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: calc(var(--r, 0) / 5 * 100%); overflow: hidden; color: #f5a623; white-space: nowrap; }

/* ---------- Social ---------- */
.ex-social { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.ex-social a { display: grid; place-items: center; inline-size: 38px; block-size: 38px; border: 1px solid var(--ex-line); border-radius: 50%; color: inherit; transition: background-color .15s, color .15s, border-color .15s; }
.ex-social a:hover { background: var(--ex-accent); border-color: var(--ex-accent); color: #fff; }

/* ---------- Profile ---------- */
.ex-profile { padding-block-end: 4rem; }
.ex-profile > .container:first-child:not(.ex-layout) { padding-block-start: 1rem; }
.ex-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.25rem); align-items: start; padding-block: 1.5rem; }
.ex-main { min-inline-size: 0; }

.ex-card-side { display: grid; gap: 1.15rem; padding: 1.25rem; border-radius: var(--ex-radius); background: var(--ex-card); box-shadow: var(--ex-shadow); }
.has-sticky .ex-card-side { position: sticky; inset-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + 96px); }

.ex-id__photo .ex-photo { aspect-ratio: 4 / 5; border-radius: calc(var(--ex-radius) - 4px); }
.ex-id__photo .ex-photo--initials { font-size: 4.5rem; }
.ex-id__text { display: grid; gap: .35rem; margin-block-start: 1rem; }
.ex-id__text .ex-badges { position: static; flex-direction: row; flex-wrap: wrap; }
.ex-id__name { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -.01em; }
.ex-id__role { margin: 0; color: var(--ex-accent); font-weight: 700; }

.ex-avail { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .9rem; border-radius: 12px; font-weight: 700; font-size: .9rem; }
.ex-avail i { flex: none; inline-size: .6rem; block-size: .6rem; border-radius: 50%; }
.ex-avail.is-on { background: #e8f9ee; color: #136c34; } .ex-avail.is-on i { background: #22c55e; animation: ex-pulse 2s infinite; }
.ex-avail.is-off { background: #f3f4f7; color: #5b6070; } .ex-avail.is-off i { background: #9aa0b0; }
.ex-details { display: grid; gap: .65rem; margin: 0; }
.ex-details div { display: flex; justify-content: space-between; gap: 1rem; padding-block-end: .65rem; border-block-end: 1px dashed var(--ex-line); }
.ex-details div:last-child { border: 0; padding: 0; }
.ex-details dt { color: var(--ex-muted); font-size: .85rem; }
.ex-details dd { margin: 0; font-weight: 700; text-align: end; }
.ex-contacts { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.ex-contacts a { display: flex; align-items: center; gap: .65rem; text-decoration: none; word-break: break-word; }
.ex-contacts a:hover { color: var(--ex-accent); }
.ex-contacts .icon { color: var(--ex-accent); }
.ex-cta { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .95rem 1.25rem; border-radius: calc(var(--ex-radius) - 4px); background: var(--ex-accent); color: #fff !important; font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--ex-accent) 70%, transparent); transition: transform .15s, box-shadow .15s; }
.ex-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px color-mix(in srgb, var(--ex-accent) 80%, transparent); }

.ex-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 0 0 2.25rem; padding: 0; list-style: none; }
.ex-stats li { display: grid; gap: .1rem; justify-items: start; padding: 1.1rem 1.25rem; border-radius: var(--ex-radius); background: var(--ex-card); box-shadow: var(--ex-shadow); }
.ex-stats strong { font-size: 2rem; line-height: 1; letter-spacing: -.02em; color: var(--ex-accent); }
.ex-stats span { color: var(--ex-muted); font-size: .82rem; font-weight: 600; }

/* ---------- Sections ---------- */
.ex-sec { margin-block-end: 2.75rem; }
.ex-sec__title { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.1rem; font-size: 1.35rem; letter-spacing: -.01em; }
.ex-sec__title::before { content: ""; inline-size: 6px; block-size: 1.2em; border-radius: 3px; background: var(--ex-accent); }
.ex-sec--wide { margin-block-start: 3rem; }
.ex-profile .entry-content { font-size: 1.05rem; }

.ex-quote { position: relative; margin: 0 0 2.75rem; padding: 1.75rem 2rem; border-radius: var(--ex-radius); background: linear-gradient(135deg, color-mix(in srgb, var(--ex-accent) 10%, #fff), #fff); border-inline-start: 5px solid var(--ex-accent); }
.ex-quote p { margin: 0 0 .75rem; font-size: 1.25rem; line-height: 1.55; font-weight: 600; }
.ex-quote cite { color: var(--ex-muted); font-style: normal; font-weight: 700; font-size: .9rem; }

.ex-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.ex-service { padding: 1.25rem; border: 1px solid var(--ex-line); border-radius: var(--ex-radius); background: var(--ex-card); transition: border-color .2s, transform .2s, box-shadow .2s; }
.ex-service:hover { border-color: var(--ex-accent); transform: translateY(-3px); box-shadow: var(--ex-shadow); }
.ex-service__n { display: inline-block; margin-block-end: .5rem; color: var(--ex-accent); font-weight: 800; font-size: .85rem; letter-spacing: .08em; }
.ex-service h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.ex-service p { margin: 0; color: var(--ex-muted); font-size: .92rem; }

.ex-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.ex-chips li { padding: .45rem .95rem; border-radius: 999px; background: var(--ex-soft); font-weight: 600; font-size: .9rem; transition: background-color .15s, color .15s; }
.ex-chips li:hover { background: var(--ex-accent); color: #fff; }
.ex-chips--tools li { background: transparent; border: 1.5px solid var(--ex-ink); }
.ex-chips--tools li:hover { border-color: var(--ex-accent); }

.ex-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.ex-timeline::before { content: ""; position: absolute; inset-block: .5rem; inset-inline-start: 5px; inline-size: 2px; background: var(--ex-line); }
.ex-timeline li { position: relative; display: grid; gap: .15rem; padding-block: .35rem 1.1rem; padding-inline-start: 2rem; }
.ex-timeline li::before { content: ""; position: absolute; inset-block-start: .75rem; inset-inline-start: 0; inline-size: 12px; block-size: 12px; border-radius: 50%; background: var(--ex-card); border: 3px solid var(--ex-accent); }
.ex-timeline time { color: var(--ex-accent); font-weight: 800; font-size: .82rem; letter-spacing: .04em; }
.ex-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.ex-list li { position: relative; padding-inline-start: 1.9rem; }
.ex-list strong { color: var(--ex-ink); }
.ex-list--check li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .3em; inline-size: 1.15rem; block-size: 1.15rem; border-radius: 50%; background: var(--ex-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 70% no-repeat; }
.ex-list:not(.ex-list--check) li::before { content: ""; position: absolute; inset-inline-start: .35rem; inset-block-start: .65em; inline-size: .45rem; block-size: .45rem; border-radius: 50%; background: var(--ex-accent); }

.ex-video { position: relative; overflow: hidden; border-radius: var(--ex-radius); aspect-ratio: 16 / 9; background: #000; box-shadow: var(--ex-shadow); }
.ex-video iframe, .ex-video video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; }
.ex-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.ex-gallery img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--ex-radius) - 4px); transition: transform .3s; }
.ex-gallery li { overflow: hidden; border-radius: calc(var(--ex-radius) - 4px); }
.ex-gallery li:hover img { transform: scale(1.05); }
.ex-back { margin-block-start: 1rem; }
.ex-back a { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--ex-accent); }

/* ---------- Layout: hero ---------- */
.ex-cover { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--ex-accent) 50%, #0b0b0f), transparent 65%), linear-gradient(135deg, #0b0b0f, #1c1d27); }
.ex-cover__img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: .38; }
.ex-cover__inner { position: relative; display: grid; gap: 1.5rem; padding-block: 1.25rem 2.25rem; }
.ex-profile--hero .ex-id { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; }
.ex-profile--hero .ex-id__photo { inline-size: clamp(120px, 18vw, 190px); flex: none; }
.ex-profile--hero .ex-id__photo .ex-photo { aspect-ratio: 1; border-radius: var(--ex-radius); border: 4px solid rgb(255 255 255 / 85%); box-shadow: 0 16px 40px rgb(0 0 0 / 40%); }
.ex-profile--hero .ex-id__text { margin: 0; flex: 1 1 280px; }
.ex-profile--hero .ex-id__role { color: #fff; opacity: .9; }
.ex-profile--hero .ex-tags li { background: rgb(255 255 255 / 16%); color: #fff; }
.ex-profile--hero .ex-stats { margin: 0; }
.ex-profile--hero .ex-stats li { background: rgb(255 255 255 / 10%); box-shadow: none; backdrop-filter: blur(10px); }
.ex-profile--hero .ex-stats strong { color: #fff; }
.ex-profile--hero .ex-stats span { color: #d6d9e2; }
.ex-profile--hero .ex-crumbs { color: #fff; }

/* ---------- Layout: stacked ---------- */
.ex-top { padding-block: 1rem 2.25rem; background: linear-gradient(to bottom, var(--ex-soft), transparent); }
.ex-top__inner { display: grid; gap: 1.5rem; justify-items: center; text-align: center; }
.ex-profile--stacked .ex-id { display: grid; justify-items: center; gap: 1rem; }
.ex-profile--stacked .ex-id__photo { inline-size: 190px; }
.ex-profile--stacked .ex-id__photo .ex-photo { aspect-ratio: 1; border-radius: 50%; border: 5px solid #fff; box-shadow: var(--ex-shadow); }
.ex-profile--stacked .ex-id__text { justify-items: center; margin: 0; }
.ex-profile--stacked .ex-id__text .ex-badges, .ex-profile--stacked .ex-tags { justify-content: center; }
.ex-profile--stacked .ex-stats { inline-size: 100%; margin: 0; }
.ex-top__actions { display: grid; gap: 1rem; justify-items: center; inline-size: 100%; max-inline-size: 460px; }
.ex-top__actions .ex-details div { gap: 2rem; }
.ex-top__actions .ex-cta { inline-size: 100%; }
.ex-profile--stacked .ex-main { padding-block-start: 2rem; }

@media (max-width: 900px) {
	.ex-layout { grid-template-columns: 1fr; }
	.has-sticky .ex-card-side { position: static; }
	.ex-profile--sidebar .ex-id { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 1rem; align-items: center; }
	.ex-profile--sidebar .ex-id__text { margin: 0; }
}
@media (max-width: 520px) {
	.ex-profile--sidebar .ex-id { grid-template-columns: 1fr; }
	.ex-quote { padding: 1.25rem; }
	.ex-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.ex-card, .ex-photo, .ex-service, .ex-cta, .ex-gallery img { transition: none !important; }
	.ex-badge--avail i, .ex-avail i { animation: none !important; }
}

/* Profile name and verification stay aligned in both profile layouts. */
.ex-profile-name { display:flex; align-items:center; justify-content:flex-start; gap:.24em; min-inline-size:0; }
.ex-profile-name > bdi { min-inline-size:0; overflow-wrap:anywhere; }

.ex-name-en { margin:0 0 10px; color:var(--ex-muted,#718096); font-size:13px; font-weight:400; letter-spacing:.025em; text-align:start; }
.ep-testimonials { display:grid; gap:12px; }
.ep-testimonial { margin:0; padding:18px; border:1px solid var(--ex-line,#dce3e9); border-inline-start:2px solid var(--c-crimson,#cb3340); border-radius:10px; background:var(--ex-soft,#f5f7fa); }
.ep-testimonial blockquote { margin:0; padding:0; border:0; background:none; font:inherit; }
.ep-testimonial blockquote p { margin:0; font-size:14px; line-height:1.85; }
.ep-testimonial figcaption { margin-block-start:12px; font-size:12px; color:var(--ex-muted,#718096); line-height:1.6; }
.ep-ai-copy { font-size:14px; line-height:1.9; }
.ep-ai-copy p:first-child { margin-block-start:0; }
.ep-ai-source { padding-block-start:10px; border-block-start:1px solid var(--ex-line,#dce3e9); font-size:11px; color:var(--ex-muted,#718096); }
.ep-panel--inquiry p { font-size:14px; line-height:1.8; }
.ep-panel--inquiry .ex-cta { display:inline-flex; align-items:center; gap:8px; }
@media(max-width:640px) { .ep-identity > .ex-name-en { grid-column:2; margin:0 0 5px; } .ep-testimonial { padding:14px; } }

/* Homepage expert previews: identity first, details live in the profile. */

/* Verification follows the name in every expert card layout. */

/* Align the badge with the first title line rather than the whole multiline name. */

/* Anchor the directory backdrop to the physical left edge in both RTL and LTR. */
body.post-type-archive-expert,
body.post-type-archive-expert .ex-archive { background-position:center,left top; }

/* Directory hero only; cards, profile pages and expertise archives retain their layouts. */
body.post-type-archive-expert .ex-head--hero {
 padding-block:clamp(44px,6vw,88px) clamp(36px,5vw,64px);
 border-block-end:1px solid rgb(169 190 211 / 14%);
 background:radial-gradient(ellipse at 50% 0,rgb(187 39 65 / 16%),transparent 65%),linear-gradient(180deg,rgb(9 15 22 / 36%),rgb(9 15 22 / 85%));
}
body.post-type-archive-expert .ex-head--hero::after {
 inset:0; inline-size:auto; aspect-ratio:auto; border:0; border-radius:0; box-shadow:none;
 background:none;
}
/* One continuous decorative grid behind the hero and the complete directory. */
body.post-type-archive-expert .ex-archive { isolation:isolate; }
body.post-type-archive-expert .ex-archive::before {
 content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
 background-image:linear-gradient(rgb(172 194 216 / 5%) 1px,transparent 1px),linear-gradient(90deg,rgb(172 194 216 / 5%) 1px,transparent 1px);
 background-size:64px 64px; background-position:center top;
}
body.post-type-archive-expert .ex-head--hero > .container,
body.post-type-archive-expert .ex-head--hero > .container:not(:has(.ex-search)) {
 display:flex; flex-direction:column; align-items:center; gap:0; text-align:center;
}
body.post-type-archive-expert .ex-head--hero .ex-crumbs {
 flex-wrap:wrap; justify-content:center; gap:8px; max-inline-size:100%; margin:0 0 28px; color:#94a3b5; font-size:11px; line-height:1.6;
}
body.post-type-archive-expert .ex-head--hero .ex-head__title {
 inline-size:100%; max-width:none; max-inline-size:20ch; margin:0; color:#f4f5f8;
 font-size:clamp(2.4rem,5.5vw,4.75rem); font-weight:800; line-height:1.14; letter-spacing:-.04em; text-wrap:balance; overflow-wrap:anywhere;
}
body.post-type-archive-expert .ex-head--hero .ex-head__title::before {
 content:""; display:block; inline-size:44px; block-size:44px; margin:0 auto 18px;
 background:url('../images/samurai-heading.svg') center / contain no-repeat;
}
body.post-type-archive-expert .ex-head--hero .ex-head__intro {
 max-width:none; max-inline-size:60ch; margin-block:18px 0; color:#b4c0ce; font-size:clamp(.9rem,1.3vw,1.05rem); line-height:1.85; text-wrap:pretty;
}
body.post-type-archive-expert .ex-head--hero .ex-head__intro > :first-child { margin-block-start:0; }
body.post-type-archive-expert .ex-head--hero .ex-head__intro > :last-child { margin-block-end:0; }
body.post-type-archive-expert .ex-head--hero .ex-search { align-self:center; inline-size:100%; max-inline-size:600px; margin:30px 0 0; }
body.post-type-archive-expert .ex-head--hero .ex-search input {
 box-sizing:border-box; min-inline-size:0; min-block-size:58px; padding-block:14px; border:1px solid #3b4655; border-radius:14px;
 background:rgb(16 25 35 / 94%); color:#f4f5f8; box-shadow:0 12px 32px rgb(0 0 0 / 18%); font-size:14px; line-height:1.6;
}
body.post-type-archive-expert .ex-head--hero .ex-search input:focus { outline:2px solid #db5b70; outline-offset:3px; border-color:#db5b70; }
body.post-type-archive-expert .ex-head--hero .ex-search button { border-radius:10px; color:#d3dce7; }
body.post-type-archive-expert .ex-head--hero .ex-search__submit { background:#35202b; color:#ffdbe3; }
body.post-type-archive-expert .ex-head--hero .ex-search__submit:hover { background:#522838; }
body.post-type-archive-expert .ex-head--hero .ex-filters { justify-content:center; flex-wrap:wrap; gap:8px; max-inline-size:100%; margin:22px 0 0; }
body.post-type-archive-expert .ex-head--hero .ex-filters a { padding:8px 14px; border-radius:10px; font-size:12px; line-height:1.5; }
@media(max-width:700px) {
 body.post-type-archive-expert .ex-head--hero { padding-block:32px 36px; }
 body.post-type-archive-expert .ex-head--hero .ex-crumbs { margin-block-end:24px; font-size:10px; }
 body.post-type-archive-expert .ex-head--hero .ex-head__title { font-size:clamp(2rem,8.5vw,3.2rem); line-height:1.18; }
 body.post-type-archive-expert .ex-head--hero .ex-head__title::before { inline-size:36px; block-size:36px; margin-block-end:16px; }
 body.post-type-archive-expert .ex-head--hero .ex-head__intro { margin-block-start:14px; font-size:14px; line-height:1.75; }
 body.post-type-archive-expert .ex-head--hero .ex-search { margin-block-start:24px; }
 body.post-type-archive-expert .ex-head--hero .ex-search input { min-block-size:54px; font-size:13px; }
}
