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

html {
    scroll-behavior: smooth;
}

:root {
    --bg-dark: #0a0a12;
    --purple: #8b5cf6;
    --blue: #3b82f6;
    --text-light: #f5f5f7;
    --text-gray: #a1a1aa;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --navbar-bg: rgba(10, 10, 18, 0.8);
}
body.light-mode{
    --bg-dark: #f5f5f7;
    --text-light: #0a0a12;
    --text-gray: #52525b;
    --card-bg: rgba(0, 0, 0, 0.04);
    --card-border: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(245, 245, 247, 0.249);
}



body {
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

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

.nav-links a.active-link {
    color: var(--purple);
}

.btn-download {
    padding: 10px 20px;
    border: 1px solid var(--purple);
    border-radius: 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-download:hover {
    background: var(--purple);
}
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 50px;
    position: relative;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15), transparent 40%);
}

.badge {
    padding: 8px 16px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.highlight {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text {
    max-width: 500px;
    color: #e4e4e7;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 30px;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.social-icons a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
}

.avatar-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: bold;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
}
section {
    padding: 80px 50px;
    max-width: 1100px;
    margin: 0 auto;
}

section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
}

/* ===== About ===== */
.about p {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-gray);
}

/* ===== Skills ===== */
.skills-subtitle {
    font-size: 18px;
    color: var(--purple);
    margin: 30px 0 15px;
}

.skills-subtitle:first-of-type {
    margin-top: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.skill-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 14px;
    color: var(--text-light);
}

.skill-badge {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 600;
}

.badge-debutant {
    background: rgba(161, 161, 170, 0.15);
    color: var(--text-gray);
}

.badge-intermediaire {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

/* ===== Projects ===== */
.projects-placeholder {
    text-align: center;
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}
/* ===== Projects réels avec images ===== */
/* ===== Projects réels avec images (design amélioré) ===== */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-card-full {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s;
}

.project-card-full:hover {
    border-color: var(--purple);
}

.project-card-full h3 {
    color: var(--purple);
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
}

.project-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.project-images img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    display: block;
}

.project-card-full p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.project-tags span {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .project-images {
        grid-template-columns: 1fr;
    }
}
/* Responsive : على الموبايل، الصور فوق النص بدل جنبه */
@media (max-width: 768px) {
    .project-card-full {
        grid-template-columns: 1fr;
    }
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple);
}

.project-card h3 {
    margin-bottom: 10px;
    color: var(--purple);
}

.project-card p {
    color: var(--text-gray);
    font-size: 14px;
}

/* ===== Experience (Timeline) ===== */
.timeline-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.timeline-item h3 {
    color: var(--text-light);
    margin-bottom: 5px;
}

.timeline-date {
    display: block;
    color: var(--purple);
    font-size: 13px;
    margin-bottom: 10px;
}

.timeline-item p {
    color: var(--text-gray);
    font-size: 14px;
}

/* ===== Contact ===== */
.contact {
    text-align: center;
}

.contact p {
    color: var(--text-gray);
    margin-bottom: 30px;
}
.contact-email {
    color: var(--purple);
    font-size: 15px;
    margin-top: 15px;
    font-weight: bold;
}
.contact-details {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-gray);
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-gray);
    font-size: 13px;
    border-top: 1px solid var(--card-border);
}
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 20px;
        background: var(--bg-dark);
        padding: 20px;
        border-radius: 12px;
        border: 1px solid var(--card-border);
    }

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

    .hero h1 {
        font-size: 32px;
    }

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

    section {
        padding: 50px 20px;
    }
}
.theme-toggle {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    font-size: 22px;
    cursor: pointer;
    z-index: 200;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}
/* ===== Page Wrapper + effet de profondeur (vignette) ===== */
.page-wrapper {
    position: relative;
    overflow: hidden;
}

.page-wrapper::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse farthest-corner at center, transparent 65%, rgba(0,0,0,0.35) 100%);
    z-index: 50;
}

/* ===== Hero avec image de fond ===== */
.hero {
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,18,0.1) 0%, rgba(10,10,18,0.35) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: rgba(0,0,0,0.3);
}

/* ===== Effet 3D tilt sur les cartes ===== */
.skill-item,
.timeline-item {
    transform-style: preserve-3d;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
}
/* ===== CV Dropdown ===== */
.cv-dropdown {
    position: relative;
}

.cv-menu {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background-color: rgba(245, 245, 247, 0.249);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
    min-width: 260px;
    backdrop-filter: blur(10px);
    z-index: 300;
}

.cv-menu.active {
    display: block;
}

.cv-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: background 0.2s;
}

.cv-menu a:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}