/* ===== IMPORTS & VARIABLES ===== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #00ff88;
    --secondary: #ff0088;
    --accent: #8800ff;
    --white: #ffffff;
    --black: #000000;
    --dark: #0a0a0a;
    --darker: #050505;
    --gray: #333333;
    --light-gray: #666666;
    --green-glow: rgba(0, 255, 136, 0.3);
    --pink-glow: rgba(255, 0, 136, 0.3);
    --purple-glow: rgba(136, 0, 255, 0.3);
    
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-fast: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--darker);
    color: var(--white);
    overflow-x: hidden;
    cursor: none;
}

body.loading {
    overflow: hidden;
}

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

/* ===== CURSEUR PERSONNALISÉ ===== */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 10001; /* Au-dessus des modals (z-index: 10000) */
    transition: transform 0.1s ease;
}

#cursor-dot {
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--green-glow);
    transition: var(--transition-fast);
}

body:hover #cursor-dot {
    transform: scale(1.5);
    background: var(--secondary);
    box-shadow: 0 0 30px var(--pink-glow);
}

.nav-link:hover ~ #cursor-dot,
.filter-btn:hover ~ #cursor-dot,
.submit-btn:hover ~ #cursor-dot {
    transform: scale(2);
    background: var(--accent);
    box-shadow: 0 0 40px var(--purple-glow);
}

/* ===== LOADER ===== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease, visibility 1s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--primary);
}

.loader-progress {
    width: 300px;
    height: 2px;
    background: var(--gray);
    margin: 2rem auto;
    position: relative;
    border-radius: 1px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    border-radius: 1px;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--green-glow);
}

.progress-text {
    position: absolute;
    right: 0;
    top: -30px;
    font-size: 1rem;
    color: var(--primary);
}

.loader-binary {
    font-size: 0.8rem;
    color: var(--light-gray);
    letter-spacing: 2px;
    opacity: 0.5;
}

/* ===== EFFETS GLITCH ===== */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: var(--secondary);
    clip: rect(0, 0, 0, 0);
    animation: glitch-1 2s infinite;
}

.glitch::after {
    color: var(--accent);
    clip: rect(0, 0, 0, 0);
    animation: glitch-2 2s infinite;
}

@keyframes glitch-1 {
    0% { clip: rect(0, 0, 0, 0); }
    5% { clip: rect(10px, 9999px, 20px, 0); }
    10% { clip: rect(20px, 9999px, 30px, 0); }
    15% { clip: rect(30px, 9999px, 40px, 0); }
    20% { clip: rect(0, 0, 0, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-2 {
    0% { clip: rect(0, 0, 0, 0); }
    15% { clip: rect(40px, 9999px, 50px, 0); }
    25% { clip: rect(50px, 9999px, 60px, 0); }
    35% { clip: rect(60px, 9999px, 70px, 0); }
    40% { clip: rect(0, 0, 0, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 20px var(--green-glow);
}

.nav-menu {
    display: flex;
    gap: 3rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition-fast);
}

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

.nav-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--green-glow);
}

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

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-burger span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Noise overlay supprimé pour simplifier */

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(100px);
    animation: slideUp 1s ease forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.2s; }
.hero-title .line:nth-child(2) { animation-delay: 0.4s; }
.hero-title .line:nth-child(3) { animation-delay: 0.6s; }

.hero-title .accent {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.typewriter {
    font-size: 1.5rem;
    color: var(--light-gray);
    margin-bottom: 3rem;
    animation: typewriter 2s steps(20) 1s forwards;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
}

@keyframes typewriter {
    to { width: 100%; }
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

.stat {
    text-align: center;
}

.binary {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--green-glow);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.binary:hover {
    color: var(--secondary);
    text-shadow: 0 0 15px var(--pink-glow);
    transform: scale(1.1);
    cursor: default;
}

.binary:hover::before {
    content: attr(data-real);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--secondary);
    text-shadow: 0 0 15px var(--pink-glow);
    opacity: 1;
    animation: numberReveal 0.3s ease-out;
}

@keyframes numberReveal {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Random Text Mutation */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text .letter {
    display: inline-block;
    transition: var(--transition-fast);
}

.glitch-text .letter.mutating {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--pink-glow);
    animation: letterMutation 0.5s ease-in-out;
}

@keyframes letterMutation {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    25% {
        transform: scale(1.2) rotateZ(5deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.8) rotateZ(-3deg);
        opacity: 0.9;
    }
    75% {
        transform: scale(1.1) rotateZ(2deg);
        opacity: 0.95;
    }
}

.label {
    font-size: 0.8rem;
    color: var(--light-gray);
    letter-spacing: 1px;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--primary);
    animation: float 6s ease-in-out infinite;
}

.cube {
    top: 10%;
    right: 15%;
    animation: floatAndSpin 6s ease-in-out infinite;
    animation-delay: 0s;
    border-color: #00aa44;
    box-shadow: 0 0 20px rgba(0, 170, 68, 0.3);
    background: var(--darker);
    backdrop-filter: blur(10px);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cube:hover {
    border-color: #ff0088;
    box-shadow: 0 0 30px rgba(255, 0, 136, 0.5);
    transform: scale(1.1);
}

/* ===== TERMINAL INTERACTIF ===== */
.interactive-terminal {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 5;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28ca42; }

.terminal-title {
    margin-left: auto;
    color: var(--light-gray);
    font-size: 0.8rem;
}

.terminal-body {
    padding: 1rem;
    min-height: 120px;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--primary);
    margin-right: 0.5rem;
}

.command {
    color: var(--white);
}

.terminal-output {
    color: var(--secondary);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.cursor {
    color: var(--primary);
    animation: blink-cursor 1s infinite;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.terminal-line .prompt {
    margin-right: 0.5rem;
}

.terminal-line .cursor {
    margin-right: 0.25rem;
}

#terminal-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--white) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    width: 250px !important;
    flex: 1;
}

#terminal-input::placeholder {
    color: var(--light-gray);
    opacity: 0.7;
}

#terminal-history {
    max-height: 150px;
    overflow-y: auto;
    margin-top: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

#terminal-history::-webkit-scrollbar {
    width: 4px;
}

