html {
  scroll-behavior: smooth;
}
:root {
  /* Backgrounds */
  --bg-light: #f3def5;
  --bg-white: #ffffff;

  /* Brand Colors */
  --primary-color: #924dbf;
  --secondary-color: #b08fc8;
  --accent-color: #9e72c3;

  /* Text Colors */
  --text-dark: #1f0529;
  --text-muted: #6e5a7d;

  /* typography */
  --font-main: "Poppins", "Inter", sans-serif;

  /* layout */
  --radius-large: 24px;
  --radius-med: 12px;
  --gap-section: 80px;

  /* effects */
  --shadow-small: 0 4px 12px rgba(31, 5, 41, 0.05);
  --shadow-med: 0 10px 30px rgba(31, 5, 41, 0.1);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* navigation bar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(146, 77, 191, 0.1);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 35px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--primary-color);
}
.nav-cta {
  background-color: var(--primary-color);
  color: white !important;
  padding: 10px 20px;
  border-radius: var(--radius-med);
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-small);
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

/* hero section */
.hero {
  padding: 150px 20px 100px;
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}
.hero-text h1 {
  font-size: 3.8rem;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 800;
}
.hero-text h1 span {
  color: var(--primary-color);
  position: relative;
}
.hero-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 35px;
}
.badge {
  display: inline-block;
  padding: 5px 15px;
  background: white;
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  border: 1px solid var(--secondary-color);
}
.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-large);
  z-index: 2;
  box-shadow: var(--shadow-med);
  transition: var(--transition);
}
.hero-image img:hover {
  transform: scale(1.02);
}
.blob-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: radial-gradient(
    circle,
    var(--secondary-color) 0%,
    transparent 70%
  );
  filter: blur(50px);
  opacity: 0.3;
  z-index: 1;
}

/* about section */
#about {
  padding: var(--gap-section) 10%;
  background-color: var(--bg-white);
}
#about h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
}
.description {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
}
.description p {
  color: var(--text-muted);
  margin-bottom: 15px;
}
.description q {
  display: block;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--primary-color);
  margin: 20px 0;
  font-weight: 500;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.stat-item {
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: var(--radius-med);
  text-align: center;
  min-width: 200px;
  transition: var(--transition);
  border: 1px solid rgba(146, 77, 191, 0.1);
  box-shadow: var(--shadow-small);
}
.stat-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-med);
}
.stat-item h3 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 5px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
/* skills section */
#skills {
  padding: var(--gap-section) 10%;
}
#skills h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
}
.skill {
  margin-bottom: 40px;
}
.skill h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
}
.sub-skill {
  margin-bottom: 20px;
}
.sub-skill p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 500;
}
.progress-container {
  width: 100%;
  background-color: var(--secondary-color);
  height: 8px;
  border-radius: var(--radius-med);
  overflow: hidden;
}
.progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--secondary-color),
    var(--primary-color)
  );
  border-radius: var(--radius-med);
  transition: width 1.5s ease-in-out;
}

/* footer */
footer {
  padding: 40px 8%;
  background-color: var(--bg-white);
  border-top: 1px solid var(--bg-light);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.social-links {
  display: flex;
  gap: 25px;
  list-style: none;
}
.social-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}
.social-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}
.social-links a:hover {
  color: var(--primary-color);
}
.social-links a:hover::after {
  width: 100%;
}
/* Services Section */
#services {
    padding: var(--gap-section) 10%;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius-large);
    border: 1px solid rgba(146, 77, 191, 0.1);
    transition: var(--transition);
    text-align: left;
}

.service-card:hover {
    background: white;
    transform: translateY(-10px);
    box-shadow: var(--shadow-med);
    border-color: var(--primary-color);
}

.service-card h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 20px 0 15px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
/* Projects Section */
#projects {
    padding: var(--gap-section) 10%;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.project-item {
    background: var(--bg-white);
    border-radius: var(--radius-large);
    overflow: hidden; /* لضمان عدم خروج الصورة عن الحواف المنحنية */
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.project-img {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* للحفاظ على أبعاد الصورة */
    transition: var(--transition);
}

.project-item:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 30px;
}

.project-info span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.project-info h3 {
    margin: 10px 0 20px;
    font-size: 1.6rem;
}

.view-project {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: var(--transition);
}

.view-project:hover {
    color: var(--primary-color);
    padding-left: 10px;
}
/* Contact Section - Glassmorphism Style */
#contact {
    padding: var(--gap-section) 10%;
    background: radial-gradient(circle at top right, rgba(146, 77, 191, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(176, 143, 200, 0.05), transparent);
}

.contact-card {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-large);
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-med);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.contact-text h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.contact-text h2 span {
    color: var(--primary-color);
    font-weight: 800;
}

.contact-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(146, 77, 191, 0.1);
    border-radius: var(--radius-med);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(146, 77, 191, 0.05);
}

.contact-form textarea {
    resize: none;
}

/* Responsive for Contact Section */
@media (max-width: 850px) {
    .contact-card {
        grid-template-columns: 1fr;
        padding: 40px 30px;
        text-align: center;
    }
    
    .form-group {
        grid-template-columns: 1fr;
    }
}