:root {
  --bg-dark-core: #030303;
  --glass-surface: rgba(14, 14, 14, 0.6);
  --glass-border: rgba(255, 255, 255, 0.04);
  --text-muted: #8e8e93;
  --glow-subtle: rgba(255, 255, 255, 0.02);
  --entity-glow: #ffffff; 
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark-core);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#starsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* الهيدر الزجاجي المعلق */
.main-header {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 1100px;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 16px 40px;
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.main-header .logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 2px;
}

.nav-container {
  display: flex;
  gap: 35px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

/* زر القائمة للهواتف (مخفي افتراضياً) */
.menu-toggle {
  display: none;
  font-size: 20px;
  cursor: pointer;
  color: #fff;
}
#menu-checkbox {
  display: none;
}

/* قسم الـ Hero */
.hero-section {
  min-height: 100vh;
  padding: 120px 10% 60px 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 40px;
}

.hero-text-side {
  max-width: 550px;
  z-index: 5;
}

.hero-sub {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-description {
  font-size: 17px;
  line-height: 1.8;
  color: #b5b5b5;
  margin-bottom: 40px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 35px;
  background: #ffffff;
  color: #000000;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
}

.hero-title-side {
  position: absolute;
  right: 5%;
  bottom: 8%;
  pointer-events: none;
  z-index: 2;
}

.huge-back-text {
  font-size: 14vw;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.8;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.01) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* الأقسام العامة والتخطيط */
.about-section, .skills-section, .projects-section {
  padding: 120px 10%;
  position: relative;
  z-index: 5;
}

.section-title-wrapper {
  margin-bottom: 60px;
}

.section-title-wrapper.center {
  text-align: center;
}

.section-tag {
  font-size: 13px;
  letter-spacing: 6px;
  color: var(--text-muted);
  font-weight: 700;
}

.title-large {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 12px;
}

.subtitle-text {
  color: var(--text-muted);
  font-size: 15px;
}

/* شبكة About Me */
.about-content-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

/* الإطار الزجاجي المحيط بالصورة */
.glass-image-frame {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: 28px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  width: 100%;
  max-width: 420px;
  height: 490px;
  overflow: hidden;
  margin: 0 auto;
}

/* حاوية تأثير السلايدر */
.mask-effect-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: ew-resize;
  border-radius: 18px;
  --reveal-x: 50%;
  animation: floatEntity 6s ease-in-out infinite; 
}

.base-img, .mask-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.mask-img {
  clip-path: polygon(var(--reveal-x) 0, 100% 0, 100% 100%, var(--reveal-x) 100%);
  z-index: 2;
}

.mask-effect-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 38% 36%, var(--entity-glow) 4px, transparent 6px),
                    radial-gradient(circle at 62% 36%, var(--entity-glow) 4px, transparent 6px);
  z-index: 3;
  clip-path: polygon(var(--reveal-x) 0, 100% 0, 100% 100%, var(--reveal-x) 100%);
  filter: drop-shadow(0 0 8px var(--entity-glow));
  animation: blinkEyes 4s infinite; 
}

.mask-effect-container::after {
  content: '';
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 40px;
  border-bottom: 3px solid var(--entity-glow);
  border-radius: 0 0 50px 50px; 
  z-index: 4;
  clip-path: polygon(calc(var(--reveal-x) - 35%) 0, 100% 0, 100% 100%, calc(var(--reveal-x) - 35%) 100%);
  filter: drop-shadow(0 0 6px var(--entity-glow));
  opacity: 0;
  animation: wickedSmile 10s ease-in-out infinite; 
}

.split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.8);
  left: var(--reveal-x);
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.6);
  z-index: 10;
}

@keyframes floatEntity {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.01); }
}

@keyframes blinkEyes {
  0%, 90%, 94%, 100% { transform: scaleY(1); opacity: 1; }
  92% { transform: scaleY(0.05); opacity: 0.3; }
}

@keyframes wickedSmile {
  0%, 60%, 100% { opacity: 0; transform: translateX(-50%) scaleX(0.5); }
  70%, 90% { opacity: 0.95; transform: translateX(-50%) scaleX(1.1); }
}

.main-profile-title {
  font-size: 36px;
  margin-bottom: 22px;
  font-weight: 700;
}

.profile-text {
  color: #a0a0a5;
  line-height: 1.9;
  margin-bottom: 35px;
}

.profile-meta-rows {
  margin-bottom: 40px;
}

.meta-item {
  display: flex;
  margin-bottom: 15px;
  font-size: 15px;
}

.meta-label {
  width: 140px;
  color: var(--text-muted);
}

