@import "variables.css"; 

.navbar{
    background-color: var(--module-bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 2rem;
    height: 80px;
}

header{
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    margin-left: auto;
}

.menu li{
    position: relative;
    margin-left: 1rem;
}


.menu li a{
    color: var(--navbar-text-color);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}


.menu li a:hover{
    color: var(--text-color);
}

.submenu {/* cacher de base */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 8px;
    background-color: var(--module-secondary-bg-color);
    border-radius: 6px;
    min-width: 150px;
    list-style: none;
}

.menu li:hover .submenu {
    display: block;
    padding: 2px 2px;
}

.submenu li a {
    color: var(--navbar-text-color);
    display: block;
    transition: color 0.3s ease;
}

.submenu li a:hover {
    color: var(--text-color);
    background-color: var(--skills-bg-color);
}

.logo {
    color: var(--logo-color);
    text-decoration: none;
    font-family: 'courier new', monospace;
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
}

.logo-detail {
    color: var(--logo-detail-color);
    font-size: 2rem;
}


.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--loader-bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: disappear 0.5s ease forwards;
  animation-delay: 1.5s;
}

.contact-page .loader-overlay, .projects-page .loader-overlay {
  animation-delay: 2.5s;
}

html, body {
    overflow-x : hidden;
    max-width: 100%;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: clamp(40px, 15vw, 120px);
  aspect-ratio: 1;
  display: grid;
  border: 4px solid #0000;
  border-radius: 50%;
  border-right-color: var(--logo-detail-color);
  animation: l15 1s infinite linear;
}
.loader::before,
.loader::after {    
  content: "";
  grid-area: 1/1;
  margin: 2px;
  border: inherit;
  border-radius: 50%;
  animation: l15 2s infinite;
}
.loader::after {
  margin: 8px;
  animation-duration: 3s;
}
@keyframes l15{ 
  100%{transform: rotate(1turn)}
}


body{
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-shadow: inset 0 0 5em 1em rgba(0, 38, 255, 0.5);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        box-shadow: inset 0 0 5em 1em rgba(0, 38, 255, 0.5);
    }
    50% {
        box-shadow: inset 0 0 5em 2em rgba(0, 38, 255, 0.8);
    }
    
}

.big-title {
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 8rem;
    align-items: center; 
    justify-content: center;
    display: flex;
    animation: text-focus-in 1.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) 0s both;

}
.section-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    align-items: center; 
    justify-content: center;
    display: flex;
    width: 100%;
    animation: text-focus-in 1.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) 2s both;
}

section p{
    padding: 2rem 2rem;
    text-align: center;
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}



.skills{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem 0;
}

.skills ul{
    list-style: none;
    padding: 0;
    margin: 0;
}



.skills h3{
    border-bottom: 2px solid var(--logo-detail-color);
}

.skills li{
    padding: 0.5rem 0;
    background-color: var(--skills-bg-color);
}

.skills div:hover{
    scale:1.03;
    
    transition: scale 0.3s ease;
}

.front, .back, .ia, .jeu, .infra, .data{
    text-align: center;
    border: 1px solid var(--logo-detail-color);
    border-radius: 8px;
    padding: 1rem;
    width: 33%;
}

.skills div:nth-of-type(1) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}
.skills div:nth-of-type(2) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.2s both;
}
.skills div:nth-of-type(3) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.4s both;
}
.skills div:nth-of-type(4) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.6s both;
}
.skills div:nth-of-type(5) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.8s both;
} 
.skills div:nth-of-type(6) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 4s both;
}



.divider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 3rem 0;
}

.divider-dots span {
    display: block;
    width: 12px;
    height: 12px;
    background-color: var(--logo-detail-color);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 1.2s ease-in-out 3s infinite;
}

.divider-dots span:nth-child(2) { animation-delay: 3.2s; }
.divider-dots span:nth-child(6) { animation-delay: 3.2s; }
.divider-dots span:nth-child(10) { animation-delay: 3.2s; }
.divider-dots span:nth-child(14) { animation-delay: 3.2s; }
.divider-dots span:nth-child(3) { animation-delay: 3.4s; }
.divider-dots span:nth-child(7) { animation-delay: 3.4s; }
.divider-dots span:nth-child(11) { animation-delay: 3.4s; }
.divider-dots span:nth-child(15) { animation-delay: 3.4s; }
.divider-dots span:nth-child(4) { animation-delay: 3.6s; }
.divider-dots span:nth-child(8) { animation-delay: 3.6s; }
.divider-dots span:nth-child(12) { animation-delay: 3.6s; }
.divider-dots span:nth-child(16) { animation-delay: 3.6s; }
.divider-dots span:nth-child(5) { animation-delay: 3.8s; }
.divider-dots span:nth-child(9) { animation-delay: 3.8s; }
.divider-dots span:nth-child(13) { animation-delay: 3.8s; }
.divider-dots span:nth-child(17) { animation-delay: 3.8s; }

