/* ==========================================================================
   HISHAM RAMADAN — DIGITAL ARCHITECT
   Design system for the premium personal brand website (static site).
   Master Creative Brief, 25 Nov 2026. Palette / typography are exact.
   Pages include the Google Fonts <link> (see DESIGN_CONTRACT.md);
   this file declares the font stacks with system fallbacks.
   Electric Blue is used SELECTIVELY only. No purple-heavy gradients,
   no neon. WCAG 2.2 AA: visible focus, AA body contrast, reduced motion.
   ========================================================================== */

/* ------------------------------------------------------------------ 1. Tokens */
:root {
  /* Exact brand palette — do not change these values. */
  --color-navy: #101722;          /* Deep Navy — primary identity */
  --color-midnight: #182536;      /* Midnight Blue — secondary dark surface */
  --color-accent: #3478F6;        /* Electric Blue — selective accent only */
  --color-accent-hover: #2a63d6;  /* Darker blue for hover/focus states */
  --color-accent-ink: #1e4fb0;    /* Blue text on light surfaces (AA) */
  --color-steel: #a9b8ca;         /* Steel Silver — secondary text on dark */
  --color-soft: #f4f6f9;          /* Soft White — light surfaces / text on dark */
  --color-muted: #687587;         /* Muted Gray — secondary text on light */
  --color-white: #ffffff;         /* Pure White */

  /* Semantic aliases (pages/components use these, never raw hex). */
  --bg-dark: var(--color-navy);
  --bg-dark-2: var(--color-midnight);
  --bg-light: var(--color-soft);
  --bg-white: var(--color-white);
  --text-dark: var(--color-navy);
  --text-on-dark: var(--color-soft);
  --text-on-dark-2: var(--color-steel);
  --text-muted: var(--color-muted);
  --border-light: #dfe5ec;
  --border-dark: rgba(169, 184, 202, 0.22);
  --border-subtle: rgba(16, 23, 34, 0.12);

  /* Typography — Manrope (EN headings), Inter (EN body),
     IBM Plex Sans Arabic (AR headings + body). */
  --font-heading-en: "Manrope", "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body-en: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Manrope", "Inter", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --font-heading: var(--font-heading-en);
  --font-body: var(--font-body-en);

  /* Fluid type scale (brief: hero 64–80, section 44–56, card 22–28,
     body 16–18, labels 12–14). */
  --fs-hero: clamp(2.75rem, 5.2vw + 1rem, 5rem);        /* 44–80px */
  --fs-section: clamp(2rem, 3.4vw + 0.6rem, 3.5rem);   /* 32–56px */
  --fs-h3: clamp(1.375rem, 1.6vw + 0.9rem, 1.75rem);   /* 22–28px */
  --fs-h4: clamp(1.125rem, 0.8vw + 0.9rem, 1.375rem);  /* 18–22px */
  --fs-body: clamp(1rem, 0.3vw + 0.9rem, 1.125rem);    /* 16–18px */
  --fs-small: 0.9375rem;                                /* 15px */
  --fs-label: 0.8125rem;                                /* 13px */
  --lh-tight: 1.08;
  --lh-heading: 1.15;
  --lh-body: 1.7;
  --lh-ar: 1.85; /* Arabic needs taller line-height */

  /* Spacing / layout */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --container-max: 76rem;   /* 1216px */
  --container-wide: 84rem;  /* 1344px */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(16, 23, 34, 0.08);
  --shadow-md: 0 8px 28px rgba(16, 23, 34, 0.10);
  --shadow-lg: 0 20px 48px rgba(16, 23, 34, 0.16);
  --shadow-dark: 0 20px 48px rgba(0, 0, 0, 0.45);
  --header-height: 4.5rem;
  --transition: 0.25s ease;
}

/* Arabic language: swap the whole stack to IBM Plex Sans Arabic. */
[lang="ar"],
[dir="rtl"] {
  --font-heading: var(--font-ar);
  --font-body: var(--font-ar);
}

/* ------------------------------------------------------------------ 2. Reset / base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-dark);
  background: var(--bg-white);
  overflow-x: hidden; /* never allow horizontal scroll */
}

