/* --- Global Styles & Reset --- */
:root {
    --sidebar-width: 380px; 
    
    /* LIGHT THEME VARIABLES */
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff; /* Visual merging */
    --text-primary: #000000;
    --text-secondary: #444;
    --border-color: #eee;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --card-background: #ffffff; /* For cards inside the content area */
    --card-hover-background: #f0f0f0; 
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Subtle card shadow */
    --light-text-color: #555; /* Used for dates/company names */
    --pop-shadow-light: rgba(0, 0, 0, 0.15); /* Stronger shadow for pop effect */
    
    /* LIGHT MODE LOGO BACKGROUND: Transparent */
    --logo-bg-light: transparent;
}

/* DARK THEME VARIABLES (Applied when body has data-theme="dark") */
body[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #121212; /* Visual merging */
    --text-primary: #ffffff;
    --text-secondary: #ccc;
    --border-color: #333;
    --shadow-color: rgba(255, 255, 255, 0.05);
    --card-background: #1e1e1e;
    --card-hover-background: #2a2a2a;
    --card-shadow: 0 4px 6px rgba(255, 255, 255, 0.03);
    --light-text-color: #ccc;
    --pop-shadow-dark: rgba(255, 255, 255, 0.1); /* Stronger shadow for dark pop */
    
    /* DARK MODE LOGO BACKGROUND: White (to make dark logos visible) */
    --logo-bg-dark: #ffffff; 
}

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

body {
    /* KEY CHANGE: Use Inter font */
    font-family: 'Inter', sans-serif, Arial; 
    
    background-color: var(--bg-primary); 
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s; 
    min-height: 100vh;
}

/* --- TOP NAVIGATION BAR --- */
.navbar {
    position: sticky; 
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color); 
    padding: 20px 40px; 
    z-index: 100; 
    
    display: flex;
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.nav-brand {
    font-size: 1.5em; 
    font-weight: 800;
    color: var(--text-primary);
    text-transform: lowercase;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500; 
    margin-left: 20px;
    padding-bottom: 5px;
    transition: border-bottom 0.3s;
    text-transform: lowercase; 
}

.nav-links a:hover {
    border-bottom: 2px solid var(--text-secondary);
}

.nav-links a.active {
    border-bottom: 2px solid var(--text-primary);
}

.nav-utility .fa-moon,
.nav-utility .fa-sun {
    cursor: pointer;
}

/* --- NEW LAYOUT: MAIN WRAPPER (VERTICAL LINE FIX) --- */
.main-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr; 
    width: 100%;
    /* Calculate height excluding the navbar height (approx 68px) */
    min-height: calc(100vh - 68px); 
}

/* --- 1. LEFT COLUMN (SIDEBAR) --- */
.sidebar {
    width: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    /* *** UPDATED PADDING HERE: 55px *** */
    padding: 55px 20px; 
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-picture-container {
    width: 150px; 
    height: 150px;
    margin-bottom: 20px;
    overflow: hidden; 
    border-radius: 8px; 
}

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

.sidebar .job-title {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 15px;
}

/* FINAL HR LINE CORRECTION */
.sidebar hr {
    width: calc(100% - 50px); 
    border: 0;
    border-top: 1px solid var(--border-color); 
    margin: 15px auto; 
}

/* --- SOCIAL ICON STYLING (NO GLOW) --- */
.sidebar .social-links {
    margin-top: 30px;
    display: flex; 
    gap: 25px; 
}

.sidebar .social-links a {
    display: block; 
    text-decoration: none;
    transition: opacity 0.2s; 
}

.sidebar .social-links i {
    color: var(--text-primary); 
    font-size: 1.5em; 
}

.sidebar .social-links a:hover {
    opacity: 0.7; 
}

.sidebar .social-links a:hover i {
    filter: none; 
}
/* --- END OF SOCIAL ICON UPDATES --- */

/* --- 2. RIGHT COLUMN (MAIN CONTENT AREA) --- */
.content-area {
    flex-grow: 1;
}

/* --- Content Sections Styling --- */
.content-section {
    padding: 40px 40px; 
    background-color: var(--bg-primary); 
}

.content-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px;
    text-transform: lowercase; /* Ensured lowercase heading */
}

/* New rule for the secondary 'experience' h2 on the home page */
.content-section .experience-h2 {
    margin-top: 40px; /* Add vertical separation from 'About Me' */
}


/* --- EXPERIENCE GRID AND CARD STYLES --- */

.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Space between the cards */
    margin-top: 10px;
}

.experience-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px; /* Padding inside the card */
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--card-shadow); 
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--border-color); /* Subtle border for definition */
}

.experience-item:hover {
    box-shadow: 0 4px 10px var(--shadow-color);
    transform: translateY(-2px);
}

.experience-details {
    display: flex;
    align-items: center; 
    gap: 15px;
}

.logo-box {
    width: 48px; 
    height: 48px;
    border-radius: 8px; 
    
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
    
    background-color: var(--logo-bg-light); 
    
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
    transition: background-color 0.3s; /* Transition for dark mode background */
}

/* Hover reset for Experience Logos (Ensures NO GLOW) */
.experience-item:hover .logo-box {
    filter: none; 
}


/* Dark mode specific override for logo boxes (Keeps white background in dark mode) */
body[data-theme="dark"] .logo-box {
    background-color: var(--logo-bg-dark); 
}


