/* ==========================================================================
   Arabic Translating – main stylesheet
   Logical properties (inline-start/end) keep one set of rules for English
   (LTR) and Arabic (RTL). Colours are tokens with a light and a dark theme.
   ========================================================================== */

:root {
	--bg: #f4f7f6;
	--surface: #ffffff;
	--surface-2: #eef3f2;
	--text: #0f2a2e;
	--text-soft: #2f565c;
	--muted: #55696b;
	--line: #d6dfdd;
	--line-strong: #b9c7c4;

	--deep: #0f2a2e;          /* dark bands: services, footer, panel head */
	--deep-2: #1d4148;
	--on-deep: #ffffff;
	--on-deep-soft: rgba(255, 255, 255, .66);
	--on-deep-line: rgba(255, 255, 255, .14);

	--btn-bg: #0f2a2e;
	--btn-bg-hover: #1d4148;
	--btn-text: #ffffff;

	--brass: #b8862b;
	--brass-text: #8a6216;
	--brass-wash: #f6eedc;
	--sage: #2f8a63;
	--sage-wash: #e3efe9;
	--sage-text: #2c6a4f;
	--chip-wash: #e8eef0;
	--danger: #a3321f;

	--header-bg: rgba(244, 247, 246, .9);
	--shadow: 0 24px 48px -28px rgba(15, 42, 46, .35);
	--focus: #b8862b;

	--font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;

	--wrap: 72rem;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--section: clamp(4rem, 9vw, 7.5rem);
	--radius: 6px;
	--radius-lg: 14px;
	--header-h: 4.5rem;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0b1a1d; --surface: #10252a; --surface-2: #142e33; --text: #e6eeec; --text-soft: #b8cac6; --muted: #8ea4a1;
		--line: #21393d; --line-strong: #34524f; --deep: #071316; --deep-2: #17343a; --on-deep-line: rgba(255, 255, 255, .1);
		--btn-bg: #e6eeec; --btn-bg-hover: #ffffff; --btn-text: #0b1a1d;
		--brass: #d3a24a; --brass-text: #e3b965; --brass-wash: #2a2415; --sage: #5cc495; --sage-wash: #12342a; --sage-text: #8fd6b3; --chip-wash: #1a363b;
		--danger: #ff8a73; --header-bg: rgba(11, 26, 29, .88); --shadow: 0 24px 48px -24px rgba(0, 0, 0, .6); --focus: #e3b965;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0b1a1d; --surface: #10252a; --surface-2: #142e33; --text: #e6eeec; --text-soft: #b8cac6; --muted: #8ea4a1;
	--line: #21393d; --line-strong: #34524f; --deep: #071316; --deep-2: #17343a; --on-deep-line: rgba(255, 255, 255, .1);
	--btn-bg: #e6eeec; --btn-bg-hover: #ffffff; --btn-text: #0b1a1d;
	--brass: #d3a24a; --brass-text: #e3b965; --brass-wash: #2a2415; --sage: #5cc495; --sage-wash: #12342a; --sage-text: #8fd6b3; --chip-wash: #1a363b;
	--danger: #ff8a73; --header-bg: rgba(11, 26, 29, .88); --shadow: 0 24px 48px -24px rgba(0, 0, 0, .6); --focus: #e3b965;
	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
body.lang-ar { font-family: var(--font-ar); font-size: 1.125rem; line-height: 1.85; }
[lang="en"] { font-family: var(--font); }
[lang="ar"] { font-family: var(--font-ar); }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
body.lang-ar :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.4; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
	background: var(--btn-bg); color: var(--btn-text); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: var(--btn-text); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 46rem; }
.wrap-mid { max-width: 60rem; }

.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: .5em; }
.section-intro { color: var(--muted); max-width: 38rem; }
.section-head {
	display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
	gap: 1rem 2rem; margin-bottom: 2.5rem;
}
.section-head .section-title { margin-bottom: .25em; }
.section-head-end { justify-content: flex-end; }

