.project-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.project-modal.hidden {
    display: none;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(8px);
}

.project-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 900px);
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    padding: 1.5rem;
}

.project-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: grid;
    place-items: center;
    border: none;
    cursor: pointer;
}

.project-modal-content {
    display: grid;
    gap: 1.25rem;
}

.project-modal-image-wrapper {
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.project-modal-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.project-modal-body {
    padding: 0.25rem 0.25rem 0.5rem;
}

body.modal-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .project-modal-content {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }
}

/* Theme toggle overrides for light mode */
body.light {
    background-color: #f8fafc;
    color: #0f172a;
}

body.light .glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

body.light .bg-brand-primary,
body.light .bg-brand-primary:hover,
body.light .bg-blue-600 {
    background-color: #2563eb !important;
}

body.light .text-white,
body.light .text-gray-100 {
    color: #0f172a !important;
}

body.light .text-gray-400,
body.light .text-gray-500,
body.light .text-gray-600,
body.light .text-gray-700 {
    color: #475569 !important;
}

body.light .bg-gray-900,
body.light .bg-gray-900\/50,
body.light .bg-gray-800,
body.light .bg-gray-800\/50 {
    background-color: #f8fafc !important;
}

body.light .border-gray-800,
body.light .border-gray-700 {
    border-color: #e2e8f0 !important;
}

body.light .hover\:text-white:hover {
    color: #0f172a !important;
}

body.light .hover\:bg-blue-600:hover {
    background-color: #1d4ed8 !important;
}
