
    :root {
            --p: #2adfa2;        /* اللون الرئيسي - زمردي */
            --p2: #20b886;       /* اللون الثانوي - زمردي غامق */
            --s: #1ca372;         /* لون إضافي - زمردي أغمق */
            --accent: #ffffff;
            --green: #10b981;
            --bg: #0a0f0e;        /* خلفية داكنة مائلة للأخضر */
            --bg2: #0e1513;       /* خلفية ثانوية داكنة */
            --bg3: #131b18;       /* خلفية ثالثة داكنة */
            --card: rgba(42, 223, 162, 0.04);
            --card-border: rgba(42, 223, 162, 0.25);
            --glass: rgba(42, 223, 162, 0.06);
            --text: #f0fdf9;
            --muted: rgba(240, 253, 249, 0.6);
            --radius: 20px;
            --nav-h: 70px;
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --bg-overlay-1: rgba(42, 223, 162, 0.1);
            --bg-overlay-2: rgba(28, 163, 114, 0.1);
            --grid-color: rgba(42, 223, 162, 0.1);
            --noise-opacity: 0.02;
        }

        
        [data-theme="light"] {
            --bg: #f0fdf9;
            --bg2: #e0f7ef;
            --bg3: #d1f0e5;
            --card: rgba(255,255,255,0.85);
            --card-border: rgba(42, 223, 162, 0.15);
            --glass: rgba(255,255,255,0.7);
            --text: #0a3b2d;
            --muted: rgba(10, 59, 45, 0.6);
            --bg-overlay-1: rgba(42, 223, 162, 0.05);
            --bg-overlay-2: rgba(28, 163, 114, 0.05);
            --grid-color: rgba(42, 223, 162, 0.15);
            --noise-opacity: 0.03;
        }

        *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

        html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

        body {
            font-family: 'Cairo', 'Tajawal', sans-serif;
            background: var(--bg);
            color: var(--text);
            overflow-x: hidden;
            transition: background 0.4s, color 0.4s;
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        main { flex: 1; }
        .bg-custom {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -2;
            background: radial-gradient(circle at 20% 20%, rgba(42, 223, 162, 0.15) 0%, transparent 30%),
                        radial-gradient(circle at 80% 70%, rgba(28, 163, 114, 0.15) 0%, transparent 35%),
                        radial-gradient(circle at 40% 80%, rgba(42, 223, 162, 0.1) 0%, transparent 40%),
                        var(--bg);
            animation: bgPulse 15s ease-in-out infinite;
        }

        @keyframes bgPulse {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.9;
                transform: scale(1.02);
            }
        }

        /* طبقة شبكة خفيفة */
        .bg-grid {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background-image: 
                linear-gradient(rgba(42, 223, 162, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(42, 223, 162, 0.03) 1px, transparent 1px);
            background-size: 60px 60px;
            pointer-events: none;
        }

        /* جزيئات ضوئية نادرة */
        .bg-particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }

        .particle {
            position: absolute;
            width: 2px;
            height: 2px;
            background: var(--p);
            border-radius: 50%;
            opacity: 0.1;
            animation: float 20s linear infinite;
        }

        @keyframes float {
            0% {
                transform: translateY(100vh) translateX(0);
                opacity: 0;
            }
            10% {
                opacity: 0.2;
            }
            90% {
                opacity: 0.2;
            }
            100% {
                transform: translateY(-100vh) translateX(100px);
                opacity: 0;
            }
        }

        /* تأثير ضوضاء خفيف */
        .bg-noise {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            opacity: var(--noise-opacity);
            pointer-events: none;
            background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJmIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc0IiBudW1PY3RhdmVzPSIzIiAvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNmKSIgLz48L3N2Zz4=');
            background-repeat: repeat;
        }

        /* ===== نهاية الخلفية ===== */

        /* تحسين الأداء */
        .hero, .about-grid, .skills-grid, .portfolio-grid {
            will-change: transform;
            content-visibility: auto;
            contain-intrinsic-size: 1px 500px;
        }

        /* ─── Scrollbar ─── */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: var(--bg); }
        ::-webkit-scrollbar-thumb { background: linear-gradient(var(--p), var(--s)); border-radius: 99px; }

        /* ─── NAV ─── */
        nav {
            position: fixed; top: 0; width: 100%;
            height: var(--nav-h);
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 6%;
            z-index: 1000;
            background: rgba(10, 15, 14, 0.7);
            backdrop-filter: blur(20px) saturate(180%);
            border-bottom: 1px solid var(--card-border);
            transition: all 0.4s;
        }
        [data-theme="light"] nav { background: rgba(240, 253, 249, 0.8); }
        nav.scrolled { height: 60px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

        .logo {
            font-size: 26px; font-weight: 900; letter-spacing: -1px;
            background: linear-gradient(135deg, var(--p), var(--s));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            cursor: pointer; display: flex; align-items: center; gap: 8px;
            transition: transform 0.3s;
        }
        .logo:hover { transform: scale(1.05); }
        .logo-bracket { -webkit-text-fill-color: var(--p); opacity: 0.5; }

        .nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
        .nav-links a {
            color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
            padding: 6px 14px; border-radius: 99px; transition: all 0.25s;
        }
        .nav-links a:hover, .nav-links a.active {
            color: var(--text);
            background: var(--glass);
        }
        .nav-links a.active { color: var(--p); }

        .theme-btn {
            width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--card-border);
            background: var(--glass); cursor: pointer; display: flex; align-items: center;
            justify-content: center; font-size: 16px; color: var(--text); transition: all 0.3s;
        }
        .theme-btn:hover { transform: rotate(20deg); border-color: var(--p); }

        .menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
        .menu-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
        .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
        .menu-toggle.active span:nth-child(2) { opacity: 0; }
        .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }


        /* ─── HERO ─── */
        .hero {
            position: relative; z-index: 1;
            min-height: 100vh;
            display: flex; align-items: center; justify-content: center; text-align: center;
            padding: calc(var(--nav-h) + 60px) 6% 80px;
        }

        .hero-content { max-width: 860px; animation: fadeUp 0.9s ease both; }

        .avatar-wrap {
            position: relative; width: 160px; height: 160px;
            margin: 0 auto 36px;
        }
        .avatar-ring {
            position: absolute; inset: -8px; border-radius: 50%;
            background: conic-gradient(from 0deg, var(--p), var(--s), var(--p2), var(--s), var(--p));
            animation: spin 6s linear infinite;
        }
        .avatar-ring::after {
            content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg);
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        .avatar-inner {
            position: absolute; inset: 4px; border-radius: 50%;
            background: linear-gradient(135deg, var(--bg2), var(--bg3));
            display: flex; align-items: center; justify-content: center;
            font-size: 72px; z-index: 2;
            box-shadow: 0 0 40px rgba(42, 223, 162, 0.3);
        }
        .available-tag {
            position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
            background: linear-gradient(135deg, var(--green), #059669);
            color: #fff; font-size: 11px; font-weight: 700;
            padding: 4px 14px; border-radius: 99px; white-space: nowrap;
            box-shadow: 0 4px 12px rgba(16,185,129,0.4); z-index: 3;
            display: flex; align-items: center; gap: 6px;
        }
        .blink { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: blink 1.5s infinite; }
        @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

        .hero-name {
            font-weight: 900; 
            font-size: 5rem;
            margin-bottom: 16px; letter-spacing: -2px;
            background: linear-gradient(135deg, var(--text) 0%, var(--p) 60%, var(--s) 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .hero-title {
            font-size: clamp(18px, 3vw, 28px); font-weight: 700;
            color: var(--s); margin-bottom: 20px; min-height: 40px;
        }
        .cursor { display: inline-block; width: 3px; height: 1.1em; background: var(--p); border-radius: 2px; vertical-align: text-bottom; animation: blink 0.8s infinite; }

        .hero-desc {
            font-size: clamp(15px, 2vw, 19px); color: var(--muted); line-height: 1.8;
            max-width: 680px; margin: 0 auto 44px;
        }

        .stats {
            display: flex; justify-content: center; gap: 12px;
            flex-wrap: wrap; margin-bottom: 44px;
        }
        .stat-chip {
            background: var(--glass); border: 1px solid var(--card-border);
            border-radius: 14px; padding: 16px 28px; text-align: center;
            backdrop-filter: blur(10px); transition: transform 0.3s, box-shadow 0.3s;
        }
        .stat-chip:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(42, 223, 162, 0.2); }
        .stat-num { font-size: 32px; font-weight: 900; background: linear-gradient(135deg, var(--p), var(--s)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block; }
        .stat-lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }

        .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }

        .btn {
            display: inline-flex; align-items: center; gap: 10px;
            padding: 14px 32px; border-radius: 99px; font-size: 15px; font-weight: 700;
            text-decoration: none; border: none; cursor: pointer; transition: all 0.35s;
            position: relative; overflow: hidden; font-family: inherit;
        }
        .btn-grad {
            background: linear-gradient(135deg, var(--p), var(--s));
            color: #0a3b2d; box-shadow: 0 8px 24px rgba(42, 223, 162, 0.35);
        }
        .btn-grad:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(42, 223, 162, 0.5); }
        .btn-outline {
            background: transparent; color: var(--text);
            border: 2px solid var(--card-border); backdrop-filter: blur(8px);
        }
        .btn-outline:hover { border-color: var(--p); color: var(--p); transform: translateY(-3px); }
        .btn::after {
            content: ''; position: absolute; inset: 0;
            background: rgba(255,255,255,0.15); opacity: 0;
            transition: opacity 0.3s; border-radius: inherit;
        }
        .btn:hover::after { opacity: 1; }

        .socials { display: flex; gap: 12px; justify-content: center; }
        .soc {
            width: 44px; height: 44px; border-radius: 14px;
            background: var(--glass); border: 1px solid var(--card-border);
            display: flex; align-items: center; justify-content: center;
            font-size: 18px; color: var(--muted); text-decoration: none;
            transition: all 0.3s; backdrop-filter: blur(8px);
        }
        .soc:hover { background: linear-gradient(135deg, var(--p), var(--s)); color: #0a3b2d; border-color: transparent; transform: translateY(-4px) scale(1.1); }

        /* ─── SCROLL INDICATOR ─── */
        .scroll-indicator {
            position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            color: var(--muted); font-size: 12px; font-weight: 600; z-index: 2;
            animation: bounce 2s infinite;
        }
        .scroll-indicator .mouse { width: 22px; height: 34px; border: 2px solid var(--card-border); border-radius: 11px; display: flex; justify-content: center; padding-top: 6px; }
        .scroll-indicator .wheel { width: 3px; height: 7px; background: var(--p); border-radius: 99px; animation: wheel 2s infinite; }
        @keyframes wheel { 0%,100%{transform:translateY(0);opacity:1} 60%{transform:translateY(8px);opacity:0} }
        @keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

        /* ─── SECTIONS ─── */
        section { position: relative; z-index: 1; padding: 110px 6%; }

        .sec-label {
            display: inline-flex; align-items: center; gap: 8px;
            font-size: 13px; font-weight: 700; color: var(--p);
            letter-spacing: 2px; text-transform: uppercase;
            background: rgba(42, 223, 162, 0.12); border: 1px solid rgba(42, 223, 162, 0.25);
            padding: 6px 16px; border-radius: 99px; margin-bottom: 18px;
        }
        .sec-title {
            font-size: clamp(32px, 5vw, 54px); font-weight: 900; line-height: 1.1;
            letter-spacing: -2px; margin-bottom: 16px;
        }
        .sec-desc { font-size: 17px; color: var(--muted); line-height: 1.8; max-width: 560px; }
        .sec-header { margin-bottom: 70px; }
        .sec-header.center { text-align: center; }
        .sec-header.center .sec-desc { margin: 0 auto; }

        /* ─── ABOUT ─── */
        .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
        .about-img-wrap { position: relative; }
        .about-img-card {
            background: var(--glass); border: 1px solid var(--card-border);
            border-radius: 15px;
            padding: 50px;
            text-align: center;
            font-size: 100px;
            backdrop-filter: blur(10px);
            box-shadow: 0 30px 60px rgba(0,0,0,0.2);
            position: relative; overflow: hidden;
        }
        .about-img-card::before {
            content: ''; position: absolute; top: -60%; right: -20%;
            width: 250px; height: 250px; border-radius: 50%;
            background: radial-gradient(circle, rgba(42, 223, 162, 0.2), transparent);
        }
        .about-badge {
            position: absolute; bottom: -5px; right: -5px;
            background: linear-gradient(135deg, var(--p), var(--s));
            color: #0a3b2d; padding: 12px 20px; border-radius: 16px;
            font-size: 13px; font-weight: 700;
            box-shadow: 0 8px 20px rgba(42, 223, 162, 0.4);
        }
        .about-info p { font-size: 16px; color: var(--muted); line-height: 1.9; margin-bottom: 20px; }
        .info-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
        .info-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
        .info-list li i { color: var(--p); width: 18px; }

        /* ─── SKILLS ─── */
        .skills-wrapper { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
        .skill-group-title { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--p); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
        .skill-group-title::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }
        .skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
        .skill-tag { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--glass); backdrop-filter: blur(8px); font-size: 14px; font-weight: 600; color: var(--text); transition: all 0.25s; cursor: default; user-select: none; }
        .skill-tag:hover { border-color: var(--p); color: var(--p); background: rgba(42,223,162,0.08); transform: translateY(-2px); }
        .skill-tag svg { width: 15px; height: 15px; flex-shrink: 0; }

        /* ─── PORTFOLIO ─── */
        .portfolio-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 48px; }
        .filter-btn { padding: 7px 18px; border-radius: 8px; border: 1px solid var(--card-border); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
        .filter-btn.active, .filter-btn:hover { background: rgba(42,223,162,0.08); color: var(--p); border-color: rgba(42,223,162,0.35); }
        .portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
        .proj-card { background: var(--glass); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; backdrop-filter: blur(10px); }
        .proj-card:hover { border-color: rgba(42,223,162,0.4); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
        .proj-header { padding: 24px 22px 18px; border-bottom: 1px solid var(--card-border); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
        .proj-header-left { min-width: 0; }
        .proj-num { font-size: 11px; font-weight: 700; color: var(--p); letter-spacing: 2px; margin-bottom: 8px; display: block; }
        .proj-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
        .proj-icon-wrap { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--p); font-size: 15px; transition: background 0.2s, border-color 0.2s; }
        .proj-card:hover .proj-icon-wrap { background: rgba(42,223,162,0.1); border-color: rgba(42,223,162,0.4); }
        .proj-body { padding: 16px 22px 20px; }
        .proj-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
        .proj-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
        .tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; border: 1px solid var(--card-border); color: var(--muted); background: transparent; }
        .proj-links { display: flex; gap: 14px; }
        .proj-link { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color 0.2s; }
        .proj-link:hover { color: var(--p); }
        @media (max-width: 640px) { .portfolio-grid { grid-template-columns: 1fr; } }

        /* ─── CONTACT ─── */
        .contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; align-items: start; }
        .contact-info { }
        .contact-cards { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
        .contact-card {
            display: flex; align-items: center; gap: 16px;
            background: var(--glass); border: 1px solid var(--card-border);
            border-radius: 16px; padding: 18px 22px; backdrop-filter: blur(10px);
            transition: all 0.3s;
        }
        .contact-card:hover { border-color: rgba(42, 223, 162, 0.5); transform: translateX(-4px); }
        [dir="rtl"] .contact-card:hover { transform: translateX(4px); }
        .contact-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--p), var(--s)); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #0a3b2d; flex-shrink: 0; }
        .contact-card h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
        .contact-card p { font-size: 15px; font-weight: 700; }

        .contact-form { background: var(--glass); border: 1px solid var(--card-border); border-radius: 28px; padding: 36px; backdrop-filter: blur(10px); }
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
        .form-group label { font-size: 13px; font-weight: 700; color: var(--muted); }
        .form-group input, .form-group textarea, .form-group select {
            background: rgba(255,255,255,0.04); border: 1px solid var(--card-border);
            border-radius: 12px; padding: 12px 16px; color: var(--text); font-size: 15px;
            font-family: inherit; transition: border-color 0.3s, box-shadow 0.3s; outline: none; resize: none;
        }
        .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
            border-color: var(--p); box-shadow: 0 0 0 3px rgba(42, 223, 162, 0.15);
        }
        .form-group textarea { min-height: 120px; }

        .loading {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--p), var(--s));
            transform: translateX(-100%);
            animation: loading 1s ease infinite;
            z-index: 9999;
            display: none;
        }

        @keyframes loading {
            100% { transform: translateX(100%); }
        }

        .form-success {
            background: var(--p);
            color: #0a3b2d;
            padding: 12px;
            border-radius: 12px;
            margin-top: 16px;
            text-align: center;
            animation: slideUp 0.3s ease;
            display: none;
            font-weight: 700;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ─── FOOTER ─── */
        footer {
            position: relative; z-index: 1;
            border-top: 1px solid var(--card-border);
            padding: 40px 6%;
            display: flex; align-items: center; justify-content: space-between;
            flex-wrap: wrap; gap: 20px;
        }
        footer p { color: var(--muted); font-size: 14px; }
        footer p span { color: var(--p); }
        .footer-socials { display: flex; gap: 10px; }
        .footer-soc { width: 36px; height: 36px; border-radius: 10px; background: var(--glass); border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: 15px; transition: all 0.3s; }
        .footer-soc:hover { background: var(--p); color: #0a3b2d; border-color: transparent; transform: translateY(-3px); }

        /* ─── SCROLL TOP ─── */
        .scroll-top {
            position: fixed; bottom: 30px; left: 30px;
            width: 48px; height: 48px; border-radius: 14px;
            background: linear-gradient(135deg, var(--p), var(--s));
            border: none; color: #0a3b2d; font-size: 18px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            opacity: 0; visibility: hidden; transition: all 0.4s;
            box-shadow: 0 8px 20px rgba(42, 223, 162, 0.4); z-index: 999;
        }
        [dir="rtl"] .scroll-top { left: auto; right: 30px; }
        .scroll-top.show { opacity: 1; visibility: visible; }
        .scroll-top:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(42, 223, 162, 0.6); }

        /* ─── DIVIDER ─── */
        .divider { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--card-border), transparent); margin: 0; }

        /* ─── ANIMATIONS ─── */
        @keyframes fadeUp { from { opacity:0; transform: translateY(40px); } to { opacity:1; transform: translateY(0); } }
        .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
        .reveal.visible { opacity: 1; transform: translateY(0); }
        .reveal-delay-1 { transition-delay: 0.1s; }
        .reveal-delay-2 { transition-delay: 0.2s; }
        .reveal-delay-3 { transition-delay: 0.3s; }
        .reveal-delay-4 { transition-delay: 0.4s; }

        /* تحسين التجاوب */
        @media (max-width: 900px) {
            .about-grid { grid-template-columns: 1fr; }
            .contact-grid { grid-template-columns: 1fr; }
            .about-img-wrap { max-width: 360px; margin: 0 auto; }
        }
        @media (max-width: 768px) {
            .nav-links {
                position: fixed; top: var(--nav-h); right: -100%;
                background: rgba(10, 15, 14, 0.97); backdrop-filter: blur(20px);
                width: 280px; height: calc(100vh - var(--nav-h));
                flex-direction: column; padding: 30px 20px;
                border-left: 1px solid var(--card-border);
                transition: right 0.4s; align-items: flex-start;
                z-index: 999;
            }
            [data-theme="light"] .nav-links { background: rgba(240, 253, 249, 0.98); }
            .nav-links.open { right: 0; }
            .menu-toggle { display: flex; }
            .hero { padding: 120px 5% 80px; }
            .form-row { grid-template-columns: 1fr; }
            .portfolio-grid { grid-template-columns: 1fr; }
            section { padding: 80px 5%; }
        }
        @media (max-width: 480px) {
            .cta { flex-direction: column; }
            .btn { justify-content: center; }
            .stats { gap: 8px; }
            .stat-chip { padding: 12px 18px; }
        }

        /* ─── READING PROGRESS BAR ─── */
        .progress-bar {
            position: fixed; top: 0; left: 0; height: 3px; width: 0%;
            background: linear-gradient(90deg, var(--p), var(--s), var(--accent));
            z-index: 9999; transition: width 0.1s linear;
            box-shadow: 0 0 10px var(--p);
        }

        /* ─── TESTIMONIALS ─── */
        .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
        .testi-card {
            background: var(--glass); border: 1px solid var(--card-border);
            border-radius: 24px; padding: 32px; backdrop-filter: blur(10px);
            transition: all 0.35s; position: relative; overflow: hidden;
        }
        .testi-card::before {
            content: '"'; position: absolute; top: 16px; right: 24px;
            font-size: 80px; line-height: 1; color: var(--p); opacity: 0.15;
            font-family: Georgia, serif;
        }
        .testi-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(42, 223, 162, 0.15); border-color: rgba(42, 223, 162, 0.4); }
        .testi-stars { color: var(--accent); font-size: 16px; margin-bottom: 16px; letter-spacing: 2px; }
        .testi-text { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
        .testi-author { display: flex; align-items: center; gap: 14px; }
        .testi-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--s)); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
        .testi-name { font-size: 15px; font-weight: 800; }
        .testi-role { font-size: 13px; color: var(--muted); }

        /* ─── ENHANCED HERO ─── */
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        /* ─── TIMELINE ─── */
        .timeline { position: relative; padding-right: 30px; }
        .timeline::before {
            content: ''; position: absolute; right: 0; top: 0; bottom: 0;
            width: 2px; background: linear-gradient(to bottom, var(--p), var(--s), transparent);
        }
        .timeline-item { position: relative; padding-bottom: 36px; }
        .timeline-dot {
            position: absolute; right: -38px; top: 4px;
            width: 16px; height: 16px; border-radius: 50%;
            background: linear-gradient(135deg, var(--p), var(--s));
            border: 3px solid var(--bg);
            box-shadow: 0 0 0 3px rgba(42, 223, 162, 0.3);
        }
        .timeline-year { font-size: 12px; font-weight: 700; color: var(--p); letter-spacing: 1px; margin-bottom: 6px; }
        .timeline-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
        .timeline-sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
        .timeline-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }


        /* ─── CONTACT ─── */
        .c-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto 48px; }
        .c-card { background: var(--glass); border: 1px solid var(--card-border); border-radius: 18px; padding: 30px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; backdrop-filter: blur(12px); transition: all 0.25s; text-decoration: none; color: var(--text); }
        .c-card:hover { transform: translateY(-6px); border-color: rgba(42,223,162,0.45); box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
        .c-card-icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--p), var(--s)); display: flex; align-items: center; justify-content: center; font-size: 22px; color: #0a3b2d; box-shadow: 0 6px 20px rgba(42,223,162,0.25); }
        .c-card-label { font-size: 11px; font-weight: 700; color: var(--p); letter-spacing: 2px; text-transform: uppercase; }
        .c-card-value { font-size: 15px; font-weight: 700; }
        .c-card-sub { font-size: 12px; color: var(--muted); }
        .c-status { max-width: 900px; margin: 0 auto; background: var(--glass); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 32px; display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; backdrop-filter: blur(12px); }
        .c-status-item { display: flex; align-items: center; gap: 12px; }
        .c-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--p); flex-shrink: 0; box-shadow: 0 0 8px var(--p); animation: blink 1.5s infinite; }
        .c-status-text { font-size: 14px; font-weight: 700; }
        .c-status-sub { font-size: 12px; color: var(--muted); }
        .c-divider { width: 1px; height: 36px; background: var(--card-border); }
        @media (max-width: 600px) { .c-divider { display: none; } .c-status { gap: 18px; } }

        /* دعم الوضع الداكن للمتصفح */
        @media (prefers-color-scheme: dark) {
            :root:not([data-theme="light"]) {
                --bg: #0a0f0e;
                --text: #f0fdf9;
            }
        }

        /* تقليل الحركة للمستخدمين */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
            
            .bg-custom,
            .particle {
                animation: none !important;
            }
        }













