/* ==========================================================
   Portfolio – الأنماط المخصصة (فوق Bootstrap 5 RTL)
   ========================================================== */

:root {
    --brand: #6366f1;
    --brand-2: #06b6d4;
    --brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --surface: #ffffff;
    --page-bg: #f5f6fb;
    --soft-shadow: 0 10px 30px -12px rgba(30, 41, 59, .25);
    --radius: 1.1rem;
}

[data-bs-theme="dark"] {
    --surface: #1b1e2b;
    --page-bg: #11131c;
    --soft-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--page-bg);
    transition: background-color .3s ease;
}

main { min-height: 70vh; }

/* ---------- شريط التنقل ---------- */
.site-navbar {
    background: rgba(17, 19, 28, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-navbar .navbar-brand { font-weight: 800; letter-spacing: .3px; }
.site-navbar .brand-dot {
    display: inline-block; width: .6rem; height: .6rem; border-radius: 50%;
    background: var(--brand-gradient); margin-inline-end: .4rem;
}
.site-navbar .nav-link {
    position: relative; color: rgba(255, 255, 255, .72); font-weight: 500;
    transition: color .2s ease;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: #fff; }
.site-navbar .nav-link.active::after {
    content: ""; position: absolute; inset-inline: .5rem; bottom: .15rem;
    height: 2px; border-radius: 2px; background: var(--brand-gradient);
}

/* ---------- أزرار ---------- */
.btn-brand {
    background: var(--brand-gradient); border: 0; color: #fff; font-weight: 600;
    box-shadow: 0 8px 20px -8px rgba(99, 102, 241, .8);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost {
    border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 600;
    background: rgba(255, 255, 255, .08);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- الهيرو ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(circle at 15% 20%, rgba(139, 92, 246, .55), transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(6, 182, 212, .45), transparent 45%),
                #12142a;
    border-radius: 0 0 2.2rem 2.2rem;
    padding: 5.5rem 0 5rem;
    margin-bottom: 3rem;
}
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem;
    border-radius: 99px; background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18); font-size: .9rem;
}
.hero .eyebrow .pulse {
    width: .55rem; height: .55rem; border-radius: 50%; background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: pulse 2s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.hero h1 { font-weight: 800; line-height: 1.25; }
.gradient-text {
    background: linear-gradient(90deg, #a5b4fc, #67e8f9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-visual {
    aspect-ratio: 1; max-width: 320px; margin-inline: auto; border-radius: 50%;
    display: grid; place-items: center; font-size: 6rem; color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, .06), 0 0 0 28px rgba(255, 255, 255, .03),
                0 30px 60px -20px rgba(99, 102, 241, .8);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }

/* ---------- عناوين الأقسام ---------- */
.section-title { font-weight: 800; margin-bottom: .35rem; }
.section-title::after {
    content: ""; display: block; width: 56px; height: 4px; margin-top: .55rem;
    border-radius: 4px; background: var(--brand-gradient);
}
.page-header {
    padding: 2.5rem 0 1rem;
}
.page-header p { max-width: 640px; }

/* ---------- البطاقات ---------- */
.card-soft {
    background: var(--surface); border: 1px solid rgba(128, 128, 160, .14);
    border-radius: var(--radius); box-shadow: var(--soft-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-hover:hover { transform: translateY(-6px); }

.icon-badge {
    width: 3rem; height: 3rem; border-radius: .9rem; display: grid; place-items: center;
    font-size: 1.4rem; color: #fff; background: var(--brand-gradient); flex-shrink: 0;
}

.skill-chip {
    display: inline-block; padding: .3rem .75rem; margin: .15rem;
    border-radius: 99px; font-size: .85rem; font-weight: 500;
    background: rgba(99, 102, 241, .12); color: var(--brand);
}
[data-bs-theme="dark"] .skill-chip { color: #a5b4fc; }

/* ---------- المشاريع ---------- */
.project-card .cat-badge {
    font-size: .78rem; font-weight: 600; padding: .35rem .7rem; border-radius: 99px;
    background: rgba(99, 102, 241, .12); color: var(--brand);
}
[data-bs-theme="dark"] .project-card .cat-badge { color: #a5b4fc; }

/* ---------- معرض الهوايات ---------- */
.filter-pills .btn {
    border-radius: 99px; font-weight: 600; padding-inline: 1.2rem;
}
.gallery-card { overflow: hidden; }
.gallery-media {
    position: relative; height: 230px; overflow: hidden; background: #0b0d16;
}
.gallery-media img, .gallery-media video {
    width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease;
}
.gallery-card:hover .gallery-media img { transform: scale(1.08); }
.gallery-media .zoom-btn {
    position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, 0); cursor: zoom-in;
    display: grid; place-items: center; color: #fff; font-size: 2rem; opacity: 0;
    transition: opacity .25s ease, background .25s ease;
}
.gallery-card:hover .zoom-btn { opacity: 1; background: rgba(0, 0, 0, .35); }
.gallery-media .cat-float {
    position: absolute; top: .75rem; inset-inline-start: .75rem; z-index: 2;
    backdrop-filter: blur(6px); background: rgba(17, 19, 28, .7); color: #fff;
    border-radius: 99px; padding: .25rem .75rem; font-size: .78rem; font-weight: 600;
}

/* ---------- حالة فارغة ---------- */
.empty-state {
    text-align: center; padding: 3.5rem 1rem; color: var(--bs-secondary-color);
}
.empty-state i { font-size: 3rem; opacity: .5; }

/* ---------- نماذج ---------- */
.form-control:focus, .form-select:focus {
    border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(99, 102, 241, .22);
}
.admin-panel { border: 1px dashed var(--brand); border-radius: var(--radius); background: var(--surface); }

/* ---------- تسجيل الدخول ---------- */
.auth-wrap { min-height: 60vh; display: grid; place-items: center; }

/* ---------- التذييل ---------- */
.site-footer {
    margin-top: 5rem; padding: 2.5rem 0 1.5rem; color: rgba(255, 255, 255, .75);
    background: #12142a; border-radius: 2.2rem 2.2rem 0 0;
}
.site-footer a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.social-link {
    width: 2.4rem; height: 2.4rem; display: inline-grid; place-items: center;
    border-radius: 50%; background: rgba(255, 255, 255, .08); margin-inline-end: .35rem;
    transition: background .2s ease, transform .2s ease;
}
.social-link:hover { background: var(--brand); transform: translateY(-3px); }

/* ---------- بطاقات الأرقام وقص النص ---------- */
.stat-card { display: flex; flex-direction: column; justify-content: center; }
.stat-number {
    font-size: 2.4rem; font-weight: 800; line-height: 1.1;
    background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.line-clamp {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.footer-links li { margin-bottom: .35rem; }

/* ---------- ظهور تدريجي عند التمرير ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-visual, .hero .eyebrow .pulse { animation: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 767.98px) {
    .hero { padding: 3.5rem 0 3rem; border-radius: 0 0 1.5rem 1.5rem; }
    .hero-visual { max-width: 200px; font-size: 4rem; margin-top: 2rem; }
}
