:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #111642;
    --bg-card: rgba(17, 22, 66, 0.25);
    --accent: #4f6ef7;
    --accent2: #7c3aed;
    --accent3: #06b6d4;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --glow: rgba(79, 110, 247, 0.4);
    --border: rgba(79, 110, 247, 0.2);
}

* {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    text-decoration: none;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

body,
html {
    width: 100%;
    max-width: 100%;
}

/* ===== LOCK SCROLL DURING LOADING ===== */
html.loading,
body.loading {
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 99999;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    touch-action: none;
    overscroll-behavior: none;
    pointer-events: all;
    user-select: none;
    -webkit-user-select: none;
}

.loading-screen.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loading-logo {
    margin-bottom: 30px;
    animation: pulseLogo 2s infinite ease-in-out;
}

.loading-logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--glow));
    border: 2px solid var(--accent);
    border-radius: 50%;
    padding: 12px;
    background: rgba(79, 110, 247, 0.08);
    box-shadow: 0 0 25px var(--glow), inset 0 0 15px rgba(79, 110, 247, 0.1);
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loading-text {
    display: flex;
    font-size: 3em;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--accent);
    text-shadow: 0 0 20px var(--glow);
}

.loading-text span {
    display: inline-block;
    animation: wave 1.2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
        color: var(--accent);
        filter: drop-shadow(0 0 0px var(--accent));
    }

    50% {
        transform: translateY(-25px);
        color: var(--accent3);
        filter: drop-shadow(0 0 15px var(--accent3));
    }
}

.loading-text span:nth-child(1) {
    animation-delay: 0.1s;
}

.loading-text span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-text span:nth-child(3) {
    animation-delay: 0.3s;
}

.loading-text span:nth-child(4) {
    animation-delay: 0.4s;
}

.loading-text span:nth-child(5) {
    animation-delay: 0.5s;
}

.loading-text span:nth-child(6) {
    animation-delay: 0.6s;
}

.loading-text span:nth-child(7) {
    animation-delay: 0.7s;
}

.loading-text span:nth-child(8) {
    animation-delay: 0.8s;
}

.loading-text span:nth-child(9) {
    animation-delay: 0.9s;
}

.loading-text span:nth-child(10) {
    animation-delay: 1.0s;
}

.loading-text span:nth-child(11) {
    animation-delay: 1.1s;
}

.loading-text span:nth-child(12) {
    animation-delay: 1.2s;
}

.loading-text span:nth-child(13) {
    animation-delay: 1.3s;
}

.loading-text span:nth-child(14) {
    animation-delay: 1.4s;
}

.loading-text span:nth-child(15) {
    animation-delay: 1.5s;
}

.loading-screen p {
    margin-top: 35px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ===== HEADER ===== */
header {
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    position: fixed;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 200px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.8em;
    letter-spacing: 3px;
}

.logo span {
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--glow));
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 5px;
    background: rgba(79, 110, 247, 0.08);
    box-shadow: 0 0 12px var(--glow), inset 0 0 10px rgba(79, 110, 247, 0.1);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    margin: 6px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navigation a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link {
    text-decoration: none;
    position: relative;
    padding: 8px 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0%;
    height: 0%;
    background: var(--accent);
    filter: blur(15px);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
    border-radius: 20px;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    transition: width 0.3s ease;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 15px var(--accent);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 120%;
    height: 70%;
    opacity: 0.25;
}

.nav-link:hover::after {
    width: 100%;
    box-shadow: 0 0 12px var(--accent);
}

.close-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--accent);
    transform: rotate(180deg);
}

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transform: translateZ(0);
}

/* ===== FLOATING ORBS ===== */
.floating-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
max-width: 100%;

} 
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.15;
    animation: floatOrb 20s ease-in-out infinite;
    contain: strict;
    will-change: transform;
}

.orb:nth-child(1) {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -10%;
    left: -5%;
    animation-duration: 18s;
}

