/* ═══════════════════════════════════════════════════════════════════════════
   Project detail page
   ═══════════════════════════════════════════════════════════════════════════ */

.ks-project {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 0 clamp(2.5rem, 6vw, 4rem);
}

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */
.ks-project-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1.35rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

.ks-project-crumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}

.ks-project-crumb a:hover {
    color: #fda4af;
}

.ks-project-crumb__sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
}

.ks-project-crumb__current {
    color: rgba(255, 255, 255, 0.75);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Two-column layout ─────────────────────────────────────────────────────── */
.ks-project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 1.35rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

@media (max-width: 991px) {
    .ks-project-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Preview ─────────────────────────────────────────────────────────────────── */
.ks-project-preview {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.ks-project-preview__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    min-height: 200px;
}

.ks-project-preview__frame.is-landscape {
    aspect-ratio: 16 / 9;
    max-height: min(56vh, 520px);
}

.ks-project-preview__frame.is-portrait {
    aspect-ratio: 9 / 16;
    max-height: min(72vh, 640px);
    max-width: 360px;
    margin: 0 auto;
}

.ks-project-preview__media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ks-project-preview__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ks-project-preview__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ks-project-preview__tag {
    display: inline-flex;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ks-project-preview__downloads {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.ks-project-sidebar {
    position: sticky;
    top: 5.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    padding: 1.35rem 1.35rem 1.25rem;
}

@media (max-width: 991px) {
    .ks-project-sidebar {
        position: static;
    }
}

.ks-project-sidebar__title {
    margin: 0 0 0.35rem;
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.ks-project-sidebar__creator {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
}

.ks-project-sidebar__creator strong {
    color: #fda4af;
    font-weight: 600;
}

.ks-project-sidebar__desc {
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
}

.ks-project-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
}

.ks-project-pricing__label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-right: auto;
}

.ks-project-pricing__value {
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    line-height: 1;
}

.ks-project-pricing__unit {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

.ks-project-sidebar__hint {
    margin: 0.65rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.ks-project-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ks-project-spec {
    min-width: 0;
}

.ks-project-spec__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.2rem;
}

.ks-project-spec__value {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    word-break: break-word;
}

.ks-project-related .ks-browse-card__media video,
.ks-project-related .ks-browse-card__media img {
    opacity: 1;
}

/* ── Related ─────────────────────────────────────────────────────────────────── */
.ks-project-related {
    margin-top: 0.5rem;
}

.ks-project-related__head {
    margin-bottom: 1.15rem;
}

.ks-project-related__head .ks-section-title {
    font-size: 1.25rem;
}

.ks-browse-grid--related {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
}

/* Override legacy thick borders on project detail */
.ks-project .ks-project-preview-wrap,
.ks-project .ks-project-info-card {
    border-width: 1px;
}
