/* =========================================================
   d7meeAz — personal research desktop
   Retro-OS / Bliss / phosphor archive
   ========================================================= */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/assets/fonts/IBMPlexSansArabic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/assets/fonts/IBMPlexSansArabic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --desktop: #06110b;
  --desktop-2: #0a1d12;
  --window: #ece9d8;
  --window-2: #f8f6ec;
  --window-3: #e4dfcd;
  --title-a: #0a5bd8;
  --title-b: #2f7cf6;
  --title-c: #063b98;
  --ink: #11160f;
  --ink-2: #3d4738;
  --muted: #66705f;
  --line: #b9b3a2;
  --line-2: #8f8a7a;
  --green: #1e6b38;
  --green-2: #2d8a4d;
  --phosphor: #6bff8f;
  --red: #b5302a;
  --amber: #9a5a10;
  --blue: #0a4fc4;
  --bone: #f2efe9;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Liberation Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --arabic: 'IBM Plex Sans Arabic', 'Liberation Sans', sans-serif;
  --head: 58px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); }
body {
  margin: 0;
  background: var(--desktop);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(70% 60% at 80% 0%, rgba(30,107,56,.22), transparent 60%),
    radial-gradient(60% 50% at 10% 80%, rgba(10,79,196,.10), transparent 65%),
    linear-gradient(180deg, #06110b 0%, #08160e 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: .015;
  background: repeating-linear-gradient(180deg, #fff 0, #fff 1px, transparent 1px, transparent 4px);
  mix-blend-mode: screen;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--phosphor); color: #041008; }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.ltr { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 1200;
  transform: translateY(-180%);
  background: var(--window); color: var(--ink);
  border: 2px solid var(--ink); padding: 9px 13px;
  font-family: var(--mono); font-size: 11px;
  transition: transform .18s var(--ease);
}
.skip:focus { transform: translateY(0); }

/* ---------- title bar ---------- */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--head);
  background: linear-gradient(180deg, var(--title-a) 0%, #0a4fc4 48%, var(--title-c) 100%);
  border-bottom: 1px solid #03245c;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 3px 14px rgba(0,0,0,.28);
}
.titlebar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand-mark {
  font-family: var(--display); font-weight: 700; font-size: 18px;
  letter-spacing: -.04em; color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.brand-name {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: #dbe8ff;
}
.brand:hover .brand-mark { color: var(--phosphor); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: #e7f0ff;
  border-bottom: 2px solid transparent; padding: 5px 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--phosphor); }
