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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d0b1e;
    /* Dark blue/purple background */
    color: #ffffff;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    overflow: hidden;
    /* Hide background overflow */
    position: relative;
}

/* --- Animated Gradient Background --- */
.background-blur {
    position: fixed;
    top: 50%;
    left: 50%;
    width: max(100vw, 100vh);
    height: max(100vw, 100vh);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
            rgba(255, 110, 196, 0.7),
            /* Pink */
            rgba(100, 100, 255, 0.7),
            /* Blue */
            rgba(255, 165, 0, 0.7),
            /* Orange */
            rgba(0, 212, 255, 0.7)
            /* Cyan */
        );
    background-size: 200% 200%;
    filter: blur(120px);
    z-index: -1;
    animation: gradient-flow 15s ease infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Project Grid Layout --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

/* --- Frosted Glass Card Styling --- */
.project-card {
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    /* Semi-transparent white */
    backdrop-filter: blur(15px);
    /* The "frost" effect */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 200px;
    /* Set a fixed height */
    object-fit: cover;
    /* Ensures image covers the area */
    display: block;
}

.card-content {
    padding: 1.5rem;
}

.card-content span {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.card-content h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* --- Responsive for smaller screens --- */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        /* Stack cards vertically */
        gap: 1.5rem;
    }

    .project-card img {
        height: 250px;
    }
}




/* This class is added to the main element in slider.html */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    top: 2rem;
    flex-wrap: wrap;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 100;
}

#project-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}


.slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.slider-container {
    /* Frosted glass container for the image */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.image-viewer {
    width: 100%;
    max-height: calc(100vh - 18rem);
    /* Adjusted to prevent overlap with title and navigation */
    transition: aspect-ratio 0.4s ease-in-out;
    display: flex;
    /* Ensure content is centered */
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

#slider-image {
    border-radius: 16px;
    /* Inner border-radius for the image */
    width: 85vw;
    height: 100%;
    display: block;
    background-color: #00000000;
    object-fit: contain;
    /* Change from cover to contain */
    object-position: center;
    /* Center the image */
    /* Fallback for loading images */
}


/* --- Navigation Buttons (No changes below) --- */
.slider-nav {
    display: flex;
    bottom: 1rem;
    left: 0;
    right: 0;
    column-gap: 0.75rem;
    row-gap: 0.1rem;
    flex-wrap: wrap;
    position: fixed;
    justify-content: center;
    padding: 1rem;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Perfect circle */
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #ffffff;

    /* Glassmorphism for buttons */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);

    transition: background 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* The menu button is a link, so we reset text-decoration */
.menu-btn {
    text-decoration: none;
}

.nav-btn svg {
    width: 28px;
    height: 28px;
}

/* Style for disabled buttons (start/end of slider) */
.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}