:root {
    --primary-bg: #ffffff;
    --sidebar-bg: #1a2530;
    /* Deep dark blue/charcoal */
    --input-bg: #f4f4f4;

    --text-main: #2c3e50;
    --text-muted: #546e7a;
    --sidebar-text: #ecf0f1;
    --sidebar-muted: #bdc3c7;

    --accent-color: #c0a062;
    /* Gold/Metallic for premium touch */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: #cfd8dc;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.resume-container {
    max-width: 1000px;
    margin: 40px auto;
    background-color: var(--primary-bg);
    display: grid;
    grid-template-columns: 330px 1fr;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-height: 1100px;
    animation: fadeIn 0.8s ease-out;
    /* Main entrance */
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}

/* Sidebar Styles */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    animation: slideInLeft 1s ease-out;
    /* Sidebar entrance */
}

.avatar-container {
    width: 160px;
    height: 160px;
    margin-bottom: 5px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
}

.avatar-container:hover {
    transform: scale(1.02);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.profile-header h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* Premium shadow */
}

.profile-header .job-title {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section {
    width: 100%;
}

.sidebar .section h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--sidebar-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 13px;
    width: 100%;
    align-items: flex-start;
    /* Align left for cleaner look with icons */
    padding: 0 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    /* More space between icon and text */
    width: 100%;
    justify-content: flex-start;
    color: var(--sidebar-text);
    /* Brighter text for readability */
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    /* Subtle nudge */
}

.contact-item .icon {
    color: var(--accent-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(192, 160, 98, 0.1);
    /* Subtle gold background */
    border-radius: 50%;
    border: 1px solid rgba(192, 160, 98, 0.3);
    flex-shrink: 0;
    /* Prevent icon shrinking */
}

.contact-item span,
.contact-item a {
    white-space: normal;
    /* Allow wrapping */
    overflow: visible;
    text-overflow: clip;
    /* Remove ellipsis */
    font-weight: 500;
    letter-spacing: 0.3px;
    word-break: break-word;
    /* Ensure long emails break if needed */
    text-align: left;
}

/* Sidebar Lists - Skill Chips */
.sidebar ul {
    list-style: none;
    text-align: left;
    width: 100%;
    padding: 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Space between chips */
}

.sidebar h4 {
    color: var(--accent-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: left;
    padding-left: 10px;
    width: 100%;
    opacity: 0.9;
}

.sidebar li {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: #eceff1;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 0;
    /* Handled by gap */
    line-height: 1.4;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border for definition */
}

.sidebar li:hover {
    background: linear-gradient(135deg, rgba(192, 160, 98, 0.3) 0%, rgba(192, 160, 98, 0.1) 100%);
    transform: translateY(-2px);
    /* Pop up effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Specific styling for non-chip lists in main content */
.main-content ul {
    display: block;
}

.education .item {
    margin-bottom: 25px;
    text-align: left;
    padding: 0 10px;
    border-left: 2px solid rgba(192, 160, 98, 0.3);
    padding-left: 15px;
    margin-left: 5px;
}

.education h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 14px;
    padding-left: 0;
    text-transform: none;
    letter-spacing: 0.5px;
}

.education .institution {
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.education .date,
.education .location {
    font-size: 12px;
    font-style: italic;
    color: var(--sidebar-muted);
}

/* Main Content Styles */
.main-content {
    padding: 70px 70px;
    /* More breathable */
    background-color: white;
}

.main-content .section h3 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--text-main);
    border-bottom: none;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-content .section h3::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(to right, var(--accent-color), transparent);
    flex-grow: 1;
    opacity: 0.5;
}

.profile p {
    font-size: 16px;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.9;
    font-weight: 300;
}

.job {
    margin-bottom: 0;
    position: relative;
    padding-left: 30px;
    padding-bottom: 40px;
    border-left: 1px solid #e0e0e0;
}

.job:last-child {
    border-left: 1px solid transparent;
}

.job::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--accent-color);
    z-index: 2;
}

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

.job h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 2px;
    font-weight: 700;
}

.job .company {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.job .date {
    font-size: 13px;
    color: #90a4ae;
    font-weight: 500;
}

.job .duties {
    padding-left: 0;
    list-style-type: none;
}

.job .duties li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 0;
    color: var(--text-muted);
    font-size: 15px;
}

.job .duties li::before {
    content: none;
}

.activities ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.activities ul li {
    margin-bottom: 0;
    padding-left: 20px;
    position: relative;
    font-size: 15px;
    color: var(--text-muted);
}

.activities ul li::before {
    content: "✦";
    font-size: 10px;
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--accent-color);
}

/* Responsive / Mobile */
@media screen and (max-width: 768px) {
    body {
        background-color: #fff;
    }

    .resume-container {
        grid-template-columns: 1fr;
        margin: 0;
        box-shadow: none;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        padding: 40px 20px;
        order: -1;
        /* Sidebar on top */
        width: 100%;
    }

    .sidebar li,
    .education .item {
        text-align: center;
        padding: 0;
        border-left: none;
    }

    .sidebar ul {
        justify-content: center;
    }

    .education h4 {
        text-align: center;
    }

    .sidebar h4 {
        text-align: center;
        padding-left: 0;
    }

    /* Contact info on mobile should wrap */
    .contact-info {
        align-items: center;
        /* Center align on mobile */
    }

    .contact-item {
        justify-content: center;
        width: auto;
        /* Allow auto width */
        max-width: 100%;
    }

    .contact-item span,
    .contact-item a {
        white-space: normal;
        /* Allow wrap on mobile */
        text-align: center;
        font-size: 13px;
        /* Slightly larger for readability */
    }

    .main-content {
        padding: 30px 20px;
    }

    .job {
        padding-left: 20px;
        border-left: 2px solid #e0e0e0;
        margin-left: 5px;
    }

    /* Adjust timeline dot for mobile */
    .job::before {
        left: -7px;
    }

    .activities ul {
        grid-template-columns: 1fr;
    }

    .job-header {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .section h3 {
        font-size: 22px;
        margin-bottom: 25px;
    }
}

/* Print Styles */
@media print {

    *,
    .resume-container,
    .sidebar {
        animation: none !important;
        transition: none !important;
    }

    body {
        margin: 0;
        background: white;
        font-size: 12px;
    }

    .resume-container {
        margin: 0;
        box-shadow: none;
        max-width: 100%;
        width: 100%;
        display: grid;
        grid-template-columns: 280px 1fr;
        min-height: 100vh;
    }

    .sidebar {
        background-color: #1a2530 !important;
        color: #ecf0f1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 30px 20px;
        height: 100%;
    }

    .sidebar li {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #eceff1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1px solid #444;
        /* Fallback visual for print if background stripped */
    }

    .main-content {
        padding: 30px 30px;
    }

    .job {
        border-left: 1px solid #ccc !important;
    }

    .section h3::after {
        background: #ccc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    @page {
        margin: 0;
    }
}

/* Print Button Styles */
.print-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.print-btn {
    background: var(--sidebar-bg);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.print-btn:hover {
    background: var(--accent-color);
    color: var(--sidebar-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(192, 160, 98, 0.4);
}

.print-btn:active {
    transform: translateY(-1px);
}

/* Hide button in print mode */
@media print {

    .print-container,
    .print-btn {
        display: none !important;
    }
}