/* ===========================
   Palette & variables
=========================== */
:root {
    
    --primary-color: #1FA5A0;          /* Turquoise Elias (orbe) */
    --secondary-color: #8B5E3C;        /* Marron cuir (sac / aventure) */
    --accent-color: #7E57C2;           /* Violet mystique (effets AR) */

    --background-light: #F4ECE3;       /* Ivoire parchemin, chaleureux */
    --background-dark: radial-gradient(circle at top left, #0c0514 0, #247e88 45%);     /* Bleu nuit profond */
    
    --text-color: #0F1A2F;             /* Bleu encre foncé */
    --text-light: #FFFFFF;             /* Blanc */

    --muted-color: #6E6B70;            /* Taupe gris neutre */
    --card-bg: #FFFFFF;                /* Blanc propre */
    --border-soft: rgba(0, 0, 0, 0.08);

    --shadow-soft: 0 18px 40px rgba(13, 26, 38, 0.18);

}

/* ===========================
   Reset & base
=========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: system-ui, sans-serif;
    font-size: 18px;
    color: var(--text-color);
    background-color: var(--background-light);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }

/* ===========================
   Layout
=========================== */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

section { padding: 70px 0; }

/* ===========================
   Header
=========================== */
header {
    background: var(--background-dark);
    color: var(--text-light);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 { font-size: 1.6rem; }
.tagline { font-size: 0.9rem; color: #cbd2e2; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
}

.nav-links a {
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 999px;
    transition: 0.25s;
    text-decoration: none;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===========================
   HERO
=========================== */
.hero-section {
    background: radial-gradient(circle at top left, #247e88 0, #0c0514 45%);
    color: var(--text-light);
    text-align: center;
    padding-top: 80px;
}

.profile-pic {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}

.hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #e1e4f0;
}

.hero-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

/* Buttons */
.cta-button, .ghost-button {
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 1.05rem;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

.cta-button {
    background: var(--primary-color);
    color: var(--text-light);
}

.cta-button:hover {
    background: #0f6a63;
}

.ghost-button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--text-light);
}

.ghost-button:hover {
    background: rgba(255,255,255,0.1);
}

.hero-badges {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
}

/* ===========================
   Sections génériques
=========================== */
.section-title {
    font-size: 1.9rem;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 60%;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 999px;
}

.section-alt {
    background: var(--background-dark);
    color: var(--text-light);
}

.section-alt .section-title::after {
    background: var(--secondary-color);
}

.section-intro {
    max-width: 650px;
    margin-bottom: 28px;
    color: var(--muted-color);
}

/* ===========================
   À propos
=========================== */
.about-section p { margin-bottom: 14px; }

.skills-short ul {
    list-style: none;
    margin-top: 15px;
}

.skills-short li {
    margin-bottom: 6px;
}

/* ===========================
   Expérience
=========================== */
.job-entry {
    background: radial-gradient(circle at top left, #ffffff 0, #cdf9fe 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.job-entry h3 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--secondary-color);
}

.job-entry p { margin-bottom: 10px;  color: var(--primary-color);}

.job-entry ul {
    margin-left: 20px;
    color: var(--text-color);
}

/* ===========================
   Projets
=========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.project-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    transition: 0.25s;
}
.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--secondary-color);
}
.project-card p { margin-bottom: 10px;  color: var(----text-color);}

.project-card ul {
    margin-left: 20px;
    color: var(--text-color);
}
.project-card:hover {
    transform: translateY(-6px);
}
.centered-image {
    display: block;
    margin: 0 auto 12px auto; /* centre + marge sous l’image */
    border-radius: 8px; /* optionnel, mais joli */
}

/* ===========================
   Contact
=========================== */
#contact p {
    max-width: 650px;
    margin-bottom: 14px;
}

.contact-extra {
    margin-top: 14px;
    font-size: 0.95rem;
}
.link-elias {
    color: var(--background-light);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.link-elias::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: var(--secondary-color);
    transition: 0.3s ease;
}

.link-elias:hover::after {
    width: 100%;
}


/* ===========================
   Footer
=========================== */
footer {
    background: #050914;
    color: #b3bad4;
    text-align: center;
    padding: 20px 0;
}

.footer-note {
    font-size: 0.85rem;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 768px) {

    header {
        position: static;
    }

    .nav-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .section-title::after {
        width: 40%;
    }
}

/* ===========================
   3D GALLERY (inspirée du CodePen)
   =========================== */

.projects-gallery {
    margin-top: 60px;
    text-align: center;
}

.gallery-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.projects-gallery-intro {
    max-width: 620px;
    margin: 0 auto 30px;
    color: var(--muted-color);
}

/* Conteneur principal 3D */
.card3d-container {
    --hero-plane-static: rotateY(325deg) rotateZ(14deg) rotateX(77deg) translateX(-2.498rem);
    --hero-plane-pos-a: -10rem;
    --hero-plane-pos-b: -1rem;
    --hero-plane-height: 26rem;
    --hero-plane-width: 17rem;
    --hero-item-size: 12.5rem;
    --hero-stacked-items: 0;
    --hero-card-perspective: rotateY(35deg) skewY(14deg);

    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    transform: scale(0.9);
}

/* Wrapper */
.card3d-wrapper {
    display: flex;
    position: relative;
}

.card3d-wrapper::after {
    content: "";
    position: absolute;
    opacity: 0;
    top: 5rem;
    left: 0;
    background-image: linear-gradient(#450f10 0%, #2d2a28 33%, #2a151a 66%, #450f10 100%);
    background-size: 100% 300%;
    animation: gradientScroll 3s linear infinite, planeAppear 1600ms ease forwards;
    transform: translateZ(var(--hero-plane-pos-b));
    height: var(--hero-plane-height);
    width: var(--hero-plane-width);
    border-radius: 2rem;
}

/* Items */
.card3d-item {
    --hero-item: 0;
    --hero-item-hover: -6.5rem;
    opacity: 0;
    height: 350px;
    position: relative;
    user-select: none;
    margin-left: -6.5rem;
    transform:
        translateX(var(--hero-stacked-items))
        translateY(var(--hero-item))
        var(--hero-card-perspective);
    transition: transform 300ms ease;
    animation: imageDrop 500ms calc(var(--stagger) * 450ms) ease-out forwards;
}

.card3d-item img {
    width: 100%;
    border-radius: inherit;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.75);
    transform: scale(0);
    /*background-color: rgba(218, 112, 214, 0.69);*/
    animation: imageAppear 1700ms calc(var(--stagger) * 350ms)
        cubic-bezier(0.95, 0, 0, 0.99) forwards;
}

.card3d-item:hover {
    --hero-item: var(--hero-item-hover) !important;
}

.card3d-item:first-child {
    z-index: 5;
}
.card3d-item:nth-child(2) {
    z-index: 4;
    --hero-item: -1rem;
    --hero-item-hover: -7.5rem;
}
.card3d-item:nth-child(3) {
    z-index: 3;
    --hero-item: -2rem;
    --hero-item-hover: -8.5rem;
}
.card3d-item:nth-child(4) {
    z-index: 2;
    --hero-item: -2rem;
    --hero-item-hover: -8.5rem;
}

/* Inner container */
.card3d-inner {
    border-radius: 12px;
    width: var(--hero-item-size);
    border: 3px dashed gray;
    background-color: rgba(128, 128, 128, 0.12);
    animation: imageSkeletonRemove 1700ms calc(var(--stagger) * 350ms)
        cubic-bezier(0.95, 0, 0, 0.99) forwards;
}

/* Keyframes (repris du CodePen) */
@keyframes planeAppear {
    0% {
        transform: var(--hero-plane-static) translateZ(var(--hero-plane-pos-a));
        opacity: 0;
    }
    100% {
        transform: var(--hero-plane-static) translateZ(var(--hero-plane-pos-b));
        opacity: 1;
    }
}

@keyframes imageDrop {
    0% {
        top: -6rem;
        opacity: 0;
    }
    100% {
        top: 0;
        opacity: 1;
    }
}

@keyframes imageAppear {
    55% {
        transform: scale(0);
        filter: blur(20px);
    }
    100% {
        transform: scale(1.025);
        filter: blur(0px);
    }
}

@keyframes imageSkeletonRemove {
    65% {
        border-color: gray;
        background-color: rgba(128, 128, 128, 0.12);
    }
    100% {
        border-color: rgba(128, 128, 128, 0);
        background-color: rgba(128, 128, 128, 0);
    }
}

@keyframes gradientScroll {
    0% {
        background-position-y: 100%;
    }
    100% {
        background-position-y: 0%;
    }
}

/* Responsive 3D gallery */
@media (max-width: 768px) {
    .card3d-container {
        transform: scale(0.8);
    }
}
/* ===========================
   Layout À propos : galerie 3D + texte
=========================== */

.about-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

/* Colonne gauche : fixe la largeur de la galerie */
.about-media {
    flex: 0 0 360px;
    max-width: 380px;
}

/* On évite le gros margin-top de projects-gallery dans cette section */
.about-media .projects-gallery {
    margin-top: 0;
    text-align: center;
}

/* Colonne droite : le texte prend le reste */
.about-text {
    flex: 1;
}

/* Un peu d’air entre texte et liste */
.about-text p {
    margin-bottom: 14px;
}

/* Optionnel : liste un peu décollée du paragraphe */
.about-text .skills-short {
    margin-top: 12px;
}

/* Adapte légèrement la taille de la 3D pour cette zone */
.about-media .card3d-container {
    transform: scale(0.85);
    transform-origin: center;
}

/* Responsive : sur mobile, on repasse en colonne */
@media (max-width: 900px) {
    .about-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-media {
        flex: 0 0 auto;
    }

    .about-text {
        width: 100%;
    }

    .about-text p {
        text-align: center;
    }

    /* Pour que la liste reste lisible, on centre le bloc
       mais on garde les puces alignées à gauche */
    .about-text .skills-short ul {
        display: inline-block;
        text-align: left;
    }

    .about-media .card3d-container {
        transform: scale(0.9);
    }
}

.about-features {
    list-style: none;
    margin-top: 25px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-features li {
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-left: 5px solid var(--primary-color); /* Turquoise Elias */
    padding: 12px 18px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 6px;
    transition: 0.25s;
}

.about-features li:hover {
    transform: translateX(8px);
    background: rgba(255,255,255,0.18);
}
