/* Variables */
:root {
    --color-background: #0a0a0a;
    --color-text: #ffffff;
    --color-primary: #00c8ff;
    --color-secondary: #444444;
    --color-accent: #ff3366;
    --color-dark: #1a1a1a;
    --color-light: #f5f5f5;
    --font-main: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
    --section-padding: 100px 0;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-color: var(--color-background);
    background-image: linear-gradient(to bottom right, rgba(0, 200, 255, 0.05), rgba(255, 51, 102, 0.05));
}

/* Ajustements pour les sections avec le fond de particules */
.section {
    position: relative;
    z-index: 1;
}

.dark-bg {
    position: relative;
    background-color: rgba(26, 26, 26, 0.8);
    /* Semi-transparent pour voir les particules */
}

/* Ajustements pour la section hero */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/noise.png');
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

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

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loader .letter {
    font-size: 5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 0 10px;
    animation: pulse 1.5s infinite ease-in-out;
}

.loader .letter:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.95);
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 2px;
}

.logo a:hover {
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--color-text);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 20px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    box-shadow: inset 0 0 0 2px var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* Sections */
.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 50px;
    color: var(--color-text);
    opacity: 0.8;
}

.sub-section-title {
    font-size: 2rem;
    margin-top: 60px;
    margin-bottom: 30px;
}

.dark-bg {
    background-color: var(--color-dark);
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-background);
    background-image: linear-gradient(to right, rgba(0, 200, 255, 0.1), rgba(255, 51, 102, 0.1));
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/noise.png');
    opacity: 0.05;
    z-index: 0;
}

.hero .container {
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.glitch {
    position: relative;
    color: var(--color-text);
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-primary);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--color-accent);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    5% {
        clip: rect(80px, 9999px, 95px, 0);
    }

    10% {
        clip: rect(15px, 9999px, 25px, 0);
    }

    15% {
        clip: rect(54px, 9999px, 65px, 0);
    }

    20% {
        clip: rect(33px, 9999px, 22px, 0);
    }

    25% {
        clip: rect(10px, 9999px, 85px, 0);
    }

    30% {
        clip: rect(90px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(0, 0, 0, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    5% {
        clip: rect(20px, 9999px, 30px, 0);
    }

    10% {
        clip: rect(85px, 9999px, 95px, 0);
    }

    15% {
        clip: rect(40px, 9999px, 50px, 0);
    }

    20% {
        clip: rect(5px, 9999px, 15px, 0);
    }

    25% {
        clip: rect(70px, 9999px, 80px, 0);
    }

    30% {
        clip: rect(25px, 9999px, 35px, 0);
    }

    100% {
        clip: rect(0, 0, 0, 0);
    }
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero .description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-text);
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--color-text);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

.arrow span {
    display: block;
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--color-text);
    border-right: 2px solid var(--color-text);
    transform: rotate(45deg);
    animation: arrow 2s infinite;
}

@keyframes arrow {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* About section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
    margin-top: 20px;
}

.about-image {
    position: relative;
}

.image-frame {
    width: 100%;
    height: 0;
    padding-bottom: 125%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.profile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.about-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 30px;
}

.about-card {
    padding: 30px;
    background-color: var(--color-dark);
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
}

.about-card:first-child {
    grid-column: 1 / -1;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.about-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.about-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}


/* Interests */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.interest-card {
    padding: 30px;
    background-color: var(--color-dark);
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
}

.interest-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.interest-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.interest-card h4 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 75%;
    background-color: white;
}

.project-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
}

.project-overlay h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.5s ease;
}

.project-overlay span {
    color: var(--color-primary);
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.1);
}

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

.project-item:hover .project-overlay h3,
.project-item:hover .project-overlay span {
    transform: translateY(0);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--color-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-background);
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -25px;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}

.timeline-content {
    padding: 30px;
    background-color: var(--color-dark);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Achievements section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.achievement-card {
    padding: 40px 30px;
    background-color: var(--color-background);
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.achievement-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: var(--color-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.achievement-card:hover .achievement-icon {
    background-color: var(--color-primary);
}

.achievement-icon i {
    font-size: 2.5rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.achievement-card:hover .achievement-icon i {
    color: var(--color-background);
}

.achievement-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Passions section */
.passions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.passion-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: 100%;
    transition: var(--transition);
}

.passion-card:hover {
    transform: translateY(-10px);
}

.passion-image {
    height: 250px;
    overflow: hidden;
}

.passion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.passion-card:hover .passion-image img {
    transform: scale(1.1);
}

.passions-grid {
    margin-top: 20px;
}

.passion-content {
    padding: 30px;
    flex-grow: 1;
}

.passion-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Hobbies */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.hobby-card {
    padding: 30px;
    background-color: var(--color-dark);
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.hobby-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.hobby-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: var(--color-background);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.hobby-card:hover .hobby-icon {
    background-color: var(--color-primary);
}

.hobby-icon i {
    font-size: 2.5rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.hobby-card:hover .hobby-icon i {
    color: var(--color-background);
}

.hobby-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Contact section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.contact-form {
    padding: 40px;
    background-color: var(--color-background);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--color-dark);
    border: none;
    border-radius: 4px;
    color: var(--color-text);
    font-family: var(--font-main);
    resize: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.form-group textarea {
    min-height: 150px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.contact-item p a {
    color: var(--color-text);
    transition: var(--transition);
}

.contact-item p a:hover {
    color: var(--color-primary);
}

/* Footer */
footer {
    padding: 60px 0 30px;
    background-color: var(--color-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: var(--color-background);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--color-primary);
    transform: translateY(-5px);
}

.footer-social i {
    font-size: 1.2rem;
    color: var(--color-text);
}

.footer-social a:hover i {
    color: var(--color-background);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-background);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-text);
}

/* Media queries */
@media (max-width: 992px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero h1 {
        font-size: 4rem;
    }

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

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        padding-right: 0;
    }

    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        left: 5px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero .subtitle {
        font-size: 1.3rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--color-background);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-card:first-child {
        grid-column: 1;
    }
}

@media (max-width: 576px) {
    :root {
        --section-padding: 50px 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

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

    .about-content,
    .interests-grid,
    .hobbies-grid,
    .projects-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 30px 20px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    animation: slideUp 1s ease forwards;
}

.slide-right {
    animation: slideRight 1s ease forwards;
}

.slide-left {
    animation: slideLeft 1s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

@keyframes slideRight {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}