/* ============================================
   ثيم "القطع الماسي" (Faceted Cut)
   ذهبي على أسود، مستوحى من أوجه الماسة المقطوعة
   ============================================ */

.theme-diamond {
    --void: #0b0a08;
    --void-2: #141210;
    --gold-deep: #a9791f;
    --gold: #c99a3d;
    --gold-bright: #f0c766;
    --bone: #efe8d8;
    --dim-text: rgba(239,232,216,.62);
    --border-line: rgba(201,154,61,.28);
    --card-bg: rgba(240,199,102,.045);
    --card-bg-hover: rgba(240,199,102,.09);
    --radius-cut: 14px;

    background: radial-gradient(ellipse at 50% -10%, var(--void-2) 0%, var(--void) 55%);
    color: var(--bone);
}

.theme-diamond.mode-light {
    --champagne: #f6f1e4;
    --champagne-2: #efe6d0;
    --ink: #18140f;
    --dim-text: rgba(24,20,15,.6);
    --border-line: rgba(24,20,15,.16);
    --card-bg: rgba(24,20,15,.035);
    --card-bg-hover: rgba(24,20,15,.07);
    background: radial-gradient(ellipse at 50% -10%, var(--champagne-2) 0%, var(--champagne) 55%);
    color: var(--ink);
}

/* الخطوط: عربي = Cairo / لاتيني = Cormorant Garamond + Jost */
.theme-diamond {
    font-family: 'Jost', 'Cairo', sans-serif;
}
.theme-diamond .display-name {
    font-family: 'Cormorant Garamond', 'Cairo', serif;
    font-weight: 700;
    font-size: clamp(30px, 8vw, 42px);
    letter-spacing: .04em;
    background: linear-gradient(120deg, var(--gold-deep), var(--gold-bright) 45%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: diamond-fade-up .8s cubic-bezier(.4,.1,.2,1) .35s both;
}
.theme-diamond.mode-light .display-name {
    background: linear-gradient(120deg, var(--gold-deep), var(--gold) 45%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
}
.theme-diamond .bio {
    color: var(--dim-text);
    font-size: 15px;
    line-height: 1.7;
    animation: diamond-fade-up .75s cubic-bezier(.4,.1,.2,1) .5s both;
}

/* الصورة الشخصية بشكل القطع الثماني */
.theme-diamond .avatar {
    clip-path: polygon(
        var(--radius-cut) 0, calc(100% - var(--radius-cut)) 0,
        100% var(--radius-cut), 100% calc(100% - var(--radius-cut)),
        calc(100% - var(--radius-cut)) 100%, var(--radius-cut) 100%,
        0 calc(100% - var(--radius-cut)), 0 var(--radius-cut)
    );
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(201,154,61,.25);
    position: relative;
    animation: diamond-pop .9s cubic-bezier(.4,.1,.2,1) .15s both;
}

/* توهج خلفي نابض خلف الصورة */
.theme-diamond .profile-container { position: relative; }
.theme-diamond .profile-container::before {
    content: '';
    position: absolute;
    top: 30px; left: 50%; transform: translate(-50%, 0);
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(201,154,61,.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: diamond-pulse 5.5s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* الأزرار - شكل القطع الثماني */
.theme-diamond .profile-link {
    background: var(--card-bg);
    color: var(--bone);
    border: 1px solid var(--border-line);
    clip-path: polygon(
        var(--radius-cut) 0, calc(100% - var(--radius-cut)) 0,
        100% var(--radius-cut), 100% calc(100% - var(--radius-cut)),
        calc(100% - var(--radius-cut)) 100%, var(--radius-cut) 100%,
        0 calc(100% - var(--radius-cut)), 0 var(--radius-cut)
    );
    position: relative;
    overflow: hidden;
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: .02em;
    transition: background-color .3s ease, border-color .3s ease, transform .2s ease;
    opacity: 0;
    animation: diamond-fade-up .75s cubic-bezier(.4,.1,.2,1) both;
}
.theme-diamond.mode-light .profile-link { color: var(--ink); }

/* تسلسل ظهور الأزرار بالترتيب */
.theme-diamond .profile-link:nth-child(1) { animation-delay: 1.0s; }
.theme-diamond .profile-link:nth-child(2) { animation-delay: 1.08s; }
.theme-diamond .profile-link:nth-child(3) { animation-delay: 1.16s; }
.theme-diamond .profile-link:nth-child(4) { animation-delay: 1.24s; }
.theme-diamond .profile-link:nth-child(5) { animation-delay: 1.32s; }
.theme-diamond .profile-link:nth-child(6) { animation-delay: 1.40s; }
.theme-diamond .profile-link:nth-child(n+7) { animation-delay: 1.48s; }

.theme-diamond .profile-link:hover {
    background: var(--card-bg-hover);
    border-color: var(--gold-deep);
    transform: translateY(-2px);
}
.theme-diamond .profile-link:active { transform: scale(.985); }

/* شعاع اللمعان القطري عند الهوفر */
.theme-diamond .profile-link::after {
    content: '';
    position: absolute; top: 0; left: 0; height: 100%; width: 60%;
    background: linear-gradient(120deg, transparent, rgba(240,199,102,.18), transparent);
    transform: translateX(-150%);
    pointer-events: none;
}
.theme-diamond .profile-link:hover::after {
    animation: diamond-shimmer .7s ease;
}

.theme-diamond .powered-by { animation: diamond-fade-up .7s ease 1.6s both; color: var(--dim-text); }
.theme-diamond .powered-by a { color: var(--gold); }

/* ===== الحركات ===== */
@keyframes diamond-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes diamond-pop {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes diamond-pulse {
    0%, 100% { transform: translate(-50%, 0) scale(1); opacity: .45; }
    50%      { transform: translate(-50%, 0) scale(1.08); opacity: .85; }
}
@keyframes diamond-shimmer {
    from { transform: translateX(-150%); }
    to   { transform: translateX(150%); }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .theme-diamond * {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001s !important;
    }
}
