/* Work Gallery Page Styles */

body {
    background: #0d0d0d;
    color: #e6e6e6;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Hide footer on work page */
.footer,
#site-footer {
    display: none;
}

/* Filter Bar */
.filter-bar {
    position: sticky;
    top: 7rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 2rem 3rem;
    flex-wrap: wrap;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    margin: 0 -2rem 4rem -2rem;
}

.filter-btn {
    background: none;
    border: 1px solid rgba(230, 230, 230, 0.3);
    color: #e6e6e6;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    background: rgba(230, 230, 230, 0.1);
    border-color: rgba(230, 230, 230, 0.6);
}

.filter-btn.active {
    background: #e6e6e6;
    color: #0d0d0d;
    border-color: #e6e6e6;
}

.web-art-btn:hover {
    background: rgba(230, 230, 230, 0.1);
    border-color: rgba(230, 230, 230, 0.6);
}

/* Projects Container */
.projects-container {
    padding: 4rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Constellation Lines */
.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.constellation-lines path,
.constellation-lines line {
    stroke: #8b939c;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.3s ease;
    fill: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 4rem;
    position: relative;
    z-index: 1;
}

/* Project Cards */
.project-card {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    position: relative;
}

.project-card.expanded {
    grid-column: 1 / -1;
    cursor: default;
    padding-bottom: 2.5rem;
    padding-top: 1.5rem;
}

.project-card:not(.expanded):hover {
    transform: translateY(-5px);
}

.project-card:not(.expanded):hover .card-image {
    border-color: rgba(230, 230, 230, 0.35);
}

.project-card-compact {
    display: block;
}

.project-card.expanded .project-card-compact {
    display: none;
}

.project-card-expanded {
    display: none;
    padding: 2.5rem;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(230, 230, 230, 0.15);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.project-card.expanded .project-card-expanded {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    animation: expandCard 0.4s ease;
    max-height: 500px;
    overflow: hidden;
}

@keyframes expandCard {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.expanded-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.expanded-left::-webkit-scrollbar {
    width: 6px;
}

.expanded-left::-webkit-scrollbar-track {
    background: rgba(230, 230, 230, 0.05);
    border-radius: 3px;
}

.expanded-left::-webkit-scrollbar-thumb {
    background: rgba(230, 230, 230, 0.3);
    border-radius: 3px;
}

.expanded-left::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 230, 230, 0.5);
}

.expanded-media {
    width: 100%;
    border-radius: 10px;
}

.expanded-media iframe {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    display: block;
    border: 1px solid rgba(230, 230, 230, 0.1);
}

.expanded-media img {
    width: 100%;
    border-radius: 10px;
    display: block;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(230, 230, 230, 0.1);
    transition: transform 0.3s ease;
}

.expanded-media img:hover {
    transform: scale(1.02);
}

.expanded-media img:last-child {
    margin-bottom: 0;
}

.expanded-right {
    display: flex;
    flex-direction: column;
}

.expanded-header {
    margin-bottom: 1.5rem;
}

.expanded-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: #e6e6e6;
    margin: 0 0 0.8rem 0;
    line-height: 1.3;
}

.expanded-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: rgba(230, 230, 230, 0.5);
    margin: 0 0 0.4rem 0;
    letter-spacing: 0.05em;
}

.expanded-role {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: rgba(230, 230, 230, 0.6);
    margin: 0 0 1.2rem 0;
    font-style: italic;
    letter-spacing: 0.02em;
}

.expanded-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.expanded-tags .tag {
    font-size: 0.8rem;
    padding: 0.5rem 1.1rem;
    background: rgba(230, 230, 230, 0.08);
    border-color: rgba(230, 230, 230, 0.25);
}

.expanded-description {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(230, 230, 230, 0.9);
    flex-grow: 1;
}

.expanded-description a {
    color: #e6e6e6;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}


.close-expanded {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(230, 230, 230, 0.4);
    background: transparent;
    color: rgba(230, 230, 230, 0.6);
    font-size: 1.8rem;
    line-height: 40px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

.close-expanded:hover {
    background: rgba(230, 230, 230, 0.1);
    border-color: rgba(230, 230, 230, 0.6);
    color: rgba(230, 230, 230, 0.9);
    transform: rotate(90deg);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(230, 230, 230, 0.2);
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.card-info h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #e6e6e6;
    margin: 0 0 0.5rem 0;
}

.card-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: rgba(230, 230, 230, 0.6);
    margin: 0 0 0.3rem 0;
}

.card-role {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: rgba(230, 230, 230, 0.5);
    margin: 0 0 0.8rem 0;
    font-style: italic;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(230, 230, 230, 0.1);
    border: 1px solid rgba(230, 230, 230, 0.3);
    border-radius: 12px;
    color: rgba(230, 230, 230, 0.8);
}

/* Project Detail Panel */
.project-detail {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {

    /* Hide constellation lines on mobile */
    .constellation-canvas {
        display: none;
    }

    .filter-bar {
        justify-content: flex-start;
        gap: 0.6rem;
        padding: 3.5rem 1.5rem 2rem;
        margin: 0 0 4rem 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(230, 230, 230, 0.3) transparent;
    }

    .filter-bar::-webkit-scrollbar {
        height: 4px;
    }

    .filter-bar::-webkit-scrollbar-track {
        background: transparent;
    }

    .filter-bar::-webkit-scrollbar-thumb {
        background: rgba(230, 230, 230, 0.3);
        border-radius: 2px;
    }

    .filter-bar::-webkit-scrollbar-thumb:hover {
        background: rgba(230, 230, 230, 0.5);
    }

    .filter-btn {
        padding: 0.35rem 0.9rem;
        border-radius: 14px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .projects-container {
        padding: 0 0.5rem 3rem;
    }

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

    .project-card {
        margin-bottom: 0 !important;
    }

    .project-card:not(:last-child) {
        margin-bottom: 0 !important;
    }

    .project-card[style*="display: none"] {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card-image {
        height: 250px;
    }

    .project-card.expanded .project-card-expanded {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
        max-height: none;
    }

    .expanded-left {
        max-height: none;
    }

    .expanded-media img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .expanded-media iframe {
        height: 250px;
    }

    .expanded-title {
        font-size: 1.4rem;
    }

    .expanded-date,
    .expanded-role {
        font-size: 0.85rem;
    }

    .expanded-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .close-expanded {
        top: auto;
        bottom: 1.5rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        position: fixed;
        z-index: 1000;
    }

    .project-card.expanded .project-card-expanded {
        padding-bottom: 5rem;
    }
}