

:root {
    --primary-color: #ff7271;
    --secondary-color: #51abb2;
    --background-color: #339097;
    --text-color: #ffffff;
    --glow-color: rgba(255, 117, 165, 0.5);
    --card-bg: rgba(255, 255, 255, 0.05);
}
/* Variables */


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

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}





/* 📌 Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.68rem 0.68rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
}

/* 📌 Conteneur pour aligner le menu burger & le bouton thème */
/* 📌 Conteneur pour aligner le menu burger & le bouton thème */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem; /* Espacement entre les boutons */
    justify-content: flex-end; /* Aligner les éléments à droite */
}
/* 📌 Masquer le menu burger sur desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

/* 📌 Afficher correctement le bouton thème */
#theme-toggle {
    display: block; /* Toujours visible sur grand écran */
    margin-left: auto; /* Pousse complètement à droite */
}

/* 📌 Responsive : afficher le burger et masquer le bouton thème */
@media (max-width: 768px) {
    /* Afficher le menu burger */
    .nav-toggle {
        display: flex;
    }

    /* Cacher le bouton thème */
    #theme-toggle {
        display: none;
    }
}

.bar {
    width: 30px;
    height: 4px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.4s;
}

/* 📌 Menu Desktop */
.nav-links {
    display: flex;
    
    gap: 2rem;
    list-style: none;
}

/* 📌 Responsive : activer le burger sur mobile */
@media (max-width: 768px) {
    /* Masquer le bouton thème sur mobile */
    #theme-toggle {
        display: none;
    }

    /* Afficher le menu burger */
    .nav-toggle {
        display: flex;
    }

    /* Ajuster le menu */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.95);
        text-align: center;
        padding: 1rem 0;
    }

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

    /* Animation pour transformer le burger en "X" */
    .nav-toggle.open .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.open .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}


.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    position: relative;
}

/* Glowing Effects */
.glow-text {
    text-shadow: 0 0 10px var(--glow-color);
}

.glow-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--glow-color);
}

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

.glow-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    background: var(--primary-color);
    color: var(--background-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px var(--glow-color);
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--glow-color);
}

.glow-button.outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.glow-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.glow-icon:hover {
    text-shadow: 0 0 10px var(--glow-color);
    transform: scale(1.1);
}

/* Home Section */
.home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.particle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--glow-color) 0%, transparent 70%);
    opacity: 0.1;
}

.content {
    text-align: center;
    z-index: 1;
    justify-content: center;
    align-items: center;
}

 /* Glitch Effect */


.middle{
    
    font-weight: bold;
    position: relative;
    display: inline-block; /* Assure que le texte garde sa forme */
    text-shadow: 0.05em 0 0 var(--primary-color),
                -0.05em -0.025em 0 var(--secondary-color);
}

.text{
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;

}

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

.text::before{
  color: var(--secondary-color);
  animation: glitch-effect 3s infinite;
}

.text::after{
  color: var(--primary-color);
  animation: glitch-effect 2s infinite;
}

@keyframes glitch-effect {
  0%{
    left: -2px;
    top: -2px;
  }
  25%{
    left: 2px;
    top: 0px;
  }
  50%{
    left: -1px;
    top: 2px;
  }
  75%{
    left: 1px;
    top: -1px;
  }
  100%{
    left: 0px;
    top: -2px;
  }
}

/* Typing Effect */
.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}


/* Scroll Animation */
@keyframes scroll {
    0% {
        transform: translate(-50%, 0); 
        opacity: 1;
    }
    50% {
        opacity: 0.5;  /* Fade out slightly in the middle of the animation */
    }
    100% {
        transform: translate(-50%, 20px); 
        opacity: 0; /* Fade completely at the end */
    }
}


/* About Section */
.about {
    padding: 6rem 2rem;
}

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

