/* Portfolio Page - Dark theme, masonry grid, ambilight, lightbox */

/* ==================== HERO ==================== */
.portfolio-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
}

.portfolio-hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.portfolio-hero-name {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
    letter-spacing: 0.02em;
}

.portfolio-hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: rgba(255,255,255,0.85);
    font-weight: 300;
    margin: 0;
    text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

.portfolio-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.6);
    font-size: 1.8rem;
    animation: portfolio-bounce 2s infinite;
    cursor: pointer;
}

@keyframes portfolio-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==================== BIO ==================== */
.portfolio-bio {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #b0b0b0;
}

.portfolio-bio .stat-value {
    color: #fff;
    font-weight: 600;
}

/* ==================== MASONRY GRID ==================== */
.portfolio-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
    column-count: 3;
    column-gap: 16px;
}

.portfolio-grid-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 16px;
    overflow: visible;
    cursor: pointer;
    border-radius: 4px;
}

/* Ambilight glow */
.portfolio-grid-item::before {
    content: '';
    position: absolute;
    inset: -8px;
    z-index: -1;
    background-image: var(--photo-url);
    background-size: cover;
    background-position: center;
    filter: blur(25px) saturate(1.5);
    opacity: 0;
    transition: opacity 0.6s ease;
    border-radius: 8px;
}

.portfolio-grid-item.loaded::before {
    opacity: 0.45;
}

.portfolio-grid-item:hover::before {
    opacity: 0.7;
}

.portfolio-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-grid-item img.visible {
    opacity: 1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .portfolio-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        column-count: 1;
        padding: 0 0.5rem 3rem;
    }

    .portfolio-bio {
        padding: 3rem 1rem 2rem;
        font-size: 1rem;
    }
}
