/*
      ( (
       ) )
     ........
     |      |]
     \      /
      `----'
   This CSS is by Didier Nicolas and it is "Powered by Coffee"
*/

:root {
    /* Brand Gradient */
    --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --brand-primary: #4f46e5;       /* Indigo 600 */
    --brand-secondary: #06b6d4;     /* Cyan 500 */
    
    /* Surface Colors */
    --bg-body: #f0f4f8;             
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.90);
    
    /* Typography */
    --text-main: #0f172a;           
    --text-muted: #475569;          
    --text-light: #94a3b8;          
    
    /* UI Elements */
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Reset & Typography */
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *:before, *:after { box-sizing: inherit; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
}

h1, h2, h3, h4 { 
    font-family: 'Outfit', sans-serif; 
    color: var(--text-main); 
    margin-top: 0;
}

p, li { 
    color: var(--text-muted); 
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s;
}

/* Focus States (A11y) */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Icons */
        .icon-svg { width: 20px; height: 20px; stroke-width: 2; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
        .icon-lg { width: 32px; height: 32px; stroke-width: 1.5; }

/* Layout */
.page-wrapper {
    max-width: 1150px; 
    margin: 0 auto;
    display: grid; 
    grid-template-columns: 340px 1fr;
    gap: 40px; 
    align-items: start;
}

/* Header */
.header-card {
    grid-column: 1 / -1;
    background: var(--bg-glass);
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid white;
    border-radius: var(--radius-lg);
    padding: 40px 50px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: var(--shadow-card);
    margin-bottom: 10px;
    position: relative; 
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-card:hover { 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-hover); 
}

.header-card::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 4px; 
    height: 100%;
    background: var(--brand-gradient);
}

/* Header Identity */
.header-identity {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
    background-color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header-profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
    border-color: white;
}

.header-info h1 {
    font-size: 3.5rem; 
    margin: 0; 
    line-height: 1;
    background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.header-role {
    font-size: 1rem; 
    font-weight: 500;
    background: var(--brand-gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    margin-top: 10px; 
    display: inline-block;
}

/* Header Actions */
.header-actions { 
    display: flex; 
    gap: 15px; 
}

.btn {
    border: none; 
    padding: 12px 24px; 
    border-radius: 50px;
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    display: flex; 
    align-items: center; 
    gap: 8px;
    transition: all 0.3s ease; 
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-gradient); 
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5); 
}

.btn-secondary {
    background: white; 
    color: #0077b5; /* LinkedIn Blue */
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover { 
    background: #f8fafc; 
    transform: translateY(-3px); 
    border-color: #0077b5; 
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.2); 
}

/* Sidebar */
aside { 
    position: relative; 
    top: auto; 
}

aside section {
    background: var(--bg-surface); 
    padding: 30px;
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow-card);
    margin-bottom: 25px; 
    border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.3s ease;
}

aside section:hover { 
    transform: translateY(-2px); 
}

.section-title {
    background: linear-gradient(90deg, var(--text-main), var(--brand-primary));
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    display: inline-block;
}

/* Sidebar Lists */
.contact-list, .simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.contact-icon-box {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--text-light);
}

.simple-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Tags */
.tag-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.skill-tag {
    display: inline-block; 
    padding: 8px 14px; 
    border-radius: 8px;
    font-size: 0.85rem; 
    font-weight: 500; 
    transition: all 0.2s; 
    cursor: default;
    background: #f1f5f9; 
    color: var(--text-muted);
}

.skill-tag:hover { 
    background: #e2e8f0; 
    color: var(--text-main); 
    transform: translateY(-2px); 
}

.keyword-tag {
    display: inline-block; 
    padding: 8px 14px; 
    border-radius: 8px;
    font-size: 0.85rem; 
    font-weight: 500; 
    transition: all 0.2s; 
    cursor: default;
    background: rgba(6, 182, 212, 0.1); 
    color: #0891b2;
}

.keyword-tag:hover {
    background: var(--brand-gradient);
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
main section {
    background: var(--bg-surface); 
    padding: 45px;
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow-card);
    margin-bottom: 30px; 
    position: relative; 
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.6);
}

main h2 {
    font-size: 1.8rem; 
    margin: 0 0 30px 0;
    background: linear-gradient(90deg, var(--text-main), var(--brand-primary));
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Profile emphasis block */
.profile-highlight {
    background: linear-gradient(to right, rgba(79, 70, 229, 0.05), rgba(6, 182, 212, 0.05));
    border-left: 4px solid var(--brand-primary);
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.profile-highlight p {
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 0;
}

.process-flow {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: 10px;
}

/* Education subsections */
.subsection-title {
    color: var(--brand-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.course-list {
    list-style-type: none;
    padding-left: 0;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.course-list li {
    margin-bottom: 15px;
    color: var(--text-main);
}

.ref-id {
    color: var(--brand-secondary);
    display: block;
    margin-top: 2px;
}

/* Timeline */
.timeline { 
    border-left: 3px solid #e0e7ff; 
    padding-left: 35px; 
    margin-left: 10px; 
}

.job-card { 
    position: relative; 
    margin-bottom: 50px; 
    transition: transform 0.3s ease; 
}

.job-card::before {
    content: ''; 
    position: absolute; 
    left: -44px; 
    top: 6px;
    width: 15px; 
    height: 15px; 
    border-radius: 50%;
    background: var(--bg-surface); 
    border: 4px solid var(--brand-primary);
    box-shadow: 0 0 0 4px #e0e7ff; 
    transition: all 0.3s ease;
}

.job-card:hover::before { 
    background: var(--brand-primary); 
    box-shadow: 0 0 0 6px #c7d2fe; 
    transform: scale(1.1); 
}

.job-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    flex-wrap: wrap; 
    margin-bottom: 12px; 
}

.job-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin: 0; 
}

.job-date { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--brand-primary); 
    background: #e0e7ff; 
    padding: 6px 14px; 
    border-radius: 20px; 
}

.job-company { 
    font-size: 1.1rem; 
    color: var(--brand-secondary); 
    font-weight: 600; 
    display: block; 
    margin-top: 4px; 
}

.job-desc-sm {
    margin: 5px 0 0 0; 
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-light);
}

.job-details {
    padding-left: 18px;
    margin-top: 10px;
}

.job-details li { 
    margin-bottom: 10px; 
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.p-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.p-card:hover, .p-card:focus {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-primary);
    outline: none;
}

.p-icon-box {
    color: var(--brand-primary);
    margin-bottom: 15px;
}

.p-title {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.p-desc {
    font-size: 0.85rem;
        color: var(--brand-secondary);
}

/* References Grid */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ref-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--brand-secondary);
}

