* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #2d3748 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #4299e1;
    background: linear-gradient(45deg, #4299e1, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 30px rgba(66, 153, 225, 0.3);
    animation: pulse 3s infinite;
    overflow: hidden;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(66, 153, 225, 0.3); }
    50% { box-shadow: 0 0 50px rgba(66, 153, 225, 0.6); }
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #4299e1, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-info .subtitle {
    font-size: 1.2rem;
    color: #a0aec0;
    margin-bottom: 1rem;
}

.specialization {
    display: inline-block;
    background: linear-gradient(45deg, #e53e3e, #fc8181);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 25px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-link:hover, .nav-link.active {
    background: linear-gradient(45deg, #4299e1, #667eea);
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.section {
    background: rgba(26, 35, 50, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 153, 225, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #4299e1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.5rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.link-card {
    background: linear-gradient(45deg, rgba(66, 153, 225, 0.1), rgba(102, 126, 234, 0.1));
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-card-unavailable {
    background: rgba(220, 38, 38, 0.1); /* rouge clair */
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626; /* rouge texte */
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: line-through; /* barré */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(66, 153, 225, 0.2);
    border-color: #4299e1;
}

.link-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.link-card h3 {
    margin-bottom: 0.5rem;
    color: #4299e1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.8), rgba(45, 55, 72, 0.6));
    border: 1px solid rgba(66, 153, 225, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(66, 153, 225, 0.1), transparent);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: #4299e1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-card h3 {
    color: #4299e1;
    font-size: 1.3rem;
    flex: 1;
    margin: 0;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.project-badge.personal {
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.8));
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.project-badge.academic {
    background: linear-gradient(45deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.8));
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.project-badge.professional {
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.8));
    color: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.project-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.5);
}

.project-description {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #cbd5e0;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    color: #4299e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(66, 153, 225, 0.2);
    border-color: #4299e1;
    transform: translateY(-1px);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 25px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-tab:hover, .filter-tab.active {
    background: linear-gradient(45deg, #4299e1, #667eea);
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* ← largeur minimale augmentée */
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(66, 153, 225, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.contact-icon {
    font-size: 1.5rem;
    color: #4299e1;
}

.contact-item.unavailable {
    background: rgba(220, 38, 38, 0.1); /* rouge clair */
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626; /* rouge texte */
}

.contact-item.unavailable div {
    text-decoration: line-through; /* barré */
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4299e1;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 35, 50, 0.6);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(45deg, #4299e1, #667eea);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid rgba(66, 153, 225, 0.2);
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h1 {
        font-size: 2rem;
    }
    
    .links-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-badge {
        align-self: flex-start;
    }

    .navigation, .filter-tabs {
        flex-direction: column;
        align-items: center;
    }

    .project-links {
        flex-direction: column;
    }
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(30, 41, 59, 0.9);
    padding: 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 153, 225, 0.3);
}

.lang-btn {
    padding: 8px 12px;
    background: transparent;
    color: #cbd5e0;
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    transform: translateY(-2px);
}

.lang-btn.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 3px;
}

/* Popup styles */
.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: #1e293b;
    padding: 2.5rem 3rem;
    border-radius: 10px;
    text-align: center;
    color: white;
    min-width: 320px;
    max-width: 90%;
    box-sizing: border-box;
}

.popup h3 {
    margin-bottom: 1rem;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease-in-out;
    min-width: 100px;
}

.popup-btn:hover {
    background: #2563eb;
}

.popup-close {
    display: block;
    margin: 0 auto;
    padding: 0.6rem 2.5rem;
    background: #ef4444;
    border: none;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.popup-close:hover {
    background: #dc2626;
}


