
/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8; /* Cyan clair */
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --secondary: #818cf8; /* Indigo */
    --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s ease;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-primary); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    /* display: inline-block; */
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px; background: var(--gradient); border-radius: 2px;
}

section { padding: 100px 0; position: relative; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 28px; border-radius: 50px; font-weight: 600;
    transition: var(--transition); cursor: pointer; font-size: 1rem;
}

.btn-primary { background: var(--gradient); color: white; border: none; box-shadow: 0 4px 15px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5); }

.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.2); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); }

/* --- NAVIGATION --- */
header { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--card-border); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; max-width: 1200px; margin: 0 auto; position: relative; }

.logo { font-size: 1.5rem; font-weight: 700; font-family: var(--font-heading); }
.logo span { color: var(--accent); }

.nav-center { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.lang-toggle {
    background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
    color: var(--accent); padding: 5px 12px; border-radius: 20px;
    cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: var(--transition);
}
.lang-toggle:hover { background: var(--accent); color: white; }

.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-primary); }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; overflow: hidden; padding-top: 80px;
}

#canvas-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.6; }

.shape { position: absolute; border-radius: 50%; filter: blur(80px); z-index: 0; opacity: 0.4; pointer-events: none; }
.shape-1 { width: 400px; height: 400px; background: var(--accent); top: -100px; left: -100px; }
.shape-2 { width: 300px; height: 300px; background: var(--secondary); bottom: 50px; right: -50px; }

.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 20px; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.hero-content h2 { font-size: 1.5rem; color: var(--accent); margin-bottom: 20px; font-weight: 500; }
.hero-content p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 30px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* --- ABOUT SECTION --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.about-text p { margin-bottom: 20px; color: var(--text-secondary); font-size: 1.05rem; }
.about-text strong { color: var(--accent); }

.highlight-item {
    background: rgba(255, 255, 255, 0.03); padding: 20px; border-radius: 12px;
    margin-bottom: 20px; display: flex; gap: 15px; border-left: 3px solid var(--accent);
}
.highlight-item i { font-size: 1.5rem; color: var(--accent); margin-top: 4px; }
.highlight-item strong { display: block; font-size: 1.1rem; margin-bottom: 5px; }
.highlight-item p { font-size: 0.95rem; margin-bottom: 0; color: var(--text-secondary); }

/* --- SKILLS SECTION --- */
#skills { background-color: #162032; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }

.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 30px; transition: var(--transition); backdrop-filter: blur(5px); }
.card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.skill-category h3 { margin-bottom: 20px; font-size: 1.2rem; color: var(--text-primary); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--card-border); padding-bottom: 10px; }
.skill-category h3 i { color: var(--accent); }

.skill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag { background: rgba(255,255,255,0.05); padding: 8px 14px; border-radius: 6px; font-size: 0.9rem; color: var(--text-secondary); border: 1px solid transparent; transition: var(--transition); }
.skill-tag:hover { background: rgba(56, 189, 248, 0.1); color: var(--accent); border-color: var(--accent); }

/* --- EXPERIENCE SECTION (Timeline) --- */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background: var(--card-border); top: 0; bottom: 0; left: 50%; margin-left: -1px; }

.timeline-item { padding: 10px 40px; position: relative; width: 50%; opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; }

.timeline-dot { width: 16px; height: 16px; background: var(--bg-color); border: 3px solid var(--accent); border-radius: 50%; position: absolute; top: 20px; right: -10px; z-index: 1; }
.timeline-item.right .timeline-dot { left: -10px; }

.timeline-content { background: var(--card-bg); border: 1px solid var(--card-border); padding: 25px; border-radius: 12px; }
.timeline-date { font-size: 0.85rem; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 5px; display: block; }
.timeline-role { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.timeline-company { font-size: 0.95rem; color: var(--text-secondary); font-style: italic; margin-bottom: 15px; display: block; }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; text-align: left; }

/* --- PROJECTS SECTION --- */
#projects { background-color: #162032; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.project-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-10px); border-color: var(--accent); }

.project-image { height: 160px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); }
.project-image i { font-size: 4rem; color: rgba(56, 189, 248, 0.2); transition: var(--transition); }
.project-card:hover .project-image i { color: var(--accent); transform: scale(1.1); }

.project-info { padding: 25px; flex-grow: 1; }
.project-info h3 { font-size: 1.3rem; margin-bottom: 5px; color: var(--text-primary); }
.project-info h4 { font-size: 0.9rem; color: var(--secondary); margin-bottom: 15px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.project-info p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 20px; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tech-badge { font-size: 0.75rem; background: rgba(255,255,255,0.1); color: var(--text-primary); padding: 4px 10px; border-radius: 4px; }

/* --- EDUCATION & VOLUNTEERING --- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.edu-item { border-bottom: 1px solid var(--card-border); padding-bottom: 15px; margin-bottom: 15px; }
.edu-item:last-child { border-bottom: none; }
.edu-year { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 5px; display: block; }
.edu-item p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; }
.edu-details { font-size: 0.85rem; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }

/* --- CONTACT SECTION --- */
.contact-section { text-align: center; background: linear-gradient(to bottom, var(--bg-color), #1e293b); }
.contact-container { max-width: 800px; margin: 0 auto; }
.contact-container p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 40px; }

.contact-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.contact-link { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 120px; padding: 20px; background: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid var(--card-border); transition: var(--transition); }
.contact-link:hover { background: rgba(56, 189, 248, 0.1); border-color: var(--accent); transform: translateY(-5px); }
.contact-link i { font-size: 1.8rem; color: var(--accent); }
.contact-link span { font-size: 0.9rem; font-weight: 500; }

/* --- FOOTER --- */
footer { padding: 30px 0; text-align: center; border-top: 1px solid var(--card-border); color: var(--text-secondary); font-size: 0.9rem; }

/* --- TOAST --- */
#toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 2000; }
.toast { background: var(--card-bg); border-left: 4px solid var(--accent); padding: 15px 25px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); margin-top: 15px; display: flex; align-items: center; gap: 15px; transform: translateX(120%); transition: transform 0.4s ease; backdrop-filter: blur(10px); border: 1px solid var(--card-border); color: white; }
.toast.show { transform: translateX(0); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .about-grid, .edu-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .timeline-item.left { text-align: left; }
    .timeline-item.right { left: 0; }
    .timeline-dot { left: 22px; right: auto; }
    .timeline-item.right .timeline-dot { left: 22px; }
}

@media (max-width: 768px) {
    .nav-center { display: none; }
    .nav-center.mobile-active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: #0f172a; padding: 20px; border-bottom: 1px solid var(--card-border); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
    .nav-links { flex-direction: column; width: 100%; text-align: center; }
    .mobile-menu-btn { display: block; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
}
