/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0a0a0a;
    overflow-x: hidden;
    position: relative;
}

/* ===== ANIMATED BACKGROUND ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    25% { transform: translateX(-20px) translateY(-10px) scale(1.05); }
    50% { transform: translateX(20px) translateY(10px) scale(0.95); }
    75% { transform: translateX(-10px) translateY(20px) scale(1.02); }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

p {
    color: #94a3b8;
    line-height: 1.7;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn::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.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
    border: 2px solid #ffffff;
}

.btn-primary:hover {
    background: transparent;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #64748b;
}

.btn-secondary:hover {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    border: 2px solid #64748b;
    color: #64748b;
}

.btn-outline:hover {
    background: #64748b;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 15px 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25); /* stronger shadow for separation */
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    padding: 10px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== LOGO ===== */
.navbar-brand {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
}

.logo-name {
    color: #ffffff;
    position: relative;
}

.logo-dot {
    color: #ffffff;
    margin: 0 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.logo-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    margin-top: -5px;
    font-weight: 400;
}

/* ===== NAVIGATION ===== */
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 10px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-link i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* ===== MOBILE MENU ===== */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
    background: transparent;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    overflow: hidden;
    padding-top: 90px; /* add space for fixed navbar */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 8s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 40%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-30px) rotate(90deg) scale(1.1); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg) scale(0.9); 
        opacity: 0.4;
    }
    75% { 
        transform: translateY(-40px) rotate(270deg) scale(1.05); 
        opacity: 0.5;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: #64748b;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.name {
    display: block;
    color: #ffffff;
    position: relative;
}
.name::after {
    content: none;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

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

.hero-subtitle {
    font-size: 1.8rem;
    color: #64748b;
    margin-bottom: 30px;
    font-weight: 300;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Amazing typewriter animation for hero-subtitle */
.hero-subtitle {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #fff;
    width: 0;
    display: inline-block;
    animation: typewriter 2.5s steps(20, end) 0.5s forwards, blinkCaret 0.7s step-end infinite;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 20ch; } /* 20 caractères pour 'Full Stack Developer' */
}

@keyframes blinkCaret {
    0%, 100% { border-color: transparent; }
    50% { border-color: #fff; }
}

@media (max-width: 600px) {
    .hero-subtitle {
        font-size: 1rem;
        width: 20ch;
        animation: typewriter 2.5s steps(20, end) 0.5s forwards, blinkCaret 0.7s step-end infinite;
    }
}

/* Professional grayscale/white animation for logo-name */
.logo-name {
    color: #fff;
    animation: logoFadeScaleGlow 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
    font-weight: 800;
    position: relative;
    text-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,255,0.2);
}

@keyframes logoFadeScaleGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
        text-shadow: none;
    }
    70% {
        opacity: 1;
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(255,255,255,0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,255,0.2);
    }
}

.hero-description {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    position: relative;
    animation: fadeInUp 1s ease-out 1s both;
}

.cv-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.cv-spinner {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.cv-spinner-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.cv-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.cv-spinner-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Force hero-stats to be horizontal on all screen sizes */
.hero-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 32px;
    margin-top: 40px;
}

.stat {
    flex: 1 1 0;
    min-width: 160px;
    max-width: 220px;
    min-height: 140px;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.10);
    box-shadow: 0 6px 32px rgba(100,116,139,0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 12px 24px 12px;
    transition: box-shadow 0.3s, transform 0.3s, border 0.3s;
    position: relative;
}

.stat:hover {
    box-shadow: 0 12px 36px rgba(100,116,139,0.18);
    border: 1.5px solid #64748b;
    transform: translateY(-6px) scale(1.04);
    background: rgba(255,255,255,0.07);
}

.stat i {
    font-size: 2.2rem;
    color: #64748b;
    margin-bottom: 18px;
    transition: color 0.3s;
}

