:root {
            --light-alt: #f8f9fa;
            --dark-card: #212529;
            --gray: #6c757d;
            --primary: #0d6efd;
            --primary-dark: #0b5ed7;
            --light: #f8f9fa;
            --dark: #212529;
            --radius: 0.5rem;
            --radius-sm: 0.25rem;
            --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
            --transition: all 0.3s ease;
        }

        /* Fixed Modal Styles */
        .modal {
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            /* Use visibility instead of display for transitions */
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            background-color: rgba(0, 0, 0, 0.8);
        }

        .modal.show {
            visibility: visible;
            opacity: 1;
        }

        .modal-content {
            background-color: var(--light-alt);
            margin: 5% auto;
            padding: 30px;
            border-radius: var(--radius);
            width: 90%;
            max-width: 800px;
            box-shadow: var(--shadow-lg);
            position: relative;
            animation: modalFadeIn 0.3s ease;
            transform: translateY(20px);
            transition: transform 0.3s ease;
        }

        .modal.show .modal-content {
            transform: translateY(0);
        }

        .dark-theme .modal-content {
            background-color: var(--dark-card);
        }

        @keyframes modalFadeIn {
            from { opacity: 0; transform: translateY(-50px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 25px;
            font-size: 28px;
            font-weight: bold;
            color: var(--gray);
            cursor: pointer;
            transition: var(--transition);
        }

        .close-modal:hover {
            color: var(--primary);
        }

        .modal-body {
            padding: 20px 0;
        }

        .modal-title {
            font-size: 2rem;
            margin-bottom: 10px;
            color: var(--primary);
        }

        .modal-subtitle {
            display: block;
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: var(--gray);
        }

        .modal-date {
            display: block;
            margin-bottom: 20px;
            color: var(--gray);
            font-style: italic;
        }

        .modal-description {
            margin-bottom: 30px;
            line-height: 1.8;
        }

        .modal-tech {
            margin-bottom: 30px;
        }

        .modal-tech h3, 
        .modal-features h3 {
            margin-bottom: 15px;
            color: var(--dark);
        }

        .dark-theme .modal-tech h3,
        .dark-theme .modal-features h3 {
            color: var(--light);
        }

        .modal-tech ul,
        .modal-features ul {
            list-style: none;
            padding-left: 0;
        }

        .modal-tech li,
        .modal-features li {
            margin-bottom: 8px;
            position: relative;
            padding-left: 20px;
        }

        .modal-tech li::before,
        .modal-features li::before {
            content: '•';
            position: absolute;
            left: 0;
            color: var(--primary);
            font-weight: bold;
        }

        .modal-image {
            width: 100%;
            height: 300px;
            object-fit: cover;
            border-radius: var(--radius-sm);
            margin-bottom: 20px;
        }

        /* View Details Button */
        .view-details {
            padding: 10px 25px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 50px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            transform: translateY(20px);
            opacity: 0;
            display: inline-block;
            text-decoration: none;
        }

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

        .view-details:hover {
            background: var(--primary-dark);
            transform: translateY(-2px) !important;
        }

        .theme-toggle {
            position: fixed;
            top: 15px;
            right: 15px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            font-size: 1.7rem;
            cursor: pointer;
            box-shadow: var(--shadow-lg);
            transition: var(--transition);
            z-index: 100;
        }

        .theme-toggle:hover {
            background: var(--primary-dark);
            transform: rotate(30deg);
        }

        .dark-theme {
            background: linear-gradient(135deg, #121212, #1a1a2e);
            color: #e0e0e0;
        }

        .dark-theme .portfolio-item {
            background: #2d2d2d;
        }

        .dark-theme .portfolio-title {
            color: var(--light);
        }