/* Projects Page Styles */

/* Hero Section */
.projects-hero {
    min-height: 20vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #000;
    padding: 120px 0 20px;
}

.projects-title {
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 68px;
    font-weight: 300;
    line-height: 1.2;
    text-align: center;
    color: #fff;
    letter-spacing: 0.25em;
    margin: 0;
}

.highlight-purple {
    color: #ffffff;
    position: relative;
    display: inline-block;
    background: linear-gradient(to bottom, transparent 0%, transparent 60%, #C979FF 60%, #C979FF 100%);
}

/* Projects Section */
.projects-section {
    background: #000;
    padding: 20px 0 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.project-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
    outline: none;
}

.project-item:focus {
    outline: 2px solid #C979FF;
    outline-offset: 2px;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(201, 121, 255, 0.3);
}

.project-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.project-item:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-overlay,
.project-item:focus .project-overlay,
.project-item:focus-within .project-overlay {
    opacity: 1;
}

.project-title {
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-subtitle {
    font-family: 'Ruda', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    max-height: 800px;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #C979FF;
}

#modalVideo {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .projects-hero {
        padding: 100px 0 20px;
        min-height: 15vh;
    }
    
    .projects-title {
        font-size: 48px;
        padding: 0 20px;
        letter-spacing: 0.2em;
    }
    
    .projects-section {
        padding: 20px 0 80px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 180px);
        gap: 20px;
        padding: 0 20px;
        max-width: 350px;
    }
    
    .project-overlay {
        padding: 20px;
        opacity: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
        transition: opacity 0.3s ease;
    }
    
    .project-item:hover .project-overlay,
    .project-item:active .project-overlay {
        opacity: 1;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .project-subtitle {
        font-size: 13px;
    }
    
    .modal-content {
        width: 95vw;
        height: 70vh;
    }
    
    .modal-close {
        top: -40px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .projects-title {
        font-size: 36px;
        letter-spacing: 0.15em;
    }
    
    .projects-grid {
        gap: 15px;
    }
    
    .project-overlay {
        padding: 15px;
    }
    
    .project-title {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .project-subtitle {
        font-size: 12px;
    }
}

/* Large screens - maintain 2x3 grid */
@media (min-width: 1200px) {
    .projects-grid {
        max-width: 900px;
        gap: 30px;
        grid-template-rows: repeat(3, 220px);
    }
    
    .projects-section {
        padding: 20px 0 100px;
    }
}

/* Medium screens - 2x3 grid */
@media (min-width: 769px) and (max-width: 1199px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 180px);
        gap: 20px;
        max-width: 750px;
    }
    
    .projects-section {
        padding: 20px 0 80px;
    }
}

/* Small tablets - 2x3 grid */
@media (min-width: 481px) and (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 150px);
        gap: 15px;
        max-width: 550px;
    }
    
    .projects-section {
        padding: 20px 0 80px;
    }
}
