
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card2: #162032;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: .2s;
}
.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}
/* ازرار  */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  color: #fff;
}
/* قسم الهيرو  */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 5rem 2.5rem 4rem;
}
.hero-bg-shape {
  position: absolute;
  top: -120px;
  left: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 260px; }
.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .3rem;
}
.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: .5rem;
}
.hero-title {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.4rem;
}
.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  margin-bottom: 2rem;
  font-size: .9rem;
  color: var(--text-muted);
  align-items: center;
}
.hero-contact span { color: var(--border); }
.hero-contact a { color: var(--text-muted); font-weight: 600; }
.hero-contact a:hover { color: var(--accent); }

.hero-img-wrap { flex-shrink: 0; }
.hero-img-placeholder {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 4px solid var(--primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
}
.hero-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section { padding: 5rem 2.5rem; }
.section:nth-child(even) { background: var(--bg-card2); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
.section-title span {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  margin-right: .6rem;
  vertical-align: middle;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: .4rem;
}

/* About me*/
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-muted);
  max-width: 780px;
}

/* skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.skill-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.2rem;
  letter-spacing: .5px;
}
.skill-group ul { display: flex; flex-direction: column; gap: .9rem; }
.skill-group li { display: flex; flex-direction: column; gap: .3rem; }
.skill-name { font-size: .92rem; font-weight: 600; }
.bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width .6s ease;
}

/* servises*/
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.service-icon { font-size: 2.2rem; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; }
.service-card p { font-size: .93rem; color: var(--text-muted); }
.service-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
}
.service-delivery {
  font-size: .85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: .7rem;
  margin-top: .3rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.portfolio-img { height: 180px; overflow: hidden; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
  letter-spacing: 1px;
}
.portfolio-info { padding: 1.4rem; }
.portfolio-info h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.portfolio-info p { font-size: .88rem; color: var(--text-muted); margin-bottom: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span {
  padding: .25rem .75rem;
  background: rgba(37,99,235,0.15);
  border: 1px solid var(--primary);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--primary);
  font-weight: 600;
}

/*تعليم*/
.edu-list { display: flex; flex-direction: column; gap: 1.4rem; max-width: 700px; }
.edu-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
}
.edu-icon { font-size: 2rem; flex-shrink: 0; }
.edu-info h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.edu-info p { font-size: .9rem; color: var(--text-muted); }
.edu-info a {
  display: inline-block;
  margin-top: .4rem;
  font-size: .85rem;
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px dashed var(--primary);
}

/* تواصل*/
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}
.contact-info .contact-note {
  font-size: .9rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.contact-info ul { display: flex; flex-direction: column; gap: .9rem; }
.contact-info li { font-size: .95rem; color: var(--text-muted); }
.contact-info a { color: var(--text-muted); font-weight: 600; }
.contact-info a:hover { color: var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .85rem 1.2rem;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { align-self: flex-start; }

/* footer*/
.footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
}

/* media */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 1rem; font-size: .85rem; }
  .hero { padding: 4rem 1.2rem 3rem; }
  .hero-content { flex-direction: column-reverse; align-items: center; text-align: center; }
  .hero-contact { justify-content: center; }
  .hero-img-placeholder { width: 180px; height: 180px; }
  .section { padding: 3.5rem 1.2rem; }
  .contact-wrap { grid-template-columns: 1fr; }
  .skills-grid,
  .services-grid,
  .portfolio-grid { grid-template-columns: 1fr; }
}