.stats-grid-row {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.stat-box {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 24px 20px;
  border-radius: 20px;
  flex: 1;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.download-btn {
  padding: 16px 35px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  font-size: 12px;
  transition: background 0.3s, border-color 0.3s;
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}

/* المهارات (Skills) */
.skills-interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.skill-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 28px 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  backdrop-filter: blur(15px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
}

.skill-icon-box {
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--icon-color);
}

.skill-info {
  flex: 1;
}

.skill-text-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skill-name {
  font-weight: 600;
  font-size: 16px;
}

.skill-number {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  border-radius: 20px;
}

/* المشاريع (Projects) */
.projects-single-column-grid {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.project-browser-card {
  background: rgba(14, 14, 14, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
}

.project-browser-card:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.15);
}

.browser-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  position: relative;
}

.browser-actions {
  display: flex;
  gap: 8px;
  position: absolute;
  left: 20px;
}

.browser-actions .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-actions .close { background: #ff5f56; }
.browser-actions .minimize { background: #ffbd2e; }
.browser-actions .expand { background: #27c93f; }

.browser-address-bar {
  background: rgba(0, 0, 0, 0.3);
  color: #8e8e93;
  font-size: 11px;
  padding: 6px 40px;
  border-radius: 30px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.browser-address-bar i {
  font-size: 10px;
  color: #27c93f;
}

.project-video-thumb {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0a0a;
}

.project-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 3, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-browser-card:hover .project-hover-overlay {
  opacity: 1;
}

.preview-link-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.preview-link-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(255, 255, 255, 0.2);
}

.project-details {
  padding: 24px;
}

.project-details h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-details p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-tech-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tech-tags span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #b5b5b5;
  text-transform: uppercase;
}

/* الفوتر (Footer) */
.main-footer {
  background: rgba(10, 10, 10, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 80px 10% 30px 10%;
  position: relative;
  z-index: 10;
  margin-top: 100px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.footer-brand-side {
  max-width: 360px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #ffffff, #8e8e93);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-links-grid {
  display: flex;
  gap: 80px;
}

.footer-links-column h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
  margin-bottom: 22px;
  font-weight: 700;
}

.footer-social-list {
  list-style: none;
}

.footer-social-list li {
  margin-bottom: 14px;
}

.footer-social-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-list a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-copyright span {
  color: #ffffff;
  font-weight: 600;
}

.footer-crafted-note {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-crafted-note i.pulse-heart {
  color: #ff3b30;
  animation: heartBeat 1.4s infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}


/* ===================================================
   🤖 استعلامات الوسائط المطورة للتجاوب الكامل (Media Queries)
   =================================================== */

/* 1. ضبط شاشات اللابتوب الصغيرة والأجهزة اللوحية الكبيرة (إلى 1024 بكسل) */
@media (max-width: 1024px) {
  .about-content-layout {
    grid-template-columns: 1fr; /* تحويل التخطيط لعمود واحد */
    gap: 50px;
  }
  .hero-section {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 160px;
  }
  .hero-title-side {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 20px;
  }
  .huge-back-text {
    font-size: 18vw;
  }
}

/* 2. ضبط شاشات الأجهزة اللوحية والهواتف الذكية (إلى 768 بكسل) */
@media (max-width: 768px) {
  /* تعديل الهيدر ليصبح متجاوب بقائمة البرجر */
  .main-header {
    width: 90%;
    padding: 12px 24px;
    border-radius: 30px;
  }
  
  .menu-toggle {
    display: block; /* إظهار زر القائمة */
    z-index: 101;
  }

  .nav-container {
    position: fixed;
    top: 0;
    right: -100%; /* إخفاء القائمة خارج الشاشة */
    width: 260px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 100px 40px;
    gap: 30px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }

  /* عند الضغط على زر القائمة يتم سحبها للداخل */
  #menu-checkbox:checked ~ .nav-container {
    right: 0;
  }

  /* تفتيت صف الإحصائيات والأزرار في الموبايل */
  .stats-grid-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .title-large {
    font-size: 32px;
  }
  
  .main-profile-title {
    font-size: 28px;
    text-align: center;
  }

  .profile-text {
    text-align: center;
  }

  .meta-item {
    justify-content: center;
  }

  .download-btn {
    display: flex;
    margin: 0 auto;
  }

  /* الفوتر */
  .footer-container {
    flex-direction: column;
    gap: 40px;
  }
  .footer-links-grid {
    gap: 40px;
    justify-content: space-between;
    width: 100%;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* 3. ضبط شاشات الهواتف الصغيرة جداً (إلى 480 بكسل) */
@media (max-width: 480px) {
  .main-header .logo {
    font-size: 16px;
  }
  .hero-description {
    font-size: 15px;
  }
  .action-btn {
    padding: 12px 28px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }
  .glass-image-frame {
    height: 400px; /* تقليص ارتفاع حاوية الصورة لتناسب الهواتف الضيقة */
  }
  .footer-links-grid {
    flex-direction: column;
    gap: 30px;
  }
}