/* LinkedIn Theme Styles */

/* 3. Typography & Colors */
:root {
    --li-bg: #f3f2ef;
    --li-card-bg: #ffffff;
    --li-text-primary: #191919;
    --li-text-secondary: #666666;
    --li-link: #0a66c2;
    --li-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    /* Subtler shadow */
    --li-radius: 8px;
    --li-font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--li-bg) !important;
    font-family: var(--li-font) !important;
    color: var(--li-text-primary) !important;
    line-height: 1.5;
}

a {
    color: var(--li-link) !important;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--li-text-primary) !important;
}

/* 4. Cards */
.resume-section,
.resume-header {
    background: var(--li-card-bg) !important;
    border-radius: var(--li-radius) !important;
    box-shadow: var(--li-shadow) !important;
    border: none !important;
    margin-bottom: 24px !important;
    /* Spacing between cards */
    padding: 24px !important;
}

/* Remove default dividers/borders from template */
.resume-section-title::after {
    display: none !important;
}

.resume-section-title {
    border-bottom: none !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    padding-bottom: 0 !important;
    text-transform: capitalize !important;
    /* Not uppercase like original */
}

/* 2. Profile Header (Hero) */
.resume-header {
    position: relative;
    height: auto !important;
    /* Reset height from pillar-1.css */
    padding: 0 !important;
    /* Reset padding to handle cover */
    overflow: visible;
    /* Changed to visible just in case, though hidden was for radius */
    /* actually keep overflow hidden for radius, but ensure height is auto */
    overflow: hidden;
    /* Ensure cover stays within radius */
    padding-bottom: 24px !important;
}

/* Cover Image */
.resume-header::before {
    content: '';
    display: block;
    position: absolute;
    /* Take out of flow */
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #0077b5, #00a0dc);
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Header Content Container */
.resume-header .media {
    display: flex !important;
    flex-direction: row !important;
    position: relative;
    padding: 0 24px;
    margin-top: 0;
    align-items: flex-start;
    z-index: 5;
    /* Ensure content is above cover */
}

/* Profile Picture */
.resume-header .picture {
    width: 160px !important;
    height: 160px !important;
    border-radius: 50% !important;
    border: 4px solid #fff !important;
    object-fit: cover !important;
    margin-top: 40px !important;
    /* Position top at 40px (120 - 160/2 + adjustment) */
    margin-bottom: 16px;
    margin-right: 24px;
    z-index: 10;
    background: #fff;
    position: relative;
    flex-shrink: 0;
}

/* Header Info */
.resume-header .media-body {
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 125px !important;
    /* Push text down below the 120px cover */
    text-align: left !important;
    display: block !important;
    background: transparent;
}

.resume-header .name {
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 4px;
    line-height: 1.2;
    color: var(--li-text-primary) !important;
}

/* Job Title / Basic Info */
.resume-header .title {
    font-size: 16px !important;
    color: var(--li-text-secondary) !important;
    margin-bottom: 12px !important;
    font-weight: 400;
}

/* Flags - Top Right */
.resume-header .title {
    position: absolute;
    top: 20px;
    /* Relative to .media (0px), so inside cover */
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
    z-index: 20;
}

.resume-header .title img {
    width: 24px;
    height: auto;
    margin-left: 8px;
    transition: transform 0.2s;
}

.resume-header .title img:hover {
    transform: scale(1.2);
}

/* Contact Info Line */
.resume-header .primary-info .list-unstyled {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--li-text-secondary);
}

.resume-header .primary-info .list-unstyled li {
    margin-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
}

.resume-header .primary-info i,
.resume-header .primary-info svg,
.resume-header .primary-info .svg-inline--fa {
    color: #434E5E !important;
    /* Forced dark grey to match LinkedIn icon container */
    margin-right: 6px;
}

.resume-header .primary-info a {
    color: var(--li-link) !important;
    /* Changed from secondary to link blue */
    font-weight: 500;
}

.resume-header .primary-info a:hover {
    text-decoration: underline;
    color: var(--li-link) !important;
}

/* Social/Secondary Info */
.resume-header .secondary-info {
    margin-top: 0 !important;
    margin-left: 0 !important;
}

.resume-header .secondary-info .resume-social {
    display: flex;
    gap: 16px;
    padding: 0;
}

.resume-header .secondary-info li {
    margin-bottom: 0 !important;
}

.resume-header .secondary-info a {
    color: var(--li-link) !important;
    font-size: 14px;
}


/* 5. Experience (Left Column) */
.resume-section.experience-section .resume-timeline {
    padding-left: 0 !important;
    border-left: none !important;
}