.nav .nav-cta {
  color: var(--ink); background: var(--window); border: 2px solid;
  border-color: #fff #7b7b7b #7b7b7b #fff;
  padding: 5px 10px; font-weight: 600;
}
.nav .nav-cta:hover { background: var(--phosphor); border-color: #d8ffdf #3c7d4b #3c7d4b #d8ffdf; color: var(--ink); }

.head-actions { display: flex; align-items: center; gap: 8px; }
.nav-meta { display: none; }
.lang-switch {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 30px; padding: 0 7px;
  background: var(--window); color: var(--ink);
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  font-family: var(--arabic); font-size: 15px; font-weight: 700; line-height: 1;
}
.lang-switch:hover { background: var(--phosphor); }
.menu-btn {
  display: none; width: 38px; height: 30px;
  background: var(--window); color: var(--ink);
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  place-items: center;
}
.menu-bars { display: grid; gap: 4px; }
.menu-bars i { display: block; width: 15px; height: 2px; background: var(--ink); transition: .2s; }
.menu-btn[aria-expanded="true"] .menu-bars i:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- window chrome ---------- */
.window {
  background: var(--window);
  color: var(--ink);
  border: 2px solid;
  border-color: #fff #767676 #767676 #fff;
  box-shadow: 6px 6px 0 rgba(0,0,0,.34);
  min-width: 0;
}
.win-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 28px; padding: 3px 7px;
  background: linear-gradient(90deg, var(--title-c) 0%, var(--title-a) 35%, var(--title-b) 100%);
  color: #fff; border-bottom: 1px solid #03245c;
}
.win-path {
  font-family: var(--mono); font-size: 10px; letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.win-controls { display: flex; gap: 2px; flex: 0 0 auto; }
.win-controls i {
  width: 17px; height: 15px; display: grid; place-items: center;
  background: var(--window); color: var(--ink);
  border: 1px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  font-family: var(--mono); font-size: 10px; font-style: normal; line-height: 1;
}
.win-menu {
  display: flex; gap: 15px; padding: 3px 9px;
  background: var(--window); border-bottom: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 9px; color: #444;
}
.win-body { padding: clamp(20px, 4vw, 42px); background: var(--window-2); }
.win-status {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 4px 8px; background: var(--window);
  border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 9px; letter-spacing: .04em;
  color: #4f5749; text-transform: uppercase;
}
.win-status span:last-child { color: #6e7668; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--head) + 48px) 0 54px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #07130c; }
.hero-bg picture, .hero-bg img { width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: center 42%; filter: saturate(1.05) contrast(1.03); }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(4,12,7,.78) 0%, rgba(4,12,7,.48) 45%, rgba(4,12,7,.12) 100%),
    linear-gradient(180deg, rgba(4,12,7,.30), rgba(4,12,7,.62));
}
.hero-scan {
  position: absolute; inset: 0; opacity: .10;
  background: repeating-linear-gradient(180deg, #fff 0, #fff 1px, transparent 1px, transparent 4px);
  mix-blend-mode: overlay;
}
.hero-wrap { position: relative; z-index: 1; }
.hero-window { max-width: 1100px; margin-inline: auto; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(220px,.7fr); gap: 40px; align-items: start; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; font-family: var(--mono); font-size: 9px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green);
}
.eyebrow b { color: var(--ink); font-weight: 600; }
.dot { width: 6px; height: 6px; background: var(--green-2); box-shadow: 0 0 0 3px rgba(45,138,77,.14); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; margin: 0; color: var(--ink); }
h1 { font-size: clamp(48px, 7vw, 84px); line-height: .91; letter-spacing: -.055em; }
h1 span { color: var(--green); }
.hero-role {
  margin: 16px 0 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--blue);
}
.hero-lede { max-width: 620px; margin: 18px 0 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.hero-actions .btn { min-height: 42px; padding: 0 16px; font-size: 9.5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 13px;
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  background: var(--window); color: var(--ink);
  font-family: var(--mono); font-size: 9px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600;
  box-shadow: 1px 1px 0 rgba(0,0,0,.25);
}
.btn:hover { background: #fff; }
.btn:active { border-color: #7b7b7b #fff #fff #7b7b7b; transform: translate(1px,1px); box-shadow: none; }
.btn-primary { background: var(--blue); color: #fff; border-color: #6fa8ff #06327a #06327a #6fa8ff; }
.btn-primary:hover { background: #1a67e8; color: #fff; }
.btn-ghost { background: var(--window); color: var(--ink); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 8.5px; }
.btn svg { width: 13px; height: 13px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  list-style: none; padding: 0; margin: 30px 0 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hero-stats li { padding: 13px 13px 12px; border-inline-end: 1px solid var(--line); }
.hero-stats li:last-child { border-inline-end: 0; }
.hero-stats b { display: block; font-family: var(--display); font-size: 38px; line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.hero-stats span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 8.5px; line-height: 1.45; text-transform: uppercase; color: var(--ink-2); }
.hero-stats small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 7.5px; color: var(--muted); }

.ascii-stamp { margin: 16px 0 0; font-family: var(--mono); font-size: 9.5px; line-height: 1.5; letter-spacing: .04em; color: var(--green); opacity: .8; white-space: pre-wrap; }
.avatar-plate { margin: 0; align-self: start; }
.avatar-frame {
  position: relative; padding: 9px; background: #050805;
  border: 2px solid; border-color: #6e7668 #020402 #020402 #6e7668;
  box-shadow: 0 0 0 1px #000, 0 0 24px rgba(107,255,143,.08);
}
.avatar-frame img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(1.15) contrast(1.05); }
.avatar-frame::before, .avatar-frame::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--phosphor); border-style: solid; opacity: .75;
}
.avatar-frame::before { left: 3px; top: 3px; border-width: 1px 0 0 1px; }
.avatar-frame::after { right: 3px; bottom: 3px; border-width: 0 1px 1px 0; }
.avatar-scan {
  position: absolute; inset: 9px; pointer-events: none; opacity: .13;
  background: repeating-linear-gradient(180deg, #fff 0, #fff 1px, transparent 1px, transparent 3px);
}
.avatar-plate figcaption {
  margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line);
  font-family: var(--mono); color: var(--muted);
}
.avatar-id { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; }
.avatar-id b { color: var(--ink); font-size: 14px; letter-spacing: -.02em; }
.avatar-id span { font-size: 10px; display: inline-flex; align-items: center; gap: 4px; }
.avatar-id svg { width: 11px; height: 11px; }
.avatar-id:hover b { color: var(--green); }

.ascii-rule {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 0;
  font-family: var(--mono); font-size: 10px; color: var(--green-2);
  text-align: center; opacity: .6; overflow: hidden; white-space: nowrap;
}

/* ---------- sections ---------- */
.section { padding: 44px 0; position: relative; }
.section-intro { max-width: 760px; margin-bottom: 26px; }
.kicker {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--green);
}
.section-intro h2, .about-grid h2, .contact-grid h2 { font-size: clamp(28px, 4vw, 46px); max-width: 720px; }
.section-intro p, .about-grid .prose > p, .contact-grid > div > p {
  color: var(--ink-2); font-size: 15.5px; max-width: 680px; margin: 12px 0 0;
}
.section-foot { margin-top: 18px; display: flex; justify-content: flex-end; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--blue); border-bottom: 1px solid rgba(10,79,196,.3);
  padding-bottom: 2px;
}
.text-link:hover { border-color: var(--blue); }
.text-link svg { width: 12px; height: 12px; }