.orb:nth-child(2) {
    width: 300px;
    height: 300px;
    background: var(--accent2);
    top: 50%;
    right: -5%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.orb:nth-child(3) {
    width: 350px;
    height: 350px;
    background: var(--accent3);
    bottom: -10%;
    left: 30%;
    animation-duration: 25s;
    animation-delay: -10s;
}

.orb:nth-child(4) {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 20%;
    right: 20%;
    animation-duration: 20s;
    animation-delay: -7s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* ===== SECTIONS ===== */
section {
    padding: 100px 200px;
}

/* ===== HERO SECTION ===== */
.main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
    gap: 50px;
}

.text-container {
    flex: 1;
    max-width: 550px;
}

.image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-wrapper {
    position: relative;
}

.profile-image {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    box-shadow: 0 0 60px var(--glow), 0 0 120px rgba(124, 58, 237, 0.2);
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 80px var(--glow), 0 0 160px rgba(124, 58, 237, 0.3);
}

.image-container::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 2px dashed var(--border);
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* ===== FLOATING TECH ICONS ===== */
.floating-tech-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(17, 22, 66, 0.95);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(79, 110, 247, 0.3);
    z-index: 3;
    animation: floatIcon 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.floating-tech-icon:hover {
    transform: scale(1.1) !important;
    border-color: var(--accent);
    box-shadow: 0 0 35px var(--glow);
    animation-play-state: paused;
}

.floating-tech-icon img,
.floating-tech-icon svg {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--glow));
}

.tech-icon-1 {
    bottom: -5px;
    left: 65px;
    animation-delay: 0s;
}

.tech-icon-2 {
    bottom: -30px;
    left: calc(50% - 30px);
    animation-delay: 1.5s;
}

.tech-icon-3 {
    top: calc(50% - 30px);
    left: -30px;
    animation-delay: 3s;
}

.tech-icon-4 {
    top: calc(50% - 30px);
    right: -30px;
    animation-delay: 4.5s;
}

.tech-icon-5 {
    bottom: 65px;
    left: -5px;
    animation-delay: 1.0s;
}

.tech-icon-6 {
    bottom: -5px;
    right: 65px;
    animation-delay: 2.5s;
}

.tech-icon-7 {
    bottom: 65px;
    right: -5px;
    animation-delay: 0.5s;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}

