/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    color: white;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.modal-body {
    padding: 2rem;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* Skills Grid in Modal */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.skill-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* Experience Detail Modal Styles */
.experience-detail {
    display: grid;
    gap: 2rem;
}

.experience-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.experience-position h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.experience-position h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.experience-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.meta-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 24px;
}

.meta-item div {
    display: flex;
    flex-direction: column;
}

.meta-item label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.meta-item span {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
}

.experience-responsibilities h3,
.experience-skills h3,
.experience-description h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.experience-responsibilities h3 i,
.experience-skills h3 i,
.experience-description h3 i {
    color: var(--primary-color);
}

.experience-responsibilities ul {
    list-style: none;
    padding: 0;
}

.experience-responsibilities li {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.experience-responsibilities li:last-child {
    border-bottom: none;
}

.experience-responsibilities li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.skills-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skill-tag {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.experience-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-top: 1rem;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .experience-meta {
        grid-template-columns: 1fr;
    }

    .skills-used {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .close-modal {
        font-size: 1.5rem;
        width: 25px;
        height: 25px;
    }

    .modal-body {
        padding: 1rem;
    }

    .experience-position h2 {
        font-size: 1.5rem;
    }

    .experience-position h3 {
        font-size: 1.1rem;
    }

    .experience-responsibilities h3,
    .experience-skills h3,
    .experience-description h3 {
        font-size: 1.1rem;
    }
}