[dir="rtl"] body { line-height: var(--lh-ar); }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding-inline-start: 1.25rem; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--text-dark);
}
h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-section); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0 0 1rem; }
::selection { background: var(--color-accent); color: var(--color-white); }

/* Visible focus — WCAG 2.2 AA, never removed. */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-footer :focus-visible,
.hero--dark :focus-visible { outline-color: var(--color-steel); }

/* Skip link (keyboard users). */
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem;
  z-index: 200; background: var(--color-navy); color: var(--color-white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 700; transition: top var(--transition);
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ------------------------------------------------------------------ 3. Layout utilities */
.container { width: min(100% - 2.5rem, var(--container-max)); margin-inline: auto; }
.container--wide { width: min(100% - 2.5rem, var(--container-wide)); margin-inline: auto; }
.section { padding: var(--space-2xl) 0; }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--text-on-dark); }
.section--dark p { color: var(--text-on-dark-2); }
.section--light { background: var(--bg-light); }
.section--tight { padding: var(--space-xl) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--fs-label); font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-accent-ink); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--color-accent); }
.section--dark .eyebrow { color: var(--color-accent); }
.section-head { max-width: 46rem; margin-bottom: var(--space-lg); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 2rem; height: 2px; background: var(--color-accent); }
/* Page titles use <h1> semantics at section size (same as case/article hero h1s). */
.section-head h1 { font-size: var(--fs-section); }
.section-head p.lead, .lead { font-size: clamp(1.0625rem, 0.5vw + 0.9rem, 1.25rem); color: var(--text-muted); }
.section--dark .lead { color: var(--text-on-dark-2); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }

/* Architectural grid backdrop (subtle, on dark sections only). */
.arch-grid {
  background-image:
    linear-gradient(rgba(169, 184, 202, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 184, 202, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* ------------------------------------------------------------------ 4. Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16, 23, 34, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-dark);
}
.site-header--light {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border-light);
}
.site-header--light .nav-link { color: var(--text-dark); }
.site-header--light .nav-link:hover,
.site-header--light .nav-link.is-active { color: var(--color-accent-ink); }
.site-header--light .brand-name { color: var(--text-dark); }
.site-header--light .lang-switch { color: var(--text-dark); border-color: var(--border-subtle); }
.site-header--light .nav-toggle span { background: var(--text-dark); }

.nav { display: flex; align-items: center; gap: var(--space-md); min-height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 0.75rem; margin-inline-end: auto; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 2.5rem; width: auto; }
.brand-name {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
  letter-spacing: 0.06em; color: var(--color-white); line-height: 1.2; white-space: nowrap;
}
.brand-tagline {
  display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--color-steel); text-transform: uppercase; white-space: nowrap;
}

.nav-list {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-link {
  display: block; padding: 0.6rem 0.6rem; border-radius: var(--radius-sm);
  color: var(--text-on-dark-2); font-weight: 600; font-size: 0.9rem;
  position: relative; white-space: nowrap;
}
.nav-link:hover { color: var(--color-white); text-decoration: none; }
.nav-link.is-active { color: var(--color-white); }
.nav-link.is-active::after {
  content: ""; position: absolute; inset-inline: 0.8rem; bottom: 0.15rem;
  height: 2px; background: var(--color-accent); border-radius: 2px;
}
.nav-cta { margin-inline-start: 0.5rem; white-space: nowrap; flex-shrink: 0; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.8rem; border: 1px solid var(--border-dark); border-radius: var(--radius-pill);
  color: var(--text-on-dark); font-weight: 700; font-size: 0.85rem; background: transparent;
}
.lang-switch:hover { border-color: var(--color-accent); color: var(--color-white); text-decoration: none; }

/* Mobile nav toggle — hidden on desktop. */
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm); padding: 0.6rem; line-height: 0;
}
.nav-toggle span {
  display: block; width: 1.4rem; height: 2px; background: var(--color-white);
  margin: 4px 0; transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ 5. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: var(--radius-sm);
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem; line-height: 1.3;
  border: 1px solid transparent; text-align: center;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--color-accent); color: var(--color-white); }
