/* admin.css or your main stylesheet */

/* Modern light color palette with enhanced vibrancy */
:root {
    --primary-blue: #4f46e5;
    --accent-blue: #3b82f6;
    --text-light: #ffffff;
    --text-dark: #1e293b;
    --background: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(79, 70, 229, 0.1);
    --gradient-start: #4f46e5;
    --gradient-end: #06b6d4;
}

/* Drag and Drop Styles for Admin Panel */
.project-card-admin.dragging {
    opacity: 0.5;
    background: #eef2ff;
}

/* New visual indicators for drop position */
.project-card-admin.drag-over-top {
    border-top: 3px dashed var(--primary-blue);
}

.project-card-admin.drag-over-bottom {
    border-bottom: 3px dashed var(--primary-blue);
}

.project-card-admin[draggable="true"] .project-header-admin {
    cursor: move; /* Indicates the header is the drag handle */
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Enhanced Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(79, 70, 229, 0.1);
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    height: 100%;
}

.nav-links li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    position: relative;
    color: #475569; /* Softer text color */
    text-decoration: none;
    font-size: 1.1rem; /* Slightly smaller font size */
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0; /* Remove horizontal padding, keep vertical for click area */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--text-dark);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.nav-links a.active::after {
    width: 100%;
}

/* Hero Section with Enhanced Design */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 2rem;
    background: #090a0f; /* Dark background */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.landing-view {
    /* This ensures the initial view is always fullscreen */
    height: 100vh;
    /* Remove top margin from content for this specific page */
    margin-top: 0 !important;
}

/* New Ambient Gallery Background Container */
.ambient-gallery-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* --- New Fading and Transparency Effects --- */
.ambient-gallery-background::before,
.ambient-gallery-background::after {
    content: '';
    position: absolute;
    inset: 0; /* Covers the entire container */
    pointer-events: none; /* Ensures the overlays don't block mouse events */
}

/* Global dark film overlay to subdue the background */
.ambient-gallery-background::before {
    background: rgba(9, 10, 15, 0.7); /* Dark overlay for a moodier look */
    z-index: 1;
}

/* Soft fade-out effect at the edges */
.ambient-gallery-background::after {
    background: radial-gradient(ellipse at center, transparent 40%, #090a0f 90%);
    z-index: 2;
}

/* --- New Landing Page Content Styles --- */
.landing-content {
    position: relative;
    z-index: 3; /* Ensure it's on top of all background elements */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-light);
}

.landing-quote {
    font-size: 2.5rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    max-width: 800px;
    margin-bottom: 3rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation-delay: 0.5s;
}

.journey-button {
    position: relative;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: all 0.4s ease;
    overflow: hidden;
    animation-delay: 1s;
}

.journey-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.journey-button:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

.journey-button:hover::before {
    left: 100%;
}

/* --- End Landing Page Content Styles --- */

.ambient-scroller {
    display: flex;
    width: 200%; /* To hold two grids side-by-side */
    height: 100%;
    animation: infiniteScroll 180s linear infinite; /* Slower, more ambient speed */
}

.ambient-grid-instance {
    width: 50%;
    height: 100%;
    /* Revert to CSS Grid with a fine-grained row setup for perfect masonry */
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* Define a base row height relative to the viewport height */
    grid-auto-rows: minmax(30vh, auto);
    gap: 0.5rem; /* Consistent gap between tiles */
    grid-auto-flow: dense;
    /* Padding is now applied to first and last child to create a seamless loop */
}

.ambient-grid-instance:first-child {
    padding: 1rem 0.25rem 1rem 1rem;
}

.ambient-grid-instance:last-child {
    padding: 1rem 1rem 1rem 0.25rem;
}

.ambient-image-item {
    /* --- DEFINITIVE FIX: Define tile sizes directly in CSS for perfect uniformity --- */
    grid-row: span 1; /* Default tiles span 1 row track */
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.05); /* Placeholder background */
    /* transition for transform is now on the img element */
}

/* --- Subtle Layering Depth --- */
.ambient-image-item:nth-child(4n) {
    z-index: 1; /* Appears slightly further back */
}

.ambient-image-item:nth-child(5n) {
    z-index: 3; /* Appears slightly closer */
}
.ambient-image-item:nth-child(odd) {
    z-index: 2; /* Middle layer */
}