/* --- LOGO IMAGE PLACEMENT (Experience Section) --- */
.sociovate { background-image: url('logo2/socio.png'); }
.infolayer { background-image: url('logo2/infolayer.png'); }
.sasefied { background-image: url('logo2/sasefied.png'); }
.ablelyf { background-image: url('logo2/ablelyf.png'); }
.deloitte { background-image: url('logo2/deloitte.png'); } 
.nestify { background-image: url('logo2/nestify.png'); }


.text-content {
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    flex-grow: 1; 
}

.job-title-card {
    font-size: 1em; /* Smaller title size for cards */
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.company-name {
    font-size: 0.9em;
    color: var(--light-text-color); 
    margin: 0;
    display: flex; 
    align-items: center; 
    gap: 0.5em; 
    flex-wrap: nowrap; 
}

.job-duration {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--light-text-color);
    white-space: nowrap; 
}

/* --- MINIMALIST PROJECT LIST STYLES --- */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1px; /* Very tight spacing between list items */
    border: 1px solid var(--border-color); /* Single border around the whole group */
    border-radius: 8px;
    overflow: hidden; /* Clips the borders for a continuous look */
    box-shadow: 0 2px 5px var(--shadow-color);
    margin-top: 10px;
}

.project-item {
    display: block; /* Make <a> act like block element */
    padding: 20px 25px;
    background-color: var(--card-background); /* Card background for subtle contrast/hover */
    text-decoration: none; /* Remove underline for anchor tags */
    color: var(--text-primary);
    /* Add transition for the pop effect */
    transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.3s;
    position: relative; /* Needed for z-index on hover */
    z-index: 1; /* Ensures it renders above neighbors on hover */
}

/* Add a line divider between items, replacing the vertical gap */
.project-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color); 
}

/* PROJECT POP EFFECT */
.project-item:hover {
    background-color: var(--card-hover-background);
    /* Lift the card up */
    transform: translateY(-2px); 
    /* Stronger shadow when popped */
    box-shadow: 0 5px 15px var(--pop-shadow-light, var(--shadow-color));
}
body[data-theme="dark"] .project-item:hover {
    box-shadow: 0 5px 15px var(--pop-shadow-dark, var(--shadow-color));
}


.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.project-icon {
    font-size: 1.2em;
    color: var(--text-primary); 
    flex-shrink: 0;
}

.project-title {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.project-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    padding-left: 35px; /* Indent to align with the text content */
    margin: 0;
}

/* --- Project Link Icon Styling (Always Visible) --- */

.project-link-icon {
    font-size: 0.75em; /* Smaller size relative to the title */
    color: var(--text-secondary);
    opacity: 1; /* Icon is now ALWAYS visible */
    transition: color 0.2s; /* Keep transition for color change on hover */
    margin-left: 8px; 
}

/* Enhance the icon color when the project item is hovered */
.project-item:hover .project-link-icon {
    color: var(--text-primary); 
    /* Remove transform logic since it's always visible */
    transform: none; 
}

/* --- IMPACT LIST STYLING: Minimalist List (Role, Company, Date) --- */

.impact-list-minimal {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between the cards */
    margin-top: 10px;
}

.impact-item-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* Slightly less vertical padding than experience cards */
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--card-shadow); 
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--border-color);
}

.impact-item-minimal:hover {
    box-shadow: 0 4px 10px var(--shadow-color);
    transform: translateY(-2px);
}

.impact-details-minimal {
    display: flex; 
    align-items: center; 
    gap: 15px;
}

.logo-box-minimal {
    width: 36px; /* Smaller icon box */
    height: 36px;
    border-radius: 6px; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
    
    /* Logo styling changes for FULL COVERAGE and NO BORDER */
    background-size: cover; /* Ensures logo fills the box completely */
    background-repeat: no-repeat;
    background-position: center;
    border: none; /* REMOVE THE BORDER */
    overflow: hidden; /* Important to clip parts outside the rounded box */
    /* Use the variable background color */
    background-color: var(--logo-bg-light); 
    transition: background-color 0.3s; 
}

/* Hover reset for Impact Logos (Ensures NO GLOW) */
.impact-item-minimal:hover .logo-box-minimal {
    filter: none; 
}


/* Dark mode specific override for minimal logo boxes (Keeps white background in dark mode) */
body[data-theme="dark"] .logo-box-minimal {
    background-color: var(--logo-bg-dark); 
}


 /* --- LOGO IMAGE PLACEMENT (Impact Section) --- */

.eleutherai { background-image: url('logo/eai.png'); }
.aiplans { background-image: url('logo/ai-plans.png'); }
.aiforgood { background-image: url('logo/doha-hub.png'); }
.omdena { background-image: url('logo/omdena.png'); }
.scaledown { background-image: url('logo/scaledown.png'); }
.now { background-image: url('logo/now.png'); }


.text-content-minimal {
    display: flex;
    flex-direction: column; 
    justify-content: center; 
}

.job-title-minimal {
    font-size: 1em; 
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.company-name-minimal {
    font-size: 0.85em; /* Slightly smaller company name */
    color: var(--light-text-color); 
    margin: 0;
}

.job-duration-minimal {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--light-text-color);
    white-space: nowrap; 
}

/* --- Crucial Hiding/Showing Class for JS --- */

.hidden {
    display: none; 
}

/* Responsive adjustment for small screens */
@media (max-width: 800px) {
    .main-wrapper {
        /* Stack the sidebar and content vertically */
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none; /* Hide nav links on very small screens, or adjust */
    }

    .content-section {
        padding: 20px;
    }

    .experience-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
    }
    
    .impact-item-minimal {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
.profile-picture-container {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;

    /* NEW */
    border: 2px solid var(--border-color);
}