#terminal-history::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.terminal-history-line {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.3;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== SKILLS MATRIX ===== */
.matrix-skills {
    position: relative;
    width: 300px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    overflow: hidden;
    margin-top: 2rem;
}

#skills-matrix-canvas {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.matrix-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.matrix-overlay h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--green-glow);
}

.matrix-overlay p {
    color: var(--light-gray);
    font-size: 0.8rem;
}

/* ===== SKILLS AMÉLIORÉES ===== */
.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes floatAndSpin {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        box-shadow: 0 0 20px rgba(0, 170, 68, 0.3);
    }
    25% { 
        transform: translateY(-15px) rotate(90deg) scale(1.1); 
        box-shadow: 0 0 30px rgba(0, 170, 68, 0.4);
    }
    50% { 
        transform: translateY(-30px) rotate(180deg) scale(1.2); 
        box-shadow: 0 0 40px rgba(0, 170, 68, 0.5);
    }
    75% { 
        transform: translateY(-15px) rotate(270deg) scale(1.1); 
        box-shadow: 0 0 30px rgba(0, 170, 68, 0.4);
    }
}

.code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 1;
    z-index: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
}

.scroll-line {
    width: 2px;
    height: 50px;
    background: linear-gradient(180deg, var(--primary), transparent);
    margin: 0 auto 1rem;
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
    50% { transform: scaleY(0.8); opacity: 0.8; }
}

.scroll-indicator span {
    font-size: 0.8rem;
    color: var(--light-gray);
    letter-spacing: 2px;
}

/* ===== SECTIONS GÉNÉRALES ===== */
section {
    padding: 6rem 0;
    position: relative;
}

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

.section-header {
    position: relative;
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
    line-height: 1.2;
}

.section-number {
    position: absolute;
    top: -1.5rem;
    right: 0;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    z-index: -1;
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--dark);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.reveal-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--light-gray);
    opacity: 0;
    transform: translateY(30px);
    animation: revealText 1s ease forwards;
}

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

.highlight {
    color: var(--primary);
    font-weight: 600;
    text-shadow: 0 0 10px var(--green-glow);
}

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

.skills-binary {
    margin-top: 3rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.skill-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-radius: 5px;
}

.skill-binary {
    font-family: var(--font-mono);
    color: var(--primary);
    font-weight: 600;
    text-shadow: 0 0 5px var(--green-glow);
}

.skill-name {
    color: var(--white);
    font-weight: 500;
    letter-spacing: 1px;
}

.about-visual {
    position: relative;
    height: 400px;
}

.profile-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border: 2px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 30px var(--green-glow);
}