.main h2 {
    font-size: 2.3em;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main h4 {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.cursor {
    animation: blink 1s infinite;
    display: inline-block;
    width: 3px;
    background: var(--accent);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.main h3 {
    color: var(--text-dim);
    font-size: 1.2em;
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 35px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.main-btn,
.cv-btn {
    color: #fff;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    transition: all 0.4s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.main-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 30px rgba(79, 110, 247, 0.3);
}

.cv-btn {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.cv-btn:hover {
    background: var(--accent);
    color: #fff;
}

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

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

.main-btn:hover,
.cv-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(79, 110, 247, 0.4);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-icons a {
    color: var(--text-dim);
    font-size: 1.5em;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 110, 247, 0.15);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.4s ease;
}

.social-icons a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--glow);
    border-color: transparent;
}

/* ===== SCROLL REVEAL - SECTION ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animations */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 500ms; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 600ms; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 700ms; }
.reveal-stagger.visible > *:nth-child(9) { transition-delay: 800ms; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 900ms; }

/* Section title animation */
.section-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Project card 3D flip effect */
.project-card-3d {
    opacity: 0;
    transform: rotateY(90deg) translateZ(0);
    transform-style: preserve-3d;
    transition: all 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card-3d.visible {
    opacity: 1;
    transform: rotateY(0) translateZ(0);
}

/* Slide from left */
.slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in effect */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Form container animation */
.form-container {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover lift effect enhancement */
.project-card {
    transform-origin: center bottom;
}

/* Smooth appearance for revealed elements - will-change removed to save GPU memory.
   The browser handles these transitions efficiently without it. */

/* ===== SKILLS SECTION ===== */
.cardss {
    background: transparent;
    color: var(--text);
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.cardss .title1 {
    opacity: 1;
    transform: none;
    transition: none;
}

.title {
    display: flex;
    justify-content: center;
    font-size: 2.4em;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title1 {
    display: flex;
    justify-content: center;
    color: #fff;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 35px;
    position: relative;
    text-shadow: 0 0 20px rgba(79, 110, 247, 0.3);
}

.title1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    border-radius: 10px;
    box-shadow: 0 0 15px var(--accent), 0 0 30px var(--glow);
    animation: magicGlow 3s ease-in-out infinite;
}

@keyframes magicGlow {
    0%,
    100% {
        transform: scaleX(1);
        opacity: 0.6;
    }

    50% {
        transform: scaleX(1.5);
        opacity: 1;
    }
}

.section-subtitle {
    text-align: center;
    color: var(--text-dim);
    font-size: 1.1em;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== SKILL CARDS GRID ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.card1 {
    background: rgba(17, 22, 66, 0.22);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    transform: none !important;
    filter: none;
}

.card1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 110, 247, 0.05), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card1:hover {
    transform: none !important;
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(79, 110, 247, 0.15);
}

.card1:hover::before {
    opacity: 1;
}

.card-icon-title1 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.card-icon1 img,
.card-icon1 .skill-svg {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--glow));
}

.card-icon1 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-title1 h1 {
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
    margin: 0;
}

.card-description1 {
    color: var(--text-dim);
    font-size: 0.9em;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.card-description1 p {
    color: var(--text-dim);
}

.im {
    width: 70px;
    height: 70px;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    background: transparent;
    position: relative;
    z-index: 1;
}

.projects .content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.project-card {
    background: rgba(17, 22, 66, 0.22);
    border: 1px solid var(--border);
    min-height: 14em;
    width: calc(50% - 40px);
    overflow: hidden;
    border-radius: 16px;
    margin: 20px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s, box-shadow 0.5s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(79, 110, 247, 0.2);
}

.project-card:hover .project-image {
    opacity: 0.9;
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 1em;
}

.project-category {
    font-size: 0.8em;
    color: var(--text-dim);
}

.project-type {
    font-size: 0.85em;
    color: var(--accent3);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.project-bio {
    font-size: 0.9em;
    color: var(--text-dim);
    margin-top: 10px;
    line-height: 1.5;
}

.project-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 10px;
    color: var(--text);
}

.iconprojet {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    transition: all 0.3s;
}

.iconprojet:hover {
    filter: brightness(0) invert(0.7) sepia(1) saturate(5) hue-rotate(200deg);
}

.more-details {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.4s ease;
    text-transform: capitalize;
    font-size: 0.9em;
}

.more-details:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 15px rgba(79, 110, 247, 0.4);
    transform: translateY(-2px);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: transparent;
    position: relative;
    z-index: 1;
}

.content {
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
}

/* ===== CONTACT CARDS LAYOUT ===== */
.contact .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.card-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
}

.card {
    background: rgba(17, 22, 66, 0.22);
    border: 1px solid var(--border);
    width: 280px;
    max-width: 100%;
    border-radius: 16px;
    padding: 25px;
    margin: 0;
    transition: transform 0.4s ease, border-color 0.4s, box-shadow 0.4s;
    position: relative;
    text-align: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(79, 110, 247, 0.15);
}

.card .icon {
    color: var(--accent);
    font-size: 8em;
    text-align: center;
}

/* Professional Contact Indicator */
.contact .card .icon {
    position: relative;
    transition: all 0.4s ease;
}

.contact .card:hover .icon {
    transform: scale(1.1);
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0% {
        filter: drop-shadow(0 0 0px var(--accent));
    }

    50% {
        filter: drop-shadow(0 0 20px var(--accent));
    }

    100% {
        filter: drop-shadow(0 0 0px var(--accent));
    }
}

.contact .card::after {

    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-size: 0.65em;
    color: var(--accent);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact .card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.contact .icon {
    font-size: 3.8em;
    margin-bottom: 15px;
}

.info {
    text-align: center;
}

.info h3 {
    color: var(--accent);
    font-size: 1.2em;
    font-weight: 700;
    margin: 5px 0 10px 0;
}

.contact .info h3 {
    color: var(--accent);
}

.contact .info p {
    font-size: 1em;
    color: var(--text-dim);
    word-break: break-word;
}

/* ===== FORM ===== */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(17, 22, 66, 0.22);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(10, 14, 39, 0.45);
    font-size: 14px;
    color: var(--text);
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(79, 110, 247, 0.15);
}

.sendButton {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s;
}

.sendButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--glow);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-secondary);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 900px;
    height: 90%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #fff;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: #ddd;
}

.modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.cv-message {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.cv-icon {
    font-size: 4em;
    color: #e74c3c;
    margin-bottom: 20px;
}

.cv-message h3 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.cv-message p {
    color: var(--text-dim);
    margin-bottom: 25px;
    font-size: 1.1em;
}

.cv-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.cv-action-btn {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-btn {
    background: var(--accent);
    color: white;
}

.view-btn:hover {
    background: #3d5bd9;
    transform: translateY(-2px);
}

.download-btn {
    background: #27ae60;
    color: white;
}

.download-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.cv-info {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
}

.cv-info p {
    margin: 5px 0;
    font-size: 0.9em;
    color: var(--text-dim);
}

/* ===== HERO ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up-d1 {
    animation-delay: 0.2s;
}

.fade-in-up-d2 {
    animation-delay: 0.4s;
}

.fade-in-up-d3 {
    animation-delay: 0.6s;
}

.fade-in-up-d4 {
    animation-delay: 0.8s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-right {
    animation: fadeInRight 1s ease-out forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 1024px) {
    header {
        padding: 15px 50px;
    }

    section {
        padding: 80px 50px;
    }
}

@media screen and (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .hamburger {
        display: block;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 14, 39, 0.95);
        backdrop-filter: blur(20px);
        padding: 40px 0 20px;
        text-align: center;
        border-bottom: 1px solid var(--border);
    }

    .navigation.active {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .navigation a {
        display: block;
        padding: 15px 0;
        font-size: 1.2em;
    }

    .logo {
        font-size: 1.1em;
        letter-spacing: 1px;
    }

    .close-btn {
        display: block;
    }

    section {
        padding: 80px 20px;
    }

    .title {
        font-size: 1.8em;
        text-align: center;
    }

    .main {
        overflow: hidden;
    }

    .main-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }

    .image-container {
        margin-top: 60px;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .image-container::before {
        width: 260px;
        height: 260px;
    }

    .main h2 {
        font-size: 1.8em !important;
        text-align: center;
    }

    .main h4 {
        font-size: 1.8em;
    }

    .main h3 {
        font-size: 1em;
    }

    /* Resize and reposition floating icons for mobile */
    .floating-tech-icon {
        width: 45px;
        height: 45px;
    }

    .floating-tech-icon img,
    .floating-tech-icon svg {
        width: 25px;
        height: 25px;
    }

    .tech-icon-1 {
        bottom: -5px;
        left: 40px;
    }

    .tech-icon-2 {
        bottom: -20px;
        left: calc(50% - 22.5px);
    }

    .tech-icon-3 {
        top: calc(50% - 22.5px);
        left: -20px;
    }

    .tech-icon-4 {
        top: calc(50% - 22.5px);
        right: -20px;
    }

    .tech-icon-5 {
        bottom: 40px;
        left: -5px;
    }

    .tech-icon-6 {
        bottom: -5px;
        right: 40px;
    }

    .tech-icon-7 {
        bottom: 40px;
        right: -5px;
    }

    .loading-text {
        font-size: 1.5em;
        letter-spacing: 2px;
    }

    .main-btn,
    .cv-btn {
        display: block;
        margin: 5px auto;
        text-align: center;
        max-width: 200px;
    }

    .button-group {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

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

    .project-card {
        width: 100%;
        margin: 15px 0;
    }

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

    .card-row {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .card {
        width: 90%;
        max-width: 320px;
        margin: 0 auto;
    }

    .modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }

    .cv-message {
        padding: 30px 20px;
    }

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

    .cv-action-btn {
        width: 200px;
        justify-content: center;
    }

    .view-btn,
    .download-btn {
        font-size: 1em;
        padding: 12px 20px;
        width: 200px;
        justify-content: center;
        text-align: center;
        border-radius: 15px;
    }
}

@media (min-width: 641px) {
    .project-card {
        width: calc(50% - 40px);
        margin: 20px;
    }
}

@media (max-width: 640px) {
    .project-card {
        width: 100%;
        margin: 15px 0;
    }
}

@media (max-width: 300px) {
    body {
        font-size: 10px;
    }
}

/* ===== ICONS8 UI FIX ===== */
.icons8-ui {
    width: 48px;
    height: 48px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid #10B981;
    color: var(--text);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    width: max-content;
    max-width: 90%;
}

.toast.show {
    bottom: 40px;
}

@media (max-width: 768px) {
    .toast {
        padding: 12px 16px;
        width: 90%;
        max-width: 400px;
        text-align: left;
    }

    .toast.show {
        bottom: 50px;
    }

    .toast-message {
        font-size: 0.9em;
    }
}

.toast-icon {
    font-size: 1.5em;
}

.toast-message {
    font-size: 1em;
    font-weight: 500;
}

.sendButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(17, 22, 66, 0.35);
    padding: 80px 0 0;
    margin-top: 100px;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
    width: 100%;
    box-sizing: border-box; 
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 25px;
    display: inline-flex;
}

.footer-brand p {
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    background: rgba(79, 110, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--glow);
    border-color: transparent;
}

.footer-links h3,
.footer-contact h3 {
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.footer-links ul li a i {
    font-size: 0.7em;
    color: var(--accent);
}

.footer-links ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-dim);
    font-size: 0.95em;
}

