/* ==============================
   01 — Design tokens / الهوية البصرية
   ============================== */
:root {
  color-scheme: light;
  --background: #f7f5f1;
  --paper: #fffefa;
  --soft: #f0eeea;
  --silver: #e8e7e4;
  --coffee: #77523c;
  --coffee-dark: #573928;
  --ink: #242321;
  --muted: #68645f;
  --line: #dfdcd6;
  --light-ink: #f8f3ed;
  --radius-lg: 30px;
  --radius-md: 20px;
  --shadow: 0 24px 70px rgba(72, 53, 40, 0.09);
  --container-width: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  line-height: 1.65;
}
::selection { background: #dfc7b4; color: #27201b; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a06b48; outline-offset: 4px; }
.container { width: min(var(--container-width), calc(100% - 76px)); margin-inline: auto; }
.section { padding-block: 106px; scroll-margin-top: 90px; }
.skip-link {
  position: fixed; inset-block-start: 10px; inset-inline-start: 16px;
  z-index: 200; padding: 10px 18px; background: var(--coffee-dark);
  color: white; border-radius: 10px; transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* ==============================
   02 — Navigation
   ============================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 241, 0.94);
  -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(135, 118, 105, 0.14);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 35px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.99rem; font-weight: 750; white-space: nowrap;
  letter-spacing: -0.01em;
}
.brand__symbol {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--coffee-dark); color: white;
  font: 700 18px/1 "Segoe UI", sans-serif; letter-spacing: -0.07em;
}
.brand__symbol span { color: #d8bba5; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 34px); margin-inline: auto; }
.site-nav a {
  font-size: 0.91rem; font-weight: 600; color: var(--muted);
  transition: color 180ms ease; position: relative; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="location"] { color: var(--coffee-dark); }
.site-nav a::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: -11px;
  height: 2px; background: var(--coffee); transform: scaleX(0);
  transition: transform 180ms ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="location"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.language-toggle, .menu-toggle { cursor: pointer; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.language-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px; font-size: 0.8rem;
  font-weight: 700; min-width: 105px; min-height: 42px;
  transition: background 180ms ease, border-color 180ms ease;
}
.language-toggle:hover { background: #f0e5dc; border-color: #cbb3a1; }
.language-toggle__icon { color: var(--coffee); font: 800 12px/1 Arial, sans-serif; direction: ltr; }
.menu-toggle { display: none; width: 43px; height: 43px; border-radius: 12px; align-items: center; justify-content: center; }

/* ==============================
   03 — Hero / التعريف
   ============================== */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center; gap: clamp(42px, 6vw, 90px);
  padding-block: 94px 102px; min-height: 665px;
}
.hero__content { min-width: 0; }
.eyebrow, .section-kicker { margin: 0 0 22px; font-size: 0.82rem; font-weight: 800; color: var(--coffee); letter-spacing: 0.035em; }
.eyebrow { display: flex; gap: 11px; align-items: center; }
.eyebrow__dot { width: 8px; height: 8px; background: #a07455; border-radius: 50%; flex: none; }
.hero h1 { margin: 0; font-size: clamp(2.9rem, 5.35vw, 5.55rem); line-height: 1.31; letter-spacing: -0.055em; font-weight: 790; }
.hero__greeting { display: block; font-size: 0.53em; letter-spacing: -0.025em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.hero__name { color: var(--coffee-dark); }
.hero__punctuation { color: #b9957d; }
.hero__role { max-width: 570px; font-weight: 750; font-size: clamp(1.04rem, 1.45vw, 1.18rem); line-height: 1.85; margin: 24px 0 14px; }
.hero__description { max-width: 555px; color: var(--muted); font-size: 1.01rem; line-height: 2.12; margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 33px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 19px; min-height: 53px; font-weight: 750; font-size: 0.92rem; border-radius: 13px; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.button--primary { padding: 12px 25px; background: var(--coffee-dark); color: #fff; box-shadow: 0 11px 25px rgba(87, 57, 40, 0.12); }
.button--primary:hover { transform: translateY(-2px); background: #6c4934; box-shadow: 0 15px 30px rgba(87, 57, 40, 0.18); }
.button__arrow { font: 600 18px/1 Arial, sans-serif; }
.button--text { padding: 10px 0; color: var(--coffee-dark); border-bottom: 1px solid #cbb7a8; border-radius: 0; }
.button--text:hover { color: #a16b4b; }
.hero__social { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; font-size: 0.83rem; }
.hero__social-label { color: var(--muted); }
.hero__social a { font-weight: 750; direction: ltr; unicode-bidi: isolate; }
.hero__social a:hover { color: var(--coffee); }
.hero__visual { min-width: 0; position: relative; }
.portrait {
  position: relative; isolation: isolate; overflow: hidden;
  height: min(470px, 43vw); min-height: 350px; border-radius: 32px;
  background: linear-gradient(140deg, #ede9e2 0%, #f8f8f7 46%, #dadbdc 100%);
  border: 1px solid #e5e1dc; box-shadow: var(--shadow);
}
.portrait__glow {
  position: absolute; z-index: -1; width: 75%; aspect-ratio: 1; border-radius: 50%;
  background: #dcd3c9; filter: blur(52px); inset: 15% 10% auto auto; opacity: .48;
}
.portrait__image { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.portrait__fallback {
  display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #74695f; font-size: 0.95rem;
}
.portrait__monogram { font: 750 clamp(5rem, 10vw, 8.8rem)/1 "Segoe UI", Arial, sans-serif; color: #795944; letter-spacing: -0.095em; opacity: .68; }
.portrait-note { display: flex; align-items: center; gap: 14px; margin-top: 19px; font-size: .83rem; color: var(--muted); font-weight: 650; }
.portrait-note__line { width: 39px; height: 1px; background: #ac8b72; }
.section-divider { height: 1px; background: var(--line); }

/* ==============================
   04 — Common section headings
   ============================== */
.section-intro { margin-bottom: 34px; }
.section-intro h2 { margin: 0; font-size: clamp(1.85rem, 3vw, 2.85rem); line-height: 1.4; letter-spacing: -0.04em; font-weight: 790; }
.section-kicker { margin-bottom: 11px; }
.section-intro--wide { display: flex; justify-content: space-between; align-items: end; gap: 60px; margin-bottom: 35px; }
.section-lede { max-width: 360px; color: var(--muted); margin: 0; line-height: 1.95; font-size: .94rem; }
.about { display: grid; grid-template-columns: 0.83fr 1.4fr; gap: clamp(38px, 7vw, 120px); }
.about__body { display: grid; grid-template-columns: minmax(0, 1fr) 225px; gap: 45px; }
.about__story p { margin: 0 0 18px; font-size: .98rem; color: #504d49; line-height: 2.2; }
.about__story p:last-child { margin-bottom: 0; }
.about__facts { border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
.fact + .fact { margin-top: 24px; }
.fact__label { display: block; color: #817971; font-size: .78rem; margin-bottom: 5px; }
.fact strong { display: block; font-size: .86rem; line-height: 1.8; font-weight: 750; }

/* ==============================
   05 — Technical interests
   ============================== */
.section--tinted { background: #eeece8; border-block: 1px solid #e9e5df; }
.interest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.interest-card { background: var(--paper); border: 1px solid #e6e0da; border-radius: var(--radius-lg); padding: 34px 36px 38px; min-height: 345px; }
.interest-card--current { box-shadow: 0 13px 45px rgba(67, 46, 32, 0.035); }
.interest-card--next { background: #f8f7f4; }
.interest-card__top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.interest-card__number { color: #a98b77; font: 750 .84rem/1 "Segoe UI", Arial, sans-serif; }
.interest-card__state { color: #6b462e; background: #efe3d9; font-weight: 750; font-size: .73rem; padding: 4px 13px; border-radius: 999px; }
.interest-card__state--next { color: #696660; background: #e9e7e2; }
.interest-card h3 { font-size: 1.4rem; line-height: 1.4; margin: 0 0 13px; letter-spacing: -0.025em; }
.interest-card p { max-width: 480px; color: var(--muted); font-size: .91rem; line-height: 2; margin: 0 0 28px; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; }
.chip-list li { display: inline-flex; align-items: center; border: 1px solid #eaded5; border-radius: 9px; padding: 6px 13px; background: #f5ede7; color: #5b4334; font: 700 .83rem/1.6 "Segoe UI", Tahoma, sans-serif; }
.chip-list--outline li { background: transparent; border-color: #dcd9d4; color: #66625d; }

/* ==============================
   06 — Project cards
   ============================== */
.projects-list { display: grid; gap: 20px; }
.project-card { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); background: var(--paper); border: 1px solid var(--line); border-radius: 30px; overflow: hidden; }
.project-card__visual { position: relative; min-height: 330px; background: linear-gradient(145deg, #eeeae5, #d8d2c9); overflow: hidden; }
.project-card__visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.project-card__art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.project-card__art::before { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid #ffffff96; border-radius: 50%; inset-block-start: -130px; inset-inline-end: -80px; }
.project-card__art::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid #ffffff9c; border-radius: 50%; inset-block-end: -150px; inset-inline-start: -75px; }
.project-card__art-inner { width: 205px; height: 215px; background: rgba(255, 255, 253, .75); border: 1px solid rgba(255, 255, 255, .85); border-radius: 18px; transform: rotate(-8deg); box-shadow: 0 22px 45px rgba(64, 48, 38, .10); padding: 30px 25px; }
.project-card__art-head { width: 45px; height: 8px; border-radius: 3px; background: #97745d; margin-bottom: 25px; }
.project-card__art-line { height: 6px; border-radius: 5px; background: #d3c3b5; margin-bottom: 14px; }
.project-card__art-line--short { width: 60%; }
.project-card__art-total { border-top: 1px dashed #c2ab99; display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; margin-top: 22px; }
.project-card__art-total span { width: 36px; height: 11px; border-radius: 5px; background: #8a634b; }
.project-card__art-total span:first-child { width: 70px; background: #c9b2a1; }
.project-card__visual-caption { position: absolute; inset-inline-start: 23px; inset-block-end: 16px; z-index: 1; font-size: .73rem; color: #635b53; background: #ffffffa6; border-radius: 7px; padding: 2px 9px; }
.project-card__body { padding: clamp(28px, 4.5vw, 54px); display: flex; flex-direction: column; align-items: start; justify-content: center; }
.project-card__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-bottom: 13px; }
.project-card__category { font-size: .78rem; color: var(--coffee); font-weight: 800; }
.project-card__status { font-size: .73rem; background: #eee5dd; color: #74523c; padding: 3px 12px; border-radius: 99px; font-weight: 800; }
.project-card h3 { margin: 0 0 12px; font: 750 clamp(1.8rem, 2.5vw, 2.65rem)/1.25 "Segoe UI", Arial, sans-serif; letter-spacing: -.035em; direction: ltr; unicode-bidi: isolate; }
.project-card__description { margin: 0 0 22px; max-width: 500px; font-size: .94rem; color: var(--muted); line-height: 2; }
.project-card__technologies { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.project-card__technologies li { font: 700 .75rem/1.5 "Segoe UI", Tahoma, sans-serif; color: #6e635a; background: #f3f0eb; border: 1px solid #e9e2db; padding: 5px 11px; border-radius: 7px; }
.project-card__link { margin-top: 24px; color: var(--coffee-dark); border-bottom: 1px solid #af8a6b; font-weight: 800; font-size: .87rem; }
.project-card__link:hover { color: #986c4d; }

/* ==============================
   07 — Contact and footer
   ============================== */
.contact { padding-block: 35px 105px; }
.contact-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 55px; align-items: center; border-radius: 30px; background: #46362c; color: var(--light-ink); padding: clamp(31px, 5vw, 64px); overflow: hidden; position: relative; }
.contact-card::after { content: ""; position: absolute; width: 260px; aspect-ratio: 1; inset-block-end: -190px; inset-inline-start: 30%; border-radius: 50%; background: #6b4e3b; filter: blur(65px); opacity: .35; pointer-events: none; }
.contact-card__content, .contact-card__right { position: relative; z-index: 1; }
.section-kicker--light { color: #d5b79d; }
.contact-card h2 { font-size: clamp(2rem, 3vw, 3rem); margin: 0 0 12px; line-height: 1.35; letter-spacing: -.035em; }
.contact-card__content > p:last-child { color: #e2d8d0; font-size: .94rem; margin: 0; max-width: 440px; }
.contact-links { display: grid; gap: 11px; }
.contact-links a { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #ffffff16; border: 1px solid #ffffff2d; border-radius: 12px; padding: 11px 17px; font-size: .93rem; font-weight: 700; transition: background 180ms ease, transform 180ms ease; }
.contact-links a:hover { background: #ffffff27; transform: translateY(-2px); }
.contact-card__empty { color: #dbcfc6; font-size: .9rem; border: 1px dashed #ac998b; border-radius: 12px; padding: 17px; margin: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .83rem; }
.footer__dot { color: var(--coffee); }
.footer-links { display: flex; flex-wrap: wrap; gap: 17px; }
.footer-links a, .back-to-top { font-size: .8rem; font-weight: 750; color: var(--coffee-dark); }
.footer-links a:hover, .back-to-top:hover { text-decoration: underline; text-underline-offset: 5px; }
/* ملاحظة هادئة في أسفل التذييل، تظهر مع اللغتين دون الحاجة إلى رابط. */
.footer-ai-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 18px 22px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
  text-align: center;
}
.footer-ai-note [aria-hidden="true"] { font-size: .9rem; }


/* ==============================
   08 — Responsive / الاستجابة
   ============================== */
@media (max-width: 1100px) {
  .site-nav { gap: 16px; }
  .about { grid-template-columns: 1fr; gap: 15px; }
  .about__body { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 860px) {
  .container { width: min(var(--container-width), calc(100% - 44px)); }
  .header-inner { min-height: 72px; }
  .site-nav { display: none; position: absolute; inset-block-start: calc(100% + 1px); inset-inline: 0; background: var(--background); padding: 18px 22px 23px; border-bottom: 1px solid var(--line); box-shadow: 0 14px 25px rgba(62, 44, 33, .07); }
  .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 7px; }
  .site-nav a::after { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero { gap: 28px; padding-block: 70px 82px; min-height: 0; }
  .hero h1 { font-size: clamp(2.7rem, 5.7vw, 4.5rem); }
  .hero__role { font-size: 1rem; }
  .hero__description { font-size: .94rem; }
  .portrait { min-height: 330px; height: 420px; }
  .section { padding-block: 80px; }
  .contact { padding-block: 25px 85px; }
  .section-intro--wide { gap: 30px; }
}
@media (max-width: 690px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding-block: 65px 66px; }
  .hero__visual { max-width: 470px; width: 100%; margin-inline: auto; }
  .portrait { height: clamp(330px, 100vw, 445px); min-height: 0; }
  .hero h1 { font-size: clamp(3rem, 9vw, 4.65rem); }
  .hero__actions { margin-top: 26px; }
  .section-intro--wide { display: block; }
  .section-lede { margin-top: 13px; max-width: 520px; }
  .about__body { grid-template-columns: 1fr; gap: 28px; }
  .about__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-inline-start: none; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .fact + .fact { margin-top: 0; }
  .interest-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-card__visual { min-height: 265px; }
  .contact-card { grid-template-columns: 1fr; gap: 23px; }
}
@media (max-width: 430px) {
  .container { width: calc(100% - 32px); }
  .brand { font-size: .89rem; gap: 8px; }
  .brand__symbol { height: 34px; width: 34px; }
  .language-toggle { min-width: 91px; gap: 5px; padding: 8px 9px; }
  .language-toggle__icon { font-size: 11px; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 6px; }
  .hero h1 { font-size: clamp(2.65rem, 10.5vw, 3.3rem); }
  .hero__role { line-height: 1.9; }
  .section { padding-block: 66px; }
  .interest-card { padding: 25px 23px 30px; }
  .about__facts { grid-template-columns: 1fr; gap: 17px; }
  .project-card__body { padding: 27px 23px 32px; }
  .contact-card { padding: 28px 23px; }
  .footer-inner { padding-block: 27px; min-height: 0; gap: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* في الهواتف الضيقة جدًا تبقى العلامة النصية دون تزاحم في الترويسة. */
@media (max-width: 365px) {
  .brand > [data-name] { display: none; }
}
