@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
        
* {
    font-family: 'Inter', sans-serif;
}

/* Variables CSS pour la palette de couleurs */
:root {
    --primary-color: #ffce10;
    --primary-dark: #e6b800;
    --black: #000000;
    --dark-gray: #1a1a1a;
    --light-gray: #f5f5f5;
    --white: #ffffff;
}

/* Gradient animé avec palette noir/jaune */
.gradient-animated {
    background: linear-gradient(-45deg, #ffce10, #e6b800, #ffce10, #ffd633);
    background-size: 400% 400%;
    animation: gradient 10s ease infinite;
}

.gradient-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism dark */
.glass-dark {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 206, 16, 0.2);
}

.glass-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Soft shadow */
.soft-shadow {
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
}

.soft-shadow-yellow {
    box-shadow: 0 20px 60px -10px rgba(255, 206, 16, 0.3);
}

/* Smooth scroll avec optimisation */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--dark-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utiliser l'accélération matérielle pour les éléments animés */
.scrolling-logos,
.animate-blob,
.floating,
.gradient-animated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Réduire les animations sur mobile et pour les préférences d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Optimisations spécifiques mobile */
@media (max-width: 768px) {
    /* Désactiver les animations lourdes en mobile */
    .animate-blob,
    .gradient-animated,
    .floating {
        animation: none !important;
    }
    
    /* Simplifier les effets de survol en tactile */
    .card-hover:hover {
        transform: none;
    }
}

/* Dark mode sections */
.dark-section {
    background-color: var(--black);
    color: var(--white);
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.floating {
    animation: float 8s ease-in-out infinite;
}

/* Code animation effect */
@keyframes codeFlow {
    0% { transform: translateY(100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

.code-animation {
    position: relative;
    overflow: hidden;
}

.code-line {
    animation: codeFlow 10s linear infinite;
    color: var(--primary-color);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Card hover effect */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
}

/* Modern gradient border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
}

.gradient-border-dark {
    position: relative;
    background: var(--dark-gray);
    border-radius: 16px;
}

.gradient-border::before,
.gradient-border-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, #ffce10, #ffd633, #ffce10);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.gradient-border:hover::before,
.gradient-border-dark:hover::before {
    opacity: 1;
}

/* Pulse animation */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Modern button */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--black);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-dark {
    background-color: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
}

.btn-dark:hover {
    background-color: transparent;
    color: var(--black);
}

.btn-outline {
    background-color: transparent;
    color: var(--black);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--black);
}

.btn-modern::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

/* Tech stack icons */
.tech-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 24px;
}

.tech-icon:hover {
    background: var(--primary-color);
    transform: translateY(-5px) rotate(5deg);
}

/* Terminal effect */
.terminal {
    background: #0a0a0a;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Monaco', 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

.terminal::before {
    content: "● ● ●";
    position: absolute;
    top: 10px;
    left: 15px;
    color: #ff5f56 #ffbd2e #27c93f;
    font-size: 12px;
    letter-spacing: 5px;
}

.terminal-text {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    margin-top: 20px;
}

/* Icon container */
.icon-container {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--black);
}

.icon-container-dark {
    background: var(--dark-gray);
    color: var(--primary-color);
}

/* Number animation */
@keyframes slideNumber {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.number-slide {
    animation: slideNumber 0.6s ease-out;
}

/* Blob animation */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Responsive navigation */
.nav-link {
    position: relative;
    color: var(--dark-gray);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

/* Stats counter */
.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--dark-gray);
    margin-top: 0.5rem;
}

/* Project card */
.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(255, 206, 16, 0.2);
}

.project-image {
    height: 200px;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Line clamp utility */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: -30px;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: -7px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Loading animation */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .terminal {
        font-size: 0.8rem;
    }
}