.btn--primary:hover { background: var(--color-accent-hover); color: var(--color-white); }
.btn--secondary {
  background: transparent; color: var(--text-dark);
  border-color: var(--border-subtle);
}
.btn--secondary:hover { border-color: var(--text-dark); }
.btn--on-dark { color: var(--color-white); border-color: rgba(169, 184, 202, 0.55); }
.btn--on-dark:hover { border-color: var(--color-white); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn--lg { padding: 1.05rem 2.25rem; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------ 6. Hero */
.hero {
  background: var(--bg-dark); color: var(--text-on-dark);
  padding: calc(var(--space-2xl) + 1rem) 0 var(--space-2xl);
  position: relative; overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-xl); align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--color-white); margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--color-accent); }
.hero__intro { color: var(--text-on-dark-2); font-size: clamp(1.0625rem, 0.5vw + 0.9rem, 1.25rem); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero__visual { position: relative; }
.hero__visual img { border-radius: var(--radius-lg); box-shadow: var(--shadow-dark); width: 100%; }
.hero__visual--portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.hero__badge {
  position: absolute; bottom: 1.25rem; inset-inline-start: 1.25rem;
  background: rgba(16, 23, 34, 0.88); border: 1px solid var(--border-dark);
  color: var(--color-white); border-radius: var(--radius-md);
  padding: 0.8rem 1.1rem; font-size: var(--fs-small); font-weight: 600;
  backdrop-filter: blur(4px);
}
.hero__badge strong { color: var(--color-accent); font-size: 1.25rem; display: block; line-height: 1.1; }

/* Experience strip under the hero. */
.stats-strip {
  background: var(--bg-dark-2); border-top: 1px solid var(--border-dark);
  color: var(--text-on-dark); padding: var(--space-lg) 0;
}
.stats-strip__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-md); }
.stat { text-align: center; padding-inline: var(--space-sm); }
.stat + .stat { border-inline-start: 1px solid var(--border-dark); }
.stat__value {
  display: block; font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.25rem); color: var(--color-white); line-height: 1.1;
}
.stat__label { color: var(--text-on-dark-2); font-size: var(--fs-small); font-weight: 600; }

/* ------------------------------------------------------------------ 7. Bento grid (Expertise) */
.bento {
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(6, 1fr);
}
.bento__card {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  grid-column: span 2; display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.bento__card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--color-steel); }
.bento__card--wide { grid-column: span 3; }
.bento__card--feature {
  grid-column: span 3; background: var(--bg-dark); color: var(--text-on-dark);
  border-color: var(--bg-dark);
}
.bento__card--feature h3 { color: var(--color-white); }
.bento__card--feature p { color: var(--text-on-dark-2); }
.bento__num {
  font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-label);
  letter-spacing: 0.12em; color: var(--color-accent-ink); margin-bottom: 0.75rem;
}
.bento__card--feature .bento__num { color: var(--color-accent); }
.bento__card h3 { margin-bottom: 0.5rem; }
.bento__card p { color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.bento__link { font-weight: 700; color: var(--color-accent-ink); display: inline-flex; gap: 0.35rem; align-items: center; }
.bento__card--feature .bento__link { color: var(--color-accent); }
.bento__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

/* ------------------------------------------------------------------ 8. Cards: case studies & articles */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.case-card, .article-card {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.case-card:hover, .article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.case-card--featured { grid-column: span 2; }
.case-card__media, .article-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-dark-2); }
.case-card__media img, .article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.case-card:hover .case-card__media img, .article-card:hover .article-card__media img { transform: scale(1.03); }
.case-card__body, .article-card__body { padding: var(--space-md); display: flex; flex-direction: column; flex: 1; }
.case-card__body h3, .article-card__body h3 { margin-bottom: 0.5rem; }
.case-card__body h3 a, .article-card__body h3 a { color: var(--text-dark); }
.case-card__body h3 a:hover, .article-card__body h3 a:hover { color: var(--color-accent-ink); }
.case-card__body p, .article-card__body p { color: var(--text-muted); flex: 1; }
.case-card__meta, .article-card__meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  font-size: var(--fs-label); color: var(--text-muted); margin-top: 1rem;
}
.case-card__meta .dot::before, .article-card__meta .dot::before { content: "•"; margin-inline-end: 0.6rem; }

