:root {
    --primary-color: #3b82f6; /* Bleu moderne Tailwind */
    --accent-color: #06b6d4; /* Cyan */
    --bg-dark: #0f172a; /* Slate 900 */
    --bg-darker: #020617; /* Slate 950 */
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
}

/* --- Effets de Fond Modernes (Mesh Gradient Orbs) --- */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}
.orb-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(0,0,0,0) 70%);
}
.orb-2 {
    bottom: -10%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

/* Navbar */
.navbar {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(2, 6, 23, 0.7);
    border-bottom: 1px solid var(--border-glass);
    padding: 1.2rem 0;
    transition: var(--transition);
    z-index: 1030;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0 10px;
    opacity: 0.7;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 50%;
    background-color: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main) !important;
    opacity: 1;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Navbar Mobile Fix */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid var(--border-glass);
        border-radius: 16px;
        padding: 1rem;
        margin-top: 15px;
    }
    .nav-link { margin: 10px 0; text-align: center; }
    .nav-link::after { display: none; }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 60px;
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.badge-custom {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2rem;
}

.badge-pulse {
    width: 8px; height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* Enhanced Profile Photo */
.profile-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    z-index: 1;
}

.profile-frame {
    position: relative;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 10s infinite alternate ease-in-out;
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.2);
}

.profile-img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: inherit;
    object-fit: cover;
    border: 4px solid var(--bg-darker);
    transition: var(--transition);
}

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Section Titles */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
    font-weight: 800;
}
.section-title span {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass Cards (Skills & About) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 20px rgba(59, 130, 246, 0.1);
    background: rgba(30, 41, 59, 0.85);
}

.skill-icon {
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border-radius: 16px;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition);
}

.glass-card:hover .skill-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Modern Portfolio Cards (Mobile Friendly) */
.portfolio-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    group: hover;
}

.portfolio-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

/* Contenu du projet visible en bas (Mieux pour mobile) */
.portfolio-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 40%, rgba(2, 6, 23, 0.6) 100%);
    backdrop-filter: blur(8px);
    padding: 2rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-glass);
    transform: translateY(0); /* Toujours visible sur mobile */
    transition: var(--transition);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-outline-custom {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: white;
    color: var(--bg-darker);
    border-color: white;
}

/* Forms */
.form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    transition: var(--transition);
}

.form-control:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
    color: white;
}

.form-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Utilities */
.text-muted-custom { color: var(--text-muted); }
.section-padding { padding: 100px 0; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .section-padding { padding: 70px 0; }
    .hero-section { text-align: center; padding-top: 130px; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 15px; }
    .hero-buttons .btn { width: 100%; }
    .badge-custom { margin: 0 auto 2rem auto; }
    .profile-wrapper { max-width: 280px; margin-top: 40px; }
    .glass-card { padding: 1.5rem; }
}
