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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #035ED8 0%, #1b2027 50%, #0a0a0a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    position: relative;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 1000;
    padding: 1rem 1.5rem;
    border: 2px solid #fff;
    background: rgba(14, 17, 222, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.back-button:hover {
    background: #fff;
    color: #000;
    transform: translateX(-5px);
}

/* Artifacts Container */
.artifacts-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

/* Individual Artifacts - Floating in Space */
.artifact {
    position: absolute;
    animation: float 20s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
}

.artifact img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Artifact 1 - Top Left */
.artifact-1 {
    top: -10%;
    left: -5%;
    width: 1000px;
    height: 1000px;
    animation-delay: 0s;
    animation-duration: 25s;
}

/* Artifact 2 - Top Right */
.artifact-2 {
    top: -5%;
    right: -10%;
    width: 700px;
    height: 700px;
    animation-delay: -5s;
    animation-duration: 30s;
}

/* Artifact 3 - Bottom Left */
.artifact-3 {
    bottom: -10%;
    left: -10%;
    width: 790px;
    height: 790px;
    animation-delay: -10s;
    animation-duration: 28s;
}

/* Artifact 4 - Bottom Right */
.artifact-4 {
    bottom: -10%;
    right: -5%;
    width: 800px;
    height: 800px;
    animation-delay: -15s;
    animation-duration: 22s;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(120px, -30px) rotate(50deg);
    }
    50% {
        transform: translate(-15px, 220px) rotate(-3deg);
    }
    75% {
        transform: translate(25px, 10px) rotate(4deg);
    }
}

/* Description Box - Floating Element */
.description-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 3px solid #000;
    padding: 3rem;
    z-index: 100;
    box-shadow: 
        0 0 100px rgba(255, 255, 255, 0.1),
        20px 20px 0 rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    color: #000;
}

.description-box h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    line-height: 1;
    border-bottom: 4px solid #000;
    padding-bottom: 1rem;
}

.description-content {
    margin-bottom: 2rem;
}

.description-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.project-details {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #000;
    flex-wrap: wrap;
}

.project-details span {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Scrollbar Styling */
.description-box::-webkit-scrollbar {
    width: 8px;
}

.description-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.description-box::-webkit-scrollbar-thumb {
    background: #000;
}

/* Image Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 3rem;
}

.lightbox.active {
    display: flex !important;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: none !important;
}

.lightbox-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 100000 !important;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.lightbox-close:hover {
    transform: scale(1.2);
    background: rgba(0, 0, 0, 0.8);
}

/* Make gallery images clickable */
.gallery-item,
.cloud-item {
    cursor: pointer;
}

.gallery-item img,
.cloud-item img {
    cursor: pointer;
}


/* Responsive */
@media (max-width: 1200px) {
    .artifact-1, .artifact-2, .artifact-3, .artifact-4 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .description-box {
        padding: 2rem;
        max-height: 80vh;
    }
    
    .description-box h1 {
        font-size: 2rem;
    }
    
    .artifact-1, .artifact-2, .artifact-3, .artifact-4 {
        width: 200px;
        height: 200px;
    }
    
    .artifact-1 {
        top: 5%;
        left: 2%;
    }
    
    .artifact-2 {
        top: 3%;
        right: 2%;
    }
    
    .artifact-3 {
        bottom: 5%;
        left: 5%;
    }
    
    .artifact-4 {
        bottom: 8%;
        right: 3%;
    }
}

/* Optional: Add a subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}
