* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background: black;
    color: white;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

.header-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.navbar {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 30px;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    transition: all 0.3s ease;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
.navbar.expanded {
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(10px);
}

.navbar.collapsed {
    width: 60px;
    height: 60px;
    left: 30px;
    transform: translateX(0);
    cursor: pointer;
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar.collapsed.active {
    width: 60%;
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(10px);
}

.menu-icon span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.collapsed ul {
    opacity: 0;
    pointer-events: none;
}

.menu-icon {
    display: none;
    width: 30px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    margin: auto;
}

.navbar.collapsed .menu-icon {
    display: block;
    width: 24px;
    margin-left: 39px;
    margin-top: 5px;
}

.menu-icon span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    margin: 5px 0;
    border-radius: 3px;
}

.navbar ul li {
    display: inline-flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.navbar ul li.dropdown {
    position: relative;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 12px);
    background: rgba(211, 211, 211, 0.15);
    backdrop-filter: blur(12px);
    border: 2px solid white;
    border-radius: 18px;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    min-width: 220px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    z-index: 1100;
}

.dropdown-menu::before,
.dropdown-menu::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-menu::before {
    top: -12px;
    border-style: solid;
    border-width: 12px 14px 0 14px;
    border-color: white transparent transparent transparent;
}

.dropdown-menu::after {
    top: -10px;
    border-style: solid;
    border-width: 11px 13px 0 13px;
    border-color: rgba(211, 211, 211, 0.15) transparent transparent transparent;
}

.dropdown-menu a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 24px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.navbar.collapsed .dropdown-menu {
    display: none;
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 200px 0 135px 0;
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(5px);
    width: 95%;
    padding: 20px;
    border-radius: 0 20px 20px 0;
    margin-right: auto;
    position: relative;
}

.photo {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    margin-right: 20px;
}

.text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    color:white
}

.text-2 {
    font-size: 18px;
    padding: 10px;
    border-radius: 10px;
}

.text-1 {
    font-size: 19px;
    background: gray;
    color: white;
    padding: 10px 50px;
    border-radius: 50px;
    position: absolute;
    bottom: -20px;
    right: 15px;
    cursor: pointer;
}

.projects {
    text-align: center;
    margin: 50px auto;
    width: 100%;
}

.projects-title {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    color: white;
}

.projects-title, 
.project-lines p,
.project-card {
    color: white;
    position: relative;
    z-index: 1;
}

.project-card {
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 15px;
    margin: 50px auto;
    position: relative;
    width: 95%;
    max-width: 800px;
}

.project-card:nth-child(-n+3) {
    border-radius: 20px 0 0 20px;
    margin-left: auto;
    margin-right: 0;
}

.project-card:nth-last-child(-n+1) {
    border-radius: 0 20px 20px 0;
    margin-right: auto;
    margin-left: 0;
}

.project-card:nth-child(-n+2) {
    border-radius: 20px 0 0 20px;
    margin-left: auto;
    margin-right: 0;
}

.project-card:nth-child(n+3):nth-child(-n+4) {
    border-radius: 0 20px 20px 0;
    margin-right: auto;
    margin-left: 0;
}

.project-card:nth-child(5) {
    border-radius: 0 20px 20px 0;
    margin-right: auto;
    margin-left: 0;
}

.reseau .project-card {
    border-radius: 20px 0 0 20px;
    margin-left: auto;
    margin-right: 0;
    margin-top: 50px;
    margin-bottom: 50px;
}

.dev-web .project-card {
    border-radius: 0 20px 20px 0;
    margin-right: auto;
    margin-left: 0;
    margin-top: 50px;
    margin-bottom: 50px;
}

.projects-title::before,
.projects-title::after {
    content: "";
    flex: 1;
    height: 3px;
    background-color: white;
}

.category {
    background: rgba(128, 128, 128, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    padding: 5px 25px;
    font-size: 19px;
    border-radius: 50px;
    position: absolute;
    top: -20px;
    left: 15px;
}

.project-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
}

.project-info {
    backdrop-filter: none;
}

.project-lines {
    border-left: 2px solid white;
    padding-left: 20px;
    margin-left: 10px;
}

.line {
    width: 100%;
    height: 5px;
    background: white;
    border-radius: 5px;
}

/* Animation de pulsation subtile */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 2px 12px rgba(128, 128, 128, 0.4);
    }
}