/* Buttons & links ---------------------------------------------------------- */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 3rem; padding: .7rem 1.4rem; border-radius: var(--radius);
	background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-bg);
	font: inherit; font-weight: 600; font-size: .975rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); color: var(--btn-text); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn-light { background: #fff; color: #0f2a2e; border-color: #fff; }
.btn-light:hover { background: #f6eedc; border-color: #f6eedc; color: #0f2a2e; }
.btn-small { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9rem; }

.text-link {
	font-weight: 600; color: var(--text); text-decoration: underline;
	text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.text-link:hover { color: var(--brass-text); }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .95rem; }

/* Header ------------------------------------------------------------------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
	position: relative; width: 2.6rem; height: 2.6rem; border-radius: 50%;
	background: #0f2a2e; color: #fff; flex-shrink: 0; overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-mark span { position: absolute; font-weight: 600; line-height: 1; }
.brand-mark span:first-child { font-family: var(--font); font-size: 1.15rem; left: .5rem; top: .55rem; }
.brand-mark span:last-child { font-family: var(--font-ar); font-size: 1.3rem; right: .55rem; bottom: .45rem; color: #d3a24a; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 600; font-size: 1rem; }
.brand-role { font-size: .8rem; color: var(--muted); }

.site-nav { margin-inline-start: auto; }
.nav-list { display: flex; gap: .15rem; list-style: none; }
.nav-list a {
	display: block; padding: .5rem .7rem; border-radius: var(--radius);
	text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--text-soft);
}
.nav-list a:hover, .nav-list .is-active > a, .nav-list .current-menu-item > a { color: var(--text); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.lang-switch {
	display: inline-flex; align-items: center; min-height: 2.5rem; padding: .35rem .85rem;
	border: 1px solid var(--line-strong); border-radius: 999px;
	text-decoration: none; font-weight: 600; font-size: .92rem;
}
.lang-switch:hover { border-color: var(--text); color: var(--text); background: var(--surface); }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.5rem; height: 2.5rem; padding: 0; cursor: pointer; color: var(--text);
	border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
}
.icon-btn:hover { border-color: var(--text); background: var(--surface); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; border-radius: var(--radius); width: 2.75rem; height: 2.75rem; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 1.15rem; height: 2px; background: var(--text); border-radius: 2px;
	transition: transform .2s, opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle { direction: ltr; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 68rem) { .header-cta { display: none; } }
@media (max-width: 58rem) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
		background: var(--bg); border-bottom: 1px solid var(--line);
		padding: .5rem var(--gutter) 1.25rem; display: none;
		box-shadow: var(--shadow);
	}
	.site-nav.is-open { display: block; }
	.nav-list { flex-direction: column; gap: 0; }
	.nav-list a { padding: .85rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.nav-list li:last-child a { border-bottom: 0; }
	.header-actions { margin-inline-start: auto; }
}
@media (max-width: 28rem) {
	.brand-role { display: none; }
	.header-inner { gap: .6rem; }
}

/* Availability ------------------------------------------------------------- */

.availability {
	display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.1rem;
	font-size: .9rem; font-weight: 500; color: var(--text-soft);
}
.availability-dot {
	position: relative; width: .6rem; height: .6rem; border-radius: 50%; background: var(--line-strong); flex-shrink: 0;
}
.availability.is-open .availability-dot { background: var(--sage); }
.availability.is-open .availability-dot::after {
	content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sage); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
	.availability.is-open .availability-dot::after { animation: ping 2.4s ease-out infinite; }
}
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.availability-time { color: var(--muted); font-weight: 400; }

/* Hero --------------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 8vw, 6.5rem); }
.hero-inner {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-kicker { color: var(--brass-text); font-weight: 600; margin-bottom: 1rem; }
.hero-title {
	font-size: clamp(2.3rem, 5vw, 3.75rem); line-height: 1.08; letter-spacing: -.025em;
	margin-bottom: .45em; max-width: 14ch;
}
body.lang-ar .hero-title { line-height: 1.3; letter-spacing: 0; max-width: 16ch; font-weight: 700; }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-soft); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin-top: 2rem; }
.hero-badges li {
	font-size: .85rem; font-weight: 500; padding: .3rem .7rem;
	border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-soft); background: var(--surface);
}

/* The segment panel: the page's memorable element — a CAT-tool editor grid. */
.segments {
	margin: 0; direction: ltr; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: 0 1px 0 var(--line), var(--shadow);
	overflow: hidden;
}
.segments-head, .segment {
	display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 1rem;
}
.segments-head {
	padding: .7rem 1.1rem; background: var(--deep); color: var(--on-deep-soft);
	font-size: .78rem; font-weight: 500;
}
.segments-head [dir="rtl"] { text-align: right; }
.segments-list { list-style: none; }
.segment {
	position: relative; padding: 1.05rem 1.1rem 1.15rem; row-gap: .6rem;
	border-top: 1px solid var(--line); align-items: start;
}
.segment:first-child { border-top: 0; }
.seg-n {
	font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums;
	padding-top: .2rem; border-inline-end: 1px solid var(--line); height: 100%;
}
.segments-head .seg-n { color: var(--on-deep-soft); border-color: var(--on-deep-line); padding-top: 0; }
.seg-src { font-size: .98rem; line-height: 1.5; color: var(--text-soft); }
.seg-tgt { font-size: 1.12rem; line-height: 1.6; text-align: right; font-weight: 500; }
.seg-status {
	grid-column: 2 / -1; justify-self: start;
	font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px;
}
.seg-status-translated { background: var(--chip-wash); color: var(--text-soft); }
.seg-status-edited { background: var(--brass-wash); color: var(--brass-text); }
.seg-status-proofread { background: var(--sage-wash); color: var(--sage-text); }
.segment::before {
	content: ""; position: absolute; inset-block: 0; left: 0; width: 3px; background: var(--brass);
	transform: scaleY(0); transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
	.js .segment .seg-tgt, .js .segment .seg-status { opacity: 0; }
	.js .segments.is-playing .seg-tgt { animation: seg-in .6s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.35s + var(--i) * .55s); }
	.js .segments.is-playing .seg-status { animation: seg-in .35s ease-out forwards; animation-delay: calc(.75s + var(--i) * .55s); }
	.js .segments.is-playing .segment::before { animation: seg-bar .9s ease-out forwards; animation-delay: calc(.2s + var(--i) * .55s); }
}
@keyframes seg-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes seg-bar { 0% { transform: scaleY(0); } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 58rem) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-title { max-width: 18ch; }
}
@media (max-width: 34rem) {
	.segments-head { display: none; }
	.segment { grid-template-columns: 1.75rem minmax(0, 1fr); }
	.seg-src, .seg-tgt, .seg-status { grid-column: 2; }
	.seg-n { grid-row: 1 / span 3; }
}

/* About -------------------------------------------------------------------- */

