*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --surface: #1e1e2a;
  --surface2: #252535;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.12);
  --accent: #7c6dfa;
  --accent2: #a78bfa;
  --accent3: #c4b5fd;
  --teal: #2dd4bf;
  --pink: #f472b6;
  --text: #f0eeff;
  --text2: #a09bbf;
  --text3: #6b6685;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== NOISE TEXTURE OVERLAY ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ===== GLOW ORBS ===== */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(124, 109, 250, 0.12);
  top: -200px;
  right: -150px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(45, 212, 191, 0.08);
  bottom: 10%;
  left: -100px;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(244, 114, 182, 0.07);
  top: 50%;
  left: 50%;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}

#navbar.scrolled {
  padding: 14px 60px;
}

.logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo span {
  color: var(--accent2);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 40px;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--text) !important;
  font-weight: 500 !important;
}
.nav-cta:hover {
  background: var(--accent2) !important;
  transform: translateY(-1px);
}

/* ===== SECTIONS ===== */
section {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 109, 250, 0.1);
  border: 1px solid rgba(124, 109, 250, 0.25);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--accent3);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero h1 .name {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 109, 250, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 15px;
  border: 1px solid var(--border2);
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface);
}

/* Hero image side */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-wrapper {
  width: 360px;
  height: 420px;
  position: relative;
}

.hero-img-wrapper::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  border-radius: var(--radius-lg);
  z-index: 0;
}

.hero-img-wrapper img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
  z-index: 1;
}

/* Floating cards */
.float-card {
  position: absolute;
  background: rgba(30, 30, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 15px;
  z-index: 2;
}

.float-card-1 {
  bottom: 40px;
  left: -60px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.float-card-1 .icon {
  width: 36px;
  height: 36px;
  background: rgba(124, 109, 250, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  font-size: 16px;
}
.float-card-1 .label {
  font-size: 11px;
  color: var(--text3);
}
.float-card-1 .value {
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.float-card-2 {
  top: 40px;
  right: -50px;
}
.float-card-2 .stacks {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 130px;
}
.float-card-2 .stack-dot {
  font-size: 11px;
  color: var(--text2);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ===== SECTION TITLES ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: "Syne", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
}
.section-header p {
  font-size: 17px;
  color: var(--text2);
  margin-top: 12px;
}

/* ===== ABOUT ===== */
.about {
  padding: 120px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h3 {
  font-family: "Syne", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.about-text p {
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 16px;
}

.stat-row {
  display: flex;
  gap: 24px;
  margin-top: 32px;
}
.stat-box {
  text-align: center;
}
.stat-box .num {
  font-family: "Syne", sans-serif;
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-box .lbl {
  font-size: 13px;
  color: var(--text3);
}

/* Skills */
.skills-side h3 {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
}

.skill-cat {
  margin-bottom: 28px;
}
.skill-cat h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-size: 13px;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 14px;
  transition: all 0.2s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124, 109, 250, 0.1);
}

/* ===== SERVICES ===== */
.services {
  padding: 120px 0;
  background: var(--bg2);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  opacity: 0;
  transition: opacity 0.3s;
}
.service-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
}
.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(124, 109, 250, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent2);
  margin-bottom: 20px;
}
.service-card h3 {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== PROJECTS ===== */
.projects {
  padding: 120px 0;
}

.projects-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.filter-row {
  display: flex;
  gap: 8px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "DM Sans", sans-serif;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}
.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-img {
  width: 100%;
  height: 220px;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.project-card:hover .project-img img {
  transform: scale(1.04);
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(124, 109, 250, 0.15),
    rgba(45, 212, 191, 0.1)
  );
  color: var(--text3);
  font-size: 40px;
}

.project-body {
  padding: 28px;
}
.project-cat {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}
.project-body h3 {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.project-body p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.tech-tag {
  font-size: 12px;
  color: var(--accent3);
  background: rgba(124, 109, 250, 0.1);
  border: 1px solid rgba(124, 109, 250, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 2px;
  transition: all 0.2s;
}
.project-link:hover {
  color: var(--accent2);
  border-color: var(--accent2);
}

/* ===== CONTACT ===== */
.contact {
  padding: 120px 0;
  background: var(--bg2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  font-family: "Syne", sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.contact-info > p {
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact-details {
  margin-bottom: 40px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.contact-item .ci-icon {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  font-size: 15px;
  flex-shrink: 0;
}
.contact-item span {
  color: var(--text2);
  font-size: 15px;
}

.socials {
  display: flex;
  gap: 10px;
}
.social-btn {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s;
}
.social-btn:hover {
  color: var(--accent2);
  border-color: var(--accent);
  background: rgba(124, 109, 250, 0.1);
  transform: translateY(-2px);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}
.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text3);
}
.form-group textarea {
  min-height: 130px;
}

.submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 40px;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.submit-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 109, 250, 0.3);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 32px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text3);
  font-size: 14px;
}
footer i {
  color: var(--pink);
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  #navbar {
    padding: 16px 24px;
  }
  .nav-links {
    display: none;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-visual {
    display: none;
  }
  .hero p {
    max-width: 100%;
  }
  .hero-btns {
    justify-content: center;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .projects-header-row {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* تخصيص شريط التمرير */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent2);
}