/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --accent: #2b7cff;
  --accent-2: #6a11cb;
  --highlight: #2b7cff;
  --dark: #0f172a;
  --muted: #6b7280;
  --light: #f9f9f9;
  --text: #222;
  --maxw: 1100px;
  --nav-height: 64px;
}
.name-highlight {
  color: #ffcc00;
  font-weight: bold;
}


/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
}

/* Container */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1200;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
.navbar.scrolled {
  background: rgba(15,23,42,0.96);
  box-shadow: 0 6px 22px rgba(2,6,23,0.12);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  position: relative; /* for absolute toggle */
}

/* Logo */
.logo { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.logo .accent { color: var(--highlight); }

/* Nav links (desktop) */
.nav { margin-left: auto; }
.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links li a {
  text-decoration: none;
  color: #fff; /* white on hero by default */
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px;
  transition: color .18s ease, transform .12s ease;
}
.nav-links li a:hover { color: var(--accent); transform: translateY(-1px); }

/* Active nav link */
.nav-links a.active { color: var(--highlight); font-weight: 700; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  position: absolute;
  right: 18px;
  top: calc((var(--nav-height) - 28px) / 2);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1250;
}
.nav-toggle:focus { outline: 2px solid rgba(43,124,255,0.18); }

.hamburger {
  display: block;
  position: relative;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: background .25s ease;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, top .25s ease;
}
.hamburger::before { top: -8px; }
.hamburger::after  { top: 8px; }

/* When open: transform to X */
.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open .hamburger::after  { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav behaviour */
@media (max-width: 900px) {

  /* show toggle */
  .nav-toggle { display: block; }

  /* hide desktop links */
  .nav-links {
    display: none;
  }

  /* mobile panel (when open) */
  .nav-links.open {
    display: flex;
    position: absolute;
    top: calc(var(--nav-height));
    right: 12px;
    width: 220px;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px;
    background: rgba(15,23,42,0.98);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(2,6,23,0.18);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open li a {
    color: #fff;
    display: block;
    padding: 10px 6px;
    font-size: 1rem;
  }
}

/* Hero */
.hero {
  height: 100vh;
  background: linear-gradient(135deg, #2b7cff, #6a11cb);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero-content .highlight {
  color: #ffcc00;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #1a5ed6;
}

.btn.small {
  padding: 7px 14px;
  font-size: 0.9rem;
}

.btn.disabled {
  background: gray;
  cursor: not-allowed;
}

/* Sections */
.section { padding: 72px 20px; }
.section h2 { text-align:center; font-size:1.6rem; margin-bottom:12px; }
.section h2::after { content:""; display:block; width:60px; height:3px; background:var(--accent); margin:12px auto 0; border-radius:3px; }

/* About */
.about-container { display: grid; grid-template-columns: 1fr 420px; gap: 36px; align-items:center; max-width:var(--maxw); margin:0 auto; }
.about-text p { font-size:1.05rem; color:#222; }
.about-img img { width:100%; border-radius:12px; box-shadow: 0 8px 26px rgba(2,6,23,0.06); display:block; }

/* Services (cards dark) */
#services { color:#fff; }
#services .grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:20px; margin-top:18px; }
#services .card { background: rgba(255,255,255,0.04); padding:18px; border-radius:12px; text-align:center; box-shadow:0 8px 26px rgba(2,6,23,0.06); }
#services .card i { color: var(--highlight); margin-bottom:12px; font-size:28px; }
#services .card h3 { margin-bottom:8px; }

/* Skills */
.skills-container { max-width:700px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
.skill span { font-weight:600; color:#222; }
.progress { height:12px; background:#eee; border-radius:999px; overflow:hidden; }
.progress div { height:100%; background: linear-gradient(90deg,var(--accent),var(--accent-2)); transition: width .6s ease; }

/* Projects & Cards */
.dark { background: var(--dark); color:#fff; padding-bottom: 28px; }
.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:18px; margin-top:18px; }
.card { background:#111827; color:#fff; padding:18px; border-radius:12px; box-shadow:0 8px 24px rgba(2,6,23,0.18); transition: transform .28s ease; }
.card:hover { transform: translateY(-6px); }

/* Testimonials */
#testimonials .card { background:#fff; color:var(--dark); padding:18px; border-radius:12px; box-shadow:0 8px 20px rgba(2,6,23,0.06); text-align:center; }
#testimonials .card p { font-style:italic; color:#374151; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-align: center;
  padding: 67px 20px;
  border-radius: 0;   /* خلي الأطراف مستقيمة */
  margin: 0;          /* يشيل المسافة الجانبية */
  width: 100%;        /* يملأ العرض بالكامل */
}

/* Contact */
.contact-form { max-width:680px; margin:0 auto; display:flex; flex-direction:column; gap:12px; }
.contact-form input, .contact-form textarea { padding:12px 14px; border-radius:8px; border:1px solid #e6e6e6; font-size:1rem; background:#fff; }
.contact-form textarea { min-height:140px; }

/* Footer */
.footer { background: #0f172a; color: #cbd5e1; text-align:center; padding:22px; margin-top:30px; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .about-container { grid-template-columns: 1fr; padding: 0 8px; text-align:center; }
  .hero { padding-top: calc(var(--nav-height) + 12px); min-height: 60vh; }
  .hero h1 { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .nav-links { display:none; } /* ensure desktop nav hidden */
  .grid { grid-template-columns: 1fr; gap:14px; padding: 0 6px; }
  .contact-form { padding: 0 8px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.3rem; }
  .nav-toggle { right: 12px; top: 14px; }
  .nav-links.open { right: 8px; width: 200px; padding: 12px; }
}