.stat-number {
    display: block;
    font-size: 2.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 1.05rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Remove animation from stat icons in hero-stats */
.hero-stats .stat i {
    animation: none !important;
}

/* ===== HERO IMAGE ===== */
.hero-image {
    display: flex;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out both;
  min-width: 280px;
  max-width: 100%;
  width: 100%;
  min-height: 0;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: rotate 20s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.profile-card:hover::before {
  opacity: 1;
}
.profile-card:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    margin-bottom: 30px;
}

.avatar-3d {
    perspective: 800px;
    perspective-origin: 50% 50%;
    position: relative;
    display: inline-block;
}

.avatar-ring {
    position: absolute;
    border: 3px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 16px 4px rgba(255,255,255,0.12);
    /* Animation 3D améliorée */
    animation: ring3d 6s linear infinite;
    will-change: transform;
}
.ring-1 {
    width: 180px;
    height: 180px;
    top: -20px;
    left: -20px;
    border-color: rgba(255,255,255,0.25);
    animation-delay: 0s;
    animation-direction: normal;
    animation-name: ring3d-x;
}
.ring-2 {
    width: 200px;
    height: 200px;
    top: -30px;
    left: -30px;
    border-color: rgba(255,255,255,0.15);
    animation-delay: 1s;
    animation-direction: reverse;
    animation-name: ring3d-y;
}
.ring-3 {
    width: 220px;
    height: 220px;
    top: -40px;
    left: -40px;
    border-color: rgba(255,255,255,0.08);
    animation-delay: 2s;
    animation-direction: alternate;
    animation-name: ring3d-z;
}
@keyframes ring3d-x {
    0%   { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(0deg);}
    100% { transform: rotateX(360deg) rotateY(0deg)   rotateZ(0deg);}
}
@keyframes ring3d-y {
    0%   { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(0deg);}
    100% { transform: rotateX(0deg)   rotateY(360deg) rotateZ(0deg);}
}
@keyframes ring3d-z {
    0%   { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(0deg);}
    100% { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(360deg);}
}

.avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.avatar-container:hover .avatar-image {
    transform: scale(1.1);
}

.avatar-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

.profile-info h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.profile-info p {
    color: #64748b;
    margin-bottom: 15px;
    font-weight: 500;
}

.profile-location {
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.profile-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== SECTION TITLES ===== */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
}

.section-title i {
    color: #ffffff;
    font-size: 2rem;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
    padding: 100px 0;
    background: #111111;
    position: relative;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    z-index: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out both;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s;
}

.skill-item:hover::before {
    left: 100%;
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.skill-icon i {
    font-size: 3rem;
    color: #ffffff;
    transition: all 0.3s ease;
    display: inline-block;
}

.skill-item:hover .skill-icon i {
    transform: scale(1.2) rotateY(360deg);
    color: #ffffff;
}

.skill-item h4 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.skill-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 12px;
    border-radius: 6px;
    overflow: visible;
    position: relative;
    margin-top: 15px;
}

.skill-progress {
    height: 100%;
    background: #ffffff;
    border-radius: 6px;
    position: relative;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressGlow 2s ease-in-out infinite alternate;
}

@keyframes progressGlow {
    from { box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }
    to { box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); }
}

.skill-percentage {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(30, 41, 59, 0.85);
    padding: 2px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
    z-index: 2;
    border: 1.5px solid #fff;
    letter-spacing: 0.5px;
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 100px 0;
    background: #0a0a0a;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out both;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: rotate 20s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.service-icon {
    margin-bottom: 30px;
    position: relative;
}

.service-icon i {
    font-size: 3.5rem;
    color: #ffffff;
    transition: all 0.4s ease;
    display: inline-block;
}

.service-card:hover .service-icon i {
    transform: scale(1.2) rotateY(360deg);
    color: #ffffff;
}

.service-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.service-card p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== UI/UX SECTION ===== */
.uiux-section {
    padding: 100px 0;
    background: #111111;
    position: relative;
}

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

.uiux-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out both;
}

