/* ============================================================
   MoKhairy 3.0 — Dark Premium (Linear/Vercel school)
   Emerald identity · Huge bold type · Light elegant motion
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #060a08;
  --bg-soft: #0a120e;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-strong: rgba(255, 255, 255, 0.045);
  --border: rgba(148, 224, 195, 0.10);
  --border-strong: rgba(148, 224, 195, 0.22);
  --text: #eef6f1;
  --muted: #8fa39a;
  --accent: #34d399;
  --accent-deep: #10b981;
  --on-accent: #04120c;
  --glow: rgba(52, 211, 153, 0.14);
  --grid-line: rgba(255, 255, 255, 0.032);
  --code-bg: #07100c;
  --shadow-card: 0 24px 60px -28px rgba(0, 0, 0, 0.7);

  --font-head: "Space Grotesk", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
}

[data-theme="light"] {
  --bg: #f2f6f2;
  --bg-soft: #e8eee8;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: #ffffff;
  --border: rgba(12, 60, 40, 0.12);
  --border-strong: rgba(12, 60, 40, 0.24);
  --text: #0b1712;
  --muted: #5c7066;
  --accent: #0b9d6a;
  --accent-deep: #0a8a5e;
  --on-accent: #ffffff;
  --glow: rgba(13, 157, 106, 0.10);
  --grid-line: rgba(10, 45, 30, 0.05);
  --code-bg: #0c1510;
  --shadow-card: 0 24px 50px -30px rgba(10, 40, 28, 0.35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

::selection { background: var(--accent); color: var(--on-accent); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

.hidden { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Ambient background ---------- */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow-a {
  width: 620px; height: 620px;
  top: -220px; inset-inline-start: -160px;
  background: radial-gradient(circle, var(--glow), transparent 65%);
}
.glow-b {
  width: 520px; height: 520px;
  bottom: -200px; inset-inline-end: -140px;
  background: radial-gradient(circle, var(--glow), transparent 65%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; }

/* ---------- Reveal motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
  }
  [data-reveal].in { opacity: 1; transform: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--on-accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px var(--glow);
}
.brand-name { font-family: var(--font-head); font-size: 1rem; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-strong); }
.nav-actions { display: flex; gap: 8px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.chip-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn { padding: 8px 10px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(70px, 11vh, 120px) 0 clamp(60px, 9vh, 100px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 5vw, 70px);
  align-items: center;
}
.overline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.55rem, 6.2vw, 5.1rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 24px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), #7ee8c7 60%, var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px var(--glow));
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  max-width: 34em;
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.chips-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.chip-dot .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- Terminal ---------- */
.terminal {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: var(--shadow-card), 0 0 46px -14px var(--glow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.93rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: #2b3a33; }
.dot:nth-child(1) { background: #f16a5d; }
.dot:nth-child(2) { background: #f5bf4f; }
.dot:nth-child(3) { background: #62c554; }
.terminal-title { margin-inline-start: auto; color: var(--muted); font-size: 0.8rem; }
.terminal-body { padding: 20px 20px 24px; display: grid; gap: 9px; }
.terminal-body p { white-space: nowrap; overflow: hidden; }
/* terminal keeps a dark canvas in BOTH themes — lock its text colors */
.terminal, .mini-terminal { color: #e9f4ee; }
.terminal .t-out, .mini-terminal .t-out, .mini-terminal .mt-title { color: #8fa39a; }
.t-prompt { color: var(--accent); font-weight: 600; }
.t-pkg { color: #7ee8c7; }
.t-cursor {
  display: inline-block;
  width: 9px; height: 17px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--on-accent);
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px var(--glow); }
.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-strong); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; border-radius: 10px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vh, 110px) 0; }
.section-alt {
  background: linear-gradient(180deg, transparent, var(--bg-soft) 18%, var(--bg-soft) 82%, transparent);
  border-block: 1px solid var(--border);
}
.section-head { margin-bottom: clamp(36px, 5vh, 56px); }
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.section-head h2::after {
  content: "_";
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
}
.section-head p { color: var(--muted); max-width: 44em; }

/* ---------- Feature cards ---------- */
.feature-card {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  gap: clamp(24px, 3.5vw, 52px);
  align-items: center;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  margin-bottom: 26px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), 0 0 60px -18px var(--glow);
  transform: translateY(-3px);
}
.feature-card.flip .feature-media { order: 2; }
.feature-card.flip .feature-body { order: 1; }

.feature-media {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
}
.feature-media img { width: 100%; }
.media-panel { padding: 26px; display: grid; place-items: center; }

.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  background: var(--surface);
}
.feature-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.feature-body > p { color: var(--muted); font-size: 0.98rem; margin-bottom: 22px; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  padding: 18px 0;
  border-block: 1px solid var(--border);
  margin-bottom: 22px;
}
.metric-row strong {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
}
.metric-row span { font-size: 0.8rem; color: var(--muted); }

.link-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Mini terminal inside cards ---------- */
.mini-terminal {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 18px;
  display: grid;
  gap: 8px;
  box-shadow: 0 0 40px -16px var(--glow);
}
.mt-title { color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 4px; }

/* ---------- More builds grid ---------- */
.more-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 44px 0 20px;
  color: var(--text);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.mini-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px -18px var(--glow);
}
.mini-card h4 { font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; }
.mini-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.mini-card.soon { opacity: 0.65; border-style: dashed; }

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.stack-col h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.stack-col h4.mt { margin-top: 26px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row span {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.pill-row span:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------- About ---------- */
.about-wrap { max-width: 860px; }
.about-body { display: grid; gap: 18px; }
.about-body p { color: var(--muted); font-size: 1.05rem; }
.about-body p:first-child { color: var(--text); font-size: 1.12rem; }

/* ---------- Contact ---------- */
.contact-wrap { text-align: center; }
.contact-wrap .section-head p { margin-inline: auto; }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.contact-note {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 34px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: fixed;
  top: -70px;
  inset-inline-start: 16px;
  z-index: 100;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.92rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Nav active (scrollspy) ---------- */
.nav-links a.active { color: var(--text); background: var(--surface-strong); }

/* ---------- Mobile menu ---------- */
.nav-burger { display: none; }
.mobile-menu {
  position: fixed;
  top: 64px;
  inset-inline: 0;
  z-index: 49;
  display: none;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 6px clamp(20px, 4vw, 40px) 16px;
}
.mobile-menu.open { display: block; animation: menuIn 0.22s ease; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.mobile-menu a {
  display: block;
  padding: 14px 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu nav a:last-child { border-bottom: 0; }

/* ---------- Mini-card external-link arrow ---------- */
a.mini-card { position: relative; }
a.mini-card::after {
  content: "↗";
  position: absolute;
  top: 16px;
  inset-inline-end: 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s, transform 0.2s;
}
a.mini-card:hover::after { opacity: 1; transform: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 90;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Thumb cards (client & product builds) ---------- */
.thumb-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.thumb-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 14px 34px -18px var(--glow); }
.thumb-media { display: block; border-bottom: 1px solid var(--border); background: var(--code-bg); overflow: hidden; }
.thumb-media img { width: 100%; height: 190px; object-fit: cover; display: block; transition: transform 0.35s; }
.thumb-card:hover .thumb-media img { transform: scale(1.03); }
.thumb-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.thumb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.thumb-top h4 { font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; }
.thumb-year { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.thumb-body p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.thumb-type { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.05em; align-self: center; }

/* ---------- Design & identity ---------- */
.design-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.design-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.design-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 14px 34px -18px var(--glow); }
.design-card img { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform 0.35s; }
.design-card:hover img { transform: scale(1.04); }
.design-meta { padding: 12px 14px 14px; }
.design-meta h4 { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; }
.design-meta span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ---------- Certifications archive ---------- */
.cert-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.cert-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cert-chip:hover { border-color: var(--border-strong); color: var(--text); }
.cert-chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--surface-strong); }
.certs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.cert-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 12px 30px -16px var(--glow); }
.cert-media { border-bottom: 1px solid var(--border); background: #0a0f0d; }
.cert-media img { width: 100%; height: 210px; object-fit: cover; object-position: top; display: block; }
.cert-meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.cert-meta h4 { font-family: var(--font-head); font-size: 0.98rem; font-weight: 700; line-height: 1.35; }
.cert-issuer { color: var(--muted); font-size: 0.8rem; }
.cert-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 4px; }
.cert-line b { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); font-weight: 600; letter-spacing: 0.04em; }
.cert-line small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.recent-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 38px 0 18px;
  color: var(--muted);
}
.recent-title::after { content: "_"; color: var(--accent); font-family: var(--font-mono); font-weight: 400; }

/* ---------- Arabic / RTL ---------- */
[dir="rtl"] body,
[dir="rtl"] .brand-name,
[dir="rtl"] .nav-links a,
[dir="rtl"] .btn,
[dir="rtl"] .section-head h2,
[dir="rtl"] .section-head p,
[dir="rtl"] .feature-body h3,
[dir="rtl"] .feature-body > p,
[dir="rtl"] .mini-card h4,
[dir="rtl"] .mini-card p,
[dir="rtl"] .about-body p,
[dir="rtl"] .hero-sub,
[dir="rtl"] .footer { font-family: "IBM Plex Sans Arabic", var(--font-body); }

[dir="rtl"] .hero-title { font-family: "IBM Plex Sans Arabic", var(--font-head); letter-spacing: 0; line-height: 1.14; font-size: clamp(2.1rem, 5.4vw, 4.2rem); }
[dir="rtl"] .section-head h2 { letter-spacing: 0; }
[dir="rtl"] .overline { letter-spacing: 0.02em; }
[dir="rtl"] .metric-row strong { font-family: var(--font-mono); }
[dir="rtl"] .mobile-menu a { font-family: "IBM Plex Sans Arabic", var(--font-body); }
[dir="rtl"] .toast { font-family: "IBM Plex Sans Arabic", var(--font-body); }
[dir="rtl"] .thumb-top h4,
[dir="rtl"] .thumb-body p,
[dir="rtl"] .design-meta h4,
[dir="rtl"] .design-meta span,
[dir="rtl"] .cert-meta h4,
[dir="rtl"] .cert-issuer { font-family: "IBM Plex Sans Arabic", var(--font-body); }
[dir="rtl"] .thumb-type,
[dir="rtl"] .cert-chip,
[dir="rtl"] .cert-line b { letter-spacing: 0; }

.contact-note a { color: inherit; transition: color 0.2s; }
.contact-note a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .terminal { max-width: 560px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card.flip .feature-media { order: 0; }
  .feature-card.flip .feature-body { order: 1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .cert-media img { height: 240px; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-row li:last-child { grid-column: 1 / -1; }
  .hero { padding-top: 54px; }
  .chips-row { gap: 8px; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; }
  .link-row .btn { width: auto; }
}

/* ---------- About: stats · capabilities · quotes ---------- */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  transition: border-color 0.25s, transform 0.25s;
}
.stat:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 6px;
}
.stat span { color: var(--muted); font-size: 13.5px; letter-spacing: 0.02em; }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.cap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
}
.cap h4 {
  font-family: var(--font-head);
  font-size: 16px;
  color: var(--text);
  margin: 0 0 8px;
}
.cap h4::before { content: "// "; color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.cap p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.quote {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  padding: 22px 22px 18px;
  position: relative;
}
.quote::before {
  content: "\201C";
  position: absolute;
  top: 2px;
  inset-inline-start: 14px;
  font-family: var(--font-head);
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}
.quote blockquote {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.quote figcaption {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

[dir="rtl"] .stat b { letter-spacing: 0; }
[dir="rtl"] .cap h4::before { content: "" ; }
[dir="rtl"] .quote::before { content: "\201D"; }

@media (max-width: 980px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
}