#profile-canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ===== WORK SECTION ===== */
.work {
    position: relative;
    overflow: hidden;
}

#work-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.work-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--white);
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px var(--green-glow);
}

.work-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
    align-items: flex-start;
}

.work-item {
    width: 320px;
    flex: 0 0 320px;
    background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.98));
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    height: 380px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.work-item:hover,
.work-item:focus {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 136, 0.15);
    outline: none;
}

.work-item:focus-visible {
    border-color: rgba(0, 255, 136, 0.8);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 136, 0.25),
        0 0 0 3px rgba(0, 255, 136, 0.5);
}


.project-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    backdrop-filter: blur(10px);
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.project-status.completed {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.1);
}

.project-status.in_progress {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.1);
}

.project-status.planned {
    background: rgba(136, 0, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(136, 0, 255, 0.3);
    box-shadow: 0 0 8px rgba(136, 0, 255, 0.1);
}


.work-image {
    width: 100%;
    height: 55%;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 0, 136, 0.05));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    overflow: hidden;
}

.project-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: saturate(0.8) brightness(0.9);
}

.project-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.work-item:hover .project-preview {
    transform: scale(1.05);
    filter: saturate(1.1) brightness(1.1);
}

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

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

.work-content {
    padding: 1.75rem;
    height: 45%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.work-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--white);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.work-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    display: inline-block;
    width: fit-content;
}

.work-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    opacity: 0.9;
    flex-grow: 1;
}

/* ===== PROJECT MODAL ===== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}




/* Responsive Modal */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .project-icon-large {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .modal-title {
        font-size: 2rem;
    }
    
    .project-links {
        flex-direction: column;
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--dark);
    position: relative;
}

#contact-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 1rem;
    border-radius: 10px;
    transition: var(--transition-fast);
}

.contact-item:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateX(10px);
}

.contact-binary {
    font-family: var(--font-mono);
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 10px var(--green-glow);
}

.contact-details h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.contact-details a,
.contact-details span {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-details a:hover {
    color: var(--primary);
    text-shadow: 0 0 5px var(--green-glow);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    color: var(--white);
    text-decoration: none;
    padding: 1rem;
    border: 2px solid var(--gray);
    border-radius: 5px;
    transition: var(--transition-fast);
    font-weight: 600;
    letter-spacing: 1px;
}

.social-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px var(--green-glow);
    transform: translateY(-5px);
}

/* ===== CONTACT FORM ===== */
.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 3rem;
    backdrop-filter: blur(20px);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--gray);
    padding: 1rem 0;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--light-gray);
    letter-spacing: 1px;
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.form-group input:focus + .form-line,
.form-group textarea:focus + .form-line {
    width: 100%;
}

.submit-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 3rem;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.5s ease;
    z-index: -1;
}

.submit-btn:hover::before {
    left: 0;
}