.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-inner {
	display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
	gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.about-side { position: sticky; top: calc(var(--header-h) + 2rem); }
.portrait {
	background: #f4f7f6; border-radius: var(--radius-lg); overflow: hidden;
	aspect-ratio: 17 / 22; border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.iso-note {
	margin-top: 1.25rem; padding: 1.1rem 1.2rem; border-inline-start: 3px solid var(--brass);
	background: var(--brass-wash); border-start-end-radius: var(--radius); border-end-end-radius: var(--radius);
}
.iso-note p { font-weight: 600; margin-bottom: .4rem; }
.iso-note .text-link { font-size: .92rem; }

.prose { max-width: 40rem; }
.story p:first-child { font-size: 1.25rem; line-height: 1.55; color: var(--text); font-weight: 500; }
body.lang-ar .story p:first-child { line-height: 1.8; }
.story p { color: var(--text-soft); }

.agencies { margin-top: clamp(3rem, 7vw, 5rem); }
.agencies-title { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: 1.25rem; }
.agencies-title b { color: var(--text); font-weight: 600; }
.agencies-list {
	list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 0;
	font-size: clamp(1.05rem, 1.8vw, 1.35rem); font-weight: 500; color: var(--text);
	border-top: 1px solid var(--line); padding-top: 1.25rem;
}
body.lang-ar .agencies-list { direction: rtl; }
.agencies-list li { white-space: nowrap; }
.agencies-list li:not(:last-child)::after { content: "/"; color: var(--brass); margin-inline: .7rem; font-weight: 400; }

@media (max-width: 52rem) {
	.about-inner { grid-template-columns: 1fr; }
	.about-side { position: static; display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; align-items: end; }
	.iso-note { margin-top: 0; }
}

/* Why me ------------------------------------------------------------------- */

.why-list {
	list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	border-top: 2px solid var(--text); margin-top: 1rem;
}
.why-list li {
	padding-block: 1.5rem 1.75rem; padding-inline-end: 1.5rem;
	font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 500; line-height: 1.35;
	border-bottom: 1px solid var(--line); display: flex; gap: .85rem; align-items: baseline;
}
.why-list li::before {
	content: ""; flex-shrink: 0; width: .6rem; height: .6rem; border-radius: 50%;
	background: var(--brass); transform: translateY(-.1em);
}
@media (max-width: 52rem) { .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .why-list { grid-template-columns: 1fr; } }

/* Services ----------------------------------------------------------------- */

.services { background: var(--deep); color: var(--on-deep); }
.services .section-title { color: var(--on-deep); }
.services-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: 1rem; }
.services-col h3 { font-size: .95rem; font-weight: 500; color: var(--on-deep-soft); margin-bottom: 1rem; }
.services-col ul { list-style: none; }
.services-col li { padding: .7rem 0; border-top: 1px solid var(--on-deep-line); font-size: 1.05rem; }
.services-pairs li {
	font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.3; padding: 1rem 0;
	border-top-color: rgba(211, 162, 74, .6);
}
.services-note { margin-top: 2.5rem; color: var(--on-deep-soft); }
@media (max-width: 52rem) { .services-grid { grid-template-columns: 1fr 1fr; } .services-pairs { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .services-grid { grid-template-columns: 1fr; } }

/* Technology --------------------------------------------------------------- */

.tech-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 5rem); }
.tech-intro p { color: var(--text-soft); }
.tech-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; align-content: start; }
.tech-group h3 { font-size: 1rem; padding-bottom: .7rem; border-bottom: 2px solid var(--text); margin-bottom: .5rem; }
.tech-group ul { list-style: none; }
.tech-group li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.tech-group a { text-decoration: none; font-weight: 500; }
.tech-group a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.tech-note { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 60rem) { .tech-inner { grid-template-columns: 1fr; } }
@media (max-width: 34rem) { .tech-groups { grid-template-columns: 1fr 1fr; } }

/* CV band ------------------------------------------------------------------ */

.cv-band { padding-block: 0 var(--section); }
.cv-inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
	background: var(--deep-2); color: var(--on-deep); border-radius: var(--radius-lg);
	padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
	max-width: calc(var(--wrap) - 2 * var(--gutter));
}
.cv-inner h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: .25rem; }
.cv-inner p { margin: 0; color: var(--on-deep-soft); }
@media (max-width: 72rem) { .cv-inner { margin-inline: var(--gutter); max-width: none; width: auto; } }

/* Portfolio ---------------------------------------------------------------- */

.portfolio { background: var(--surface); border-block: 1px solid var(--line); }
.cert-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.cert-filter button {
	font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
	min-height: 2.5rem; padding: .35rem .95rem; border-radius: 999px;
	border: 1px solid var(--line-strong); background: transparent; color: var(--text-soft);
	display: inline-flex; align-items: center; gap: .45rem;
}
.cert-filter button:hover { border-color: var(--text); color: var(--text); }
.cert-filter button[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.cert-filter .count { font-size: .78rem; opacity: .7; font-variant-numeric: tabular-nums; }

.cert-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 2rem 1.5rem; }
.cert[hidden] { display: none; }
.cert-link { display: block; text-decoration: none; color: var(--text); }
.cert-paper {
	display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
	padding: .9rem; transition: border-color .15s, background-color .15s;
}
.cert-paper img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 6px 18px -10px rgba(15, 42, 46, .45); }
.cert-link:hover .cert-paper { border-color: var(--brass); background: var(--brass-wash); }
.cert-title { display: block; margin-top: .8rem; font-weight: 600; line-height: 1.35; }
.cert-type { display: block; font-size: .85rem; color: var(--muted); }

