* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    background-color: #111;
    font-family: 'Segoe UI', sans-serif;
    color: white;
}

#main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 3rem;
    overflow-y: auto;
}

.project-card {
    position: relative;
    border-radius: 16px;
    background: #1a1a1a;
    transition: transform 0.3s ease;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.project-card:hover {
    transform: translateY(-5px);
}

.serial-number {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.project-content {
    position: relative;
}

.project-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.project-links {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.link-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.link-icon.github {
    background: rgba(36,41,46,0.9);
    color: white;
}

.link-icon.live {
    background: rgba(33,150,243,0.9);
    color: white;
}

.link-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.project-title {
    padding: 1.2rem;
    font-size: 1.2rem;
    text-align: center;
    background: linear-gradient(to right, #2a2a2a, #1a1a1a);
    margin: 0;
}

@media (max-width: 768px) {
    #main {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .project-title {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .serial-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}