:root {
    --primary-blue: #0066cc;
    --secondary-blue: #00a1ff;
    --light-blue: #e6f3ff;
    --accent-blue: #00ccff;
    --accent-purple: #6c63ff;
    --accent-cyan: #00e5ff;
    --gradient-start: #0066cc;
    --gradient-end: #00ccff;
    --text-dark: #1a1a2e;
    --text-light: #ffffff;
    --hover-blue: #0052cc;
    --grid-size: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-blue);
}

.navbar {
    background-color: rgba(0, 102, 204, 0.95);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.2);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.nav-brand a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-brand a:hover {
    color: var(--accent-cyan);
}

.nav-brand .brand-k {
    color: rgba(26, 26, 46, 0.7);
}

.nav-brand a:hover .brand-k {
    color: rgba(26, 26, 46, 0.7);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    margin: 0;
    grid-column: 2;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-cyan);
}

.lang-switch {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--text-light);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    background-color: var(--text-light);
    color: var(--primary-blue) !important;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    grid-column: 3;
    justify-self: end;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-light);
    position: relative;
    transition: background-color 0.3s;
    margin: 10px auto;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-light);
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

@media (max-width: 768px) {
    .navbar {
        grid-template-columns: auto 1fr auto;
        padding: 1rem 2rem;
    }

    .navbar-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(0, 102, 204, 0.95);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        display: flex;
    }

    .navbar.active .hamburger {
        background-color: transparent;
    }

    .navbar.active .hamburger::before {
        transform: translateY(6px) rotate(45deg);
    }

    .navbar.active .hamburger::after {
        transform: translateY(-6px) rotate(-45deg);
    }
}

header {
    color: var(--text-light);
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(45deg, 
        var(--primary-blue),
        var(--accent-purple),
        var(--accent-blue),
        var(--accent-cyan));
    background-size: 500% 500%;
    animation: gradientFlow 15s ease infinite;
}

.header-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 400%;
    height: 400%;
    border-radius: 80%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.2));
    animation: rotate 20s linear infinite;
}

.geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--accent-blue) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-blue) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--accent-cyan) 1px, transparent 2px);
    background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), calc(var(--grid-size) * 2) calc(var(--grid-size) * 2);
    opacity: 0.1;
    animation: slide 20s linear infinite;
}

.geometric-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
        var(--accent-purple) 0%,
        transparent 1px,
        transparent 50%);
    background-size: var(--grid-size) var(--grid-size);
    opacity: 0.05;
    animation: shimmer 10s linear infinite;
}

.mt-4 {
    margin-top: 1rem;
}

#about p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* Position par défaut pour desktop */
    background: var(--primary-blue);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top:hover {
    background: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#back-to-top.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        opacity: 0.03;
    }
    50% {
        opacity: 0.08;
    }
    100% {
        opacity: 0.03;
    }
}

@keyframes slide {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(var(--grid-size)) translateY(0);
    }
    50% {
        transform: translateX(var(--grid-size)) translateY(var(--grid-size));
    }
    75% {
        transform: translateX(0) translateY(var(--grid-size));
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(0, 204, 255, 0.2));
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
}

.logo {
    margin-bottom: 2rem;
}

.logo-img {
    width: 150px;
    height: auto;
    /*filter: brightness(0) invert(1);*/
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1);
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
}

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

.section-card {
    background: var(--text-light);
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    overflow: hidden;
}

.section-icon {
    text-align: center;
    margin: -2rem -2rem 2rem -2rem;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
}

.section-icon i {
    font-size: 4rem;
    color: var(--text-light);
    position: relative;
    z-index: 2;
}

.icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 50% 50%, var(--accent-blue) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 102, 204, 0.2);
}

.section-card h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.experience h3 {
    color: var(--secondary-blue);
    margin-bottom: 0.5rem;
}

.position {
    font-weight: 500;
    color: var(--accent-blue);
}

.duration {
    font-style: italic;
    margin-bottom: 1rem;
}

.teaching-role ul {
    list-style: none;
    margin-top: 1rem;
}

.teaching-role li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.teaching-role li:before {
    content: '•';
    color: var(--accent-blue);
    position: absolute;
    left: 0;
}

.passions-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.passion-item, .project-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light-blue), #ffffff);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 102, 204, 0.1);
    overflow: hidden;
}

.passion-icon-wrapper, .project-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passion-icon-bg, .project-icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    opacity: 0.1;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.passion-item:hover .passion-icon-bg {
    transform: scale(1.1);
    opacity: 0.2;
}

.passion-item i, .project-item i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.passion-item:hover i, .project-item:hover i {
    transform: scale(1.1);
}

.passion-item:hover, .project-item:hover {
    transform: translateY(-5px);
}

.passion-item i, .project-item i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.passion-item h3, .project-item h3  {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.project-link {
    text-decoration: none;
    color: var(--secondary-blue);
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--text-dark);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--primary-blue);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--light-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

.social-links a:hover {
    color: var(--text-light);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--primary-blue);
    color: var(--text-light);
    margin-top: 4rem;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

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