/* Badges / chips */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: var(--fs-label); font-weight: 700; line-height: 1;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-pill);
  background: var(--bg-light); color: var(--text-dark); border: 1px solid var(--border-light);
  white-space: nowrap;
}
.badge--accent { background: var(--color-accent); color: var(--color-white); border-color: var(--color-accent); }
.badge--dark { background: var(--bg-dark); color: var(--color-white); border-color: var(--bg-dark); }
.badge--on-media {
  position: absolute; top: 0.9rem; inset-inline-start: 0.9rem; z-index: 2;
  background: rgba(16, 23, 34, 0.88); color: var(--color-white); border-color: transparent;
}
.chip {
  display: inline-block; padding: 0.3rem 0.75rem; border-radius: var(--radius-pill);
  background: var(--bg-light); border: 1px solid var(--border-light);
  font-size: var(--fs-label); font-weight: 600; color: var(--text-dark);
}

/* Filters (case studies + insights). */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: var(--space-lg);
}
.filter-btn {
  padding: 0.55rem 1.1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle); background: var(--bg-white);
  font-weight: 700; font-size: 0.9rem; color: var(--text-dark);
  display: inline-flex; gap: 0.45rem; align-items: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-btn:hover { border-color: var(--text-dark); }
.filter-btn.is-active { background: var(--color-navy); color: var(--color-white); border-color: var(--color-navy); }
.filter-btn .filter-count {
  font-size: 0.75rem; background: var(--bg-light); color: var(--text-muted);
  border-radius: var(--radius-pill); padding: 0.1rem 0.45rem; min-width: 1.4rem; text-align: center;
}
.filter-btn.is-active .filter-count { background: rgba(255, 255, 255, 0.18); color: var(--color-white); }
.filter-empty {
  display: none; text-align: center; padding: var(--space-xl) var(--space-md);
  border: 1px dashed var(--border-subtle); border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.filter-empty.is-visible { display: block; }
.filter-empty h3 { margin-bottom: 0.25rem; }
[hidden] { display: none !important; }

/* Search (insights). */
.search-box { position: relative; max-width: 26rem; width: 100%; }
.search-box input {
  width: 100%; padding: 0.8rem 1rem; padding-inline-end: 2.75rem;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  background: var(--bg-white); font-size: 1rem;
}
.search-box input:focus { border-color: var(--color-accent); outline: 3px solid rgba(52, 120, 246, 0.25); outline-offset: 0; }
.search-box__icon {
  position: absolute; inset-inline-end: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-weight: 700;
}
.insights-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-lg); }

/* ------------------------------------------------------------------ 9. Experience (open list, no timeline) */
.exp-item { margin-bottom: var(--space-lg); }
.exp-item:last-child { margin-bottom: 0; }
.exp-year {
  font-family: var(--font-heading); font-weight: 800; color: var(--color-accent-ink);
  font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase;
}
.exp-item h3 { margin: 0.25rem 0 0.4rem; }
.exp-item p { color: var(--text-muted); max-width: 44rem; margin-bottom: 0; }

.workplaces { margin: 0; padding: 0; list-style: none; }
.workplace { margin-bottom: var(--space-md); }
.workplace:last-child { margin-bottom: 0; }
.workplace h3 { margin: 0 0 0.2rem; }
.workplace p { color: var(--text-muted); max-width: 44rem; margin-bottom: 0; }
.workplace__meta { font-size: var(--fs-small); }

/* ------------------------------------------------------------------ 10. Toolkit */
.toolkit-group { margin-bottom: var(--space-lg); }
.toolkit-group h3 { margin-bottom: 0.75rem; }
.toolkit-list {
  display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0;
}
.toolkit-item {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.1rem; background: var(--bg-white);
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.toolkit-item:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); }
.toolkit-item img { width: 1.25rem; height: 1.25rem; object-fit: contain; }

