:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(18, 24, 38, 0.6);
    --card-hover: rgba(26, 35, 54, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.35);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-cyan: #38bdf8;
    --accent-purple: #c084fc;
    --accent-blue: #60a5fa;
    --tag-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(192, 132, 252, 0.08) 100%);
    --tag-border: rgba(56, 189, 248, 0.25);
    --tag-text: #e0f2fe;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --max-width: 1140px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    padding-bottom: 4rem;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Glow Backgrounds */
.ambient-glow-1 {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background: radial-gradient(circle at 50% 10%, rgba(56, 189, 248, 0.12) 0%, rgba(11, 15, 25, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.ambient-glow-2 {
    position: fixed;
    bottom: -150px;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.08) 0%, rgba(11, 15, 25, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Top Action Bar / Header Nav */
header.cv-header {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.brand-badge span.badge {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    border: 1px solid var(--border-highlight);
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.actions-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Language Switcher */
.lang-switch {
    display: inline-flex;
    background: rgba(20, 27, 44, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--accent-cyan);
    color: #0b0f19;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-outline {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0284c7 100%);
    color: #0b0f19;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

/* Hero Profile Card */
.hero-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    backdrop-filter: blur(16px);
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.hero-card:hover {
    border-color: var(--border-highlight);
}

.profile-photo {
    position: relative;
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-info {
    flex-grow: 1;
}

.profile-info h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 60%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-info .title {
    color: var(--accent-cyan);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info .bio {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 780px;
}

.contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.88rem;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.contact-item:hover {
    color: var(--accent-cyan);
    border-color: var(--border-highlight);
    background: rgba(56, 189, 248, 0.08);
    transform: translateY(-1px);
}

.contact-item svg {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

/* Two-Column Layout */
.cv-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
}

.section-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.85rem;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s ease;
}

.section-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.01em;
}

.section-title .title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

/* Skills Pill Tags */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.skill-pill {
    background: var(--tag-bg);
    color: var(--tag-text);
    border: 1px solid var(--tag-border);
    padding: 0.3rem 0.65rem;
    border-radius: 14px;
    font-size: 0.76rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    cursor: default;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.skill-pill::before {
    content: '•';
    color: var(--accent-cyan);
    font-size: 1rem;
    line-height: 0;
}

.skill-pill:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(192, 132, 252, 0.15) 100%);
    border-color: var(--accent-cyan);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

/* Education & Sidebar Items */
.sidebar-item {
    margin-bottom: 1.35rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.08);
}

.sidebar-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-item h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.sidebar-item .meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.35rem;
}

.sidebar-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Timeline Experience */
.timeline {
    position: relative;
    padding-left: 1.75rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.25rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1.75rem - 6px);
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    border: 2px solid var(--bg-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.timeline-role {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.timeline-company {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--text-muted);
}

.timeline-bullets {
    list-style: none;
    margin-top: 0.75rem;
}

.timeline-bullets li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.timeline-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: bold;
}

/* Jobby Feature Box */
.featured-project-card {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(192, 132, 252, 0.06) 100%);
    border: 1px solid var(--border-highlight);
    border-radius: 14px;
    padding: 1.35rem;
    margin-top: 0.5rem;
}

.featured-project-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.featured-project-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

/* Language Toggle Visibility Controls */
[data-lang="fr"] .lang-en { display: none !important; }
[data-lang="en"] .lang-fr { display: none !important; }

@media (max-width: 900px) {
    .cv-grid {
        grid-template-columns: 1fr;
    }
    .hero-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .contact-bar {
        justify-content: center;
    }
    .timeline-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 640px) {
    header.cv-header { padding: 0.85rem 0; margin-bottom: 1.5rem; }
    .nav-wrapper { flex-direction: column; gap: 0.75rem; }
    .profile-info h1 { font-size: 1.8rem; }
    .section-card { padding: 1.25rem 1rem; border-radius: 14px; }
    .timeline { padding-left: 1.25rem; }
    .timeline-item::before { left: calc(-1.25rem - 6px); }
}

/* Print Stylesheet */
@media print {
    body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 10.5pt;
    }
    .ambient-glow-1, .ambient-glow-2, header.cv-header, .btn, .lang-switch {
        display: none !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    .hero-card, .section-card, .featured-project-card {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    .profile-info h1 {
        color: #0f172a !important;
        -webkit-text-fill-color: initial !important;
    }
    .profile-info .title, .timeline-company, .sidebar-item .meta {
        color: #0284c7 !important;
    }
    .profile-info .bio, .sidebar-item p, .timeline-bullets li, .contact-item {
        color: #334155 !important;
    }
    .skill-pill {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
    }
    .cv-grid {
        grid-template-columns: 280px 1fr !important;
        gap: 1.5rem !important;
    }
    .timeline {
        border-left-color: #cbd5e1 !important;
    }
    .timeline-item::before {
        background: #0284c7 !important;
        box-shadow: none !important;
    }
    .timeline-date {
        border-color: #cbd5e1 !important;
        color: #475569 !important;
    }
    @page {
        margin: 1.5cm;
    }
}
