/* Contact Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.contact-modal-content {
    max-width: 800px;
    background-color: #1a1a1a;
    color: #ffffff;
}

.contact-container {
    display: flex;
    gap: 30px;
    padding: 10px;
}

.contact-profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2a2a2a;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-name {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
}

.contact-location {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #b0b0b0;
}

.contact-location i {
    color: oklch(0.514 0.222 16.935);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-word;
}

.contact-item a {
    text-decoration: none;
    color: white;
    word-break: break-all;
}

.contact-item i {
    min-width: 20px;
    color: oklch(0.514 0.222 16.935);
    flex-shrink: 0;
}

.contact-cv-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-cv-summary h3 {
    font-size: 1.2rem;
    margin: 0;
    margin-top: 10px;
    color: #e0e0e0;
}

.contact-cv-summary p {
    margin: 5px 0;
    color: #b0b0b0;
    line-height: 1.5;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 5px 0;
}

.skills-list li {
    background-color: #242424;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.education-item {
    margin: 5px 0;
}

.education-degree {
    font-weight: 500;
    color: #e0e0e0;
}

.education-school,
.education-year {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.contact-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #242424;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-btn:hover {
    background-color: #323232;
    transform: translateY(-2px);
}

.send-email-button {
    background-color: oklch(0.514 0.222 16.935);
}

.send-email-button:hover {
    background-color: oklch(0.41 0.159 10.272);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-button:hover {
    color: #888;
}

/* Responsive styles */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 5px;
    }

    .contact-profile-pic {
        width: 150px;
        height: 150px;
    }

    .contact-location,
    .contact-item {
        justify-content: center;
    }

    .skills-list {
        justify-content: center;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-modal-content {
        padding: 15px 10px;
        width: 95%;
        margin: 0 auto;
    }

    .modal-content {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px 10px;
        width: 95%;
        max-height: 80vh;
    }

    .contact-name {
        font-size: 1.5rem;
    }

    .contact-profile-pic {
        width: 120px;
        height: 120px;
    }

    .skills-list {
        gap: 5px;
    }

    .skills-list li {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .contact-location {
        font-size: 0.9rem;
    }

    .contact-item {
        font-size: 0.9rem;
    }

    .contact-cv-summary h3 {
        font-size: 1.1rem;
    }

    .contact-cv-summary p {
        font-size: 0.9rem;
    }

    .close-button {
        top: 5px;
        right: 10px;
        font-size: 24px;
    }

    .modal-btn {
        width: 100%;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }

    .contact-container {
        padding-bottom: 20px;
    }

    /* Fix for iOS modal height issue */
    .modal {
        position: fixed;
        overflow-y: hidden;
    }

    /* Add padding for iPhone X and newer models with notch */
    @media screen and (max-width: 812px) and (orientation: landscape) {
        .modal-content {
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
        }
    }
}

/* Improve touch targets for mobile */
@media (hover: none) {
    .modal-btn {
        padding: 12px 15px;
        min-height: 44px;
        /* Apple recommendation for touch targets */
    }

    .close-button {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}