/* ------------------------------------------------------------------ 11. Case-study detail */
.case-hero { background: var(--bg-dark); color: var(--text-on-dark); padding: var(--space-xl) 0; }
.case-hero h1 { color: var(--color-white); font-size: clamp(2rem, 3.4vw + 0.6rem, 3.5rem); }
.case-hero p { color: var(--text-on-dark-2); max-width: 44rem; }
.case-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md);
  margin: var(--space-lg) 0; padding: var(--space-md) 0;
  border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
}
.case-facts dt { font-size: var(--fs-label); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.case-facts dd { margin: 0; font-weight: 600; }
.case-section { margin-bottom: var(--space-xl); }
.case-section h2 { font-size: clamp(1.5rem, 2vw + 0.8rem, 2.25rem); margin-bottom: 0.75rem; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-light);
  cursor: zoom-in; transition: box-shadow var(--transition);
}
.gallery img:hover { box-shadow: var(--shadow-md); }
.gallery figcaption { font-size: var(--fs-small); color: var(--text-muted); margin-top: 0.5rem; }
.gallery--full { grid-template-columns: 1fr; }
.related-nav { display: flex; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border-light); }
.related-nav a { font-weight: 700; color: var(--color-accent-ink); }

/* ------------------------------------------------------------------ 12. Article detail */
.article-hero { padding: var(--space-xl) 0 var(--space-lg); }
.article-hero h1 { font-size: clamp(2rem, 3.4vw + 0.6rem, 3.5rem); max-width: 52rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; color: var(--text-muted); font-size: var(--fs-small); margin-top: 1rem; }
.article-body { max-width: 46rem; }
.article-body img { border-radius: var(--radius-lg); margin: var(--space-md) 0; }
.article-body h2 { font-size: clamp(1.5rem, 2vw + 0.8rem, 2.25rem); margin-top: 2.5rem; }
.toc {
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: var(--space-md); background: var(--bg-light); margin-bottom: var(--space-lg);
}
.toc h2 { font-size: var(--fs-h4); margin-bottom: 0.5rem; }
.toc ol { margin: 0; }
.toc a { color: var(--text-dark); }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--border-light); }
.share-row span { font-weight: 700; font-size: var(--fs-small); color: var(--text-muted); }

