        :root {
            --gradient-start: #8A2BE2;
            --gradient-mid: #4169E1;
            --gradient-end: #00FFFF;
        }

        body {
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* --- Gradient Text --- */
        .gradient-text {
            background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* --- Header & Navigation --- */
        .navbar {
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .navbar .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: #212529;
            text-decoration: none;
        }

        .navbar nav ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            gap: 2rem;
        }

        .navbar nav a {
            text-decoration: none;
            color: #555;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .navbar nav a:hover,
        .navbar nav a.active {
            color: var(--gradient-mid);
        }

        /* --- Main Content --- */
        main {
            padding: 4rem 0;
        }

        h1 {
            font-size: 3.5rem;
            font-weight: 900;
            line-height: 1.2;
        }
        
        .projects-hero {
            text-align: center;
            margin-bottom: 3rem;
        }
        .projects-hero p {
             font-size: 1.1rem;
            color: #555;
            max-width: 750px;
            margin: 0 auto;
        }

        /* --- Filter Section --- */
        .filter-container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 3rem;
        }

        .filter-btn {
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 20px;
            padding: 0.5rem 1.5rem;
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            font-weight: 500;
            color: #555;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .filter-btn:hover {
            background-color: #e9ecef;
            border-color: #ccc;
        }

        .filter-btn.active {
            background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid));
            color: #fff;
            border-color: transparent;
        }


        /* --- Project Grid --- */
        .project-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 2rem;
        }

        .project-card {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.07);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
            position: relative; /* For the new overlay */
        }

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

        .project-image-container {
            position: relative;
            width: 100%;
            height: 220px;
        }

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

        .project-card:hover .project-image {
            transform: scale(1.05);
        }
        
        .card-video-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

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

        .card-video-overlay svg {
            width: 60px;
            height: 60px;
            color: white;
            filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
        }

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

        .card-content h3 {
            font-size: 1.5rem;
            margin-top: 0;
            color: #212529;
        }

        .card-content p {
            font-size: 1rem;
            flex-grow: 1;
            margin-bottom: 1.5rem;
            color: #555;
        }

        .tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .tag {
            background-color: #e9ecef;
            color: #495057;
            font-size: 0.8rem;
            font-weight: 500;
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
        }

        .no-projects-message {
            text-align: center;
            grid-column: 1 / -1;
            padding: 3rem;
            font-size: 1.2rem;
            color: #777;
        }

        /* --- Footer --- */
        .footer {
            background-color: #212529;
            color: #adb5bd;
            text-align: center;
            padding: 2rem 0;
        }

        /* --- MODAL STYLES --- */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(10, 20, 40, 0.8);
            backdrop-filter: blur(8px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background-color: #fff;
            border-radius: 15px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            width: 90%;
            max-width: 800px;
            height: 90vh;
            max-height: 700px;
            display: flex;
            flex-direction: column;
            transform: scale(0.95);
            transition: transform 0.4s ease;
        }
        
        .modal-overlay.active .modal-content {
            transform: scale(1);
        }

        .modal-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 2rem;
            font-weight: bold;
            color: #fff;
            background-color: rgba(0,0,0,0.4);
            border: none;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            z-index: 2010;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .modal-close-btn:hover {
            background-color: rgba(0,0,0,0.7);
            transform: rotate(90deg);
        }

        .modal-media {
            flex-shrink: 0;
            position: relative;
            width: 100%;
            height: 55%;
            background-color: #222;
            border-radius: 15px 15px 0 0;
        }

        .modal-carousel, .modal-video-container {
            width: 100%;
            height: 100%;
        }
        
        .modal-video-container iframe {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 15px 15px 0 0;
        }

        .modal-carousel img {
            width: 100%;
            height: 100%;
            object-fit: contain; /* Use contain to see the whole image */
            position: absolute;
            opacity: 0;
            transition: opacity 0.5s ease;
        }
        
        .modal-carousel img.active {
            opacity: 1;
        }

        .carousel-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(0,0,0,0.4);
            color: white;
            border: none;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1;
            transition: background-color 0.3s;
        }
        
        .carousel-btn:hover {
            background-color: rgba(0,0,0,0.7);
        }

        .carousel-btn.prev { left: 15px; }
        .carousel-btn.next { right: 15px; }

        .modal-details {
            padding: 1.5rem 2rem;
            overflow-y: auto;
            flex-grow: 1;
        }
        
        .modal-title {
            font-size: 2rem;
            font-weight: 700;
            margin-top: 0;
        }

        .modal-view-switcher {
            margin-bottom: 1rem;
            display: flex;
            gap: 1rem;
        }

        .view-btn {
            background: #e9ecef;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .view-btn.active {
            background: var(--gradient-mid);
            color: white;
        }

        /* Hide inactive view */
        .modal-carousel.hidden, .modal-video-container.hidden {
            display: none;
        }

        /* --- Responsive Design --- */
        @media (max-width: 768px) {
            h1 { font-size: 2.5rem; }
            .navbar .container { flex-direction: column; gap: 1rem; }
            .modal-content { flex-direction: column; height: 85vh; }
            .modal-media { height: 40%; }
        }