.footer-contact .contact-item i {
    width: 35px;
    height: 35px;
    background: rgba(79, 110, 247, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9em;
}

.footer-bottom {
    background: rgba(10, 14, 39, 0.5);
    padding: 25px 0;
    border-top: 1px solid var(--border);
}

.footer-bottom .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bottom-content {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.9em;
}

.heart {
    color: #ef4444;
    display: inline-block;
    animation: heartBeat 1.5s ease infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer {
        padding-top: 50px;
        margin-top: 60px;
    }

    .footer-container {
        padding: 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-bottom: 40px;
        text-align: center;
    }

    /* Brand takes full width on top */
    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand .logo {
        justify-content: center;
        margin-bottom: 20px;
    }

    .footer-brand .logo .header-logo {
        width: 55px;
        height: 55px;
    }

    .footer-brand .logo span {
        font-size: 1em;
    }

    .footer-brand p {
        font-size: 0.9em;
        line-height: 1.7;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-socials a {
        width: 42px;
        height: 42px;
        font-size: 1.15em;
    }

    /* Quick Links & Services stay side by side (each 1 column) */

    /* Contact Info takes full width below */
    .footer-contact {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links h3,
    .footer-contact h3 {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .footer-links h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links ul li {
        margin-bottom: 12px;
    }

    .footer-links ul li a {
        justify-content: center;
        font-size: 0.9em;
    }

    .footer-contact .contact-item {
        justify-content: flex-start;
        flex-direction: row;
        gap: 10px;
        margin-bottom: 15px;
        font-size: 0.9em;
        width: 280px;
    }

    .footer-contact .contact-item i {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
        flex-shrink: 0;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .footer {
        padding-top: 40px;
        margin-top: 40px;
    }

    .footer-container {
        padding: 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .footer-brand .logo .header-logo {
        width: 50px;
        height: 50px;
    }

    .footer-brand .logo span {
        font-size: 0.9em;
        letter-spacing: 1px;
    }

    .footer-brand p {
        font-size: 0.85em;
        padding: 0 10px;
    }

    .footer-socials a {
        width: 38px;
        height: 38px;
        font-size: 1em;
        border-radius: 8px;
    }

    .footer-links h3,
    .footer-contact h3 {
        font-size: 1em;
    }

    .footer-links ul li a {
        font-size: 0.85em;
    }

    .footer-contact .contact-item {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .footer-contact .contact-item span {
        font-size: 0.85em;
        word-break: break-all;
    }

    .footer-bottom {
        padding: 15px 0;
    }

    .bottom-content {
        font-size: 0.8em;
        gap: 8px;
        padding: 0 10px;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */


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

    .orb {
        animation: none !important;
    }

    .floating-tech-icon {
        animation: none !important;
    }

    #particle-canvas {
        display: none !important;
    }
}