.profile-image {
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    width: 50%;
    height: 50%;
    object-fit: cover;
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}

.pavercesard{
    max-width: 50%;
    margin: 0 auto;
    line-height: 1.5;
    color: var(--pavercesard-color);
}

table {
    width: 50%;
    border-collapse: collapse;
    margin: 2rem auto;
}

caption {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

thead, tfoot {
    background-color: var(--module-bg-color);
}

th,td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--module-secondary-bg-color);
    color: var(--text-color);
}

.table-caption {
    animation: text-focus-in 1.5s cubic-bezier(0.550, 0.085, 0.680, 0.530) 2s both;
}

.experience {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}





/* projets */

.project-card {
    border: 1px solid var(--logo-detail-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.project-card h3 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--pavercesard-color);
    line-height: 1.7;
    margin-bottom: 1rem;
    padding: 0;
    text-align: left;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    background-color: var(--projects-bg-color);
    border: 1px solid var(--projects-border-color);
    color: var(--logo-detail-color);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-card a {
    color: var(--logo-detail-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.project-card a:hover {
    text-decoration: underline;
}

.github img {
    width: 33%;
    height: 33%;
    display: flex;
    margin-left: auto;
    margin-right: auto;
}

.github{
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}

.published div:nth-of-type(1) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}
.published div:nth-of-type(2) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.2s both;
}
.published div:nth-of-type(3) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.4s both;
}

.unpublished div:nth-of-type(1) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}
.unpublished div:nth-of-type(2) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.2s both;
}
.unpublished div:nth-of-type(3) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.4s both;
}
.unpublished div:nth-of-type(4) {
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.6s both;
}





footer {
    background-color: var(--module-bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}



/* CONTACT */ 
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
    animation: tracking-expend 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3s both;
}

label {
    font-weight: bold;
    color: var(--pavercesard-color);
}

input, textarea , select{
    padding: 0.5rem;
    border: 1px solid var(--logo-detail-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--form-input-focus-border-color);
}

/* switch */
.switch-label {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 24px;
    padding: 0;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--module-secondary-bg-color);
    transition: .4s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--logo-color);
    transition: .4s;
    border-radius: 50%;
}

.switch-input:checked + .switch-slider {
    background-color: var(--logo-detail-color);
}

.switch-input:checked + .switch-slider:before {
    transform: translateX(26px);
}





/* RESPONSIVE DESIGN */


/* MOBILE */
@media (max-width: 768px) {
    .github img {
        width: 100%;
        height: 100%;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-end;
        padding: 0.5rem 1rem;
    }

    .menu {
        flex-direction: row ;
        width: 100%;
    }

    .switch-label {
        width: 40px;
        height: 20px;
    }
    .switchicon {
        font-size: 0.8rem;
    }
    .switch-input:checked + .switch-slider:before {
        width: 12px;
        height: 12px;
    }

}

/* TABLET */
@media (min-width: 769px) and (max-width: 1500px
) {
    .github img {
        width: 75%;
        height: 75%;
    }
}



/* ANIMATIONS */
@keyframes text-focus-in {
    0% {
        filter: blur(12px);
        opacity: 0;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

@keyframes tracking-expend {
    0% {
        letter-spacing: 1em;
        opacity: 0;
        transform: translateZ(400px);
    }
    40% {
        opacity: 0.6;
    }
    100% {
        letter-spacing: normal;
        opacity: 1;
        transform: translateZ(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}


@keyframes disappear {
    0% {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* particles */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind other content */
}


/* Easter egg terminal mode*/
body.easter-egg {
    background-color: #000 !important;
    font-family: 'Courier New', Courier, monospace !important;
    box-shadow: none !important;
    animation: none !important;
}

body.easter-egg > *:not(#terminal-overlay) {
    display: none !important;

}

#terminal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 10000; /* Ensure it's on top */
}

#terminal-overlay.actif{
    display: block;
}

.curseur::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}