.lightbox {
	width: min(94vw, 58rem); max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius-lg);
	background: var(--surface); color: var(--text); overflow: hidden;
}
.lightbox::backdrop { background: rgba(7, 19, 22, .85); }
.lightbox-bar { display: flex; align-items: center; gap: .75rem; padding-block: .6rem; padding-inline: 1.2rem .6rem; border-bottom: 1px solid var(--line); }
.lightbox-caption { margin: 0; font-weight: 600; flex: 1; min-width: 0; }
.lightbox-count { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox-open { font-size: .9rem; }
.lightbox-btn {
	width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius);
	background: transparent; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--text);
}
.lightbox-btn:hover { border-color: var(--text); }
[dir="rtl"] .lightbox-prev, [dir="rtl"] .lightbox-next { transform: scaleX(-1); }
.lightbox-stage { background: #f4f7f6; }
.lightbox img { max-height: calc(94vh - 4rem); width: auto; margin: 0 auto; padding: 1rem; object-fit: contain; }
@media (max-width: 34rem) { .lightbox-open, .lightbox-count { display: none; } }

/* Blog cards --------------------------------------------------------------- */

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 2.5rem 2rem; }
.post-card-link { display: block; text-decoration: none; color: var(--text); }
.post-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--line); margin-bottom: 1rem; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card-link:hover .post-card-img img { transform: scale(1.03); }
.post-card-meta { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.post-card-title { font-size: 1.3rem; margin-bottom: .4rem; }
.post-card-link:hover .post-card-title { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; }
.post-card-excerpt { color: var(--text-soft); margin: 0; }

/* Contact & quote form ------------------------------------------------------ */

.contact-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-info { position: sticky; top: calc(var(--header-h) + 2rem); }
.contact-list { margin: 2rem 0 0; }
.contact-list > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: .95rem; }
.contact-list dd { margin: 0; font-weight: 500; overflow-wrap: break-word; min-width: 0; }
.contact-list a[dir="ltr"] { unicode-bidi: isolate; }
.profiles { display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-form {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-form > h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.contact-form > p { color: var(--muted); font-size: .95rem; }
@media (max-width: 58rem) { .contact-inner { grid-template-columns: 1fr; } .contact-info { position: static; } }
@media (max-width: 30rem) { .contact-list > div { grid-template-columns: 1fr; gap: .15rem; } }

.at-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1rem; margin-top: 1.25rem; }
.at-form .field { margin: 0; }
.at-form .field-full { grid-column: 1 / -1; }
.at-form .group-title { grid-column: 1 / -1; margin: .75rem 0 -.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.at-form label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .35rem; }
.at-form .req { color: var(--brass-text); }
.at-form .hint { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); margin-top: .3rem; }
.at-form input[type="text"], .at-form input[type="email"], .at-form input[type="tel"], .at-form input[type="number"],
.at-form input[type="date"], .at-form select, .at-form textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--text); min-height: 3rem;
	padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg);
}
.at-form select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.4rem;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; }
[dir="rtl"] .at-form select { background-position: 1.2rem 55%, .85rem 55%; }
.at-form textarea { min-height: 8rem; resize: vertical; }
.at-form input:focus, .at-form textarea:focus, .at-form select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--brass); background: var(--surface); }
.at-form input[type="tel"], .at-form input[type="email"], .at-form input[type="number"], .at-form input[type="date"] { direction: ltr; }
[dir="rtl"] .at-form input[type="tel"], [dir="rtl"] .at-form input[type="email"], [dir="rtl"] .at-form input[type="number"], [dir="rtl"] .at-form input[type="date"] { text-align: right; }
.at-form input[type="file"] {
	width: 100%; font: inherit; font-size: .92rem; color: var(--text-soft);
	padding: .9rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); cursor: pointer;
}
.at-form input[type="file"]::file-selector-button {
	font: inherit; font-weight: 600; margin-inline-end: .8rem; padding: .45rem .9rem; cursor: pointer;
	border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.at-form .wpcf7-submit { margin-top: 1.25rem; min-width: 12rem; }
.at-form .wpcf7-not-valid-tip { font-size: .85rem; color: var(--danger); margin-top: .3rem; }
.at-form .wpcf7-spinner { margin-inline: .75rem; }
.wpcf7 form .wpcf7-response-output { margin: 1.25rem 0 0; padding: .8rem 1rem; border-radius: var(--radius); font-size: .95rem; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--sage); background: var(--sage-wash); color: var(--sage-text); }
@media (max-width: 34rem) { .at-form .fields { grid-template-columns: 1fr; } }

/* Word counter */
.wordcount {
	grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.wordcount summary {
	cursor: pointer; padding: .75rem 1rem; font-size: .92rem; font-weight: 600; color: var(--text-soft);
	list-style: none; display: flex; align-items: center; gap: .5rem;
}
.wordcount summary::-webkit-details-marker { display: none; }
.wordcount summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--brass-wash); color: var(--brass-text); font-weight: 600; line-height: 1; }
.wordcount[open] summary::before { content: "−"; }
.wordcount-body { padding: 0 1rem 1rem; }
.wordcount textarea {
	width: 100%; min-height: 7rem; font: inherit; font-size: .95rem; color: var(--text); resize: vertical;
	padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.wordcount-out { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: .6rem 0 0; font-size: .9rem; color: var(--muted); }
.wordcount-out b { color: var(--text); font-variant-numeric: tabular-nums; }

/* Inner pages -------------------------------------------------------------- */

.page-hero { padding-block: clamp(3rem, 7vw, 5rem) 0; }
.page-title { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: .35em; }
.page-lead { font-size: 1.15rem; color: var(--text-soft); max-width: 40rem; }

.reading-progress {
	position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; pointer-events: none;
	background: var(--brass); transform-origin: left; transform: scaleX(var(--p, 0));
}
[dir="rtl"] .reading-progress { transform-origin: right; }

.article-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.article-title { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.12; letter-spacing: -.02em; max-width: 22ch; }
body.lang-ar .article-title { line-height: 1.35; letter-spacing: 0; }
.article-meta { color: var(--muted); }
.article-img img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 2 / 1; object-fit: cover; }
.article-layout {
	display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 15rem); gap: clamp(2rem, 5vw, 4.5rem);
	justify-content: center; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.article-layout .prose { max-width: none; }