.ref-name { display: block; font-weight: 700; color: var(--text-main); }
.ref-role { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; }
.ref-company { display: block; font-size: 0.85rem; color: var(--brand-secondary); font-weight: 500; }

/* Footer */
footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wcag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    background: #ecfccb;
    color: #3f6212;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Animations & Lightbox */
.reveal-on-scroll {
    opacity: 0; 
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.is-visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1; pointer-events: all;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 30px; right: 40px;
    color: white; font-size: 45px;
    background: none; border: none; cursor: pointer;
}

.lightbox-caption {
    color: #e2e8f0; margin-top: 20px; font-size: 1.2rem; font-family: 'Outfit', sans-serif;
}

/* Mobile responsive */
@media (max-width: 950px) {
    .page-wrapper { grid-template-columns: 1fr; }
    
    .header-card { 
        flex-direction: column; 
        text-align: center; 
        gap: 25px; 
    }
    
    .header-identity { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    .header-actions { 
        flex-direction: column; 
        width: 100%; 
    }
    
    .btn { 
        justify-content: center; 
        width: 100%; 
    }
    
    aside { 
        position: static; 
    }
}

/* Print styles */
@media print {
    @page { margin: 1cm; size: A4; }
    
    /* Reset Body */
    body {
        background: white !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 10pt; /* Slightly smaller for A4 fitting */
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Layout Reset */
    .page-wrapper {
        display: block !important;
        max-width: 100% !important;
        gap: 0 !important;
    }

    /* Hide UI Elements */
    .header-actions, 
    .lightbox, 
    .wcag-badge, 
    footer,
    button {
        display: none !important;
    }

    /* Reset Shadows, Borders & Backgrounds for ink saving */
    .header-card, 
    aside section, 
    main section,
    .profile-highlight {
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        backdrop-filter: none !important;
    }
    
    .header-card { margin-bottom: 30px !important; border-bottom: 2px solid #ccc !important; padding-bottom: 20px !important; }
    .header-card::before { display: none; }
    .header-profile-img { box-shadow: none; border: 1px solid #ccc; width: 100px; height: 100px; }
    .header-info h1 { font-size: 2.5rem; background: none; color: #000; -webkit-text-fill-color: initial; }
    .header-role { color: #555; background: none; -webkit-text-fill-color: initial; }

    /* Force visibility (override reveal animation) */
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Sidebar - Move to top or linearize */
    aside {
        position: static;
        display: block;
        border-bottom: 1px solid #ddd;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    /* Compact Sidebar Sections for print */
    aside section { margin-bottom: 15px !important; }
    .section-title { font-size: 1.1rem; border-bottom: 1px solid #000; color: #000; margin-bottom: 10px; }
    .contact-list { display: flex; flex-wrap: wrap; gap: 15px; }
    .contact-list li { margin-bottom: 5px; }
    .contact-icon-box { display: none; } /* Hide icons to save space */
    
    /* Main Content */
    main h2 { color: #000; background: none; -webkit-text-fill-color: initial; border-bottom: 1px solid #000; padding-bottom: 5px; width: 100%; }
    
    /* Timeline & Jobs */
    .timeline { border-left: 2px solid #ccc; padding-left: 20px; }
    .job-card { margin-bottom: 30px; page-break-inside: avoid; }
    .job-card::before { display: none; } /* Remove dots */
    .job-date { background: none; color: #000; border: 1px solid #ccc; padding: 2px 8px; }
    .job-title { color: #000; }
    .job-company { color: #333; }
    
    /* Profile Emphasis Print Style */
    .profile-highlight { border-left: 2px solid #000 !important; padding-left: 15px !important; }
    .process-flow { color: #000; }

    /* Grids to Block */
    .projects-grid, .references-grid { display: block; }
    .p-card, .ref-card { 
        background: none; 
        border: 1px solid #ddd; 
        margin-bottom: 10px; 
        text-align: left; 
        padding: 10px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        page-break-inside: avoid;
    }
    .p-icon-box { display: none; }

    /* Links */
    a { color: #000; text-decoration: underline; }
}
/*

     ........
     |      |]
     \      /
      `----'
   Coffee empty, work done.
*/
