/* هوية د. محمد الشخصية: الأسود والفضي من ملف الشعار. العقد كامل في DESIGN.md */
/* avoid-ai-design-ignore: SD2 SD4 */
:root {
  --black: #101010;
  --silver: #A8A8A8;
  --font-display: "Reem Kufi", "Noto Naskh Arabic", serif;
  --font-text: "Noto Naskh Arabic", "Noto Serif", serif;
}
:root[data-theme="dark"] {
  --ground: var(--black);
  --ink: #ECECEA;
  --muted: #A8A8A8;
  --rule: #2E2E2E;
  --focus: #ECECEA;
}
:root[data-theme="light"] {
  --ground: #F1F1F0;
  --ink: var(--black);
  --muted: #595959;
  --rule: #CDCDCB;
  --focus: var(--black);
}
:root[lang="en"] { --font-text: "Noto Serif", serif; --font-display: "Reem Kufi", "Noto Serif", serif; }

/* اللغتين: المحتوى الطويل مكتوب مرتين */
:root[lang="ar"] [data-l="en"], :root[lang="en"] [data-l="ar"] { display: none !important; }

* { box-sizing: border-box; }
html { background: var(--ground); scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
:root[lang="en"] body { line-height: 1.6; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* الشريط العلوي */
.top { display: flex; align-items: center; gap: 28px; padding-block: 22px; }
.top .mark { display: block; width: 46px; height: 46px; flex: none; }
.top .mark img { width: 100%; height: 100%; display: block; }
.top nav { display: flex; gap: 24px; font-size: 16px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.top .tools { margin-inline-start: auto; display: flex; gap: 8px; }
.tools button {
  font: inherit; font-size: 15px; color: var(--ink);
  background: none; border: 1px solid var(--rule);
  height: 38px; padding-inline: 14px; border-radius: 19px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.tools button:hover { border-color: var(--muted); }
.tools svg { width: 16px; height: 16px; }
.tools .lang-btn { font-family: "Noto Serif", serif; }
:root[lang="en"] .tools .lang-btn { font-family: "Noto Naskh Arabic", serif; }

/* الواجهة */
.hero {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 56px;
  align-items: end;
  padding-block: 48px 72px;
}
.hero h1 { font-size: clamp(52px, 8.4vw, 116px); line-height: 1.12; margin: 0 0 28px; }
:root[lang="en"] .hero h1 { line-height: 1.02; letter-spacing: -0.01em; }
.hero h1 .dr { font-size: 0.42em; font-weight: 500; color: var(--muted); margin-inline-end: 0.3em; }
.hero p { margin: 0; max-width: 34em; font-size: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; font-size: 17px; }

/* الصورة: زاويتها السفلية مقصوصة بميل نهايات حروف الشعار */
.portrait { margin: 0; }
.portrait picture { display: block; width: 100%; }
.portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 73% 100%, 0 100%);
  background: #fff;
}
:root[dir="ltr"] .portrait img { clip-path: polygon(0 0, 100% 0, 100% 100%, 27% 100%, 0 76%); }

/* الأقسام */
.section { border-top: 1px solid var(--rule); padding-block: 56px 96px; }
.section > h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.3; margin: 0 0 24px; }

/* أعمل الآن على */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 8px 32px;
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
}
.when { color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.rows .when { padding-top: 4px; }
.rows h3 { font-size: 24px; line-height: 1.35; margin: 0; }
.role { color: var(--muted); font-size: 16px; margin-top: 2px; }
.rows .what { margin: 0; }
.rows .what a { white-space: nowrap; }

/* المسيرة */
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 72px; }
.cols > div > h3 { font-size: 20px; color: var(--muted); font-weight: 500; margin: 0 0 4px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { padding-block: 20px; border-bottom: 1px solid var(--rule); }
.steps > li:last-child, .rows > li:last-child { border-bottom: 0; }
.steps h4 { font-size: 22px; line-height: 1.4; margin: 2px 0 0; }
.steps .role { margin-top: 0; }
.points { margin: 12px 0 0; padding-inline-start: 1.1em; }
.points li { margin-block: 6px; }
.points li::marker { color: var(--muted); }
.certs { margin: 36px 0 0; max-width: 52em; font-size: 16px; color: var(--muted); }
.certs b { color: var(--ink); font-weight: 600; }

/* أيقونات التطبيقات تحت «أعمل الآن على» */
.apps { margin-top: 36px; }
.apps-h { color: var(--muted); font-size: 16px; margin: 0 0 16px; }
.apps ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px 32px; }
.apps a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; min-width: 84px; }
.apps img { display: block; width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 0 0 1px var(--rule); }
.apps a:hover span { text-decoration: underline; text-underline-offset: 0.3em; }

/* تواصل */
.contact .mail { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5.4vw, 64px); line-height: 1.2; margin: 0 0 20px; overflow-wrap: anywhere; }
.contact .mail a { text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.contact .mail a:hover { text-decoration-thickness: 3px; }

/* التذييل */
.foot { display: flex; align-items: center; gap: 14px; padding-block: 28px 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }
.foot img { width: 28px; height: 28px; }
.foot .site { margin-inline-start: auto; }

@media (max-width: 820px) {
  .top { gap: 16px; flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; gap: 20px; overflow-x: auto; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 16px 56px; }
  .portrait { order: -1; max-width: 300px; }
  .hero p { font-size: 18px; }
  .rows > li { grid-template-columns: 1fr; gap: 4px; }
  .rows .when { padding-top: 0; }
  .rows .what { margin-top: 8px; }
  .cols { grid-template-columns: 1fr; gap: 40px; }
  .foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .tools button { transition: color .15s, border-color .15s, text-decoration-thickness .15s; }
}
