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

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #0f1115;
    --bg-secondary: #161a22;
    --text-color: #e6e6e6;
    --text-muted: #a0a0a0;
    --accent-color: #4cc9f0;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/*HEADER*/

header {
    background: var(--bg-secondary);
    border-bottom: 1px solid #222;
}

.navbar {
    max-width: 1100px;
    margin: auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--accent-color);
    font-size: 1.5rem;
}

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

.nav-links a {
    color: var(--text-muted);
}

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

/*BUTTON*/

.btn {
    background: var(--accent-color);
    color: #000;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: bold;
}

.btn:hover {
    box-shadow: 0 8px 20px rgba(76, 201, 240, 0.3);
}

/*SECTIONS*/

section {
    max-width: 900px;
    margin: auto;
    padding: 4rem 2rem;
}

.skills {
    padding: 2.5rem 2rem;
}

.skills + .skills {
    padding-top: 1rem;
}

/*HERO CAROUSEL*/

.hero-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #161a22, #0f1115);
}

.slides {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.hero-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.65);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    color: var(--text-muted);
}

.hero-buttons{
    margin-top:1.5rem;
    display:flex;
    gap:1rem;
    justify-content:center;
    flex-wrap:wrap;
}

/*CAROUSELS HOME*/

.carousels {
    max-width: 1100px;
    margin: auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.carousel {
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid #222;
}

.carousel-track {
    display: flex;
    animation: scroll 25s linear infinite;
}

.carousel-track.slow {
    animation-duration: 35s;
}

.carousel img {
    width: 320px;
    height: 180px;
    flex-shrink: 0;
    object-fit: cover;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-320px * 4)); }
}

/*SKILLS*/

.skills-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.skill-card {
    background: var(--bg-secondary);
    border: 1px solid #222;
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: 0.2s;
}

.skill-card img {
    width: 32px;
    filter: grayscale(100%) brightness(0.8);
}

.skill-card span {
    color: var(--text-muted);
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.skill-card:hover img {
    filter: grayscale(0%) brightness(0.9);
}

.skill-card:hover span {
    color: var(--accent-color);
}

.skills-list .skills-grid {
    grid-template-columns: 1fr;
}

/*PROJECTS*/

.projects {
    max-width: 1400px;
    margin: auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.projects section.project {
    max-width: 100%;
}

.project {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 4rem;
    align-items: center;
}

.project-text h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.project-role {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.project-text p { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem; 
} 

.project-details { 
    list-style: none; 
    color: var(--text-muted); 
}

.project-details li {
    margin-bottom: 0.4rem;
}

.project-media {
    position: relative;
}

.project-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #0b0e14;
    cursor: zoom-in;
}

.project-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.project-carousel img.active {
    opacity: 1;
}

.project-carousel:hover img.active {
    filter: brightness(0.9);
}

.project-btn {
    display: inline-block;
    margin: 1.5rem 0 2rem;
    font-size: 0.9rem;
}

.project--reverse {
    grid-template-columns: 1.6fr 1fr;
}

.project--reverse .project-text {
    order: 2;
}

.project--reverse .project-media {
    order: 1;
}

/*LIGHTBOX*/

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 18, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 1rem;
}

.lightbox-arrow:hover {
    color: var(--accent-color);
}

.lightbox-arrow.left { left: 2rem; }
.lightbox-arrow.right { right: 2rem; }

/*FOOTER*/

footer {
    margin-top: 3rem;
    background: var(--bg-secondary);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #222;
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

/*SOCIAL ICONS*/ 

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

.social-links a { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
} 

.social-links img { 
    width: 64px; 
    height: 64px; 
    filter: grayscale(100%) brightness(0.8); 
    opacity: 0.8; 
    transition: all 0.25s ease; 
} 

.social-links a:hover img { 
    filter: grayscale(0%) brightness(1); 
    opacity: 1; 
    transform: translateY(-3px); }

/*RESPONSIVE*/

@media (max-width: 900px) {
    .project,
    .project--reverse {
        grid-template-columns: 1fr;
    }

    .project--reverse .project-text,
    .project--reverse .project-media {
        order: initial;
    }
}

@media (max-width: 600px) {
    .lightbox-arrow {
        font-size: 2.2rem;
    }
}


.lang-switch {
    display: flex;
    gap: 1rem;
}

.lang-switch a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lang-switch a:hover {
    color: var(--accent-color);
}

.lang-switch {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: 0.2s ease;
}

.lang-item img {
    width: 20px;
    height: auto;
    filter: grayscale(100%) brightness(0.8);
    transition: 0.2s ease;
}

.lang-item:hover {
    color: var(--accent-color);
}

.lang-item:hover img {
    filter: grayscale(0%) brightness(1);
}

/* ACTIF */
.lang-item.active {
    color: var(--accent-color);
    font-weight: 600;
}

.lang-item.active img {
    filter: grayscale(0%) brightness(1);
}