@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

:root {
    --background-color: #0B132B;
    --white-color: #FFFFFF;
    --yellow-color: #F9E900;
    --darkblue-color: #171738;
    --dimgray-color: #637074;
}

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

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

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    color: var(--white-color);
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.1) 1px,
        transparent 1px
    );
    background-position: 50% 50%;
    background-size: 1.1rem 1.1rem;
    min-height: 100vh;
    position: relative;
    padding-top: 80px;
    padding-bottom: 100px;
}

/* Projects Section */
section.projects {
    position: relative;
    width: 100%;
}

.hero-yellow-circle3 {
    width: 1000px;
    height: 1000px;
    background-color: var(--yellow-color);
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
    position: absolute;
    left: -1000px;
    top: 0;
    bottom: 0;
    z-index: -1;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.projects-container h2 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.projects-description {
    font-size: 1rem;
    font-weight: 200;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Card Grid */
.projects-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

/* Card */
.project-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--white-color);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--yellow-color);
    box-shadow: 0 20px 40px rgba(249, 233, 0, 0.08);
}

/* Card Image */
.project-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--darkblue-color);
}

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

.project-card:hover .project-img img {
    transform: scale(1.05);
}

/* Hover Overlay */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 43, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--yellow-color);
    color: var(--darkblue-color);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.project-card:hover .visit-btn {
    transform: scale(1.05);
}

/* Card Info */
.project-info {
    padding: 1.2rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.project-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.project-info p {
    font-size: 0.85rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .projects-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .project-img {
        height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
