:root {
    --primary-color: #111;
    --secondary-color: #666;
    --border-color: #ddd;
    --font-main: 'Apple Garamond', 'New York', 'New York Extra Large', 'New York Large', 'New York Medium', 'New York Small', ui-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-headers: 'SF Pro Display', 'SF Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Language Switch */
.lang-switch {
    text-align: right;
    max-width: 800px;
    margin: 12px auto 0;
    padding: 0 40px;
    font-family: var(--font-headers);
    font-size: 13px;
}

.lang-switch a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.lang-switch a:hover {
    color: var(--primary-color);
}

.lang-switch a::after {
    content: none;
}

/* Reset & Basics */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.resume-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 60px 40px 40px 40px;
    /* Increased top padding from 40px to 60px */
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for paper effect */
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: none;
}

a:hover {
    opacity: 0.7;
}

a::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Header Section */
.resume-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.resume-header .name {
    font-family: var(--font-headers);
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-stretch: expanded;
    /* for variable fonts */
    font-variation-settings: "wdth" 125;
    /* explicit width axis */
}

.resume-header .contact-info {
    font-size: 14px;
    color: var(--secondary-color);
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Section Titles */
.section-title {
    font-family: var(--font-headers);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: normal;
    color: var(--primary-color);
    font-stretch: expanded;
    font-variation-settings: "wdth" 125;
    border-bottom: 2px solid #000;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

/* Professional Summary */
.summary-section p {
    margin-bottom: 10px;
}

/* Skills */
ul {
    margin: 0;
    padding-left: 0;
    /* Remove default padding for grid look */
    list-style: none;
    /* customized bullets/layout */
}

.skills-list li {
    display: flex;
    margin-bottom: 8px;
    /* Increased spacing */
}

.skills-list li b {
    flex: 0 0 160px;
    /* Fixed width for category column */
    color: var(--primary-color);
    font-weight: 600;
}

/* Fallback for mobile or small screens handled in media query */
.achievements-list {
    padding-left: 18px;
    /* restoring bullets for job achievements */
    list-style: disc;
}

.achievements-list li {
    display: list-item;
    /* normal list item behavior */
    margin-bottom: 4px;
}

/* Experience Section */
.job-entry {
    margin-bottom: 35px;
    /* Increased vertical rhythm */
}

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

.job-entry .company {
    font-family: var(--font-headers);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    font-stretch: expanded;
    font-variation-settings: "wdth" 125;
}

.job-entry .location {
    font-size: 14px;
    color: var(--secondary-color);
}

.job-subheader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-family: var(--font-headers);
    /* Removed expanded stretch from Role to differentiate from Company Name */
}

.job-subheader .role {
    font-weight: 500;
    /* Regular/Medium weight to contrast with Bold Company Name */
    font-size: 15px;
    color: #444;
    /* Dark gray to soften it slightly against the black company name */
    margin-top: 4px;
    /* Essential breathing room */
}

.job-subheader .date {
    font-size: 14px;
    font-family: var(--font-main);
    /* Keep dates in main serif font */
    font-style: italic;
    color: var(--secondary-color);
}

.role-summary {
    margin: 5px 0 10px 0;
    color: var(--secondary-color);
}

/* Education Section */
.education-entry {
    margin-bottom: 15px;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.edu-header .university {
    font-size: 15px;
}

.edu-header .location {
    font-size: 14px;
    color: var(--secondary-color);
}

.edu-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.edu-details .degree {
    font-size: 14px;
}

.edu-details .date {
    font-family: var(--font-main);
    font-style: italic;
    font-size: 14px;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 600px) {
    .resume-container {
        margin: 0;
        padding: 20px;
        width: 100%;
        box-shadow: none;
    }

    .resume-header .name {
        font-size: 26px;
    }

    .contact-info {
        flex-direction: column;
        gap: 4px;
    }

    .contact-info .separator {
        display: none;
    }

    .job-header,
    .job-subheader,
    .edu-header,
    .edu-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-header .location,
    .job-subheader .date,
    .edu-header .location,
    .edu-details .date {
        margin-top: 2px;
    }

    /* Make lists tighter on mobile but keep grid if possible, or stack */
    .skills-list li {
        flex-direction: column;
        margin-bottom: 12px;
    }

    .skills-list li b {
        flex: auto;
        margin-bottom: 2px;
    }

    ul {
        padding-left: 0;
    }

    .achievements-list {
        padding-left: 18px;
    }
}

/* Print Overrides */
@media print {
    .lang-switch {
        display: none;
    }

    body {
        background-color: #fff;
        line-height: 1.3;
        font-size: 9pt;
        margin: 4mm 10mm;
    }

    .resume-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: none;
    }

    .resume-header {
        margin-bottom: 4px;
        padding-bottom: 4px;
    }

    .resume-header .name {
        font-size: 16pt;
        margin-bottom: 2px;
    }

    .resume-header .contact-info {
        font-size: 8.5pt;
        gap: 4px;
    }

    .section-title {
        font-size: 10pt;
        margin-top: 4pt;
        margin-bottom: 2pt;
    }

    .summary-section p {
        margin-bottom: 2px;
    }

    .skills-list li {
        margin-bottom: 2px;
    }

    .job-entry .company {
        font-size: 10pt;
    }

    .job-subheader .role {
        font-size: 9pt;
    }

    .role-summary {
        margin: 1px 0 4px 0;
    }

    .job-entry {
        margin-bottom: 5pt;
    }

    .achievements-list li {
        margin-bottom: 1px;
    }

    .education-entry {
        margin-bottom: 2px;
    }

    a {
        text-decoration: none;
        color: #000;
        border: none;
    }

    /* Ensure maximum contrast for print */
    body,
    p,
    h1,
    h2,
    h3,
    h4,
    li,
    span,
    div {
        color: #000 !important;
    }

    .skills-list li b {
        color: #000 !important;
    }
}