/* ------------------------------------------------------------------ 13. Forms */
.form { max-width: 40rem; }
.form--wide { max-width: 48rem; }
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.form-field label .required { color: var(--color-accent-ink); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); background: var(--bg-white); font-size: 1rem;
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--color-accent); outline: 3px solid rgba(52, 120, 246, 0.25); outline-offset: 0;
}
.form-field--error input, .form-field--error select, .form-field--error textarea { border-color: #b3261e; }
.form-error { display: none; color: #b3261e; font-size: var(--fs-small); font-weight: 600; margin-top: 0.35rem; }
.form-field--error .form-error { display: block; }
.form-hint { font-size: var(--fs-small); color: var(--text-muted); margin-top: 0.35rem; }
.form-note {
  background: var(--bg-light); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 1rem 1.25rem; font-size: var(--fs-small);
  color: var(--text-muted); margin-top: 1.25rem;
}
.form-note strong { color: var(--text-dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status--ok { color: var(--color-accent-ink); }
.form-status--error { color: #b3261e; }

/* ------------------------------------------------------------------ 14. Breadcrumbs */
.breadcrumbs { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 0.4rem; color: var(--color-steel); }
[dir="rtl"] .breadcrumbs li + li::before { content: "\\"; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs [aria-current="page"] { color: var(--text-dark); font-weight: 700; }
.case-hero .breadcrumbs, .hero .breadcrumbs { color: var(--text-on-dark-2); }
.case-hero .breadcrumbs a, .hero .breadcrumbs a { color: var(--text-on-dark-2); }
.case-hero .breadcrumbs [aria-current="page"], .hero .breadcrumbs [aria-current="page"] { color: var(--color-white); }

/* ------------------------------------------------------------------ 15. Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(16, 23, 34, 0.94); align-items: center; justify-content: center;
  padding: 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: min(90vw, 64rem); text-align: center; margin: 0; }
.lightbox__img { max-height: 78vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: var(--radius-md); }
.lightbox__caption { color: var(--text-on-dark-2); font-size: var(--fs-small); margin-top: 0.75rem; }
.lightbox__btn {
  position: absolute; background: rgba(255, 255, 255, 0.12); color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%;
  width: 2.75rem; height: 2.75rem; font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__btn:hover { background: var(--color-accent); border-color: var(--color-accent); }
.lightbox__close { top: 1rem; inset-inline-end: 1rem; }
.lightbox__prev { top: 50%; inset-inline-start: 1rem; transform: translateY(-50%); }
.lightbox__next { top: 50%; inset-inline-end: 1rem; transform: translateY(-50%); }
.lightbox__counter { position: absolute; bottom: 1rem; inset-inline-start: 50%; transform: translateX(-50%); color: var(--text-on-dark-2); font-size: var(--fs-small); }

/* ------------------------------------------------------------------ 16. Footer */
.site-footer { background: var(--bg-dark); color: var(--text-on-dark-2); padding: var(--space-xl) 0 var(--space-lg); }
.site-footer a { color: var(--text-on-dark-2); }
.site-footer a:hover { color: var(--color-white); text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-brand .brand-name { font-size: 1.15rem; }
.footer-brand p { font-size: var(--fs-small); max-width: 22rem; margin-top: 0.75rem; }
.site-footer h3 {
  color: var(--color-white); font-size: var(--fs-label); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { font-size: 0.95rem; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.7rem;
  border: 1px solid var(--border-dark); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.85rem; color: var(--color-white);
}
.footer-social a:hover { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid var(--border-dark); padding-top: var(--space-md);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-size: var(--fs-small);
}
/* ------------------------------------------------------------------ 17. Back to top / misc */
.back-to-top {
  position: fixed; bottom: 1.5rem; inset-inline-end: 1.5rem; z-index: 150;
  width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid var(--color-accent);
  background: var(--color-accent); color: var(--color-white);
  font-size: 1.25rem; line-height: 1; display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.back-to-top.is-visible { display: flex; }
.back-to-top:hover { background: var(--color-accent-hover); }
.page-404 { text-align: center; padding: var(--space-2xl) 0; }
.page-404 h1 { font-size: clamp(4rem, 12vw, 8rem); color: var(--color-accent); }
.cta-band {
  background: var(--bg-dark); color: var(--text-on-dark); border-radius: var(--radius-lg);
  padding: var(--space-xl); text-align: center;
}
.cta-band h2 { color: var(--color-white); }
.cta-band p { color: var(--text-on-dark-2); max-width: 36rem; margin-inline: auto; }
.cta-band .hero__actions { justify-content: center; }

/* Scroll reveal — JS adds .is-visible; no-JS / reduced-motion shows content. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ 18. Responsive */
/* Laptop 1280px */
@media (max-width: 1280px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .case-card--featured { grid-column: span 2; }
  .stats-strip__grid { grid-template-columns: repeat(5, 1fr); }
  /* Tighten the 8-item desktop nav so links stay on one line. */
  .nav { gap: 0.75rem; }
  .nav-link { font-size: 0.9rem; padding: 0.6rem 0.55rem; }
}

/* Desktop nav no longer fits below 1100px — show the hamburger earlier. */
@media (max-width: 1100px) {
  .nav-list, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .lang-switch { margin-inline-start: auto; }
  .site-header.nav--open .nav-list {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; inset-inline: 0;
    background: var(--bg-dark); border-bottom: 1px solid var(--border-dark);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-header--light.nav--open .nav-list { background: var(--bg-white); border-bottom: 1px solid var(--border-light); }
  .site-header.nav--open .nav-link { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--border-dark); }
  .site-header--light.nav--open .nav-link { border-bottom-color: var(--border-light); }
  .site-header.nav--open .nav-cta { display: block; width: 100%; margin: 1rem 0 0; }
  .nav { flex-wrap: wrap; }
}

/* Tablet 768px */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .hero__visual { max-width: 36rem; }
  .bento__card, .bento__card--wide, .bento__card--feature { grid-column: span 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .case-facts { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: var(--space-xl) 0; }
  .nav-list, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .lang-switch { margin-inline-start: auto; }
  /* Mobile menu: toggled open by JS (.nav--open on .site-header). */
  .site-header.nav--open .nav-list {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; inset-inline: 0;
    background: var(--bg-dark); border-bottom: 1px solid var(--border-dark);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-header--light.nav--open .nav-list { background: var(--bg-white); border-bottom: 1px solid var(--border-light); }
  .site-header.nav--open .nav-link { padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--border-dark); }
  .site-header--light.nav--open .nav-link { border-bottom-color: var(--border-light); }
  .site-header.nav--open .nav-cta { display: block; width: 100%; margin: 1rem 0 0; }
  .nav { flex-wrap: wrap; }
  .grid-3, .card-grid { grid-template-columns: 1fr; }
  .case-card--featured { grid-column: span 1; }
  .bento { grid-template-columns: 1fr; }
  .bento__card, .bento__card--wide, .bento__card--feature { grid-column: span 1; }
  .stats-strip__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .stat + .stat { border-inline-start: 0; }
  .stat:nth-child(odd) { border-inline-end: 1px solid var(--border-dark); }
  .gallery { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-bottom { flex-direction: column; }
  .lightbox__prev { inset-inline-start: 0.5rem; }
  .lightbox__next { inset-inline-end: 0.5rem; }
  .insights-toolbar { flex-direction: column; }
  .search-box { max-width: none; }
}

/* Mobile 390px */
@media (max-width: 480px) {
  .container, .container--wide { width: min(100% - 2rem, var(--container-max)); }
  .brand-tagline { display: none; }
  .brand-name { font-size: 0.95rem; }
  .hero { padding: var(--space-xl) 0; }
  .hero__actions .btn { width: 100%; }
  .stats-strip__grid { grid-template-columns: 1fr 1fr; }
  .case-facts { grid-template-columns: 1fr; }
  .btn { padding: 0.8rem 1.4rem; }
}

/* Smaller mobile 360px */
@media (max-width: 360px) {
  :root { --header-height: 4rem; }
  .brand-logo { height: 2rem; }
  .lang-switch { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
  .filter-btn { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
  .back-to-top { bottom: 1rem; inset-inline-end: 1rem; width: 2.75rem; height: 2.75rem; }
}

/* ------------------------------------------------------------------ 19. RTL */
[dir="rtl"] {
  text-align: right;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; }
[dir="rtl"] .eyebrow { letter-spacing: 0.02em; }
[dir="rtl"] .brand-name { letter-spacing: 0; }
[dir="rtl"] .exp-year { letter-spacing: 0.02em; }
[dir="rtl"] .nav-link.is-active::after { inset-inline: 0.8rem; }
/* Flip directional arrows/icons in RTL (arrows point the other way). */
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ------------------------------------------------------------------ 20. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
  .case-card:hover .case-card__media img,
  .article-card:hover .article-card__media img { transform: none; }
}

/* ------------------------------------------------------------------ 21. Print (CV page) */
@media print {
  .site-header, .site-footer, .nav-toggle, .back-to-top, .hero__actions,
  .cta-band, .share-row, .form, .lightbox, .skip-link, .breadcrumbs,
  .filter-bar, .insights-toolbar, .related-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; }
  h1, h2, h3, h4 { color: #000; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .section { padding: 0.75rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .case-card, .article-card, .bento__card { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
  @page { margin: 1.8cm; }
}

/* ------------------------------------------------------------------ 22. Books */
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.book-card {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.book-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.book-card__media { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg-dark-2); }
.book-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.book-card:hover .book-card__media img { transform: scale(1.03); }
.book-card__body { padding: var(--space-md); display: flex; flex-direction: column; flex: 1; }
.book-card__body h3 { margin-bottom: 0.25rem; }
.book-card__subtitle { font-weight: 600; color: var(--text-dark); margin-bottom: 0.75rem; }
.book-card__body p { color: var(--text-muted); flex: 1; }
.book-card__meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  font-size: var(--fs-label); color: var(--text-muted); margin-top: 1rem; flex: 0;
}
.book-card__meta .dot::before { content: "•"; margin-inline-end: 0.6rem; }
.book-card__actions { margin-top: 1.25rem; }
@media (max-width: 1280px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-card__media { aspect-ratio: 2 / 3; max-width: 22rem; margin-inline: auto; width: 100%; }
}
@media print {
  .book-card { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
}