.about-content {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-card {
    flex: 1;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.profile-card img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}


/* Projects Section */
.projects {
    padding: 6rem 2rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-info {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: rgba(10, 25, 47, 0.9);
    transition: bottom 0.3s;
}

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

.project-card:hover .project-info {
    bottom: 0;
}

/* Contact Section */
.contact {
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.02);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: none;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
}

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

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.form-group input:focus ~ .focus-border,
.form-group textarea:focus ~ .focus-border {
    width: 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .about-content {
        flex-direction: column;
    }

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

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

[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}




/* About Section */
.about-text {
    background-color: #0a192f; /* Dark background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #fff; /* White text color */
    font-size: 1.1rem;
    line-height: 1.6;
}

.about-text p {
    margin-bottom: 2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8); /* Light gray for description text */
}


/* Glowing border effect on hover */
.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 0 15px rgba(255, 117, 165, 1), /* Green glowing border */
        0 0 15px rgba(255, 117, 165, 1),   /* Red glowing border */
        0 0 15px rgba(255, 117, 165, 1);   /* Blue glowing border */
    border: 4px solid; /* Make the border solid on hover */
    border-color: #ff7271; /* Green border */
}

/* Counter animation */
.counter {
    font-size: 3rem;
    font-weight: bold;
    color: #ff7271; /* Bright green for counter numbers */
    transition: transform 0.3s ease-in-out;
}

/* Animation for counters */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}
@layer reset, base, utilities, components, layout, overrides;

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@property --direction {
  syntax: '<number>';
  initial-value: 1;
  inherits: true;
}

@layer reset {
  *,
  ::before,
  ::after {
    box-sizing: border-box;
  }

  :where(:not(dialog)) {
    margin: 0;
  }

  :where(html) {
    -webkit-text-size-adjust: none;

    @media (prefers-reduced-motion: no-preference) {
      scroll-behavior: smooth;
    }
  }

  :where(body) {
    min-block-size: 100svb;
    -webkit-font-smoothing: antialiased;
  }
}

@layer base {
  html {
    --surface-1: oklch(20% 0.03 269);
    --surface-2: oklch(26% 0.04 269);
    --text-1: oklch(91% 0.03 61);
    --body: 400 1rem/1.5rem system-ui, sans-serif;
    --display: 400 3.562rem/4rem system-ui, sans-serif;
    --display-small: 400 2.25rem/2.75rem system-ui, sans-serif;
    --label: 500 0.875rem/1.25rem system-ui, sans-serif;
    --title: 400 1.375rem/1.75rem system-ui, sans-serif;
    color-scheme: dark;
  }

  body {
    background-color: var(--surface-1);
    color: var(--text-1);
    font: var(--body);
  }
}
 