.uiux-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.uiux-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.uiux-icon i {
    font-size: 2.5rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.uiux-card:hover .uiux-icon i {
    transform: scale(1.1) rotate(5deg);
}

.uiux-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.uiux-title {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.uiux-description {
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.uiux-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.uiux-actions {
    display: flex;
    gap: 10px;
}

.uiux-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.uiux-card:hover .uiux-overlay {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    text-align: center;
    color: #0a0a0a;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.uiux-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #0a0a0a;
}

.overlay-content h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #0a0a0a;
    font-weight: 700;
}

.overlay-content p {
    color: #333333;
    font-weight: 500;
}

/* LinkedIn button for overlay */
.overlay-content .btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #0a0a0a;
    border: 2px solid #ffffff;
}

.overlay-content .btn-linkedin:hover,
.overlay-content .btn-linkedin:focus {
    background: transparent;
    color: #0a0a0a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    border: 2px solid #0a0a0a;
    text-decoration: none;
}

.overlay-content .btn-linkedin i {
    font-size: 2rem;
    color: #0a66c2;
    margin-right: 8px;
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    padding: 100px 0;
    background: #0a0a0a;
    position: relative;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

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

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.project-icon i {
    font-size: 2rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon i {
    transform: scale(1.2) rotate(10deg);
}

.project-title-section h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.project-updated {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-description {
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.project-actions {
    display: flex;
    gap: 10px;
}

/* ===== WORK TOGETHER SECTION ===== */
.work-together-section {
    padding: 80px 0;
    background: #111111;
    text-align: center;
    position: relative;
}

.work-together-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    z-index: 1;
}

.work-together-section .container {
    position: relative;
    z-index: 2;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 100px 0;
    background: #0a0a0a;
    position: relative;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-card .icon {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.contact-card .info {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-group input:focus + .input-icon,
.input-group textarea:focus + .input-icon {
    color: #ffffff;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #64748b;
}

.send-btn {
    width: 100%;
    padding: 15px;
    background: #ffffff;
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.send-btn:hover {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    background: #111111;
    position: relative;
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    animation: float 12s ease-in-out infinite;
    filter: blur(2px);
}

.orb-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 15%;
    animation-delay: 4s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    bottom: -50px;
    left: 60%;
    animation-delay: 8s;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 50px;
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
}

.footer-column {
    color: #ffffff;
}

.column-header {
    margin-bottom: 30px;
}

.column-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

.about-column .title {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.contact-item:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.contact-item i {
    width: 20px;
    font-size: 1.1rem;
    color: #ffffff;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.footer-nav .nav-link:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-nav .nav-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.footer-nav .nav-link:hover i {
    transform: translateX(3px);
}

.social-description {
    color: #94a3b8;
    margin-bottom: 25px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0a0a0a;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover .social-icon {
    transform: scale(1.1) rotate(5deg);
}

.social-name {
    font-weight: 600;
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    position: relative;
    z-index: 2;
}

.footer-bottom-content {
    text-align: center;
}

.copyright {
    color: #64748b;
}

.copyright p {
    font-size: 0.95rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-collapse.show {
        display: flex;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 15px 20px;
        border-radius: 10px;
        width: 100%;
    }

    .nav-item:last-child {
        margin-top: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 15px 25px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: row !important;
        gap: 10px;
    }

    /* Uniform size and centering for hero-stats .stat */
    .hero-stats .stat {
        width: 120px;
        height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skills-grid,
    .services-grid,
    .uiux-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 0 30px;
    }

    .social-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .social-link {
        padding: 10px 12px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .social-name {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
  .container {
    padding-left: 5vw;
    padding-right: 5vw;
  }
  .hero-section {
    padding-top: 110px; /* encore plus d'espace pour le header */
    padding-bottom: 16px;
  }
  .hero-content {
    gap: 18px;
    padding: 0;
    text-align: center;
  }
  .hero-title {
    font-size: 2rem; /* plus grand pour la visibilité */
    margin-bottom: 12px;
    word-break: break-word;
    white-space: normal;
  }
  .greeting, .name {
    display: block;
    word-break: break-word;
    white-space: normal;
  }
  .hero-subtitle {
    font-size: 1rem;
    width: 20ch;
    animation: typewriter 2.5s steps(20, end) 0.5s forwards, blinkCaret 0.7s step-end infinite;
  }
  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 18px;
    word-break: break-word;
    white-space: normal;
  }
  .hero-buttons {
    gap: 8px;
    margin-bottom: 18px;
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    font-size: 1rem;
    padding: 14px 0;
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    margin-bottom: 4px;
  }
  .cv-loading-overlay {
    border-radius: 10px;
    font-size: 0.95rem;
  }
  .hero-stats {
    flex-direction: column !important;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    align-items: stretch;
  }
  .hero-stats .stat {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    min-height: 60px;
    padding: 10px 0;
    font-size: 0.9rem;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .stat i {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }
  .stat-number {
    font-size: 1.1rem;
    margin-bottom: 1px;
  }
  .stat-label {
    font-size: 0.9rem;
  }
  .hero-image {
    margin: 0 auto;
    max-width: 90vw;
    display: flex;
    justify-content: center;
  }
  .profile-card {
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    margin-left: -5vw;
    margin-right: -5vw;
    padding-left: 5vw;
    padding-right: 5vw;
    box-sizing: border-box;
  }
  .profile-avatar {
    margin-bottom: 16px;
  }
  .avatar-3d {
    max-width: 100px;
    max-height: 100px;
  }
  .avatar-ring {
    width: 60px !important;
    height: 60px !important;
    top: -7px !important;
    left: -7px !important;
  }
  .ring-2 {
    width: 80px !important;
    height: 80px !important;
    top: -10px !important;
    left: -10px !important;
  }
  .ring-3 {
    width: 100px !important;
    height: 100px !important;
    top: -15px !important;
    left: -15px !important;
  }
  .avatar-container {
    width: 70px;
    height: 70px;
  }
  .avatar-image {
    width: 100%;
    height: 100%;
  }
  .profile-info h3 {
    font-size: 1.2rem;
  }
  .profile-info p {
    font-size: 1rem;
  }
  .profile-location {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  .profile-tech {
    gap: 8px;
    margin-top: 12px;
  }
  .tech-tag {
    font-size: 0.9rem;
    padding: 7px 14px;
    border-radius: 18px;
  }
  .floating-shapes {
    display: none;
  }
}

@media (max-width: 375px) {
  .container {
    padding-left: 2vw;
    padding-right: 2vw;
  }
  .hero-title {
    font-size: 1rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
    width: 100vw !important;
  }
  .profile-card {
    border-radius: 12px;
    padding: 14px 2px;
  }
  .btn {
    font-size: 0.9rem;
    padding: 10px 0;
  }
}

/* ===== SCROLL ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ===== FOCUS STYLES ===== */
*:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .floating-shapes,
    .hero-buttons,
    .contact-form,
    .footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-section,
    .skills-section,
    .services-section,
    .uiux-section,
    .projects-section,
    .contact-section {
        background: white !important;
        color: black !important;
    }
}

/* DEBUG: Force hero section visible on all devices */
@media (max-width: 991px) {
  .hero-section {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

