/* Glowing Animated Project Cards */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.project-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, 
        #3b82f6, #8b5cf6, #06d6a0, #ffd60a, #003566, #3b82f6);
    background-size: 400% 400%;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientShift 4s ease infinite;
    z-index: -1;
}

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

.project-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 18px;
    z-index: 0;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(59, 130, 246, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-card-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.project-card:hover .project-icon::before {
    left: 100%;
}

.project-icon i {
    font-size: 1.8rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.project-title {
    flex: 1;
}

.project-title h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title h3 {
    color: #3b82f6;
}

.project-tech {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.project-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #bfdbfe;
    transition: all 0.3s ease;
}

.project-card:hover .project-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    transform: translateY(-2px);
}

.project-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.project-stat {
    text-align: center;
}

.project-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
}

.project-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.project-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.project-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.project-btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.project-btn-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

/* Featured Project Badge */
.project-card.featured::before {
    opacity: 0.7;
}

.project-card.featured {
    background: linear-gradient(145deg, #fefefe, #f0f9ff);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: pulse 2s infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Hover effects for the entire card */
.project-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.project-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .project-card-content {
        padding: 1.5rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .project-card {
        background: linear-gradient(145deg, #1f2937, #111827);
        color: white;
    }
    
    .project-card::after {
        background: linear-gradient(145deg, #1f2937, #111827);
    }
    
    .project-title h3 {
        color: #f9fafb;
    }
    
    .project-description {
        color: #d1d5db;
    }
}