.submit-btn:hover {
    color: var(--black);
    box-shadow: 0 0 30px var(--green-glow);
    transform: translateY(-5px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--darker);
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-content p {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.footer-binary {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .work-grid {
        gap: 2rem;
    }
    
    .work-item {
        width: 300px;
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 2rem;
    }

    .nav-menu {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .hero {
        padding: 8rem 0 4rem;
        min-height: 100vh;
    }

    .hero-content,
    .about-grid,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-title .line {
        display: block;
        margin: 0.2rem 0;
    }

    .hero-subtitle p {
        font-size: 1rem;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .stat {
        min-width: 120px;
    }

    .container {
        padding: 0 2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .work-filters {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        margin: 2rem 0;
    }

    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 80px;
    }

    .work-grid {
        gap: 1.5rem;
        padding: 0;
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .work-item {
        width: 100%;
        height: 380px;
    }

    .work-content {
        padding: 1.5rem;
    }

    .work-title {
        font-size: 1.2rem;
    }

    .work-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .project-status {
        top: 0.8rem;
        right: 0.8rem;
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .about-text {
        text-align: center;
    }

    .skills-binary {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .contact-content {
        gap: 3rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .contact-form input,
    .contact-form textarea {
        font-size: 1rem;
        padding: 1rem 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-number {
        font-size: 4rem;
        top: -1rem;
        opacity: 0.3;
    }

    .interactive-terminal {
        max-width: 100%;
        margin: 2rem 0;
    }

    #terminal-input {
        width: 200px !important;
    }

    body {
        cursor: auto;
    }

    #cursor {
        display: none !important;
    }

    /* Désactiver les animations 3D sur mobile pour les performances */
    #hero-canvas,
    #work-canvas,
    #contact-canvas,
    #profile-canvas {
        display: none;
    }

    .noise-overlay {
        opacity: 0.1;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem 1rem;
    }

    .nav-logo span {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .hero-subtitle p {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat {
        min-width: 100px;
    }

    .binary,
    .contact-binary {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .work-grid {
        padding: 0;
        gap: 1rem;
        max-width: 300px;
    }

    .work-item {
        width: 100%;
        height: 340px;
        max-width: none;
    }

    .work-content {
        padding: 1rem;
    }

    .work-title {
        font-size: 1.1rem;
    }

    .work-description {
        font-size: 0.85rem;
    }

    .filter-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .work-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .project-status {
        font-size: 0.6rem;
        padding: 0.3rem 0.6rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* ===== ANIMATIONS SUPPLÉMENTAIRES ===== */
@keyframes matrix {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

.matrix-char {
    position: absolute;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    animation: matrix 3s linear infinite;
    text-shadow: 0 0 5px var(--green-glow);
}

/* ===== BINARY BACKGROUND GLOBAL ===== */
#binary-background {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* ===== EFFET TEXTE TRANSFORMÉ ===== */
#binary-background .text-transformed {
    color: #ff0088 !important;
    text-shadow: 0 0 15px rgba(255, 0, 136, 0.8) !important;
    opacity: 0.8 !important;
    font-weight: 600 !important;
    animation: textGlow 2s ease-in-out infinite alternate !important;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 0, 136, 0.6);
        opacity: 0.7;
    }
    100% {
        text-shadow: 0 0 20px rgba(255, 0, 136, 1), 0 0 30px rgba(255, 0, 136, 0.8);
        opacity: 1;
    }
}


/* ===== SCROLLBAR PERSONNALISÉE ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--accent));
}

/* ===== PROJECT MODAL STYLES ===== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, rgba(10, 10, 10, 0.98), rgba(15, 15, 15, 0.98));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    width: 90vw;
    max-width: 1200px;
    max-height: 92vh;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 136, 0.1);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

/* Cacher les éléments au début pour l'animation */
.project-modal .modal-header {
    opacity: 0;
    transform: translateY(-100px);
}

.project-modal .gallery-image-container {
    opacity: 0;
    transform: translateX(-50px) scale(0.8);
}

.project-modal .detail-section {
    opacity: 0;
    transform: translateX(50px) rotateY(15deg);
}

.project-modal .project-link {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
}

/* Header du modal */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-close {
    background: transparent;
    border: 1px solid rgba(255, 0, 136, 0.5);
    color: var(--secondary);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

.modal-close:hover {
    background: rgba(255, 0, 136, 0.1);
    border-color: var(--secondary);
    transform: rotate(90deg);
    box-shadow: 0 0 15px rgba(255, 0, 136, 0.3);
}

.project-icon-large {
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    letter-spacing: -0.02em;
}

.project-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.project-category {
    background: rgba(0, 255, 136, 0.15);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Layout principal du modal */
.modal-body {
    display: flex;
    height: calc(92vh - 90px);
    overflow: hidden;
}

.modal-sidebar {
    width: 380px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    display: flex;
    flex-direction: column;
}

.project-status-modal {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.project-status-modal.completed {
    background: rgba(0, 255, 136, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.project-status-modal.in_progress {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.project-status-modal.planned {
    background: rgba(136, 0, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(136, 0, 255, 0.3);
}

/* Galerie d'images dans la sidebar */
.modal-gallery {
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 136, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-image-container:hover {
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.15);
}

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

.gallery-image:hover {
    transform: scale(1.05);
}

/* Modal Fullscreen Image */
.image-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.image-fullscreen.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.8);
    transition: transform 0.4s ease;
}

.image-fullscreen.active .fullscreen-image {
    transform: scale(1);
}

.fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-close:hover {
    background: rgba(255, 0, 136, 0.2);
    border-color: var(--secondary);
    transform: rotate(90deg);
}


/* Contenu principal du modal */
.modal-main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
}

.detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section-title::before {
    content: '>';
    color: var(--secondary);
    font-size: 0.9rem;
}

.project-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: rgba(0, 255, 136, 0.08);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 136, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.2);
}

.features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.features-list li {
    position: relative;
    padding-left: 1.75rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 0.875rem;
}

.features-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    min-width: 160px;
    justify-content: center;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.5s ease;
    z-index: -1;
}

.project-link:hover::before {
    left: 0;
}

.project-link:hover {
    color: var(--black);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.3);
}

.project-link.demo {
    border-color: var(--secondary);
    color: var(--secondary);
}

.project-link.demo::before {
    background: var(--secondary);
}

.project-link.demo:hover {
    color: var(--white);
    box-shadow: 0 15px 35px rgba(255, 0, 136, 0.3);
}

/* Icônes des liens */
.link-icon {
    font-size: 1.1rem;
    line-height: 1;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.project-link:hover .link-icon {
    filter: grayscale(0%);
}

/* Styles spécifiques pour chaque type de lien */
.project-link.website {
    border-color: #00aaff;
    color: #00aaff;
}

.project-link.website::before {
    background: #00aaff;
}

.project-link.website:hover {
    color: var(--white);
    box-shadow: 0 15px 35px rgba(0, 170, 255, 0.3);
}

.project-link.docs {
    border-color: #ffaa00;
    color: #ffaa00;
}

.project-link.docs::before {
    background: #ffaa00;
}

.project-link.docs:hover {
    color: var(--black);
    box-shadow: 0 15px 35px rgba(255, 170, 0, 0.3);
}

.project-link.portfolio {
    border-color: #aa00ff;
    color: #aa00ff;
}

.project-link.portfolio::before {
    background: #aa00ff;
}

.project-link.portfolio:hover {
    color: var(--white);
    box-shadow: 0 15px 35px rgba(170, 0, 255, 0.3);
}

.project-link.figma {
    border-color: #ff6600;
    color: #ff6600;
}

.project-link.figma::before {
    background: #ff6600;
}

.project-link.figma:hover {
    color: var(--white);
    box-shadow: 0 15px 35px rgba(255, 102, 0, 0.3);
}

.project-link.discord {
    border-color: #5865f2;
    color: #5865f2;
}

.project-link.discord::before {
    background: #5865f2;
}

.project-link.discord:hover {
    color: var(--white);
    box-shadow: 0 15px 35px rgba(88, 101, 242, 0.3);
}

/* Message quand pas de liens */
.no-links {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Responsive modal */
@media (max-width: 1024px) {
    .modal-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .modal-body {
        flex-direction: column;
        height: auto;
        max-height: calc(90vh - 100px);
    }
    
    .modal-sidebar {
        width: 100%;
        max-height: 320px;
    }
    
    .modal-main-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 98vw;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .modal-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
    }
    
    .modal-title-section {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .project-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-sidebar {
        max-height: 280px;
    }
    
    .modal-gallery {
        padding: 1rem;
    }
    
    .gallery-main {
        aspect-ratio: 16/9;
    }
    
    .modal-main-content {
        padding: 1rem;
        gap: 1.25rem;
    }
    
    .detail-section {
        padding: 1.25rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .project-link {
        padding: 0.875rem 1.5rem;
        justify-content: center;
    }
}

/* ===== BLACK HOLE CARD EFFECTS ===== */
.black-hole-card {
    position: relative;
    overflow: hidden;
}

.black-hole-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.9) 70%, black 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.binary-orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.orbit-binary {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
    opacity: 0.8;
    animation: orbitGlow 2s ease-in-out infinite alternate;
}

@keyframes orbitGlow {
    0% {
        text-shadow: 0 0 5px var(--primary);
        opacity: 0.6;
    }
    100% {
        text-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary);
        opacity: 1;
    }
}

.matrix-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 136, 0.05) 2px,
            rgba(0, 255, 136, 0.05) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 136, 0.05) 2px,
            rgba(0, 255, 136, 0.05) 4px
        );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.work-item:hover .matrix-background {
    opacity: 1;
}

/* ===== GLITCH MUTATIONS ===== */
.letter.mutating {
    color: var(--accent);
    text-shadow: 
        0 0 5px var(--accent),
        0 0 10px var(--accent),
        0 0 15px var(--accent);
    animation: glitchMutate 0.15s linear infinite;
}

@keyframes glitchMutate {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* ===== RESPONSIVE MODAL ===== */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .project-icon-large {
        font-size: 3rem;
    }
    
    .gallery-thumbnails {
        flex-wrap: wrap;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .project-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}