@layer layout {
  .section {
    display: grid;
    max-inline-size: 100%;
    min-block-size: 100svb;
    overflow-x: clip;
    padding-block: 80px;
    place-items: center;
  }

  .section-wrapper {
    display: grid;
    place-items: center;
  }

  .header {
    display: grid;
    place-items: center;
    gap: 16px;
    z-index: 2;

    /* lg-n-above */
    @media (width >=1024px) {
      /* Placing header and cards in the same grid cell to stack them */
      /* Both elements use grid-area: 1/1 to overlap within the same area */
      grid-area: 1/1;
    }
  }

  .hgroup {
    display: grid;
    place-items: center;
    gap: 8px;
    margin-bottom: auto;
  }

  .headline {
    font: var(--display-small);


    /* lg-n-above */
    @media (width >=1200px) {
      font: var(--display);
    }
  }

  .section-link {
    color: var(--text-1);
    text-decoration: underline;
    font: var(--label);

    /* lg-n-below */
    @media (width < 1024px) {
      display: none;
    }
  }

  .cards {
    list-style: none;
    padding: 0;

    /* lg-n-below */
    @media (width < 1024px) {
      display: grid;
      grid-auto-flow: column;
      gap: 32px;
      max-inline-size: 100%;
      overflow-x: scroll;
      padding-block: 32px;
      padding-inline: 32px;
    }

    /* lg-n-above */
    @media (width >=1024px) {
      --avatar-opacity: 1;
      --avatar-img-scale: 1;
      --tooltip-visibility: hidden;
      --tooltip-opacity: 0;
      --animation-state: running;

      display: grid;
      /* Placing header and cards in the same grid cell to stack them */
      /* Both elements use grid-area: 1/1 to overlap within the same area */
      grid-area: 1/1;
      min-block-size: 700px;
      place-items: center;

      &:has(.avatar-link-wrapper:is(:hover, :focus-visible, :active)) {
        --animation-state: paused;
        /* Reduces opacity of non-hovered avatars to create a layered effect */
        --avatar-opacity: 0.4;
      }
    }
  }

  .card {
    padding: 0;

    /* lg-n-above */
    @media (width >=1024px) {
      --radius: min(620px, 40cqi);
      --offset-per-child: calc(360deg / (var(--nth-siblings) + 1));
      --angle-offset: calc(var(--nth-child) * var(--offset-per-child));
      --inline-ratio: 1/1;
      /* Keeps the horizontal scaling unchanged */
      --block-ratio: 1/2;
      /* Reduces vertical scaling, making it an oval */

      /* Adjusts tooltip direction based on avatar position */
      /* Future improvement: Replace with the sign() CSS function when it becomes widely supported */
      /* Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/sign */
      --direction: min(max(calc(cos((var(--angle) + var(--angle-offset))) * -100), -1), 1);
      
      /* Stack all cards in the same grid cell */
      grid-area: 1/1;

      /* Based on Bramus' article, modified with inline/block ratios to create an oval shape */
      /* Source: https://web.dev/articles/css-trig-functions */

      translate: calc(cos((var(--angle) + var(--angle-offset))) * var(--radius) * var(--inline-ratio))
        calc(sin((var(--angle) + var(--angle-offset))) * var(--radius) * var(--block-ratio) * -1);

      animation: adjust-angle linear 40s infinite reverse var(--animation-state);
    }
  }
   
}
  /* Continuously rotates the avatars in a circular motion */
  @keyframes adjust-angle {
    to {
      --angle: 360deg;
    }
  }

  .avatar-link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-1);

    &:is(:hover, :focus-visible, :active) {
      --avatar-img-scale: 1.1;
      --avatar-opacity: 1;
      --tooltip-opacity: 1;
      --tooltip-visibility: visible;
    }

    /* lg-n-below */
    @media (width < 1024px) {
      flex-direction: column;
      gap: 16px;
    }
  }

  .visual {
    aspect-ratio: 1;
    border-radius: 1rem;
    box-shadow: 0 2px 4px 0 oklch(0 0 0 / 10%);
    inline-size: 240px;
    opacity: var(--avatar-opacity);
    overflow: clip;
    transition: opacity 0.3s ease;

    /* lg-n-above */
    @media (width >=1024px) {
      inline-size: 144px;
      border-radius: 1e5px;
    }
  }

  .avatar-img {
    background-color: var(--surface-2);
    block-size: 100%;
    display: block;
    inline-size: 100%;
    object-fit: cover;
    scale: var(--avatar-img-scale, 1);
    transition: scale 0.3s ease;
  }

  .tooltiptext {
    display: grid;
    gap: 4px;

    /* lg-n-above */
    @media (width >=1024px) {
      position: absolute;
      /* Adjusts tooltip placement based on avatar position */
      /* Moves the tooltip to the left or right depending on the avatar's location */
      /* --direction is either 1 (right) or -1 (left) */
      max-inline-size: 20ch;
      opacity: var(--tooltip-opacity);
      transition-duration: 0.3s;
      transition-property: opacity, visibility;
      transition-timing-function: ease;
      translate: 110% 0;
      visibility: var(--tooltip-visibility);

      /* make the tooltips non-interactive */
      pointer-events: none;
      user-select: none;

      /* Adjusts text alignment based on avatar position */
      /* Ensures the tooltip text aligns properly when shifted left or right */
      @container style(--direction: -1) {
        text-align: end;
        translate: -110% 0;
      }
    }
  }

  .team-name {
    font: var(--title);
  }
}

