/* ------------------------------
   THEME VARIABLES
--------------------------------*/
:root {
    --bg: #05060a;
    --bg-alt: #070814;
    --text: #e6f1ff;
    --muted: #9aa4c2;
    --accent: #4cc9f0;
    --accent-soft: rgba(76, 201, 240, 0.18);
    --accent-strong: rgba(76, 201, 240, 0.45);
    --accent-secondary: #9d4edd;
    --card: rgba(10, 12, 24, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 0 25px rgba(0, 0, 0, 0.7);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-pill: 999px;
    --transition-fast: 0.2s ease;
    --transition-med: 0.35s ease;
    --blur-strong: 18px;
}

.light-mode {
    --bg: #f5f7ff;
    --bg-alt: #e6ecff;
    --text: #111827;
    --muted: #4b5563;
    --accent: #0077cc;
    --accent-soft: rgba(0, 119, 204, 0.12);
    --accent-strong: rgba(0, 119, 204, 0.35);
    --accent-secondary: #9333ea;
    --card: rgba(255, 255, 255, 0.9);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

/* Transition globale douce */
html, body, * {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

body {
    font-family: "Inter", "Orbitron", sans-serif;
    background: radial-gradient(circle at top, #0b1020 0, #020308 55%, #000 100%);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Glow grid */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
}

body::before {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(76, 201, 240, 0.12) 0, transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(157, 78, 221, 0.16) 0, transparent 55%),
        radial-gradient(circle at 50% 90%, rgba(76, 201, 240, 0.08) 0, transparent 55%);
    opacity: 0.9;
}

body::after {
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: soft-light;
    opacity: 0.35;
    z-index: -2;
}

/* ------------------------------
   NAVBAR
--------------------------------*/
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    background: linear-gradient(
        to bottom,
        rgba(3, 7, 18, 0.92),
        rgba(3, 7, 18, 0.75),
        transparent
    );
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: radial-gradient(circle, var(--accent) 0, transparent 60%);
    box-shadow: 0 0 18px var(--accent-strong);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 26px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-bottom: 4px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 0 12px var(--accent-strong);
    transition: width var(--transition-med);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* ------------------------------
   BOUTON THEME IA (Option 2)
--------------------------------*/
.theme-btn {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--accent);
    color: var(--text);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;

    box-shadow:
        0 0 10px rgba(76, 201, 240, 0.45),
        0 0 18px rgba(157, 78, 221, 0.25);

    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease,
        color 0.35s ease;
}

.theme-btn:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(15, 23, 42, 1);
    border-color: var(--accent-secondary);
    box-shadow:
        0 0 16px rgba(76, 201, 240, 0.65),
        0 0 26px rgba(157, 78, 221, 0.45);
}

body.theme-transition {
    transition: filter 0.6s ease;
    filter: brightness(1.25) saturate(1.15);
}

/* ------------------------------
   HERO SECTION
--------------------------------*/
.hero {
    position: relative;
    text-align: center;
    padding: 130px 20px 110px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 0, rgba(76, 201, 240, 0.18) 0, transparent 55%),
        radial-gradient(circle at 80% 0, rgba(157, 78, 221, 0.2) 0, transparent 55%);
    opacity: 0.9;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("assets/banner.jpg");
    background-position: center;
    background-size: cover;
    mix-blend-mode: soft-light;
    opacity: 0.35;
    z-index: -3;
}

.hero h2 {
    font-size: 2.7rem;
    margin-bottom: 18px;
    color: var(--text);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(15, 23, 42, 0.9);
}

.hero h2 span {
    color: var(--accent);
}

