/* Project Modal Styles */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.6);
}

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

.project-modal-content {
    background-color: rgb(30, 30, 31);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 153, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.project-modal.active .project-modal-content {
    transform: scale(1);
}

.project-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.project-modal-close:hover {
    color: #fff;
}

.project-modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.project-modal-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 20px;
    background-color: transparent;
}

#modal-project-title {
    margin: 0;
    font-family: 'Milker', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 153, 0, 0.5);
    line-height: 1.2;
}

.project-modal-body {
    flex-grow: 1;
    overflow-y: auto;
    /* Custom Scrollbar for inner content */
    scrollbar-width: thin;
    scrollbar-color: #009900 rgba(30, 30, 31, 0.5);
}

.project-modal-body::-webkit-scrollbar {
    width: 8px;
}
.project-modal-body::-webkit-scrollbar-track {
    background: rgba(30, 30, 31, 0.5);
}
.project-modal-body::-webkit-scrollbar-thumb {
    background-color: #009900;
    border-radius: 4px;
}

#modal-project-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 25px;
}

.modal-meta-section {
    margin-bottom: 15px;
}

.modal-meta-label {
    display: block;
    font-size: 0.9rem;
    color: #aaa;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-meta-value {
    color: #fff;
    font-size: 1rem;
}

#modal-project-language {
    color: #009900; /* Matrix Green */
    font-weight: bold;
}

.project-modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #009900;
    color: #f0f0f0; /* Whitish-grey color always */
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.modal-btn:visited {
    color: #f0f0f0; /* Keep whitish-grey even if visited */
}

.modal-btn:hover {
    background-color: #00cc00;
    color: #ffffff; /* Pure white on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 153, 0, 0.3);
}

.modal-btn i {
    margin-left: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .project-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }

    #modal-project-title {
        font-size: 1.5rem;
    }

    .project-modal-image {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
}

/* Project Related Context (Associated Education/Experience) */
.project-related-context {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 153, 0, 0.3);
}

.related-context-title {
    font-family: 'Milker', sans-serif;
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.related-context-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-context-item {
    background: rgba(0, 153, 0, 0.1);
    border: 1px solid rgba(0, 153, 0, 0.2);
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.related-context-type {
    font-size: 0.8em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    color: #a0a0a0;
    min-width: 80px;
    text-align: center;
}

.related-context-details {
    display: flex;
    flex-direction: column;
}

.related-context-name {
    color: #fff;
    font-weight: bold;
    font-size: 1em;
}

.related-context-subtitle {
    font-size: 0.9em;
    color: #009900;
}