.toc { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; font-size: .92rem; }
.toc-title { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .75rem; cursor: pointer; list-style: none; }
.toc-title::-webkit-details-marker { display: none; }
.toc details:not([open]) .toc-title { margin-bottom: 0; }
.toc-title::after { content: " +"; color: var(--brass-text); }
.toc details[open] .toc-title::after { content: " −"; }
@media (min-width: 64.01rem) { .toc-title { pointer-events: none; } .toc-title::after { content: none; } .toc details[open] .toc-title::after { content: none; } }
.toc ol { list-style: none; border-inline-start: 1px solid var(--line); }
.toc li a {
	display: block; padding: .35rem 0; padding-inline-start: 1rem; margin-inline-start: -1px;
	border-inline-start: 2px solid transparent; text-decoration: none; color: var(--text-soft); line-height: 1.4;
}
.toc li.toc-h3 a { padding-inline-start: 1.75rem; font-size: .88rem; }
.toc li a:hover { color: var(--text); }
.toc li a.is-current { border-inline-start-color: var(--brass); color: var(--text); font-weight: 500; }
@media (max-width: 64rem) {
	.article-layout { grid-template-columns: minmax(0, 46rem); }
	.toc { position: static; order: -1; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
}

.prose h2 { font-size: 1.7rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8em; }
.prose :is(h2, h3) { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brass); }
.prose a { text-decoration-color: var(--brass); }
.prose blockquote { margin: 1.5em 0; padding-inline-start: 1.25em; border-inline-start: 3px solid var(--brass); font-size: 1.15rem; }
.article-foot { padding-bottom: var(--section); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.post-navigation a { text-decoration: none; font-weight: 600; display: block; }
.post-navigation span { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.post-navigation .nav-next { text-align: end; grid-column: 2; }

.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .45rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }

.cert-single-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 4rem); align-items: start; }
.cert-single-img { background: #f4f7f6; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 2rem); }
.cert-single-img img { margin: 0 auto; box-shadow: 0 10px 30px -18px rgba(15, 42, 46, .5); }
.cert-single-info .contact-list { margin: 1.5rem 0 2rem; }
@media (max-width: 52rem) { .cert-single-inner { grid-template-columns: 1fr; } }

.not-found-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 600; line-height: 1; color: var(--line-strong); margin-bottom: .2em; }

/* Footer ------------------------------------------------------------------- */

.site-footer { background: var(--deep); color: var(--on-deep-soft); padding-top: clamp(3rem, 6vw, 4.5rem); }
.site-footer a { color: var(--on-deep); text-decoration: none; }
.site-footer a:hover { color: #e3c27e; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-name { color: var(--on-deep); font-weight: 600; font-size: 1.15rem; margin-bottom: .2rem; }
.footer-role { font-size: .92rem; }
.footer-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: .5rem 2.5rem; }
.footer-contact { list-style: none; display: grid; gap: .5rem; }
.footer-base {
	display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
	border-top: 1px solid var(--on-deep-line); padding-block: 1.25rem; font-size: .88rem;
}
.footer-base p { margin: 0; }
@media (max-width: 52rem) { .footer-inner { grid-template-columns: 1fr; } }

/* Motion preferences ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Contact column is narrow: stack label above value so the email stays on one line. */
.contact .contact-list > div { grid-template-columns: 1fr; gap: .15rem; }

.ls-short { display: none; }
@media (max-width: 30rem) {
	.ls-long { display: none; }
	.ls-short { display: inline; }
	.lang-switch { min-width: 2.5rem; justify-content: center; padding-inline: .5rem; }
	.brand { gap: .55rem; }
	.brand-mark { width: 2.3rem; height: 2.3rem; }
	.brand-mark span:first-child { font-size: 1rem; left: .42rem; top: .48rem; }
	.brand-mark span:last-child { font-size: 1.15rem; right: .45rem; bottom: .38rem; }
	.brand-name { font-size: .92rem; }
	.header-actions { gap: .4rem; }
}

/* ==========================================================================
   v1.1 – colour, icons and motion
   ========================================================================== */