.hero p {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--muted);
    opacity: 0.95;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 12px 30px;
    background:
        radial-gradient(circle at top left, var(--accent-strong), transparent 55%),
        radial-gradient(circle at bottom right, var(--accent-secondary), transparent 55%),
        rgba(15, 23, 42, 0.9);
    color: var(--text);
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow:
        0 0 18px rgba(76, 201, 240, 0.35),
        0 18px 35px rgba(15, 23, 42, 0.9);
    transition: transform var(--transition-med), box-shadow var(--transition-med), background var(--transition-med);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.btn:hover::after {
    transform: translateX(120%);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 25px rgba(76, 201, 240, 0.6),
        0 22px 45px rgba(15, 23, 42, 0.95);
}

/* ------------------------------
   PARTICULES
--------------------------------*/
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
/* ------------------------------
   MAIN CONTENT
--------------------------------*/

main {
    padding: 40px 20px 60px;
    max-width: 980px;
    margin: 0 auto;
}

section {
    margin-bottom: 60px;
}

h2 {
    margin-bottom: 18px;
    color: var(--text);
    font-size: 1.4rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: "";
    width: 32px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    box-shadow: 0 0 12px var(--accent-strong);
}

p,
li {
    color: var(--muted);
    opacity: 0.95;
    font-size: 0.98rem;
}

/* ------------------------------
   IMAGE STYLES
--------------------------------*/

.profile-img {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    object-fit: cover;
    margin: 24px auto;
    display: block;
    border: 2px solid rgba(148, 163, 184, 0.7);
    box-shadow:
        0 0 0 3px rgba(15, 23, 42, 1),
        0 0 25px rgba(76, 201, 240, 0.45);
    position: relative;
}

.profile-img::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 1px dashed rgba(148, 163, 184, 0.4);
}

/* Project images */

.project-img {
    width: 100%;
    border-radius: 12px;
    margin: 18px 0;
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: transform var(--transition-med), filter var(--transition-med), box-shadow var(--transition-med);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.85);
    overflow: hidden;
}

.project-card:hover .project-img {
    transform: translateY(-4px) scale(1.03);
    filter: brightness(1.12) saturate(1.1);
    box-shadow:
        0 0 25px rgba(76, 201, 240, 0.5),
        0 22px 45px rgba(15, 23, 42, 0.95);
}

/* ------------------------------
   FOOTER
--------------------------------*/

footer {
    text-align: center;
    padding: 22px;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020308 70%);
    color: var(--muted);
    margin-top: 40px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.9rem;
}

/* ------------------------------
   TIMELINE (IA STYLE)
--------------------------------*/

.timeline {
    margin: 40px auto;
    border-left: 2px solid rgba(76, 201, 240, 0.6);
    padding-left: 30px;
    max-width: 720px;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent 40%, var(--accent-secondary), transparent 80%);
    opacity: 0.5;
    filter: blur(1px);
}