.ambient-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Scale up image slightly to hide edges during movement */
    transform: scale(1.1);
    /* New styles for crossfading */
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 5s ease-in-out, transform 0.8s ease; /* Slower, more graceful 5-second fade */
}

/* Apply scaling to the image instead of the container to preserve gaps */
.ambient-image-item:nth-child(4n) img {
    transform: scale(1.078); /* 1.1 * 0.98 */
}

.ambient-image-item:nth-child(5n) img {
    transform: scale(1.122); /* 1.1 * 1.02 */
}

/* Fade in the image once it's loaded */
.ambient-image-item img.loaded {
    opacity: 1;
}

/* This is the missing rule: make the active image visible */
.ambient-image-item img.active {
    opacity: 1;
}

/* New class for the sporadic fade effect */
.ambient-image-item.fading-out img.active {
    opacity: 0.15; /* Fade to a low opacity, not fully invisible */
}

@keyframes infiniteScroll {
    from { transform: translateX(0%); }
    to { transform: translateX(-50%); }
}

/* Modifiers for asymmetrical layout */
.ambient-image-item--h-2 {
    grid-column: span 2;
    grid-row: span 1; /* Horizontal tiles also span 1 row track */
}

.ambient-image-item--v-2 {
    grid-row: span 2; /* Vertical tiles span 2 row tracks, making them taller */
}

/* New Mouse-follow Glow Effect */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 4rem;
    padding: 80px 2rem 0; /* Add top padding to account for navbar */
    position: relative;
    z-index: 1;
}

/* New Category Options Section */
.category-options-section {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 6rem 2rem; 
    background: #090a0f;
    scroll-margin-top: 0;
}

.category-options-section .section-title {
    color: var(--text-light);
    margin-bottom: 4rem;
}

.category-options-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    background-color: #090a0f; /* Definitive CLS Fix: Match the section's background to prevent flash */
    /* New: Hide the grid until content is loaded to prevent white flash */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}

/* CLS Fix: Reserve space for category cards on the homepage to prevent layout shift on scroll */
.category-options-grid:empty {
    min-height: 450px; /* Approximates the height of one row of cards */
}
/* Show the grid once content is loaded */
.category-options-grid.loaded {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.section-cta-container {
    text-align: center;
    margin-top: 4rem;
}


.category-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-light);
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: flex-end;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    isolation: isolate; /* This is the key fix! */
}

.category-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(79, 70, 229, 0.5), /* A vibrant purple/blue */
        rgba(6, 182, 212, 0.4),  /* A complementary cyan */
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: -1; /* Place it behind the card's content */
    filter: blur(60px); /* Creates the soft, diffused glow */
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-card:hover::before {
    opacity: 1;
    /* Optional: Slightly scale up the glow on hover for a more dynamic feel */
    transform: translate(-50%, -50%) scale(1.1);
}

.category-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* CLS Fix: Reserve space for the image within the card to prevent layout shift */
.category-card-image {
    aspect-ratio: 3 / 4;
    background-color: #1e293b; /* A dark placeholder color */
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.category-card-content {
    position: relative;
    z-index: 3; /* Ensure content is above the new glow effect */
    padding: 2rem;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    transform: translateY(0);
    opacity: 1;
    transition: background 0.4s ease; /* Keep a subtle transition */
}

.category-card:hover .category-card-content { /* On hover, we can make the gradient a bit stronger if desired */
    transform: translateY(0);
    opacity: 1;
}

.category-card-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.category-card-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    opacity: 0; /* Hide description by default */
    transition: opacity 0.4s ease;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    max-width: 500px;
    height: 600px;
    overflow: hidden;
    position: relative;
    background: var(--glass-bg);
    border: 1px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.2);
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

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

.hero-image:hover img {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-light); /* Changed to light text for dark background */
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Animation Classes */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Portfolio Showcase Section */
.portfolio-showcase {
    padding: 4rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    background: var(--glass-bg);
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-light);
    border: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--text-light);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item-overlay h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-item-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* New styles for the main gallery on index.html */