:root {
	--teal: #1b7f7a;  --teal-wash: #dcf1ee;  --teal-text: #136560;
	--violet: #5b5bd6; --violet-wash: #e8e8fb; --violet-text: #4646b8;
	--header-bg: rgba(255, 255, 255, .97);
	--grad-brand: linear-gradient(135deg, #1b7f7a 0%, #0f2a2e 55%, #0f2a2e 100%);
	--grad-accent: linear-gradient(90deg, #1b7f7a, #b8862b);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) { --teal: #4fc3b9; --teal-wash: #10352f; --teal-text: #7dd8cf; --violet: #9d9df5; --violet-wash: #24244a; --violet-text: #b9b9fa; --header-bg: rgba(11, 26, 29, .9); }
}
:root[data-theme="dark"] { --teal: #4fc3b9; --teal-wash: #10352f; --teal-text: #7dd8cf; --violet: #9d9df5; --violet-wash: #24244a; --violet-text: #b9b9fa; --header-bg: rgba(11, 26, 29, .9); }

/* Tones used by icon tiles */
.tone-1 { --tone: var(--teal); --tone-wash: var(--teal-wash); --tone-text: var(--teal-text); }
.tone-2 { --tone: var(--brass); --tone-wash: var(--brass-wash); --tone-text: var(--brass-text); }
.tone-3 { --tone: var(--sage); --tone-wash: var(--sage-wash); --tone-text: var(--sage-text); }
.tone-4 { --tone: var(--violet); --tone-wash: var(--violet-wash); --tone-text: var(--violet-text); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.btn .icon { width: 1.1rem; height: 1.1rem; }

/* Header: white bar with a soft shadow */
.site-header { background: var(--header-bg); box-shadow: 0 1px 0 var(--line); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(15, 42, 46, .35); }
.brand-mark { width: 2.6rem; height: 2.6rem; border-radius: 10px; background: none; box-shadow: none; overflow: visible; }
.brand-mark .bm-a, .brand-mark .bm-b { transition: transform .35s cubic-bezier(.3, .7, .2, 1); }
.brand:hover .brand-mark .bm-a { transform: translateX(3px); }
.brand:hover .brand-mark .bm-b { transform: translateX(-3px); }
@media (max-width: 30rem) { .brand-mark { width: 2.3rem; height: 2.3rem; } }

/* Menu with icons */
.nav-list a { display: inline-flex; align-items: center; gap: .45rem; position: relative; }
.nav-icon { width: 1.05rem; height: 1.05rem; color: var(--teal); opacity: .85; transition: transform .2s, color .2s; }
.nav-list a:hover .nav-icon, .nav-list .is-active .nav-icon { color: var(--brass); transform: translateY(-1px) scale(1.08); opacity: 1; }
.nav-list .is-active > a { background: var(--teal-wash); color: var(--teal-text); }
@media (min-width: 58.01rem) and (max-width: 75rem) {
	.nav-list a { padding: .45rem .45rem; gap: .3rem; font-size: .9rem; }
	.site-nav .nav-icon { width: .95rem; height: .95rem; }
	.header-inner { gap: .75rem; }
}
@media (max-width: 58rem) {
	.nav-list a { display: flex; gap: .75rem; }
	.nav-icon { width: 2rem; height: 2rem; padding: .4rem; border-radius: 8px; background: var(--teal-wash); color: var(--teal-text); opacity: 1; }
}
.site-footer .nav-icon { color: #d9a94f; opacity: .9; }
.footer-list a, .footer-contact a { display: inline-flex; align-items: center; gap: .5rem; }
.footer-contact .icon { color: #d9a94f; }
.footer-brand .brand-mark { margin-bottom: .9rem; width: 2.8rem; height: 2.8rem; }

/* Buttons */
.btn { transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-glow { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -12px rgba(27, 127, 122, .8); background-size: 160% 160%; background-position: 0 0; }
.btn-glow:hover { background: var(--grad-brand); background-size: 160% 160%; background-position: 100% 100%; color: #fff; border-color: transparent; box-shadow: 0 14px 30px -12px rgba(27, 127, 122, .9); }
:root[data-theme="dark"] .btn-glow { --grad-brand: linear-gradient(135deg, #4fc3b9, #1b7f7a); color: #06201e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-glow { --grad-brand: linear-gradient(135deg, #4fc3b9, #1b7f7a); color: #06201e; } }

/* Section titles: gradient underline that draws in */
.section-title { position: relative; padding-bottom: .45em; }
.section-title::after {
	content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 4px; width: 3.25rem; border-radius: 4px;
	background: var(--grad-accent); transform-origin: left; transition: transform .8s cubic-bezier(.2, .7, .2, 1) .15s;
}
[dir="rtl"] .section-title::after { transform-origin: right; background: linear-gradient(270deg, var(--teal), var(--brass)); }
.services .section-title::after { background: linear-gradient(90deg, #4fc3b9, #d9a94f); }
.cv-inner h2::after, .section-head .section-title { margin-bottom: .25em; }

/* Hero background */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob-a { width: 34rem; height: 34rem; background: #9fded6; top: -12rem; inset-inline-end: -8rem; }
.blob-b { width: 26rem; height: 26rem; background: #f1d9a6; bottom: -10rem; inset-inline-start: -8rem; }
.blob-c { width: 18rem; height: 18rem; background: #c9c9f6; top: 30%; inset-inline-start: 38%; opacity: .35; }
:root[data-theme="dark"] .blob { opacity: .22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: .22; } }
.hero-pattern {
	position: absolute; inset: 0; opacity: .5;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%231b7f7a' stroke-opacity='.16'%3E%3Cpath d='M28 6l6.5 15.5L50 28l-15.5 6.5L28 50l-6.5-15.5L6 28l15.5-6.5z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
	-webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 65%);
}
@media (prefers-reduced-motion: no-preference) {
	.blob-a { animation: drift-a 18s ease-in-out infinite alternate; }
	.blob-b { animation: drift-b 22s ease-in-out infinite alternate; }
	.blob-c { animation: drift-a 26s ease-in-out infinite alternate-reverse; }
}
@keyframes drift-a { to { transform: translate(-4rem, 3rem) scale(1.12); } }
@keyframes drift-b { to { transform: translate(5rem, -2rem) scale(1.08); } }

.hero-badges li { display: inline-flex; align-items: center; gap: .4rem; border-color: transparent; background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(15, 42, 46, .4); }
.hero-badges .icon { color: var(--teal); width: 1rem; height: 1rem; }
.hero-kicker { display: inline-block; }

/* Segment panel chrome */
.segments { position: relative; }
.segments-bar { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; background: var(--deep-2); color: var(--on-deep-soft); font-size: .78rem; direction: ltr; }
.segments-bar .dots { display: inline-flex; gap: .35rem; }
.segments-bar .dots i { width: .6rem; height: .6rem; border-radius: 50%; background: #ff6b5e; }
.segments-bar .dots i:nth-child(2) { background: #f5bf4f; }
.segments-bar .dots i:nth-child(3) { background: #43c463; }
.segments-file { flex: 1; font-variant-numeric: tabular-nums; }
.segments-qa { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(79, 195, 185, .18); color: #7dd8cf; font-weight: 600; }
.segments-qa .icon { width: .9rem; height: .9rem; }
.segments-head { background: var(--deep); }
.segments-progress { height: 4px; background: var(--surface-2); }
.segments-progress span { display: block; height: 100%; width: 100%; background: var(--grad-accent); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
	.js .segments-progress span { transform: scaleX(0); }
	.js .segments.is-playing .segments-progress span { transition: transform 2.2s cubic-bezier(.3, .6, .2, 1) .3s; transform: scaleX(1); }
	.segments { animation: float 7s ease-in-out infinite; }
}
@keyframes float { 50% { transform: translateY(-8px); } }

/* Stats band */
.stats { margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem)); position: relative; z-index: 2; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.stats-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center;
	padding: 1.25rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: 0 16px 34px -26px rgba(15, 42, 46, .55); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--tone); box-shadow: 0 22px 40px -24px rgba(15, 42, 46, .5); }
.stat-icon { grid-row: span 2; width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; background: var(--tone-wash); color: var(--tone-text); }
.stat-icon .icon { width: 1.45rem; height: 1.45rem; }
.stat-num { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .86rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 60rem) { .stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 26rem) { .stat { grid-template-columns: 1fr; } .stat-icon { grid-row: auto; margin-bottom: .5rem; } }

/* About */
.portrait { position: relative; background: linear-gradient(160deg, #dcf1ee, #f6eedc); border: 0; box-shadow: 0 24px 40px -28px rgba(15, 42, 46, .6); overflow: visible; }
.portrait img { border-radius: var(--radius-lg); }
.portrait-tag {
	position: absolute; bottom: 1rem; inset-inline-start: -.75rem; display: inline-flex; align-items: center; gap: .4rem;
	padding: .45rem .8rem; border-radius: 999px; background: var(--deep); color: #fff; font-size: .82rem; font-weight: 600;
	box-shadow: 0 10px 20px -10px rgba(15, 42, 46, .7);
}
.portrait-tag .icon { color: #d9a94f; width: 1rem; height: 1rem; }
@media (prefers-reduced-motion: no-preference) { .portrait-tag { animation: float 5s ease-in-out infinite; } }
.iso-note { display: flex; gap: .85rem; align-items: flex-start; border-inline-start: 0; border-radius: var(--radius-lg); background: var(--brass-wash); }
.iso-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 10px; background: var(--brass); color: #fff; }
.iso-icon .icon { width: 1.3rem; height: 1.3rem; }

.agencies-title { display: flex; align-items: center; gap: .6rem; }
.agencies-title .icon { color: var(--teal); }
.agencies-title b { color: var(--teal-text); font-size: 1.15em; }
.marquee { overflow: hidden; padding-block: .35rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { list-style: none; display: flex; gap: .75rem; width: max-content; }
.marquee-track li {
	white-space: nowrap; padding: .6rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
	background: var(--bg); border: 1px solid var(--line); color: var(--text-soft);
}
.marquee-track li:nth-child(3n+1) { border-color: rgba(27, 127, 122, .35); }
.marquee-track li:nth-child(3n+2) { border-color: rgba(184, 134, 43, .35); }
@media (prefers-reduced-motion: no-preference) {
	.marquee-track { animation: marquee 38s linear infinite; }
	.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 44s; }
	.marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { flex-wrap: wrap; width: auto; padding-inline: var(--gutter); } .marquee-track li[aria-hidden] { display: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
.agencies .marquee + .marquee { margin-top: .5rem; }
.agencies-list { display: none; }

/* Why me cards */
.why-list { border-top: 0; gap: 1rem; margin-top: 1.5rem; }
.why-card {
	padding: 1.5rem !important; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
	flex-direction: column; align-items: flex-start !important; gap: 1rem !important; position: relative; overflow: hidden;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.why-card::before { display: none !important; }
.why-card::after { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--tone); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.why-card:hover { transform: translateY(-5px); border-color: transparent; box-shadow: 0 22px 40px -24px rgba(15, 42, 46, .45); }
.why-card:hover::after { transform: scaleX(1); }
.why-icon { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; background: var(--tone-wash); color: var(--tone-text); transition: transform .3s; }
.why-card:hover .why-icon { transform: rotate(-6deg) scale(1.08); }
.why-icon .icon { width: 1.5rem; height: 1.5rem; }

/* Services band */
.services { position: relative; overflow: hidden; background: linear-gradient(150deg, #0f2a2e 0%, #123c40 55%, #16504f 100%); isolation: isolate; }
.services-bg {
	position: absolute; inset: 0; z-index: -1; opacity: .6;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06'%3E%3Cpath d='M36 8l8.4 19.6L64 36l-19.6 8.4L36 64l-8.4-19.6L8 36l19.6-8.4z'/%3E%3Ccircle cx='36' cy='36' r='10'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="dark"] .services { background: linear-gradient(150deg, #071316, #0d2a2c 60%, #10393a); }
.services-col h3 { display: flex; align-items: center; gap: .5rem; }
.services-col h3 .icon { color: #d9a94f; }
.icon-list li { display: flex; align-items: center; gap: .75rem; transition: padding .2s, color .2s; }
.icon-list li .icon { width: 2rem; height: 2rem; padding: .42rem; border-radius: 8px; background: rgba(79, 195, 185, .14); color: #7dd8cf; transition: background .2s, transform .2s; }
.icon-list li:nth-child(even) .icon { background: rgba(217, 169, 79, .14); color: #e3c27e; }
.icon-list li:hover { padding-inline-start: .35rem; color: #fff; }
.icon-list li:hover .icon { transform: scale(1.1); }
.services-pairs li { display: flex; align-items: center; gap: .6rem; }
.services-pairs li::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: linear-gradient(135deg, #4fc3b9, #d9a94f); flex-shrink: 0; }
.services-note { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.services-note .icon { color: #d9a94f; }

/* Technology */
.tech-group { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform .25s, box-shadow .25s, border-color .25s; }
.tech-group:hover { transform: translateY(-4px); border-color: var(--tone); box-shadow: 0 20px 36px -26px rgba(15, 42, 46, .5); }
.tech-group h3 { display: flex; align-items: center; gap: .6rem; border-bottom: 0; padding-bottom: .25rem; }
.tech-icon { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: var(--tone-wash); color: var(--tone-text); flex-shrink: 0; }
.tech-icon .icon { width: 1.25rem; height: 1.25rem; }
.tech-group ul { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.tech-group li { padding: 0; border: 0; }
.tech-group li a, .tech-group li:not(:has(a)) { display: inline-block; padding: .32rem .7rem; border-radius: 999px; font-size: .9rem; background: var(--tone-wash); color: var(--tone-text); font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.tech-group li a:hover { background: var(--tone); color: #fff; text-decoration: none; transform: translateY(-2px); }
.tech-groups { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

/* CV band */
.cv-band .wrap { padding-inline: var(--gutter); }
.cv-inner { position: relative; overflow: hidden; background: var(--grad-brand); max-width: none; margin: 0; width: auto; isolation: isolate; }
.cv-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 6l6.5 15.5L50 28l-15.5 6.5L28 50l-6.5-15.5L6 28l15.5-6.5z' fill='none' stroke='%23ffffff' stroke-opacity='.08'/%3E%3C/svg%3E"); }
.cv-icon { width: 3.25rem; height: 3.25rem; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #d9a94f; flex-shrink: 0; }
.cv-icon .icon { width: 1.6rem; height: 1.6rem; }
.cv-text { flex: 1; min-width: 14rem; }
@media (max-width: 72rem) { .cv-inner { margin-inline: 0; } }

/* Portfolio */
.cert-link { transition: transform .25s; }
.cert-link:hover { transform: translateY(-5px); }
.cert-paper { position: relative; transition: border-color .2s, background-color .2s, box-shadow .25s; }
.cert-link:hover .cert-paper { box-shadow: 0 22px 40px -26px rgba(15, 42, 46, .55); }
.cert-zoom { position: absolute; top: .6rem; inset-inline-end: .6rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: #fff; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .25s; }
.cert-zoom .icon { width: 1.05rem; height: 1.05rem; }
.cert-link:hover .cert-zoom, .cert-link:focus-visible .cert-zoom { opacity: 1; transform: none; }
.cert-filter button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Blog cards */
.post-card { border-radius: var(--radius-lg); transition: transform .25s; }
.post-card:hover { transform: translateY(-5px); }
.post-card-img { border-radius: var(--radius-lg); box-shadow: 0 18px 34px -26px rgba(15, 42, 46, .6); }
.post-card-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem; font-weight: 600; color: var(--teal-text); font-size: .95rem; }
.post-card-more .icon, .link-arrow .icon { transition: transform .2s; width: 1rem; height: 1rem; }
[dir="rtl"] .post-card-more .icon, [dir="rtl"] .link-arrow .icon { transform: scaleX(-1); }
.post-card-link:hover .post-card-more .icon { transform: translateX(4px); }
[dir="rtl"] .post-card-link:hover .post-card-more .icon { transform: scaleX(-1) translateX(4px); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; }

/* Contact cards */
.contact-cards { list-style: none; display: grid; gap: .7rem; margin-top: 1.5rem; }
.contact-cards li { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: border-color .2s, transform .2s; }
.contact-cards li:hover { border-color: var(--teal); transform: translateX(3px); }
[dir="rtl"] .contact-cards li:hover { transform: translateX(-3px); }
.cc-icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--tone-wash); color: var(--tone-text); }
.cc-icon .icon { width: 1.2rem; height: 1.2rem; }
.cc-body { display: flex; flex-direction: column; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.cc-body small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.cc-body a { text-decoration: none; }
.cc-body a:hover { color: var(--teal-text); }
.contact-form { box-shadow: 0 30px 60px -40px rgba(15, 42, 46, .6); position: relative; overflow: hidden; }
.contact-form::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--grad-accent); }
.contact-form > h3 { display: flex; align-items: center; gap: .55rem; }
.contact-form > h3 .icon { color: var(--teal); }
[dir="rtl"] .contact-form > h3 .icon, [dir="rtl"] .hero-actions .btn-glow .icon { transform: scaleX(-1); }
.at-form .wpcf7-submit { background: var(--grad-brand); border-color: transparent; color: #fff; }

/* Back to top with scroll-progress ring */
.to-top {
	position: fixed; bottom: 1.25rem; inset-inline-end: 1.25rem; z-index: 40; width: 3rem; height: 3rem; border-radius: 50%;
	display: grid; place-items: center; background: var(--surface); color: var(--teal-text); box-shadow: 0 12px 28px -14px rgba(15, 42, 46, .6);
	opacity: 0; transform: translateY(1rem); pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top .icon { width: 1.2rem; height: 1.2rem; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--sp, 0) * 100); stroke-linecap: round; }

/* Scroll reveal (only when JS is running; content is visible without it) */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }
	.js [data-reveal].is-in { opacity: 1; transform: none; }
	.js .section-title::after { transform: scaleX(0); }
	.js .is-in .section-title::after, .js .section-title.is-in::after { transform: scaleX(1); }
	.js .hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 110ms + 80ms); }
	.js .hero-kicker[data-reveal] { --d: 0; } .js .hero-title[data-reveal] { --d: 1; } .js .hero-lead[data-reveal] { --d: 2; } .js .hero-actions[data-reveal] { --d: 3; } .js .hero-badges[data-reveal] { --d: 4; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* v1.1 fixes */
.stat-num { direction: ltr; unicode-bidi: isolate; justify-self: start; }
@media (max-width: 34rem) {
	.about-side { grid-template-columns: 1fr; }
	.portrait { max-width: 17rem; }
	.iso-note { margin-top: 1.25rem; }
}

/* Header: never wrap or squeeze the action buttons */
.header-actions { flex-shrink: 0; }
.header-actions > * { flex-shrink: 0; }
.header-cta { white-space: nowrap; }
.icon-btn { flex-shrink: 0; aspect-ratio: 1; }
.site-header .wrap { max-width: 84rem; }
.nav-list a { white-space: nowrap; }
@media (max-width: 82rem) { .header-cta { display: none; } }
@media (min-width: 58.01rem) and (max-width: 82rem) {
	.nav-list { gap: 0; }
	.nav-list a { padding: .45rem .5rem; gap: .35rem; font-size: .92rem; }
}
@media (min-width: 58.01rem) and (max-width: 66rem) {
	.brand-role { display: none; }
	.nav-list a { padding: .45rem .4rem; font-size: .88rem; }
}
