:root { --blue: #007BFF; --glass: rgba(255, 255, 255, 0.03); }

/* Section Padding & Centering */
.projects-grid-section {
    padding: 60px 10%;
    display: flex;
    justify-content: center;
}

.projects-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1100px; /* Small, good fit layout */
    margin: 0 auto;
}

/* Project Card Styling */
.project-card {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 35px;
    backdrop-filter: blur(25px);
    transition: all 0.5s ease;
}

.project-card:hover {
    border-color: var(--blue);
    transform: translateY(-5px);
}

.card-inner-padding {
    padding: 50px 10%;
}

.project-category {
    color: var(--blue);
    font-family: 'Orbitron';
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

.project-desc {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 25px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-stack span {
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--blue);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Hero & CTA */
.projects-hero { padding: 180px 10% 80px; text-align: center; }
.cta-box {
    text-align: center;
    padding: 80px 10%;
    background: var(--glass);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 100px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .projects-layout {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .projects-grid-section {
        padding: 40px 5%;
    }
}

/* Review Vault Styling */
.review-vault-section {
    padding: 100px 10%;
    text-align: center;
}

.section-header { margin-bottom: 60px; }

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3x2 grid on desktop */
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.review-card {
    perspective: 1000px;
}

.review-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    padding: 20px;
    backdrop-filter: blur(15px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.review-img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
    filter: grayscale(20%);
    transition: 0.4s;
}

.review-glass:hover {
    transform: translateY(-10px) rotateX(5deg);
    border-color: var(--blue);
    background: rgba(0, 123, 255, 0.05);
}

.review-glass:hover .review-img {
    filter: grayscale(0%);
}

.star-rating {
    color: #ffb400; /* Fiverr Gold */
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.platform-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

/* Mobile Responsiveness for Reviews */
@media (max-width: 992px) {
    .review-grid {
        grid-template-columns: 1fr; /* Stack one by one on mobile */
        max-width: 400px;
    }
}

/* Project Cards: Divided Style */
.project-card {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 35px;
    overflow: hidden; /* Clips the image to the card radius */
    display: flex;
    flex-direction: column;
}

.project-img-box {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #111;
}

.project-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img-box img {
    transform: scale(1.1);
}

/* Massive Gallery Section */
.massive-gallery-section {
    padding: 60px 5%; /* Small side padding for the large card */
}

.large-gallery-card {
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50px;
    padding: 80px 6%;
    backdrop-filter: blur(30px);
}

.gallery-header { text-align: center; margin-bottom: 60px; }

.image-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Auto-fitting for 100+ images */
    gap: 15px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    height: 150px;
    border: 1px solid rgba(255,255,255,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.4s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .image-masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Visual Vault: 4-Column Square Grid --- */

.image-masonry-grid {
    display: grid;
    /* Forces exactly 4 items per row */
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    padding: 10px 0;
    max-width: 900px; /* (250px * 3) + gaps = roughly 850-900px */
    margin: 0 auto;   /* Centers the grid within the card */
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 300px; /* Forced height as requested */
    aspect-ratio: 1 / 1; /* Ensures it stays a perfect square */
    border-radius: 20px;
    overflow: hidden;
    background: #0f0f0f; /* Dark tech background for non-fitting edges */
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.gallery-item img, 
.gallery-item video {
    max-width: 100%;
    max-height: 100%;
    /* "CONTAIN" ensures the full picture is visible without cropping */
    object-fit: contain; 
    filter: grayscale(40%); /* Subtle mute, less intense than 100% */
    transition: 0.5s ease;
}

/* Interaction Effects */
.gallery-item:hover {
    transform: translateY(-5px);
    border-color: #007BFF;
    background: #161616;
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.1);
}

.gallery-item:hover img, 
.gallery-item:hover video {
    filter: grayscale(0%);
    transform: scale(1.05); /* Slight zoom within the container */
}

/* --- Responsive Layout for Smaller Devices --- */

@media (max-width: 992px) {
    .image-masonry-grid {
        grid-template-columns: repeat(3, 1fr); /* 2 per row for Tablets */
        max-width: 600px;
    }
    .gallery-item {
        height: 220px; /* Slightly smaller for tablets */
    }
}

@media (max-width: 600px) {
    .image-masonry-grid {
        grid-template-columns: 1fr; /* 1 per row for Mobile impact */
        max-width: 100%;
    }
    .gallery-item {
        height: 250px; /* Back to large square for mobile focus */
    }
}