/* ── DPortal Sanity Portfolio — dark theme ──────────────────────────────── */

.dp-portfolio {
    padding: 20px 0;
}

/* ── Filter bar ─────────────────────────────────────────────────────────── */

.dp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.dp-filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #9f9f9f;
    transition: background .2s, color .2s, border-color .2s;
}

.dp-filter-btn:hover {
    background: rgba(162,89,255,0.12);
    border-color: rgba(162,89,255,0.4);
    color: #c8c8cc;
}

.dp-filter-btn.dp-active {
    background: var(--color-portfolio, #a259ff);
    border-color: var(--color-portfolio, #a259ff);
    color: #fff;
}

/* ── Grid ───────────────────────────────────────────────────────────────── */

.dp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) { .dp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .dp-grid { grid-template-columns: 1fr; } }

.dp-loading,
.dp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6b7a99;
    font-size: 14px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.dp-card {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15,17,26,0.88);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.dp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.55);
    border-color: rgba(162,89,255,0.3);
}

.dp-card__image {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    aspect-ratio: 383 / 249;
}

.dp-card__btn {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
}

.dp-card__btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: object-position 6s ease, transform .4s ease;
    will-change: object-position;
}

.dp-card:hover .dp-card__btn img {
    object-position: bottom center;
    transform: scale(1.03);
}

.dp-card__placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.04);
}

.dp-card__arrow {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-portfolio, #a259ff);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 36px;
    text-align: center;
    padding: 0;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .2s, transform .2s;
}

.dp-card:hover .dp-card__arrow {
    opacity: 1;
    transform: scale(1);
}

.dp-card__content {
    padding: 14px 16px 18px;
}

.dp-card__type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-portfolio, #a259ff);
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.dp-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

body.dp-modal-open { overflow: hidden; }

.dp-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dp-modal[hidden] { display: none; }

.dp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.82);
    border: none;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dp-modal__content {
    position: relative;
    background: #0d1120;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.dp-modal__content::-webkit-scrollbar { width: 4px; }
.dp-modal__content::-webkit-scrollbar-track { background: transparent; }
.dp-modal__content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

@media (min-width: 700px) {
    .dp-modal__content {
        flex-direction: row;
        max-height: 85vh;
    }
}

.dp-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    color: #9f9f9f;
    padding: 4px 8px;
    transition: background .2s, color .2s;
}

.dp-modal__close:hover {
    background: rgba(162,89,255,0.2);
    color: #fff;
}

/* Media side */
.dp-modal__media {
    flex: 0 0 55%;
    background: #070d1b;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

@media (max-width: 699px) {
    .dp-modal__media {
        border-radius: 12px 12px 0 0;
        min-height: 220px;
    }
}

.dp-modal__media img {
    width: 100%;
    height: auto;
    display: block;
}

.dp-modal__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.dp-modal__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dp-modal__animation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

/* Body side */
.dp-modal__body {
    flex: 1;
    padding: 40px 28px 28px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.dp-modal__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dp-modal__meta-item span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7a99;
    margin-bottom: 4px;
}

.dp-modal__meta-item strong {
    font-size: 14px;
    font-weight: 600;
    color: #c8c8cc;
}

.dp-modal__desc h3 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-portfolio, #a259ff);
}

.dp-modal__desc p {
    font-size: 14px;
    line-height: 1.7;
    color: #9f9f9f;
    margin: 0;
}