.project-btn {
    font-size: 19px;
    background: gray;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    position: absolute;
    bottom: -20px;
    right: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
    overflow: visible;
    isolation: isolate;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    animation: none;
}

.project-btn span {
    position: relative;
    z-index: 2;
}

.project-btn .btn-border {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    pointer-events: none;
    z-index: 1;
}

.project-btn .btn-border rect {
    fill: transparent;
    stroke: white;
    stroke-width: 3;
    rx: 24;
    ry: 24;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    transition: stroke-dashoffset 0.7s ease, opacity 0.2s ease;
    opacity: 0;
}

.project-btn:hover .btn-border rect {
    stroke-dashoffset: 0;
    opacity: 1;
}

.project-btn:not(:hover) .btn-border rect {
    stroke-dashoffset: 520;
    opacity: 0;
}

.project-btn:active {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

footer {
    background-color: #333333;
    color: white;
    display: flex;
    justify-content: space-around;
    padding: 20px;
}

.footer-section {
    text-align: center;
    flex: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section h3 {
    margin-bottom: 15px;
}

.footer-section:first-child {
    text-align: center;
}

.footer-section:first-child img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section a {
    color: white;
    text-decoration: underline;
}

.footer-section a:hover {
    color: #cccccc;
    text-decoration: underline;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item img {
    width: 20px;
    height: 20px;
}

.contact-item span {
    vertical-align: middle;
}

/*-------------------- Modal styles --------------------*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1),
                visibility 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    width: min(92%, 640px);
    background: rgba(211, 211, 211, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    padding: 24px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Closing state to play reverse animation */
.modal-overlay.closing {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-overlay.closing .modal {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.modal-image {
    display: block;
    margin: 8px auto 16px auto;
    width: 100%;
    max-width: 560px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.modal-title {
    margin-bottom: 8px;
}

.modal-text p {
    margin: 0 auto 16px auto;
    max-width: 60ch;
}

.skill-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 8px auto 4px auto;
}

.skill-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.skill-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skill-icon-html {
    background: linear-gradient(135deg, #f16529, #e44d26);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-css {
    background: linear-gradient(135deg, #2965f1, #264de4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-js {
    background: linear-gradient(135deg, #f7df1e, #e5c400);
    color: #1d1d1d;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.skill-icon-php {
    background: linear-gradient(135deg, #8892bf, #4f5b93);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-apache {
    background: linear-gradient(135deg, #d42029, #c31724);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-dns {
    background: linear-gradient(135deg, #3b8dff, #1f6fe0);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-rdp {
    background: linear-gradient(135deg, #6c45d6, #4a2ca6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-axel {
    background: linear-gradient(135deg, #2f9f69, #218f59);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-wifi {
    background: linear-gradient(135deg, #f59e0b, #e48700);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-netadmin {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-glpi {
    background: linear-gradient(135deg, #3bb273, #2f9b63);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-wiki {
    background: linear-gradient(135deg, #64748b, #4b5563);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-fog {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-wsus {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-pfsense {
    background: linear-gradient(135deg, #111827, #1f2937);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-snort {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-honeypot {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-communication {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-teamwork {
    background: linear-gradient(135deg, #10b981, #059669);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-moderation {
    background: linear-gradient(135deg, #f97316, #ea580c);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-sql {
    background: linear-gradient(135deg, #336791, #1e4d72);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-ipam {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-graylog {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-zabbix {
    background: linear-gradient(135deg, #d40000, #b30000);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-wazuh {
    background: linear-gradient(135deg, #00a8e8, #0088c7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-haproxy {
    background: linear-gradient(135deg, #2c5282, #1e3a5f);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-icon-veeam {
    background: linear-gradient(135deg, #00b4d8, #0096c7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skill-label {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.modal-download {
    font-size: 19px;
    background: gray;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
}

.modal-download svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.modal-download span {
    vertical-align: middle;
}

/*-------------------- Project cards reveal animation --------------------*/
.project-card {
    transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

/* Initial hidden states (off-screen) */
.project-card.from-left {
    transform: translateX(-60px);
    opacity: 0;
}

.project-card.from-right {
    transform: translateX(60px);
    opacity: 0;
}

/* Visible state */
.project-card.in-view {
    transform: translateX(0);
    opacity: 1;
}

/* When leaving viewport while scrolling up, exit to the opposite side */
.project-card.out-reverse.from-left {
    transform: translateX(60px);
    opacity: 0;
}

.project-card.out-reverse.from-right {
    transform: translateX(-60px);
    opacity: 0;
}