:root{
  --bg:#0b0f1a;
  --text:#e9eefc;
  --muted:#a8b3d6;
  --cyan:#22d3ee;
  --purple:#7c3aed;
  --gold:#ffc700;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.wrap{ width: min(1120px, 92%); margin: 0 auto; }

/* ================= NAVBAR ================= */
.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(8,12,22,.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav{
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 14px 0;
}
.logo-btn{
  display:inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  background: rgba(34,211,238,.65);
  color: #06111a;
  text-decoration:none;
  font-weight: 900;
  letter-spacing: .14em;
  font-size: 10.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links{
  display:flex;
  gap: 22px;
  align-items:center;
  justify-content:center;
  flex: 1;
}
.nav-links a{
  color: rgba(233,238,252,.70);
  text-decoration:none;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 10px;
  text-transform: uppercase;
  padding: 8px 0;
}
.nav-links a:hover{ color: rgba(233,238,252,.92); }
.nav-links a.active{ color: rgba(34,211,238,.95); }

.nav-rail{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 180px;
  justify-content:flex-end;
}
.rail-line{
  height: 2px;
  width: 140px;
  background: rgba(233,238,252,.75);
  border-radius: 999px;
  opacity: .85;
}
.rail-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(233,238,252,.85);
  background: transparent;
}

.menu-btn{
  display:none;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 900;
}
.mobile{
  display:none;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.mobile a{
  display:block;
  padding: 10px 0;
  color: rgba(233,238,252,.85);
  text-decoration:none;
  letter-spacing:.08em;
  font-weight:800;
  font-size: 12px;
}
.mobile a:hover{ color: rgba(34,211,238,.95); }
.mobile.is-open{ display:block; }

/* ================= Shared background ================= */
.hero-page,
.edu-page,
.exp-page,
.skills2-page,
.ach-page,
.proj-page,
.contact-page{
  position: relative;
  overflow:hidden;
  background:
    radial-gradient(900px 520px at 18% 25%, rgba(124,58,237,.20), transparent 60%),
    radial-gradient(900px 520px at 92% 20%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(900px 520px at 55% 60%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(900px 520px at 92% 70%, rgba(124,58,237,.18), transparent 60%),
    linear-gradient(180deg, #0b0f1a, #070a12);
}
.hero-page::before,
.edu-page::before,
.exp-page::before,
.skills2-page::before,
.ach-page::before,
.proj-page::before,
.contact-page::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .10;
  pointer-events:none;
}

/* ================= Bottom bar ================= */
.bottom-bar{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 0 22px;
  position: relative;
  z-index: 1;
}
.b-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(233,238,252,.85);
  background: transparent;
  margin-left: 2px;
}
.b-line{
  height: 2px;
  flex: 1;
  background: rgba(233,238,252,.8);
  opacity: .85;
  border-radius: 999px;
}
.b-text{
  font-weight: 900;
  letter-spacing: .18em;
  font-size: 12px;
  color: rgba(233,238,252,.85);
  text-transform: uppercase;
}

/* ================= ABOUT ================= */
.hero-page{
  min-height: calc(100vh - 64px);
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-grid{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: center;
  padding: 46px 0 18px;
}
.hello{
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .18em;
  font-size: 12px;
  color: rgba(34,211,238,.9);
  font-style: italic;
}
.hero-title{
  margin: 0 0 10px;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.0;
  font-weight: 1000;
  color: rgba(233,238,252,.92);
}
.role-badge{
  display:inline-block;
  padding: 6px 12px;
  background: rgba(34,211,238,.55);
  color: #06111a;
  font-weight: 1000;
  letter-spacing: .14em;
  font-size: 10px;
  text-transform: uppercase;
  border-radius: 3px;
  margin-bottom: 14px;
}
.hero-desc{
  margin: 0;
  max-width: 560px;
  color: rgba(168,179,214,.92);
  line-height: 1.75;
  font-size: 13.5px;
}
.hero-right{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
.hero-photo{
  width: min(420px, 95%);
  height: 520px;
  border-radius: 22px;
  overflow:hidden;
  position: relative;
  background: rgba(0,0,0,.18);
  box-shadow: 0 22px 80px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
}
.hero-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none !important;
}
.hero-photo.no-img{
  display:grid;
  place-items:center;
}
.hero-photo.no-img::after{
  content:"ضع صورتك هنا: assets/img/صورتي.png";
  color: rgba(233,238,252,.7);
  font-size: 12px;
  letter-spacing:.08em;
  padding: 14px;
  text-align:center;
}

/* ================= EDUCATION ================= */
.edu-page{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}
.edu-head{
  position: relative; z-index: 1;
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  padding: 56px 0 14px;
}
.edu-title{ margin:0; font-size:34px; font-weight:1000; }
.edu-underline{
  width:220px; height:4px; margin-top:12px;
  background: rgba(34,211,238,.85);
  border-radius:2px;
}
.edu-years{
  font-weight:1000;
  letter-spacing:.06em;
  font-size: clamp(34px, 5vw, 64px);
  color: rgba(233,238,252,.18);
  text-align:right;
}
.edu-content{
  position: relative; z-index: 1;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 12px 0 10px;
}
.edu-list{ display:grid; gap:18px; }
.edu-item h3{
  margin:0 0 6px;
  font-size:16px;
  font-weight:900;
  color: rgba(233,238,252,.92);
}
.edu-item p{
  margin:0;
  color: rgba(168,179,214,.92);
  line-height:1.65;
  font-size:13.5px;
  max-width:520px;
}
/* Education image (left) */
.edu-image{
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.edu-image img{
  width: min(440px, 85%);   /* صغّرنا العرض */
  height: auto;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,.45));
  transform: translateX(-6px);
}

/* Make the text block a bit centered like the screenshot */
.edu-list{
  align-self: center;
  padding-left: 10px;
}


/* ================= EXPERIENCES ================= */
.exp-page{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}
.exp-head{
  position: relative; z-index: 1;
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  padding: 56px 0 14px;
}
.exp-title{ margin:0; font-size:34px; font-weight:1000; }
.exp-underline{
  width:240px; height:4px; margin-top:12px;
  background: rgba(34,211,238,.85);
  border-radius:2px;
}
.exp-years{
  font-weight:1000;
  letter-spacing:.06em;
  font-size: clamp(34px, 5vw, 64px);
  color: rgba(233,238,252,.18);
  text-align:right;
}
.exp-content{
  position: relative; z-index: 1;
  display:grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 26px;
  padding: 8px 0 10px;
}
.exp-jobs{ display:grid; gap:26px; padding-top:8px; }
.job{ display:flex; gap:14px; align-items:flex-start; }
.chev{
  font-weight:1000;
  color: rgba(34,211,238,.95);
  font-size:34px;
  line-height:1;
  margin-top:2px;
}
.job h3{ margin:0 0 6px; font-size:16px; font-weight:1000; }
.job-sub{ margin:0; color: rgba(168,179,214,.9); font-size:13.5px; line-height:1.5; }
.exp-details{ display:grid; gap:18px; padding-top:6px; }
.detail-block{
  background: rgba(15, 22, 38, .55);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}
.detail-block h4{ margin:0 0 10px; font-size:14px; letter-spacing:.02em; font-weight:1000; }
.detail-block ul{ margin:0; padding-left:18px; color: rgba(168,179,214,.92); line-height:1.75; font-size:13.5px; }

/* ================= SKILLS ================= */
.skills2-page{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}

.skills2-inner{
  position: relative; z-index: 1;
  margin-top: 56px;
  background: rgba(15, 22, 38, .55);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  overflow: visible; /* CHANGED (was hidden) */
}

.skills2-top{
  display:grid;
  grid-template-columns: 1.05fr 1.45fr;
  min-height: 440px;
}

.skills2-left{
  position:relative;
  display:flex;
  align-items:stretch;
  justify-content: flex-start; /* CHANGED */
}

.skills2-photo{
  width: 85%;                 /* CHANGED */
  min-height: 420px;          /* CHANGED */
  background: rgba(0,0,0,.20);
  position:relative;
  transform: translateX(-20px); /* CHANGED */
}

.skills2-photo img{
  width:100%;
  height:100%;
  object-fit: cover;
  filter: none !important;
}

.skills2-photo::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(260px 220px at 30% 90%, rgba(34,211,238,.22), transparent 60%),
    radial-gradient(260px 220px at 70% 5%, rgba(124,58,237,.22), transparent 60%);
  pointer-events:none;
}

/* ====== DOTS SQUARE (with Arabic row1 + English row3 inside) ====== */
.dots-panel{
  position:absolute;
  top:34px;
  right:-1px;
  width: 240px;
  height: 190px;
  background: rgba(0,0,0,.18);
  border-left: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  z-index: 3;
  padding: 18px 18px 16px 18px;
}

.dot-matrix{
  display:grid;
  gap: 12px;
}

.dot-row{
  display:grid;
  grid-template-columns: 74px 1fr;
  align-items:center;
  gap: 10px;
}

.row-label{
  font-weight: 1000;
  color: rgba(233,238,252,.92);
  letter-spacing: .02em;
  font-size: 14px;
}

.row-dots{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
}

.mdot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(34,211,238,.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Arabic row1 */
.mdot.ar{
  background: rgba(255,199,0,.98);
  box-shadow: 0 0 12px rgba(255,199,0,.20);
}

/* English row3 (5 cyan + 1 dim) */
.mdot.en{
  background: rgba(34,211,238,.98);
  box-shadow: 0 0 12px rgba(34,211,238,.20);
}

.mdot.dim{
  background: rgba(233,238,252,.22);
}

/* Normal rows */
.mdot.n{
  background: rgba(34,211,238,.58);
  opacity: .85;
}

/* ====== RIGHT CONTENT (CENTER LIKE YOUR IMAGE) ====== */
.skills2-titlewrap{
  padding: 36px 34px 22px;
  background:
    radial-gradient(520px 260px at 30% 10%, rgba(34,211,238,.20), transparent 60%),
    radial-gradient(520px 260px at 70% 0%, rgba(124,58,237,.18), transparent 60%),
    transparent;

  justify-self: center;
  align-self: center;
  width: min(740px, 92%);
}

.skills2-title{ margin:0 0 12px; font-size:34px; font-weight:1000; }
.skills2-underline{ width:240px; height:4px; background: rgba(34,211,238,.85); border-radius:2px; margin-bottom:16px; }

.skills-list{
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.skills-line{
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
}

.skills-bullet{
  font-weight: 1000;
  color: rgba(233,238,252,.92);
  line-height: 1.6;
}

.skills-line p{
  margin: 0;
  color: rgba(168,179,214,.92);
  line-height: 1.8;
  font-size: 13.5px;
}

.skills2-sub{ margin:0 0 10px; font-size:15px; font-weight:1000; }

.skills2-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

.pill2{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(233,238,252,.88);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 8px 12px;
  border-radius: 999px;
}


/* ================= ACHIEVEMENTS ================= */
.ach-page{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
}
.ach-head{ position: relative; z-index: 1; padding: 56px 0 10px; }
.ach-title{ margin:0; font-size:34px; font-weight:1000; }
.ach-underline{ width:260px; height:4px; margin-top:12px; background: rgba(34,211,238,.85); border-radius:2px; }

.cert-wrap{
  position: relative; z-index: 1;
  margin: 10px auto;
  overflow:hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15, 22, 38, .45);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}
.cert-track{
  display:flex;
  gap: 18px;
  padding: 18px;
  width: max-content;
  animation: certScroll 22s linear infinite;
}
.cert-wrap:hover .cert-track{ animation-play-state: paused; }
.cert{
  height: 240px;
  width: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
@keyframes certScroll{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }

/* ================= PROJECTS ================= */
.proj-page{ min-height: 100vh; display:flex; flex-direction: column; justify-content: space-between; }
.proj-head{
  position: relative; z-index: 1;
  display:flex; justify-content: space-between; align-items:flex-start;
  padding: 56px 0 10px;
}
.proj-title{ margin:0; font-size:34px; font-weight:1000; }
.proj-underline{ width:300px; height:4px; margin-top:12px; background: rgba(34,211,238,.85); border-radius:2px; }
.proj-years{ font-weight:1000; letter-spacing:.06em; font-size: clamp(34px, 5vw, 64px); color: rgba(233,238,252,.18); text-align:right; }

.proj-wrap{
  position: relative; z-index: 1;
  margin: 10px auto;
  overflow:hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15, 22, 38, .45);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}
.proj-track{
  display:flex;
  gap: 18px;
  padding: 18px;
  width: max-content;
  animation: projScroll 26s linear infinite;
}
.proj-wrap:hover .proj-track{ animation-play-state: paused; }

.p-card{
  width: 320px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  transition: transform .25s ease;
}
.p-card:hover{ transform: translateY(-6px); }
.p-img{ height:150px; background: rgba(0,0,0,.22); overflow:hidden; }
.p-img img{ width:100%; height:100%; object-fit: cover; }
.p-title{ margin:12px 12px 6px; font-size:14px; font-weight:1000; line-height:1.3; }
.p-desc{ margin:0 12px 14px; color: rgba(168,179,214,.92); font-size:12.8px; line-height:1.6; }
@keyframes projScroll{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }

/* ================= CONTACT ================= */
.contact-page{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 24px;
}
.contact-top{
  position: relative;
  z-index: 1;
  text-align:center;
  padding: 64px 0 10px;
}
.contact-title{ margin: 0; font-size: 38px; font-weight: 1000; }
.contact-sub{
  margin: 6px 0 0;
  color: rgba(34,211,238,.85);
  font-weight: 800;
  letter-spacing: .10em;
  font-size: 12px;
  font-style: italic;
}
.contact-grid{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 0 18px;
}
.c-item{ text-align:center; padding: 16px 12px; }
.c-ico{ width: 44px; height: 44px; margin: 0 auto 10px; color: rgba(34,211,238,.92); }
.c-ico svg{ width:100%; height:100%; }
.c-item h3{ margin:0 0 8px; font-weight:1000; font-size:14px; }
.c-item p{ margin:0; color: rgba(233,238,252,.75); line-height:1.6; font-size:12.5px; }
.c-link{ color: rgba(233,238,252,.85); text-decoration:none; }
.c-link:hover{ color: rgba(34,211,238,.95); }
.c-plain{ color: rgba(233,238,252,.85); font-weight: 800; }

.contact-footer{ position: relative; z-index: 1; padding-top: 8px; }
.name-rail{ display:flex; align-items:center; gap:12px; padding: 10px 0; }
.name-dot{ width:10px; height:10px; border-radius:999px; border:2px solid rgba(233,238,252,.85); background: transparent; }
.name-line{ height:2px; flex:1; background: rgba(233,238,252,.75); opacity:.85; border-radius:999px; }

.big-name{
  text-align:center;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 1000;
  letter-spacing: .08em;
  color: rgba(233,238,252,.06);
  -webkit-text-stroke: 1px rgba(233,238,252,.22);
  text-transform: uppercase;
  padding: 8px 0 4px;
}
.mid-portfolio{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
  padding: 6px 0 6px;
}
.mid-line{ height:2px; width:180px; background: rgba(233,238,252,.75); border-radius:999px; opacity:.85; }
.mid-text{ font-weight:1000; letter-spacing:.18em; font-size:12px; color: rgba(233,238,252,.80); text-transform: uppercase; }

/* ================= Responsive ================= */
@media (max-width: 980px){
  .nav-rail{ display:none; }

  .hero-grid{ grid-template-columns: 1fr; padding-top: 28px; }
  .hero-right{ justify-content: flex-start; }
  .hero-photo{ height: 420px; }

  .edu-content{ grid-template-columns: 1fr; }
  .edu-years{ text-align:left; }

  .exp-content{ grid-template-columns: 1fr; }
  .exp-years{ text-align:left; }

  .skills2-top{ grid-template-columns: 1fr; }
  .dots-panel{ display:none; }
  .skills2-photo{ min-height: 360px; }

  .cert{ height: 180px; }

  .proj-years{ text-align:left; }
  .p-card{ width: 280px; }
  .p-img{ height: 140px; }

  .contact-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px){
  .nav-links{ display:none; }
  .menu-btn{ display:block; }
}
@media (max-width: 520px){
  .contact-grid{ grid-template-columns: 1fr; }
  .mid-line{ width: 110px; }
}


/*  certi hover try  */

#certi:hover{
  transform: scale(1.5);
  border-radius: 60px;
}