#dream-portfolio-container {
    --dp-accent: #AE9EFF;
    --dp-glass: rgba(255, 255, 255, 0.02);
    --dp-border: rgba(174, 158, 255, 0.12);
    --dp-glow: 0 0 15px var(--dp-accent);
    --dp-inner: inset 0 0 10px rgba(174, 158, 255, 0.2);
    --dp-bezier: cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 80px 20px;
    color: white;
    font-family: 'Atkinson Hyperlegible Mono', monospace;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

@keyframes dp-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.dp-header {
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.dp-header h1 {
    text-transform: uppercase;
    letter-spacing: 8px;
    font-size: 2.2rem;
    text-shadow: var(--dp-glow);
    animation: dp-float 6s ease-in-out infinite;
}

.dp-nav { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-bottom: 60px; 
    flex-wrap: wrap; 
}

.dp-nav-btn {
    background: var(--dp-glass); 
    border: 1px solid var(--dp-border);
    padding: 12px 22px; 
    border-radius: 50px; 
    color: white; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: all 0.5s var(--dp-bezier);
    backdrop-filter: blur(12px); 
    font-size: 0.75rem; 
    text-transform: uppercase;
}

.dp-nav-btn:hover, .dp-nav-btn.active {
    border-color: var(--dp-accent); 
    box-shadow: var(--dp-glow), var(--dp-inner);
    background: rgba(174, 158, 255, 0.08); 
    transform: translateY(-2px);
}

.dp-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px; 
    max-width: 1300px; 
    margin: 0 auto;
}

.dp-item {
    position: relative; 
    border-radius: 25px; 
    overflow: hidden;
    border: 1px solid var(--dp-border); 
    aspect-ratio: 1/1; 
    cursor: pointer;
}

.dp-protection { position: absolute; inset: 0; z-index: 5; background: transparent; }

.dp-item img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: filter 0.8s var(--dp-bezier); 
    pointer-events: none;
}

.dp-item:hover { border-color: var(--dp-accent); box-shadow: var(--dp-glow); }
.dp-item:hover img { filter: brightness(0.35) blur(3px); }

.dp-overlay {
    position: absolute; 
    inset: 0; 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    opacity: 0;
    transition: opacity 0.6s var(--dp-bezier); 
    z-index: 2;
}

.dp-item:hover .dp-overlay { opacity: 1; }
.dp-overlay h3 { font-size: 0.9rem; margin-bottom: 5px; text-align: center; padding: 0 10px; }

#dp-lightbox {
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(25px); 
    display: none; 
    z-index: 99999;
    justify-content: center; 
    align-items: center;
}

.dp-lb-content { 
    position: relative; 
    width: 90%; 
    max-width: 1100px; 
    display: flex; 
    justify-content: center; 
}

.dp-lb-img {
    max-width: 100%; 
    max-height: 85vh; 
    border-radius: 20px;
    border: 1px solid var(--dp-border); 
    box-shadow: var(--dp-glow);
    transition: opacity 0.3s ease;
}

.dp-lb-btn {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    background: rgba(174, 158, 255, 0.1); 
    border: 1px solid var(--dp-border);
    color: white; 
    font-size: 1.5rem; 
    cursor: pointer; 
    border-radius: 50%;
    width: 55px; 
    height: 55px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: 0.4s; 
    z-index: 10;
    backdrop-filter: blur(5px);
}

.dp-lb-close { 
    position: absolute; 
    top: -60px; 
    right: 0; 
    background: none; 
    border: none; 
    color: white; 
    font-size: 2.2rem; 
    cursor: pointer; 
}

/* --- MOBILE OPTIMIZATIONS --- */
@media screen and (max-width: 768px) {
    #dream-portfolio-container {
        padding: 40px 15px;
    }

    .dp-header h1 {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }

    .dp-nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        margin-bottom: 30px;
        gap: 8px;
    }

    /* Hide scrollbar for nav while keeping swipe functionality */
    .dp-nav::-webkit-scrollbar { display: none; }

    .dp-nav-btn {
        padding: 10px 18px;
        flex-shrink: 0;
        font-size: 0.7rem;
    }

    .dp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .dp-item {
        border-radius: 15px;
    }

    /* Adjust Lightbox for Mobile */
    .dp-lb-content {
        width: 100%;
        padding: 0 10px;
    }

    .dp-lb-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    /* Move arrows slightly inside for thumbs */
    .dp-lb-btn[onclick*="-1"] { left: 5px; }
    .dp-lb-btn[onclick*="1"] { right: 5px; }

    .dp-lb-close {
        top: -50px;
        right: 10px;
    }
}

/* For very small phones */
@media screen and (max-width: 480px) {
    .dp-grid {
        grid-template-columns: 1fr;
    }
    
    .dp-item {
        aspect-ratio: 4/5; /* Slightly taller for mobile single-view */
    }
}