.gallery {
    padding: 4rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-item {
    width: calc(33.333% - 1rem); /* Adjust for 3 columns with gap */
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-image {
        height: 400px;
    }

    .navbar .social-links {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .gallery-item {
        width: calc(50% - 1rem); /* 2 columns on tablet */
    }

    .category-options-section {
        min-height: auto; /* Allow section to grow on mobile */
        overflow: visible; /* Prevent content from being cut off */
    }

    .category-options-grid {
        /* Switch to a single column layout on mobile */
        grid-template-columns: 1fr;
    }

    /* Responsive Mosaic */
    .interactive-mosaic {
        /* Simplified grid for mobile */
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    .mosaic-item.hero { grid-area: 2 / 1 / 6 / 7; }
    .mosaic-item.small-1 { grid-area: 1 / 4 / 3 / 7; z-index: 3; }
    .mosaic-item.small-2 { grid-area: 6 / 1 / 9 / 5; z-index: 3; }
    .mosaic-item.small-3 { display: none; } /* Hide one for cleaner mobile layout */

    .landing-quote {
        font-size: 1.75rem; /* Reduce font size for smaller screens */
        max-width: 90vw; /* Ensure it doesn't overflow horizontally */
    }
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin: 2rem 0;
}

.mobile-nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--primary-blue);
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Show on mobile */
    }
}

/* Spotlight Section */
.spotlight-section {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, rgba(15, 15, 20, 0.95), rgba(20, 20, 30, 0.98));
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.spotlight-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(79, 70, 229, 0.15),
        rgba(6, 182, 212, 0.05),
        transparent 50%
    );
    pointer-events: none;
    z-index: 0;
    transition: background 0.3s ease;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.spotlight-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.spotlight-card {
    position: relative;
    overflow: hidden;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.5),
        rgba(6, 182, 212, 0.5)
    );
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
    filter: blur(12px);
}

.spotlight-card::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.5),
        rgba(6, 182, 212, 0.5)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.3s ease;
}

.spotlight-card:hover::before {
    opacity: 1;
    filter: blur(16px);
}

.spotlight-card:hover::after {
    background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.8),
        rgba(6, 182, 212, 0.8)
    );
}

.spotlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(79, 70, 229, 0.3),
        0 0 50px rgba(6, 182, 212, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 25, 0.95);
}

.spotlight-content {
    padding: 1.5rem;
    background: transparent;
    position: relative;
    z-index: 1;
}

.spotlight-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.spotlight-content p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 1rem;
}

.spotlight-link {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    background: rgba(79, 70, 229, 0.2);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.5);
    transition: all 0.3s ease;
}

.spotlight-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.spotlight-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

.spotlight-content {
    padding: 2rem;
    background: transparent;
    position: relative;
    z-index: 1;
}

.spotlight-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 600;
}

.spotlight-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.spotlight-link {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    background: rgba(79, 70, 229, 0.2);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.5);
    transition: all 0.3s ease;
}

.spotlight-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for spotlight section */
@media screen and (max-width: 768px) {
    .spotlight-container {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* New Carousel Styles */
.carousel-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% / 3) - 12px);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For IE and Edge */
    scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}

.carousel.dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.carousel.dragging .carousel-item {
    cursor: grab;
    user-select: none;
}

.carousel-item {
    scroll-snap-align: start;
    height: 340px;
    list-style: none;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.carousel-item:hover .carousel-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (max-width: 900px) {
    .carousel {
        grid-auto-columns: calc((100% / 2) - 9px);
    }
}

@media screen and (max-width: 600px) {
    .carousel {
        grid-auto-columns: 100%;
    }
}


/* Project Gallery Styles (for nature.html, etc.) */
#project-gallery-container {
    padding: 4rem 2rem;
    background: var(--background);
}

.project-showcase {
    max-width: 1400px;
    margin: 0 auto 8rem auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.2s;
}

.project-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
}

.project-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.project-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.project-header p {
    font-size: 1.1rem;
    color: #475569; /* Softer description text */
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.project-image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.project-image-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #e0e0e0; /* Placeholder background */
    transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(33.333% - 2px); /* For 3 columns with 2px gap */
    margin-bottom: 2px; /* Vertical gap between items */
    flex-grow: 1;
}

.project-image-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.project-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    filter: brightness(1);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (max-width: 768px) {
    .project-header h2 {
        font-size: 2.2rem;
    }
}

