.projects-container {
    max-width: 95vw;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.project-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    cursor: pointer;
    overflow: hidden;
    min-width: 280px;
    translate: 0 0;
    opacity: 0;
    
    /* Default glow */
    border: 2px solid rgba(37, 99, 235, 0.4);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3),
                inset 0 0 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease-out;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        translate: 0 100px;
    }
    100% {
        opacity: 1;
        translate: 0 0;
    }
}

.project-card:nth-child(1) {
    animation: cardAppear 1s ease-out 0.1s forwards;
}

.project-card:nth-child(2) {
    animation: cardAppear 1s ease-out 0.3s forwards;
}

.project-card:nth-child(3) {
    animation: cardAppear 1s ease-out 0.5s forwards;
}

.project-card:nth-child(4) {
    animation: cardAppear 1s ease-out 0.7s forwards;
}

.tracker {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-content {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin: 0;
    padding: 1rem 0;
    text-align: center;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 0 rgba(0, 0, 0, 0.7),
        1px -1px 0 rgba(0, 0, 0, 0.7),
        -1px 1px 0 rgba(0, 0, 0, 0.7),
        1px 1px 0 rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

.card-subtitle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    color: white;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity 0.5s ease;
    background: rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(8px);
}

.card-links {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.github-link, .deploy-link {
    padding: 0.5rem 1rem;
    width: 140px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.github-link:hover, .deploy-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

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

.project-card:hover {
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.6),
                inset 0 0 30px rgba(37, 99, 235, 0.6);
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.3),
                    inset 0 0 15px rgba(37, 99, 235, 0.3);
        border-color: rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.4),
                    inset 0 0 20px rgba(37, 99, 235, 0.4);
        border-color: rgba(37, 99, 235, 0.5);
    }
}

@keyframes enhancedGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.6),
                    inset 0 0 30px rgba(37, 99, 235, 0.6);
        border-color: rgba(37, 99, 235, 0.8);
    }
    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.7),
                    inset 0 0 40px rgba(37, 99, 235, 0.7);
        border-color: rgba(37, 99, 235, 1);
    }
}

.project-card {
    animation: subtleGlow 3s ease-in-out infinite;
}

.project-card:hover {
    animation: enhancedGlow 3s ease-in-out infinite;
}

.project-card:hover .card-content {
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

.project-card:hover .card-title {
    opacity: 0;
}

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

.project-card:hover .card-title {
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        1px -1px 0 rgba(0, 0, 0, 0.8),
        -1px 1px 0 rgba(0, 0, 0, 0.8),
        1px 1px 0 rgba(0, 0, 0, 0.8);
}

@media (max-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        transform: none !important;
    }
    
    .card-content {
        transform: none !important;
    }
}

.project-status {
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffd700;
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

a.project-card {
    text-decoration: none;
    transition: transform 0.3s ease;
}

a.project-card:hover {
    transform: perspective(1000px) translateZ(10px);
}

a.project-card .github-link {
    position: relative;
    z-index: 2;
}

a.project-card .github-link:hover {
    transform: translateY(-2px);
}
