/* ===================================
   Portfolio Page Specific Styles
   =================================== */

/* Portfolio Hero Section */
.portfolio-hero {
    padding: calc(var(--section-padding) + 80px) 0 60px 0;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse 60% 40% at 15% 60%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 50% 35% at 85% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 65%),
        radial-gradient(ellipse 40% 25% at 50% 100%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.portfolio-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.88);
}

.portfolio-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-cyan);
    margin-top: 1.25rem;
    border-radius: 2px;
}

.portfolio-subtitle {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 700px;
}

/* Filter Pills */
.portfolio-filters {
    padding: 2rem 0;
    background-color: var(--color-bg);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.625rem 1.75rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-primary);
}

.filter-pill:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
}

.filter-pill.active {
    background-color: rgba(91, 124, 255, 0.12);
    border-color: var(--color-accent);
    color: var(--color-text);
}

/* Portfolio Main Grid */
.portfolio-main {
    padding: 3rem 0 var(--section-padding) 0;
    background-color: var(--color-bg);
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

.portfolio-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

/* Project Cards */
.project-card {
    background-color: #111111;
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(91, 124, 255, 0.08);
    border-color: rgba(91, 124, 255, 0.25);
}

/* Project Info Section */
.project-info {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.project-artist {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: -0.5rem;
    margin-bottom: 0.75rem;
}

.project-year {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.project-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    min-height: 4.32rem; /* 3 × 0.9rem × 1.6 */
}

.project-role {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}


.role-media-spacer {
    flex: 1;
}

.role-label {
    display: none;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.project-category-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem 0.15rem 0.5rem;
    background-color: transparent;
    border-left: 2px solid rgba(0, 212, 255, 0.55);
    border-radius: 3px;
    font-size: 0.6rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.8);
    font-weight: 400;
}

.project-genre-tag {
    display: inline-block;
    padding: 0.15rem 0 0.15rem 0.5rem;
    background-color: transparent;
    border-left: 2px solid rgba(91, 124, 255, 0.55);
    border-radius: 3px;
    font-size: 0.6rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(91, 124, 255, 0.85);
    font-weight: 400;
}


.role-value {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background-color: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-cyan);
    font-weight: 500;
}

/* ===================================
   Media Preview Area
   =================================== */

.media-preview {
    position: relative;
    width: 100%;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.media-preview:has(.video-element) {
    height: 175px;
}

.highlight-grid .project-card .media-preview {
    height: 140px;
}

.media-preview .video-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.audio-element {
    display: none;
}

.audio-visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Large centered play button */
.play-btn {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    opacity: 1;
    transition: all var(--transition);
    flex-shrink: 0;
}

.play-btn:hover {
    background-color: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

/* ===================================
   Player Controls Bar
   =================================== */

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0 0 0;
    margin-top: 0.3rem;
    min-height: calc(28px + 0.6rem);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: none;
    transition: height 0.15s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-filled {
    height: 100%;
    background-color: var(--color-accent);
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.volume-btn {
    width: 22px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color var(--transition);
}

.volume-btn:hover {
    color: var(--color-text);
}

.volume-slider {
    width: 56px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}

.time-display {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: left;
    flex-shrink: 0;
}

.fullscreen-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.media-preview:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===================================
   Video Modal Popup
   =================================== */

.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-modal-overlay.open {
    display: flex;
    animation: modal-fade-in 0.22s ease;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.video-modal-container {
    position: relative;
    width: 100%;
    max-width: 85vw;
    max-height: 85vh;
    background: #111;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: modal-scale-in 0.22s ease;
}

@keyframes modal-scale-in {
    from { transform: scale(0.93); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.video-modal-player {
    display: block;
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    background: #000;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .portfolio-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding-top: calc(80px + 60px);
    }

    .portfolio-projects-grid {
        grid-template-columns: 1fr;
    }

    .media-preview {
        height: 95px;
    }

    .media-preview:has(.video-element) {
        height: 160px;
    }

    .play-btn {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .filter-buttons {
        gap: 0.75rem;
    }

    .filter-pill {
        padding: 0.5rem 1.25rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .portfolio-title {
        font-size: 2.5rem;
    }

    .portfolio-subtitle {
        font-size: 0.9rem;
    }

    .project-info {
        padding: 1.25rem;
    }

    .project-name {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.85rem;
    }

    .player-controls {
        gap: 0.4rem;
    }

    .volume-slider {
        width: 44px;
    }

    .time-display {
        font-size: 0.68rem;
        min-width: 70px;
    }
}

/* ===================================
   Animations & Transitions
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.3s; }
.project-card:nth-child(7) { animation-delay: 0.35s; }
.project-card:nth-child(8) { animation-delay: 0.4s; }
.project-card:nth-child(9) { animation-delay: 0.45s; }

/* Hide cards when filtering */
.project-card.hidden {
    display: none;
}

/* ===================================
   File Metadata Section
   =================================== */

.file-metadata {
    margin-bottom: 0.75rem;
}

.file-metadata-label {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 0.25rem;
}

.file-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.file-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.58);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.file-specs {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ===================================
   Audio Controls: play button in controls row
   =================================== */

.player-controls .play-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-shrink: 0;
}

.player-controls .play-btn:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.player-controls .play-btn:active {
    transform: scale(0.95);
}

.time-current,
.time-total {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ===================================
   Details Expand/Collapse
   =================================== */

.details-slot {
    margin-top: 0.75rem;
    min-height: 1rem;
}

.details-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.2s ease;
}

.details-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

.details-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.details-toggle[aria-expanded="true"] .details-chevron {
    transform: rotate(180deg);
}

.details-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.details-body.open {
    max-height: 600px;
}

.details-content {
    padding-top: 0.65rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.details-link {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.25);
}
