/* ==========================================================
   Public Project Detail Page — Console Redesign
   File: static/css/landing/project-detail-console.css

   Scope: every rule is namespaced under .cs-project-detail /
   .cs-pd-* (brand-new class names added only inside
   templates/landing/repository_view.html), plus one small
   .cs-pd-back rule for the "Back to Repository" link on that
   same page. Nothing global (.btn, .search-card, .stat-card,
   .statistics-grid used elsewhere) is redefined, so the admin
   workflow queue and the index.html demo search card are
   untouched.
========================================================== */

.cs-pd-back{
    margin-bottom:30px;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

/* ---------- CARD SHELL ---------- */

.search-card.cs-project-detail{
    position:relative;
    isolation:isolate;
    overflow:hidden;
    border-radius:32px;
    border:1px solid var(--line-hi);
    background:
        radial-gradient(ellipse 700px 400px at 10% -10%, rgba(62,123,250,.14), transparent 60%),
        radial-gradient(ellipse 600px 400px at 100% 110%, rgba(139,92,246,.12), transparent 60%),
        var(--surface);
}

.cs-project-detail > *{
    position:relative;
    z-index:2;
}

.cs-pd-corner{
    position:absolute;
    width:24px;
    height:24px;
    border:2px solid rgba(34,211,238,.5);
    z-index:1;
    pointer-events:none;
}
.cs-pd-corner--tl{ top:20px; left:20px; border-right:none; border-bottom:none; border-radius:10px 0 0 0; }
.cs-pd-corner--br{ bottom:20px; right:20px; border-left:none; border-top:none; border-radius:0 0 10px 0; }

.cs-pd-glow{
    position:absolute;
    z-index:0;
    pointer-events:none;
    border-radius:50%;
    filter:blur(8px);
}
.cs-pd-glow--a{
    width:260px; height:260px;
    top:-100px; left:0;
    background:radial-gradient(circle, rgba(62,123,250,.25), transparent 70%);
    animation:cs-pd-drift-a 10s ease-in-out infinite;
}
.cs-pd-glow--b{
    width:240px; height:240px;
    bottom:-90px; right:4%;
    background:radial-gradient(circle, rgba(139,92,246,.2), transparent 70%);
    animation:cs-pd-drift-b 12s ease-in-out infinite;
}
@keyframes cs-pd-drift-a{ 0%,100%{transform:translate(0,0);} 50%{transform:translate(18px,14px);} }
@keyframes cs-pd-drift-b{ 0%,100%{transform:translate(0,0);} 50%{transform:translate(-16px,-12px);} }

/* ---------- META CARDS (Researchers / Adviser / Keywords) ---------- */

.cs-pd-meta-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:18px;
    margin:26px 0 34px;
}

.cs-pd-meta-card{
    --pd-accent-rgb: 62,123,250;
    position:relative;
    text-align:left;
    padding:22px 20px;
    border-radius:18px;
    border:1px solid var(--line);
    background:linear-gradient(160deg, rgba(var(--pd-accent-rgb),.09), rgba(148,163,255,.03));
    transition:border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.cs-pd-meta-card:hover{
    border-color:rgba(var(--pd-accent-rgb),.4);
    transform:translateY(-3px);
    box-shadow:0 14px 30px -16px rgba(var(--pd-accent-rgb),.4);
}

.cs-pd-meta-card--primary{ --pd-accent-rgb:62,123,250; }
.cs-pd-meta-card--cyan{ --pd-accent-rgb:34,211,238; }
.cs-pd-meta-card--violet{ --pd-accent-rgb:139,92,246; }

.cs-pd-meta-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    border-radius:10px;
    margin-bottom:14px;
    background:linear-gradient(135deg, rgba(var(--pd-accent-rgb),.9), rgba(var(--pd-accent-rgb),.55));
    box-shadow:0 6px 14px rgba(var(--pd-accent-rgb),.3);
    color:#fff;
}

.cs-pd-meta-icon svg{
    width:17px;
    height:17px;
    stroke:#fff;
}

.cs-pd-meta-label{
    opacity:.7;
    font-size:13px;
    margin-bottom:6px;
    letter-spacing:.02em;
    text-transform:uppercase;
    font-weight:600;
}

.cs-pd-meta-value{
    font-size:16px;
    line-height:1.6;
    color:var(--gray-900);
}

/* ---------- LOGIN-TO-UNLOCK BAR ---------- */

.cs-pd-locked{
    position:relative;
    margin-top:24px;
    padding:22px 24px;
    border-radius:18px;
    border:1px solid rgba(62,123,250,.25);
    background:linear-gradient(135deg, rgba(62,123,250,.1), rgba(139,92,246,.06));
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:16px;
}

.cs-pd-locked-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border-radius:12px;
    background:rgba(148,163,255,.1);
    border:1px solid var(--line-hi);
    color:var(--cyan);
    flex-shrink:0;
}

.cs-pd-locked-icon svg{
    width:18px;
    height:18px;
}

.cs-pd-locked p{
    font-size:14px;
    opacity:.85;
    margin:0;
    flex:1 1 220px;
}

@media (max-width: 640px){
    .search-card.cs-project-detail{ padding:40px 22px !important; }
    .cs-pd-locked{ flex-direction:column; align-items:flex-start; }
}