:root {
    --bg: #050505;
    --white: #ffffff;
    --gray: #b0b0b0;
    --accent: #64ffda;
    --accent-glow: rgba(100, 255, 218, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --font-head: 'Syncopate', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg); color: var(--white); font-family: var(--font-body); overflow-x: hidden; }

.scroll-progress-track {
    position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: rgba(255,255,255,0.1); z-index: 99999;
}
.scroll-progress-bar {
    height: 100%; width: 0%; background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: width 0.1s;
}

#canvas-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; opacity: 0.8; }

.floating-shapes { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.shape { position: absolute; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: 0.1; border-radius: 50%; filter: blur(80px); }
.shape-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: float 10s infinite alternate; }
.shape-2 { width: 300px; height: 300px; bottom: -50px; right: -50px; animation: float 15s infinite alternate-reverse; }
@keyframes float { from { transform: translate(0,0); } to { transform: translate(20px, 40px); } }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: #fff; }
.text-accent { color: var(--accent); }
.text-gray { color: var(--gray); }
.text-stroke { -webkit-text-stroke: 1px #fff; color: transparent; }

.font-head-bold { font-family: var(--font-head); font-size: 0.8rem; font-weight: 700; transition: color 0.3s; }

@media (hover: hover) {
    * { cursor: none !important; }
    .cursor-dot {
        width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
        position: fixed; pointer-events: none; z-index: 100001; transform: translate(-50%, -50%);
    }
    .cursor-outline {
        width: 40px; height: 40px; border: 1px solid var(--accent);
        position: fixed; pointer-events: none; z-index: 100000; transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, transform 0.3s;
        display: flex; align-items: center; justify-content: center;
    }
    body:not(.hovered) .cursor-outline { animation: rotateCursor 10s linear infinite; }
    body.hovered .cursor-outline { width: 60px; height: 60px; background: rgba(100, 255, 218, 0.1); border-color: var(--accent); animation: none; }
    body.view-mode .cursor-outline { width: 80px; height: 80px; background: var(--accent); mix-blend-mode: difference; animation: none; }
    body.view-mode .cursor-outline::after { content: 'VOIR'; font-family: var(--font-head); font-size: 0.7rem; color: #000; font-weight: 700; }
}
@keyframes rotateCursor { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (hover: none) { .cursor-dot, .cursor-outline { display: none; } }

.preloader { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s; }
.sys-text { color: var(--accent); font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 15px; }
.loader-bar-bg { width: 200px; height: 2px; background: rgba(255,255,255,0.1); }
.loader-bar { width: 0%; height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: width 0.1s; }

.project-modal { 
    position: fixed; inset: 0; z-index: 99999; 
    opacity: 0; visibility: hidden; transition: opacity 0.3s; 
    display: flex; align-items: center; justify-content: center; 
}
.project-modal.active { opacity: 1; visibility: visible; }

.modal-backdrop { 
    position: absolute; inset: 0; 
    background: rgba(0, 0, 0, 0.95); 
    z-index: 1;
}

.modal-content { 
    position: relative; background: #0a0a0a; border: 1px solid var(--border); 
    width: 90%; max-width: 800px; max-height: 90vh; 
    border-radius: 8px; box-shadow: 0 0 50px rgba(0,0,0,0.9); 
    z-index: 2; 
    overflow: hidden; display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateY(20px); transition: transform 0.4s ease-out;
}
.project-modal.active .modal-content { transform: translateY(0); }

.modal-scroll-area { padding: 50px; overflow-y: auto; max-height: 100%; }

.close-modal { 
    position: absolute; top: 20px; right: 20px; background: none; border: none; 
    color: #fff; font-size: 2rem; cursor: pointer; z-index: 10;
    transition: 0.3s;
}
.close-modal:hover { color: var(--accent); transform: rotate(90deg); }

.modal-cat { color: var(--accent); font-family: var(--font-head); font-size: 0.9rem; letter-spacing: 2px; display: block; margin-bottom: 15px; }
.modal-title { font-size: 3rem; margin-bottom: 30px; line-height: 1.1; color: #fff; text-transform: uppercase; }
.modal-meta { display: flex; gap: 40px; margin-bottom: 40px; font-size: 1rem; color: #ccc; border-bottom: 1px solid var(--border); padding-bottom: 30px; }
.modal-meta i { color: var(--accent); margin-right: 10px; }
.modal-desc { color: #dcdcdc; line-height: 1.8; margin-bottom: 40px; font-size: 1.1rem; }
.modal-link { background: var(--accent); color: #000 !important; box-shadow: 0 0 20px rgba(100, 255, 218, 0.4); padding: 15px 40px; font-size: 1rem; }
.modal-link:hover { background: #fff; box-shadow: 0 0 30px rgba(255,255,255,0.5); }

.navbar { padding: 20px 0; background: rgba(5,5,5,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.navbar-brand { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.2rem; }
.navbar-brand .dot { color: var(--accent); }
.menu-btn { cursor: pointer; color: #fff; display: flex; align-items: center; gap: 10px; }
.hamburger span { display: block; width: 25px; height: 2px; background: #fff; margin-bottom: 5px; }

.menu-overlay { position: fixed; inset: 0; background: #000; z-index: 9990; transform: translateY(-100%); transition: 0.5s; display: flex; align-items: center; justify-content: center; }
.menu-overlay.active { transform: translateY(0); }
.menu-container { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 50px; }
.menu-link { font-family: var(--font-head); font-size: 2.5rem; color: #fff; text-decoration: none; display: block; margin: 15px 0; transition: 0.3s; }
.menu-link:hover { color: var(--accent); transform: translateX(10px); }
.menu-socials { display: flex; gap: 30px; border-top: 1px solid var(--border); padding-top: 30px; width: 100%; justify-content: center; }
.menu-social-link { color: var(--gray); text-decoration: none; font-size: 0.9rem; font-family: var(--font-head); transition: 0.3s; }
.menu-social-link:hover { color: var(--accent); }

.hero-title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.2; margin-bottom: 30px; }
.status-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 50px; font-size: 0.8rem; background: rgba(255,255,255,0.02); }
.pulse { width: 8px; height: 8px; background: #0f0; border-radius: 50%; box-shadow: 0 0 10px #0f0; animation: pulse 2s infinite; }
@keyframes pulse { 0% {opacity: 1;} 50% {opacity: 0.5;} 100% {opacity: 1;} }

.btn-neon { padding: 12px 30px; border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-family: var(--font-head); font-size: 0.8rem; font-weight: 700; transition: 0.3s; display: inline-block; }
.btn-neon:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px var(--accent); }

.about-frame { border: 1px solid var(--border); padding: 10px; }
.about-frame img { width: 100%; display: block; }

.work-section { overflow: hidden; width: 100%; height: 100vh; position: relative; }
.work-container { display: flex; flex-wrap: nowrap; width: max-content; height: 100%; }
.work-item { width: 100vw; height: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); position: relative; }

.work-intro { flex-direction: column; text-align: center; padding: 0 20px; }
.project-card { padding: 0 5vw; flex-direction: column; }
.project-content { width: 100%; max-width: 1000px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; }

@media (max-width: 991px) {
    .project-content { grid-template-columns: 1fr; gap: 30px; }
    .project-img { height: 300px; }
    .project-info h3 { font-size: 1.8rem; }
    .work-item { border-right: none; }
    .work-intro p { font-size: 0.9rem; }
}

.project-img { width: 100%; height: 400px; position: relative; overflow: hidden; border-radius: 5px; border: 1px solid var(--border); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; filter: grayscale(100%); }
.project-card:hover img { filter: grayscale(0%); transform: scale(1.05); }
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.project-card:hover .overlay { opacity: 1; }
.overlay span { border: 1px solid #fff; padding: 10px 20px; border-radius: 30px; font-size: 0.8rem; color: #fff; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); }

.project-trigger-btn { background: transparent; border: none; font-family: var(--font-body); cursor: pointer; color: #fff; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; font-size: 0.9rem; transition: 0.3s; margin-top: 20px; }
.project-trigger-btn:hover { color: var(--accent); }

.bg-darker { background: #080808; }
.skill-box { background: rgba(255,255,255,0.02); border: 1px solid var(--border); padding: 30px; border-radius: 10px; transition: 0.3s; height: 100%; text-align: center; }
.skill-box:hover { border-color: var(--accent); transform: translateY(-5px); }

.cert-img-container {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.cert-img-container img {
    filter: drop-shadow(0 0 10px rgba(100, 255, 218, 0.2));
}

.hover-accent:hover { color: var(--accent) !important; text-shadow: 0 0 20px var(--accent); }

.mobile-scroll-hint {
    animation: pulse-horizontal 2s infinite;
}
@keyframes pulse-horizontal {
    0% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0.5; }
}

@media (max-width: 767px) {
    .mobile-scroll-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 15px;
    }
    .mobile-scroll-row::-webkit-scrollbar {
        display: none;
    }
    .mobile-scroll-row > div {
        flex: 0 0 85%;
        max-width: 85%;
        scroll-snap-align: center;
    }
}