/* ===== CHAT WIDGET ===== */
.chat-wrapper {
  max-width: 760px;
  margin: 32px auto;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 620px;
}

/* ── Header ── */
.chat-topbar {
  padding: 16px 22px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg3);
  flex-shrink: 0;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background:transparent;
  border: #059669 solid 1.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(42, 223, 162, 0.3);
}

.chat-topbar-info { flex: 1; }

.chat-topbar-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.chat-topbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: statusPulse 1.8s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.chat-clear-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-clear-btn:hover {
  border-color: var(--p);
  color: var(--p);
  background: rgba(42, 223, 162, 0.08);
}

/* ── Messages Area ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(42, 223, 162, 0.25);
  border-radius: 99px;
}

/* ── Message Rows ── */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.msg-row.user { flex-direction: row-reverse; }

.msg-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.msg-icon.bot-icon {
  background: linear-gradient(135deg, var(--p), var(--s));
  color: #063d2b;
}

.msg-icon.user-icon {
  background: rgba(42, 223, 162, 0.1);
  border: 1px solid var(--card-border);
  font-size: 14px;
  color: var(--p);
}

.msg-bubble {
  max-width: 68%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.7;
}

.msg-row.bot .msg-bubble {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--p), var(--s));
  color: #042e20;
  font-weight: 600;
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}