.timeline-item {
    position: relative;
    margin-bottom: 38px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, var(--accent) 0, #020617 60%);
    border-radius: 50%;
    position: absolute;
    left: -39px;
    top: 4px;
    box-shadow:
        0 0 12px rgba(76, 201, 240, 0.9),
        0 0 22px rgba(76, 201, 240, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.timeline-dot::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.timeline-content {
    background: var(--card);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow:
        0 0 18px rgba(15, 23, 42, 0.9),
        0 0 22px rgba(76, 201, 240, 0.18);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(76, 201, 240, 0.12) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-content::before {
    opacity: 1;
}

.timeline-content h3 {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 1.02rem;
}

/* ------------------------------
   NEON / IA TEXT
--------------------------------*/

.neon {
    color: var(--accent);
    text-shadow:
        0 0 6px rgba(76, 201, 240, 0.9),
        0 0 16px rgba(76, 201, 240, 0.7),
        0 0 28px rgba(76, 201, 240, 0.5);
}

/* ------------------------------
   PROJECTS GRID
--------------------------------*/

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    margin-top: 22px;
}

.project-card {
    background: var(--card);
    padding: 18px 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top left, var(--accent-soft), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 25px rgba(76, 201, 240, 0.45),
        0 22px 45px rgba(15, 23, 42, 0.95);
    border-color: rgba(76, 201, 240, 0.8);
}

.project-card h3 {
    margin-top: 8px;
    color: var(--accent);
    font-size: 1.05rem;
}

.project-card p {
    opacity: 0.9;
    margin: 10px 0 14px;
}

/* Tags */

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tags span {
    background: radial-gradient(circle at top, var(--accent-strong), rgba(15, 23, 42, 0.95));
    color: #020617;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(76, 201, 240, 0.6);
}

/* ------------------------------
   ANIMATIONS (FADE / APPEAR)
--------------------------------*/

.fade-in {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.appear {
    opacity: 1;
    transform: translateY(0);
}
/* ------------------------------
   FILTERS / PROJECT FILTERS
--------------------------------*/

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-btn {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    position: relative;
    overflow: hidden;
    transition:
        background var(--transition-med),
        color var(--transition-med),
        box-shadow var(--transition-med),
        border-color var(--transition-med),
        transform var(--transition-med);
}

.filter-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(76, 201, 240, 0.18) 50%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: radial-gradient(circle at top, var(--accent-strong), rgba(15, 23, 42, 0.95));
    color: #020617;
    box-shadow: 0 0 18px rgba(76, 201, 240, 0.7);
    border-color: rgba(76, 201, 240, 0.9);
    transform: translateY(-1px);
}

.filter-btn:hover::after,
.filter-btn.active::after {
    transform: translateX(120%);
}

/* ------------------------------
   RESPONSIVE
--------------------------------*/

@media (max-width: 900px) {
    .navbar {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    main {
        padding: 26px 18px 40px;
    }

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

    .project-card {
        margin-bottom: 18px;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    .hero {
        padding: 90px 16px 80px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.98rem;
    }

    .project-card {
        padding: 16px;
    }

    .project-img {
        margin: 10px 0;
    }

    .project-tags span {
        padding: 3px 9px;
        font-size: 0.7rem;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline-dot {
        left: -30px;
    }

    footer {
        padding: 16px;
        font-size: 0.88rem;
    }
}

/* ------------------------------
   iAventures OUTPUT BOX
--------------------------------*/

.output-box {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.96),
        rgba(15, 23, 42, 0.9),
        rgba(15, 23, 42, 0.96)
    );
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-top: 22px;
    white-space: pre-wrap;
    font-size: 1.02em;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow:
        0 0 22px rgba(76, 201, 240, 0.35),
        0 18px 40px rgba(15, 23, 42, 0.95);
    position: relative;
    overflow: hidden;
}

.output-box::before {
    content: "AI OUTPUT";
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
}

.output-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(76, 201, 240, 0.12) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.output-box:hover::after {
    opacity: 1;
}

/* ------------------------------
   SIGNATURE
--------------------------------*/

.signature {
    margin-top: 10px;
    font-size: 0.8rem;
    text-align: right;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ------------------------------
   CURSEUR IA HOLOGRAPHIQUE
--------------------------------*/

body {
    cursor: none;
}

.cursor-dot,
.cursor-halo {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Petit point lumineux */
.cursor-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow:
        0 0 14px var(--accent),
        0 0 28px var(--accent-secondary),
        0 0 40px rgba(76, 201, 240, 0.6);
}

/* Halo holographique */
.cursor-halo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(76, 201, 240, 0.55);
    box-shadow:
        0 0 22px rgba(76, 201, 240, 0.45),
        0 0 40px rgba(157, 78, 221, 0.35);
    transition: transform 0.12s ease-out, opacity 0.25s ease;
    opacity: 1;
}

/* Effet sur les éléments interactifs */
a:hover ~ .cursor-halo,
button:hover ~ .cursor-halo {
    transform: translate(-50%, -50%) scale(1.6);
    border-color: rgba(157, 78, 221, 0.6);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.5);
}

.ia-status {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 8px;
}

.ia-status.thinking {
    color: var(--accent);
}