/* New Project Hub Styles */
#project-hub-container {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-hub-container.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.empty-category-message {
    text-align: center;
    font-size: 1.2rem;
    color: #94a3b8; /* A faded, grayish color */
    padding: 4rem 2rem;
    width: 100%;
    grid-column: 1 / -1; /* Make it span all columns of the grid */
}

.project-card {
    position: relative; /* Crucial for positioning the overlay */
    background: var(--background);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.project-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: var(--text-light);
    transform: translateY(0);
    transition: background 0.4s ease;
}

/* Hide the description by default, show on hover */
.project-card-content p {
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.project-card:hover .project-card-content p {
    opacity: 0.9;
}

.project-card-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.project-card-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Project Display Styles */
#project-display-container {
    padding: 4rem 2rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
    scroll-margin-top: 100px; /* 80px navbar height + 20px buffer */
}

#project-display-container.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-projects {
    display: inline-block;
    margin-bottom: 3rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-projects:hover {
    color: var(--primary-blue);
}

/* Call to Action (CTA) Section */
.cta-section {
    padding: 6rem 2rem;
    background: var(--background);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content .section-title {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--accent-blue));
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3);
}

/* Footer Styles */
.site-footer {
    padding: 3rem 2rem;
    background-color: #090a0f; /* Match the dark hero background */
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--text-light);
    transform: translateY(-3px);
}

/* Minimal Page Title Section */
.page-title-section {
    padding: 4rem 2rem 2rem;
    text-align: center;
    background: var(--background);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #475569; /* A soft, elegant grey */
    margin: 0;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #64748b; /* A lighter, softer grey */
    margin-top: 0.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Outlined button style for light backgrounds, mimicking the homepage's journey-button */
.cta-button-outlined {
    position: relative; /* Required for the pseudo-element animation */
    overflow: hidden; /* Hides the shimmer when it's outside the button */
    display: inline-block;
    padding: 0.9rem 2.4rem;
    background: transparent;
    color: #475569; /* Softer text color */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #cbd5e1; /* Light grey border */
    border-radius: 50px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.cta-button-outlined::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.6s ease;
}

.cta-button-outlined:hover {
    background: #f1f5f9; /* Very light grey background on hover */
    border-color: #94a3b8;
    color: var(--text-dark);
}

.cta-button-outlined:hover::before {
    left: 100%;
}

.page-title-section .start-slideshow-btn {
    margin-top: 2rem;
}

/* Blog List Styles */
.blog-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
/* CLS Fix: Reserve space for blog posts to prevent footer from jumping */
.blog-list-container:empty {
    min-height: 60vh; /* Adjust as needed to approximate loaded content height */
}


.blog-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.blog-card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.blog-card-content p {
    color: #475569;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Single Post Styles */
.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.post-header {
    text-align: left;
    margin-bottom: 3rem;
}

.back-to-blog-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-blog-link:hover {
    color: var(--primary-blue);
}

.post-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-meta {
    color: #64748b;
    margin-bottom: 2rem;
}

.post-hero-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-top: 2rem;
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.post-content p,
.post-content h2,
.post-content h3 {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

/* Contact Page Styles */
.contact-section {
    padding: 2rem;
    background: var(--background);
}

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 3rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Responsive Google Form Iframe */
.google-form-wrapper {
    position: relative;
    /* Maintain aspect ratio 561 / 640 = 0.8765 */
    padding-bottom: 87.65%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1rem auto; /* Center the form */
}

.google-form-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.content {
    /* Add top margin to all main content to prevent overlap with fixed navbar */
    margin-top: 80px;
    flex-grow: 1; /* This is the key change to make the content area expand */
}

/* Fullscreen View Styles */
.fullscreen-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fullscreen-view.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-view img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Fullscreen Arrow Styles */
.fullscreen-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s ease;
}

.fullscreen-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.fullscreen-arrow.left {
    left: 20px;
}

.fullscreen-arrow.right {
    right: 20px;
}

.fullscreen-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 8px;
    display: flex;
    gap: 16px;
    z-index: 10000;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.control-btn:hover {
    color: #ccc;
}


@media screen and (max-width: 768px) {
    .ambient-grid-instance {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: minmax(20vh, auto);
    }
}

@media screen and (max-width: 480px) {
    .ambient-grid-instance {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(25vh, auto);
    }
}