.msg-row.user .msg-time { text-align: left; }

/* ── Typing Indicator ── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p);
  opacity: 0.5;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0);   opacity: 0.4; }
  40%            { transform: translateY(-6px); opacity: 1;   }
}

/* ── Welcome Screen ── */
.chat-welcome {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
}

.chat-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--p), var(--s));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(42, 223, 162, 0.25);
}

.chat-welcome h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.chat-welcome p {
  font-size: 13px;
  line-height: 1.7;
}

/* ── Suggestions ── */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.suggestion-btn {
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--card-border);
  background: var(--glass);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.suggestion-btn:hover {
  border-color: var(--p);
  color: var(--p);
  background: rgba(42, 223, 162, 0.08);
}

/* ── Input Bar ── */
.chat-inputbar {
  padding: 16px 18px;
  border-top: 1px solid var(--card-border);
  background: var(--bg3);
  flex-shrink: 0;
}

.input-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(42, 223, 162, 0.04);
  border-radius: 14px;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-container:focus-within {
  border-color: rgba(0, 255, 179, 0.45);
  box-shadow: 0 0 0 3px rgba(42, 223, 162, 0.08);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 22px;
  max-height: 140px;
  line-height: 1.6;
  overflow-y: auto;
  direction: rtl;
}

.chat-textarea::placeholder { color: var(--muted); }

.chat-textarea::-webkit-scrollbar { 
    background: transparent; 
    width: 3px; 
}

.chat-textarea::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 99px;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--p), var(--s));
  border: none;
  color: #042e20;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  pointer-events: none;
}

.send-btn.active { opacity: 1; pointer-events: auto; }

.send-btn.active:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(42, 223, 162, 0.35);
}

.input-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.input-hint kbd {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: inherit;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .chat-wrapper {
    margin: 16px;
    height: 520px;
    border-radius: 16px;
  }

  .msg-bubble { max-width: 85%; }

  .suggestions { gap: 6px; }

  .suggestion-btn { font-size: 11px; padding: 7px 12px; }
}

