/* PROJECTS SECTION STYLES */

.projects {
    position: relative;
    padding: var(--spacing-xl) 0;
    background: var(--gray-900);
    overflow: hidden;
}

/* Stars Background */
.stars-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.star:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.star:nth-child(2) {
    top: 40%;
    left: 30%;
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    top: 60%;
    left: 50%;
    animation-delay: 1s;
}

.star:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: 1.5s;
}

.star:nth-child(5) {
    top: 80%;
    left: 90%;
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.projects .section-header {
    position: relative;
    z-index: 1;
}

.projects .section-title,
.projects .section-subtitle {
    color: var(--white);
}

.projects-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link-icon {
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-xl);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.project-card:hover .project-link-icon {
    transform: scale(1);
}

.project-content {
    padding: var(--spacing-lg);
}

.project-title {
    font-size: var(--font-xl);
    font-weight: var(--font-bold);
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.project-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-sm);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: var(--font-semibold);
}

.project-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-xs);
}

.no-projects {
    text-align: center;
    padding: var(--spacing-2xl);
    color: rgba(255, 255, 255, 0.6);
}

.no-projects i {
    font-size: var(--font-4xl);
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: var(--spacing-md);
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image-container {
        height: 200px;
    }
    
    .project-content {
        padding: var(--spacing-md);
    }
}
