/* projects.css */

.projects-main {
    padding: 2rem 0;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    border-radius: 20px;
}

/* Subtle background blob to make the glass pop */
.projects-main::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0,113,227,0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.projects-header {
    text-align: center;
    margin-bottom: 3rem;
}

.projects-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    border-bottom: none; /* override global */
    display: block;
}

.projects-header p {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Light Glassmorphic Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0071e3, #42a1ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 113, 227, 0.2);
}

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

/* Card Content */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    word-break: break-word;
}

.project-icon svg {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-card:hover .project-icon svg {
    color: var(--accent);
    transform: translateX(3px) translateY(-3px);
}

.project-desc {
    color: var(--secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer (Meta info) */
.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-item svg {
    width: 14px;
    height: 14px;
}

.lang-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.project-website-link {
    margin-left: auto;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 2;
}

.project-website-link:hover {
    color: #42a1ff;
    transform: translateY(-1px);
}

.project-website-link svg {
    stroke: currentColor;
}

/* Error State */
.projects-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: #b91c1c;
}

/* Skeleton Loader Animations */
.skeleton-card {
    height: 200px;
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
    background-size: 200% 100%;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    animation: skeleton-loading 1.5s infinite linear;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-header h2 {
        font-size: 2rem;
    }
}