/* ---------- selected work ---------- */
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.case-card {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 224px; padding: 18px;
  background: #fffdf5; color: var(--ink);
  border: 1px solid var(--line); box-shadow: inset 1px 1px 0 #fff;
  transition: border-color .15s, background .15s;
}
.case-card:hover { border-color: var(--blue); background: #fff; }
.case-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.case-num { font-family: var(--mono); font-size: 9px; color: var(--blue); letter-spacing: .08em; }
.sev {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border: 1px solid currentColor;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
}
.sev-critical { color: var(--red); background: rgba(181,48,42,.04); }
.sev-high { color: var(--amber); background: rgba(154,90,16,.04); }
.sev-moderate, .sev-medium { color: var(--amber); }
.sev-low { color: var(--muted); }
.case-card h3 { font-size: 22px; line-height: 1.12; letter-spacing: -.035em; }
.case-meta { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-card p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.case-link { margin-top: auto; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.case-link svg { width: 11px; height: 11px; }

/* ---------- research ---------- */
.research-list { border-top: 1px solid var(--line); }
.research-row {
  display: grid; grid-template-columns: 210px minmax(0,1fr) 175px;
  gap: 18px; padding: 18px 4px; border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.research-row:hover { background: #fffdf5; }
.research-id { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.research-id b { font-family: var(--mono); font-size: 10px; line-height: 1.5; color: var(--ink); }
.research-main { display: flex; flex-direction: column; gap: 5px; }
.research-main strong { font-family: var(--display); font-size: 19px; line-height: 1.15; letter-spacing: -.025em; }
.research-main span { color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.research-meta { display: grid; gap: 4px; align-content: start; }
.research-meta small { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.research-meta b { font-family: var(--mono); font-size: 9px; line-height: 1.45; color: var(--ink); font-weight: 400; }
.recognition-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fffdf5; color: var(--ink);
  border: 1px solid var(--line); margin-top: 20px;
}
.recognition-band div { padding: 16px 14px; border-inline-end: 1px solid var(--line); }
.recognition-band div:last-child { border-inline-end: 0; }
.recognition-band b { display: block; font-family: var(--display); font-size: 27px; line-height: 1; color: var(--ink); letter-spacing: -.04em; }
.recognition-band span { display: block; margin-top: 6px; font-family: var(--mono); font-size: 8px; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(250px,.75fr); gap: 34px; align-items: start; }
.prose .lead { color: var(--ink); font-size: 18px; line-height: 1.55; }
.prose p { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 22px 0 0; background: var(--line); border: 1px solid var(--line); }
.about-facts div { background: #fffdf5; padding: 12px 14px; }
.about-facts dt { font-family: var(--mono); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.about-facts dd { margin: 3px 0 0; font-family: var(--display); font-size: 13px; }
.side-stack { display: grid; gap: 12px; }
.ascii-panel {
  margin: 0; padding: 14px;
  background: #050805; color: var(--phosphor);
  border: 2px solid; border-color: #6e7668 #020402 #020402 #6e7668;
  font-family: var(--mono); font-size: 9px; line-height: 1.7;
  white-space: pre-wrap; overflow-x: auto;
  box-shadow: inset 0 0 18px rgba(107,255,143,.06);
}
.method-card { background: #fffdf5; border: 1px solid var(--line); padding: 15px; }
.method-card h3 { font-size: 17px; margin-bottom: 8px; }
.method-card ol { margin: 0; padding-left: 17px; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.method-card li { margin-bottom: 5px; }
.timeline { margin-top: 26px; border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 116px minmax(0,1fr) auto; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: start; }
.timeline-row time { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.timeline-row strong { font-family: var(--display); font-size: 15px; letter-spacing: -.02em; }
.timeline-row p { margin: 3px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.timeline-row > span { font-family: var(--mono); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; color: var(--green); border: 1px solid var(--line); padding: 3px 6px; white-space: nowrap; }

/* ---------- certificates ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.cert-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #fffdf5; border: 1px solid var(--line);
  padding: 9px; color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.cert-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.cert-thumb {
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
  height: 176px; padding: 6px; overflow: hidden;
}
.cert-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.cert-code { margin-top: 4px; font-family: var(--display); font-size: 19px; line-height: 1; letter-spacing: -.03em; }
.cert-name { font-size: 11px; line-height: 1.4; color: var(--ink-2); }
.cert-meta { font-family: var(--mono); font-size: 8px; letter-spacing: .03em; color: var(--muted); }
.cert-open { margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; }
.cert-open svg { width: 10px; height: 10px; }
.cert-verify-card {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 7px;
  background: #fffdf5; color: var(--ink);
  border: 1px solid var(--line); padding: 18px; min-height: 176px;
}
.cert-verify-card:hover { border-color: var(--blue); }
.cert-verify-mark { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--green); color: var(--green); background: #edf5e4; font-family: var(--mono); font-size: 16px; }
.cert-verify-card strong { font-family: var(--display); font-size: 18px; line-height: 1.15; color: var(--ink); }
.cert-verify-card span:last-child { font-family: var(--mono); font-size: 8.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.education-line { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; line-height: 1.6; color: var(--muted); }
.education-line b { color: var(--ink); font-weight: 400; }

/* ---------- ledger ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fffdf5; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th { text-align: left; background: var(--window-3); border-bottom: 1px solid var(--line-2); padding: 8px 9px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; color: #4b5345; }
td { padding: 11px 9px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); font-size: 13px; }
.ledger-place { font-family: var(--display); font-size: 21px; line-height: 1; color: var(--green); letter-spacing: -.04em; }

/* ---------- writeups ---------- */
.writeup-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.writeup-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fffdf5; border: 1px solid var(--line);
  padding: 17px; min-height: 210px; color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.writeup-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.writeup-card .meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.writeup-card .meta span:first-child { color: var(--green); }
.writeup-card h3 { font-size: 19px; line-height: 1.15; }
.writeup-card p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.writeup-card .read { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.writeup-card .read svg { width: 11px; height: 11px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(250px,.75fr); gap: 34px; align-items: start; }
.contact-email {
  display: inline-block; margin-top: 18px;
  font-family: var(--display); font-size: clamp(19px, 2.5vw, 28px);
  color: var(--blue); border-bottom: 1px solid rgba(10,79,196,.35);
  letter-spacing: -.03em; overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--green); border-color: var(--green); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.contact-side { border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
.contact-side h3 { font-size: 18px; margin-bottom: 9px; }
.contact-side ul { margin: 0 0 15px; padding: 0; list-style: none; display: grid; gap: 8px; }
.contact-side li { position: relative; padding-inline-start: 14px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.contact-side li::before { content: "→"; position: absolute; inset-inline-start: 0; top: 0; font-family: var(--mono); color: var(--green); font-size: 11px; }
.social-row { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.social-row a { font-family: var(--mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.social-row a:hover { color: var(--blue); }
.social-row svg { width: 11px; height: 11px; }
.contact-note { margin: 16px 0 0; padding-top: 11px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; line-height: 1.6; color: var(--muted); }

/* ---------- footer taskbar ---------- */
.site-foot { margin-top: 28px; background: linear-gradient(180deg, #0a4fc4 0%, #083f9e 100%); border-top: 1px solid #6fa8ff; }
.taskbar { min-height: 38px; display: flex; align-items: center; gap: 6px; padding: 5px 0; font-family: var(--mono); font-size: 9px; color: #e7f0ff; }
.start { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--window); color: var(--ink); border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.start-mark { color: var(--green); }
.task { padding: 4px 8px; border: 1px solid #6fa8ff; background: rgba(0,0,0,.12); white-space: nowrap; }
.taskbar-spacer { flex: 1; }
.taskbar-link { padding: 3px 7px; background: var(--window); color: var(--ink); border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff; font-family: var(--arabic); font-size: 11px; }
.taskbar-meta { padding-inline-start: 8px; border-inline-start: 1px solid #6fa8ff; white-space: nowrap; color: #dbe8ff; }

/* ---------- article pages ---------- */
.article-head {
  padding: calc(var(--head) + 56px) 0 38px;
  background:
    linear-gradient(90deg, rgba(4,12,7,.94), rgba(4,12,7,.68)),
    url('/assets/img/banner.jpg') center 40% / cover no-repeat;
  border-bottom: 1px solid #1d3524;
}
.article-head .kicker { color: var(--phosphor); }
.article-head h1 { color: var(--bone); max-width: 920px; font-size: clamp(34px, 5vw, 60px); }
.article-head .lede { max-width: 720px; color: #c5d4c3; font-size: 17px; margin: 16px 0 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #a9c4a8; }
.article-meta b { color: var(--bone); font-weight: 400; }
.article-wrap { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 34px; padding: 38px 0 70px; align-items: start; }
.article-body {
  background: var(--window-2); color: var(--ink);
  border: 2px solid; border-color: #fff #767676 #767676 #fff;
  box-shadow: 6px 6px 0 rgba(0,0,0,.34);
  padding: clamp(22px, 4vw, 40px);
}
.article-body h2 { font-size: 29px; margin: 30px 0 10px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 19px; margin: 24px 0 8px; }
.article-body p { color: var(--ink-2); font-size: 15px; line-height: 1.68; margin: 0 0 13px; }
.article-body strong { color: var(--ink); }
.article-body ul, .article-body ol { color: var(--ink-2); padding-left: 21px; margin: 0 0 16px; font-size: 14.5px; line-height: 1.65; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--blue); border-bottom: 1px solid rgba(10,79,196,.3); }
.article-body a:hover { border-color: var(--blue); }
.article-body code { font-family: var(--mono); font-size: .9em; background: #e4dfcd; border: 1px solid var(--line); padding: 1px 4px; }
.callout { border-left: 3px solid var(--green); background: #e8f1dd; padding: 12px 14px; margin: 18px 0; }
.callout p { margin: 0; color: var(--ink); font-size: 14px; }
.article-aside {
  position: sticky; top: calc(var(--head) + 18px);
  background: var(--window); color: var(--ink);
  border: 2px solid; border-color: #fff #767676 #767676 #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,.3);
  padding: 16px;
}
.article-aside h3 { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.article-aside dl { margin: 0; display: grid; gap: 9px; }
.article-aside dt { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.article-aside dd { margin: 2px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.article-aside .aside-note { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 7.5px; line-height: 1.65; color: var(--muted); }
.article-nav { display: flex; justify-content: space-between; gap: 18px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }
.article-nav a { font-family: var(--mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.article-nav a:hover { color: var(--green); }
.timeline-list { list-style: none; margin: 16px 0 0; padding: 0; border-left: 1px solid var(--line-2); }
.timeline-list li { position: relative; padding: 0 0 15px 18px; color: var(--ink-2); font-size: 13px; }
.timeline-list li::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; background: var(--green); }
.timeline-list b { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); margin-bottom: 2px; }
.case-list { display: grid; gap: 12px; margin-top: 20px; }
.case { background: #fffdf5; border: 1px solid var(--line); padding: 17px; }
.case-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 7px; }
.case h3 { font-size: 19px; }
.case .sector { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.case p { margin: 0 0 7px; color: var(--ink-2); font-size: 13px; }
.case .lesson { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; line-height: 1.6; color: var(--muted); }
.case .lesson b { color: var(--green); font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0,1.15fr) minmax(200px,.85fr); gap: 28px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .contact-side { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .cert-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-wrap { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; }
}
@media (max-width: 780px) {
  :root { --head: 52px; }
  .wrap { width: calc(100% - 28px); }
  .brand-name { display: none; }
  .nav {
    position: fixed; inset: var(--head) 0 auto; z-index: 90;
    display: grid; gap: 0; align-content: start;
    padding: 10px 14px 16px; background: var(--desktop-2);
    border-bottom: 1px solid #1d3524;
    transform: translateY(-120%); transition: transform .25s var(--ease);
    height: calc(100svh - var(--head)); overflow: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 2px; border-bottom: 1px solid #1d3524; font-size: 10px; }
  .nav .nav-cta { margin-top: 10px; text-align: center; border-bottom: 0; }
  .nav-meta { display: grid; gap: 4px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #1d3524; font-family: var(--mono); font-size: 9px; color: #a9c4a8; }
  .nav-meta a { border: 0; padding: 0; font-size: 10px; color: var(--phosphor); letter-spacing: 0; text-transform: none; }
  .menu-btn { display: grid; }
  .hero { min-height: auto; padding-top: calc(var(--head) + 32px); }
  .hero-grid { grid-template-columns: 1fr; }
  .avatar-plate { max-width: 260px; order: 2; margin-inline: auto; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats li:nth-child(1), .hero-stats li:nth-child(2) { border-bottom: 1px solid var(--line); }
  .hero-stats li:nth-child(2) { border-inline-end: 0; }
  .win-body { padding: 18px; }
  .win-menu { display: none; }
  .case-grid, .writeup-grid, .cert-grid { grid-template-columns: 1fr; }
  .recognition-band { grid-template-columns: 1fr 1fr; }
  .recognition-band div:nth-child(1), .recognition-band div:nth-child(2) { border-bottom: 1px solid #1d3524; }
  .recognition-band div:nth-child(2) { border-inline-end: 0; }
  .research-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 2px; }
  .research-meta { grid-template-columns: auto 1fr; gap: 2px 8px; }
  .research-meta small { align-self: center; }
  .timeline-row { grid-template-columns: 88px 1fr; }
  .timeline-row > span { grid-column: 2; justify-self: start; }
  .contact-email { font-size: 18px; }
  .task { display: none; }
  .taskbar-meta:nth-last-child(1) { display: none; }
  .article-head { padding-top: calc(var(--head) + 36px); }
}
@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
  .hero-stats b { font-size: 24px; }
  .case-card { min-height: 0; }
  .cert-thumb { height: 130px; }
  .contact-actions .btn { width: 100%; }
  .taskbar { flex-wrap: wrap; }
  .taskbar-spacer { display: none; }
  .taskbar-meta { border: 0; padding: 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* No-JS fallback: keep navigation reachable on small screens. */
@media (max-width: 780px) {
  .no-js .nav {
    position: static;
    visibility: visible;
    transform: none;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    background: transparent;
    border: 0;
  }
  .no-js .menu-btn { display: none; }
}

/* ---------- RTL / Arabic ---------- */
html[lang="ar"] body, .ar body { font-family: var(--arabic); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
.ar h1, .ar h2, .ar h3, .ar h4 { font-family: var(--arabic); letter-spacing: 0; line-height: 1.28; }
html[lang="ar"] .kicker, html[lang="ar"] .eyebrow, html[lang="ar"] .win-path,
html[lang="ar"] .hero-role, html[lang="ar"] .hero-stats span, html[lang="ar"] .hero-stats small,
html[lang="ar"] .case-meta, html[lang="ar"] .case-link, html[lang="ar"] .research-meta,
html[lang="ar"] .cert-meta, html[lang="ar"] .cert-open, html[lang="ar"] .contact-note,
html[lang="ar"] .article-meta, html[lang="ar"] .article-nav a, html[lang="ar"] .taskbar,
html[lang="ar"] .ledger td .mono, html[lang="ar"] .timeline-row time, html[lang="ar"] .timeline-row > span {
  font-family: var(--arabic); letter-spacing: 0; text-transform: none;
}
html[lang="ar"] .brand-name { font-family: var(--arabic); font-size: 10px; letter-spacing: 0; text-transform: none; }
html[lang="ar"] .nav a { font-family: var(--arabic); font-size: 11px; letter-spacing: 0; text-transform: none; }
html[lang="ar"] .hero-lede, html[lang="ar"] .section-intro p, html[lang="ar"] .prose p,
html[lang="ar"] .article-body p, html[lang="ar"] .article-body li, html[lang="ar"] .contact-side li {
  font-family: var(--arabic); line-height: 1.9;
}
html[lang="ar"] h1 { line-height: 1.2; letter-spacing: 0; }
html[lang="ar"] .hero-role { font-size: 12px; }
html[lang="ar"] .hero-stats b, html[lang="ar"] .recognition-band b { font-family: var(--display); letter-spacing: -.03em; }
html[lang="ar"] .hero-stats span, html[lang="ar"] .hero-stats small { font-size: 9px; line-height: 1.6; }
html[lang="ar"] .win-title { direction: rtl; }
html[lang="ar"] .win-path { font-size: 10px; }
html[lang="ar"] .win-menu { direction: rtl; }
html[lang="ar"] .win-status { direction: rtl; font-size: 9px; }
html[lang="ar"] .case-card h3, html[lang="ar"] .research-main strong, html[lang="ar"] .cert-code,
html[lang="ar"] .writeup-card h3, html[lang="ar"] .contact-side h3, html[lang="ar"] .method-card h3 {
  font-family: var(--arabic); letter-spacing: 0; line-height: 1.35;
}
html[lang="ar"] .case-card p, html[lang="ar"] .writeup-card p, html[lang="ar"] .case p,
html[lang="ar"] .method-card ol, html[lang="ar"] .timeline-row p { font-family: var(--arabic); line-height: 1.8; }
html[lang="ar"] .case-card h3, html[lang="ar"] .writeup-card h3 { font-size: 19px; }
html[lang="ar"] .research-main strong { font-size: 18px; }
html[lang="ar"] .cert-name { font-family: var(--arabic); font-size: 11px; line-height: 1.6; }
html[lang="ar"] .research-row { grid-template-columns: 190px minmax(0,1fr) 160px; }
html[lang="ar"] .contact-side { border-inline-start: 0; border-inline-end: 0; }
html[lang="ar"] .contact-side { border-top: 1px solid var(--line); padding-top: 16px; }
html[lang="ar"] .contact-side li::before { content: "←"; }
html[lang="ar"] .timeline-list { border-left: 0; border-right: 1px solid var(--line-2); }
html[lang="ar"] .timeline-list li { padding-left: 0; padding-right: 18px; }
html[lang="ar"] .timeline-list li::before { left: auto; right: -4px; }
html[lang="ar"] .taskbar { direction: rtl; }
html[lang="ar"] .taskbar-spacer { flex: 1; }
html[lang="ar"] .start-mark { transform: scaleX(-1); }
html[lang="ar"] .text-link svg, html[lang="ar"] .case-link svg, html[lang="ar"] .writeup-card .read svg { transform: scaleX(-1); }
html[lang="ar"] .article-body, html[lang="ar"] .article-aside { direction: rtl; text-align: right; }
html[lang="ar"] .article-body ul, html[lang="ar"] .article-body ol { padding-left: 0; padding-right: 21px; }
html[lang="ar"] .article-body { font-family: var(--arabic); }
html[lang="ar"] .article-body h2, html[lang="ar"] .article-body h3 { font-family: var(--arabic); letter-spacing: 0; }
html[lang="ar"] .article-aside h3, html[lang="ar"] .article-aside dt { font-family: var(--arabic); letter-spacing: 0; text-transform: none; }
html[lang="ar"] .article-meta { direction: rtl; }
html[lang="ar"] .ledger th, html[lang="ar"] .ledger td { text-align: right; }
html[lang="ar"] .ledger th { font-family: var(--arabic); text-transform: none; letter-spacing: 0; }
html[lang="ar"] .education-line, html[lang="ar"] .contact-note { font-family: var(--arabic); line-height: 1.8; }
html[lang="ar"] .taskbar-link { font-family: var(--display); }

/* Arabic UI typography + RTL polish */
html[lang="ar"] .btn,
html[lang="ar"] .text-link,
html[lang="ar"] .writeup-card .read,
html[lang="ar"] .recognition-band span,
html[lang="ar"] .writeup-card .meta,
html[lang="ar"] .win-status,
html[lang="ar"] .cert-verify-card strong,
html[lang="ar"] .cert-verify-card span:last-child,
html[lang="ar"] .skip {
  font-family: var(--arabic);
  letter-spacing: 0;
  text-transform: none;
}
.method-card ol { padding-left: 0; padding-inline-start: 17px; }
html[lang="ar"] .contact-side {
  border-inline-start: 1px solid var(--line);
  border-top: 0;
  padding-inline-start: 24px;
  padding-top: 0;
}
html[lang="ar"] .hero-actions .btn-primary svg { transform: scaleX(-1); }

@media (max-width: 1000px) {
  html[lang="ar"] .contact-side {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    padding-inline-start: 0;
    padding-top: 16px;
  }
}

@media (max-width: 780px) {
  html[lang="ar"] .research-row { grid-template-columns: 1fr; }
  html[lang="ar"] .research-meta { width: auto; }
}


/* Sub-section inside a window */
.section-subhead { margin: 30px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.section-subhead h2 { font-size: clamp(24px, 3vw, 32px); }
.section-subhead p { margin: 7px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 620px; }

/* Dark stat band used inside long articles */
.stats-band {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin: 20px 0 26px;
}
.stats-band div { background: var(--desktop-2); padding: 14px 13px; }
.stats-band b { display: block; font-family: var(--display); font-size: 27px; line-height: 1; letter-spacing: -.04em; color: var(--phosphor); }
.stats-band span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 8px; line-height: 1.45; letter-spacing: .05em; text-transform: uppercase; color: #a9c4a8; }
@media (max-width: 640px) {
  .stats-band { grid-template-columns: 1fr 1fr; }
  .stats-band div:nth-child(1), .stats-band div:nth-child(2) { border-bottom: 1px solid #1d3524; }
}

/* =========================================================
   Typography refinement — larger, calmer reading scale
   Small labels are aligned with button text so the UI reads
   as one consistent system rather than micro-print.
   ========================================================= */
body { font-size: 17px; line-height: 1.7; }

/* top bar — larger, easier to scan */
:root { --head: 64px; }
.titlebar { gap: 28px; }
.brand { gap: 12px; }
.brand-mark { font-size: 24px; letter-spacing: -.035em; text-shadow: 1px 1px 0 rgba(0,0,0,.35), 0 0 18px rgba(255,255,255,.14); }
.brand-name { font-size: 12px; letter-spacing: .1em; color: #eaf2ff; }
.nav { gap: 26px; }
.nav a {
  font-size: 13px; font-weight: 600; letter-spacing: .045em;
  padding: 6px 0; color: #edf5ff;
  transition: color .15s, border-color .15s, text-shadow .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,.35); }
.nav .nav-cta { padding: 7px 14px; font-size: 12.5px; }
.lang-switch { min-width: 38px; height: 32px; font-size: 17px; }

/* window chrome + navigation */
.win-path { font-size: 12.5px; }
.win-menu { font-size: 11px; }
.win-status { font-size: 12px; padding: 6px 10px; flex-wrap: wrap; }
.win-title { min-height: 34px; }
.win-controls i { width: 18px; height: 16px; font-size: 11px; }

/* hero */
.eyebrow { font-size: 11px; }
h1 { font-size: clamp(48px, 7.2vw, 88px); }
.hero-role { font-size: 12px; }
.hero-lede { max-width: 660px; font-size: 18.5px; line-height: 1.7; }
.btn { min-height: 40px; padding: 0 15px; font-size: 11px; }
.hero-actions .btn { min-height: 44px; font-size: 11.5px; }
.btn-sm { min-height: 34px; font-size: 10px; }
.hero-stats b { font-size: clamp(30px, 3.6vw, 44px); }
.hero-stats li:first-child b { font-size: clamp(38px, 4.6vw, 56px); color: var(--green); }
.hero-stats span { font-size: 12px; line-height: 1.5; }
.hero-stats small { font-size: 11px; line-height: 1.5; }
.avatar-id b { font-size: 15px; }
.avatar-id span { font-size: 11px; }

/* section headings + intros */
.kicker { font-size: 11px; }
.section-intro p, .about-grid .prose > p, .contact-grid > div > p { font-size: 17px; line-height: 1.75; }
.section-intro h2, .about-grid h2, .contact-grid h2 { max-width: 760px; }
.text-link { font-size: 10.5px; }

/* cards + research */
.case-num { font-size: 11px; }
.sev { font-size: 9.5px; }
.case-card h3 { font-size: 24px; }
.case-meta { font-size: 10.5px; }
.case-card p { font-size: 15px; line-height: 1.62; }
.case-link { font-size: 10px; }
.research-row { grid-template-columns: minmax(170px, 230px) minmax(0,1fr) minmax(150px, 190px); }
.research-id b { font-size: 11.5px; }
.research-main strong { font-size: 21px; }
.research-main span { font-size: 15px; line-height: 1.62; }
.research-meta small { font-size: 10.5px; }
.research-meta b { font-size: 12px; }
.recognition-band b { font-size: 30px; }
.recognition-band span { font-size: 10px; }

/* about */
.prose .lead { font-size: 20px; line-height: 1.6; }
.prose p { font-size: 16.5px; line-height: 1.75; }
.about-facts dt { font-size: 10px; line-height: 1.4; }
.about-facts dd { font-size: 15.5px; line-height: 1.5; }
.ascii-panel { font-size: 10.5px; }
.method-card h3 { font-size: 19px; }
.method-card ol { font-size: 14.5px; line-height: 1.7; }
.timeline-row time { font-size: 10.5px; }
.timeline-row strong { font-size: 17px; }
.timeline-row p { font-size: 14.5px; line-height: 1.65; }
.timeline-row > span { font-size: 9px; }

/* certificates */
.cert-code { font-size: 21px; }
.cert-name { font-size: 13.5px; line-height: 1.5; }
.cert-meta { font-size: 10px; }
.cert-open { font-size: 10.5px; }
.cert-verify-card strong { font-size: 20px; }
.cert-verify-card span:last-child { font-size: 10px; }
.education-line { font-size: 11px; }

/* ledger */
th { font-size: 9.5px; }
td { font-size: 14.5px; }
td strong { font-size: 15px; }
.ledger-place { font-size: 23px; }

/* writeups */
.writeup-card .meta { font-size: 10px; }
.writeup-card h3 { font-size: 21px; }
.writeup-card p { font-size: 14.5px; line-height: 1.65; }
.writeup-card .read { font-size: 10px; }
.section-subhead p { font-size: 15.5px; }

/* contact */
.contact-email { font-size: clamp(21px, 2.6vw, 30px); }
.contact-side h3 { font-size: 20px; }
.contact-side li { font-size: 14.5px; line-height: 1.65; }
.social-row a { font-size: 10px; }
.contact-note { font-size: 11px; line-height: 1.75; }

/* footer */
.taskbar { min-height: 42px; font-size: 10.5px; }
.taskbar-link { font-size: 13px; }

/* article pages */
.article-head h1 { font-size: clamp(36px, 5.2vw, 64px); }
.article-head .lede { font-size: 19px; }
.article-meta { font-size: 10.5px; }
.article-body h2 { font-size: 31px; }
.article-body h3 { font-size: 21px; }
.article-body p { font-size: 17px; line-height: 1.75; }
.article-body ul, .article-body ol { font-size: 16px; line-height: 1.72; }
.callout p { font-size: 16px; }
.article-aside h3, .article-aside dt { font-size: 9.5px; }
.article-aside dd { font-size: 14px; }
.article-aside .aside-note { font-size: 9.5px; }
.article-nav a { font-size: 10px; }
.timeline-list li { font-size: 14.5px; }
.timeline-list b { font-size: 10px; }
.case h3 { font-size: 21px; }
.case .sector { font-size: 10px; }
.case p { font-size: 15px; }
.case .lesson { font-size: 11px; }
.stats-band span { font-size: 10px; }

/* ASCII art band */
.ascii-band {
  max-width: var(--wrap); margin: 0 auto; padding: 30px 0 12px;
  display: grid; justify-items: center; gap: 10px;
}
.ascii-art {
  margin: 0; max-width: 100%; overflow-x: auto;
  padding: 16px 18px;
  background: #050805; color: var(--phosphor);
  border: 2px solid; border-color: #6e7668 #020402 #020402 #6e7668;
  box-shadow: inset 0 0 22px rgba(107,255,143,.08), 0 0 26px rgba(107,255,143,.06);
  font-family: var(--mono);
  font-size: clamp(7px, 1.35vw, 12px);
  line-height: 1.25;
  text-shadow: 0 0 9px rgba(107,255,143,.4);
}
.ascii-caption {
  margin: 0; font-family: var(--mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: #9ddcae;
}
.ascii-prompt { color: var(--phosphor); }
.ascii-cursor { display: inline-block; color: var(--phosphor); animation: ascii-blink 1.05s steps(1) infinite; }
@keyframes ascii-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ASCII-framed section labels */
.kicker::before { content: "["; color: var(--green-2); margin-inline-end: 5px; }
.kicker::after { content: "]"; color: var(--green-2); margin-inline-start: 5px; }

/* services */
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.service-card {
  display: flex; flex-direction: column; gap: 9px;
  background: #fffdf5; border: 1px solid var(--line); padding: 20px;
  transition: border-color .15s;
}
.service-card:hover { border-color: var(--blue); }
.service-num { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--green); }
.service-card h3 { font-size: 20px; line-height: 1.25; }
.service-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }

/* Arabic reads slightly smaller at the same px, so lift it a touch */
html[lang="ar"] body { font-size: 17.5px; }
html[lang="ar"] .brand-name { font-size: 13.5px; font-weight: 700; }
html[lang="ar"] .nav a { font-size: 14.5px; font-weight: 700; }
html[lang="ar"] .hero-role { font-size: 13.5px; }
html[lang="ar"] .hero-lede { font-size: 19px; line-height: 1.95; }
html[lang="ar"] .hero-stats span { font-size: 12px; line-height: 1.7; }
html[lang="ar"] .hero-stats small { font-size: 11px; line-height: 1.7; }
html[lang="ar"] .win-path { font-size: 13px; }
html[lang="ar"] .win-status { font-size: 12.5px; }
html[lang="ar"] .case-card h3, html[lang="ar"] .writeup-card h3 { font-size: 21.5px; }
html[lang="ar"] .research-main strong { font-size: 20px; }
html[lang="ar"] .cert-name { font-size: 13.5px; }
html[lang="ar"] .about-facts dt {
  font-family: var(--arabic); font-size: 10.5px; letter-spacing: 0;
  text-transform: none; color: var(--ink-2); line-height: 1.5;
}
html[lang="ar"] .about-facts dd { font-family: var(--arabic); font-size: 15.5px; line-height: 1.6; }
html[lang="ar"] .service-card h3 { font-family: var(--arabic); font-size: 21px; line-height: 1.45; letter-spacing: 0; }
html[lang="ar"] .service-card p { font-family: var(--arabic); font-size: 15px; line-height: 1.8; }
html[lang="ar"] .research-row { grid-template-columns: minmax(160px, 210px) minmax(0,1fr) minmax(145px, 180px); }

@media (min-width: 781px) and (max-width: 1040px) {
  .nav { gap: 14px; }
  .nav a { font-size: 10.5px; }
  html[lang="ar"] .nav { gap: 12px; }
  html[lang="ar"] .nav a { font-size: 12px; }
  .brand-name { display: none; }
}

@media (max-width: 780px) {
  :root { --head: 56px; }
  .nav a { padding: 14px 2px; font-size: 16px; }
  html[lang="ar"] .nav a { font-size: 17px; }
  .hero-lede { font-size: 17px; }
  html[lang="ar"] .hero-lede { font-size: 17.5px; }
  .research-row, html[lang="ar"] .research-row { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .contact-email { font-size: 21px; }
}
@media (max-width: 520px) {
  .hero-stats b { font-size: 28px; }
  .hero-actions .btn { font-size: 11px; }
}