.resume-section.experience-section .resume-timeline::before {
    display: none !important;
}

/* Enforce spacing with high specificity */
body .resume-section.experience-section .resume-timeline .resume-timeline-item {
    border-bottom: 1px solid #ebebeb !important;
    padding-bottom: 50px !important;
    margin-bottom: 50px !important;
    display: block !important;
    width: 100% !important;
}

/* Ensure subsequent items have top margin as well */
body .resume-section.experience-section .resume-timeline .resume-timeline-item+.resume-timeline-item {
    margin-top: 50px !important;
}

.resume-timeline-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.resume-timeline-item::before {
    display: none !important;
}

/* Position Layout - LinkedIn style */
.resume-timeline-item-header {
    margin-bottom: 8px;
}

.resume-position-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--li-text-primary) !important;
    margin-bottom: 2px !important;
}

.resume-company-name {
    font-size: 14px !important;
    color: var(--li-text-primary) !important;
    margin-bottom: 2px !important;
}

.resume-position-time {
    font-size: 14px !important;
    color: var(--li-text-secondary) !important;
    margin-bottom: 8px !important;
    display: block;
}

.resume-timeline-item-desc ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.resume-timeline-item-desc li {
    margin-bottom: 6px;
    color: var(--li-text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* 6. Sidebar (Right Columns) */
.col-lg-3 .resume-section {
    padding: 20px !important;
}

.col-lg-3 .resume-section-title {
    font-size: 18px !important;
    margin-bottom: 12px !important;
}

/* Languages */
.resume-lang-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.resume-lang-list li:last-child {
    border: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-lang-name {
    font-weight: 600;
    font-size: 14px;
}

.resume-lang-list small {
    background: #f3f2ef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--li-text-secondary);
}

/* Education */
.education-section li {
    margin-bottom: 16px;
}

.resume-degree {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 2px;
}

.resume-degree-time {
    font-size: 12px !important;
    color: var(--li-text-secondary) !important;
    margin-bottom: 4px;
}

.resume-degree-org {
    font-size: 13px !important;
    color: var(--li-text-primary) !important;
}

.badge {
    font-weight: normal;
    background: #f3f2ef !important;
    color: var(--li-text-secondary) !important;
    border: none !important;
    padding: 4px 8px;
}

/* Footer */
footer {
    color: var(--li-text-secondary);
    font-size: 12px;
}

/* 9. Responsiveness */
@media (min-width: 992px) {

    /* Desktop Layout Overrides */
    .resume-wrapper-inner {
        max-width: 1128px !important;
        padding: 0 !important;
        margin-top: 24px;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Grid system provided by Bootstrap handles standard 9/3 split, 
       but user requested specific %: 65-70% / 30-35% */
    .col-lg-9 {
        flex: 0 0 70%;
        max-width: 70%;
        padding-right: 12px;
    }

    .col-lg-3 {
        flex: 0 0 30%;
        max-width: 30%;
        padding-left: 12px;
    }

    .resume-header {
        margin-bottom: 24px;
    }
}

@media (max-width: 991px) {
    /* Mobile/Tablet */

    .resume-header .media {
        flex-direction: column !important;
        /* Stack vertically */
        align-items: center;
        /* Center align items */
        margin-top: 0;
    }

    .resume-header .picture {
        width: 140px !important;
        height: 140px !important;
        margin-top: 50px !important;
        /* Push down to overlap cover correctly */
        margin-right: 0;
        margin-bottom: 16px;
    }

    .resume-header .media-body {
        margin-top: 0 !important;
        /* Reset desktop margin */
        padding-top: 0 !important;
        text-align: center !important;
        /* Center text on mobile */
        width: 100%;
    }

    /* Adjust flags for mobile */
    .resume-header .title {
        position: static;
        /* Back to static flow */
        margin-top: 10px !important;
        margin-bottom: 16px !important;
        background: transparent;
        box-shadow: none;
        padding: 0;
        text-align: center;
        display: block;
        width: 100%;
    }

    .resume-header .primary-info .list-unstyled {
        justify-content: center;
        /* Center contact info */
    }

    .resume-header .secondary-info .resume-social {
        justify-content: center;
        /* Center social links */
    }
}

/* Override global padding from pillar-1.css with higher specificity */
.resume-wrapper .resume-body,
.resume-wrapper .p-5 {
    padding: 0 !important;
}

.resume-timeline-item-header .d-flex.flex-column.flex-md-row {
    margin-top: 41px !important;
}