/* ==================== Font Face for SF Pro Rounded ==================== */
@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Heavy.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: local('SF Pro Rounded'),
        url('fonts/SF-Pro-Rounded-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ==================== CSS Variables ==================== */
:root {
    --color-black: #000000;
    --color-accent: #2196F3;
    --color-red: #E53935;
    --color-gray: #666666;
    --color-light-gray: #F5F5F5;
    --color-border: #CCCCCC;

    --font-main: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --page-padding: 14mm;
}

/* Dark mode variables */
[data-theme="dark"] {
    --color-black: #AAA599;
    --color-accent: #64B5F6;
    --color-red: #EF5350;
    --color-gray: #B0B0B0;
    --color-light-gray: #2A2A2A;
    --color-border: #404040;
}

@page {
    size: A4 portrait;
    margin: 12mm 0 12mm 0;
}

/* ==================== Base Styles ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

html,
body {
    font-family: var(--font-main);
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-black);
    background: #f0f2f8;
    padding: 0;
    margin: 0;
    display: block;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background: #1f1f1f;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px;
    min-width: calc(210mm + 48px);
}

/* Page container with simulated A4 pages */
.container {
    width: 210mm;
    min-width: 210mm;
    max-width: 210mm;
    padding: var(--page-padding);
    margin: 0 auto;
    background: #ffffff;
    overflow: visible;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .container {
    background: #1a1a1a;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Hide ATS layout by default; ATS stylesheet re-enables it when needed */
.ats-layout {
    display: none;
}


@media print {

    /* Force light theme for printing */
    html,
    html[data-theme="dark"] {
        background: #ffffff !important;
        --color-black: #000000 !important;
        --color-accent: #2196F3 !important;
        --color-red: #E53935 !important;
        --color-gray: #666666 !important;
        --color-light-gray: #F5F5F5 !important;
        --color-border: #CCCCCC !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body,
    body[data-theme="dark"],
    body[data-view-mode="ats-friendly"],
    body[data-view-mode="ats-friendly"][data-theme="dark"],
    body[data-view-mode="user-friendly"],
    body[data-view-mode="user-friendly"][data-theme="dark"] {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: auto !important;
        min-height: auto !important;
        color: #000000 !important;
        display: block !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    .container,
    [data-theme="dark"] .container,
    .ats-layout,
    [data-theme="dark"] .ats-layout,
    body[data-view-mode="ats-friendly"] .ats-layout,
    body[data-view-mode="ats-friendly"][data-theme="dark"] .ats-layout {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        min-height: auto !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: 12mm !important;
        padding-right: 12mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        overflow: visible;
        background-image: none;
        background: #ffffff !important;
        border: none !important;
    }

    /* Override dark theme styles for print */
    [data-theme="dark"] .section-title {
        color: #000000 !important;
        border-bottom-color: #000000 !important;
    }

    [data-theme="dark"] .section-title.accent-red {
        color: #E53935 !important;
        border-bottom-color: #E53935 !important;
    }

    [data-theme="dark"] .section-title.accent-yellow {
        color: #FFB74D !important;
        border-bottom-color: #FFB74D !important;
    }

    [data-theme="dark"] .section-title.accent-green {
        color: #66BB6A !important;
        border-bottom-color: #66BB6A !important;
    }

    [data-theme="dark"] .name {
        color: #000000 !important;
    }

    [data-theme="dark"] .job-title {
        color: #2196F3 !important;
    }

    [data-theme="dark"] .experience-company {
        color: #2196F3 !important;
    }

    [data-theme="dark"] .experience-position {
        color: #000000 !important;
    }

    [data-theme="dark"] .experience-achievements {
        background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%) !important;
        border-left-color: #FFC107 !important;
    }

    [data-theme="dark"] .experience-achievements__header {
        border-bottom-color: rgba(255, 193, 7, 0.3) !important;
    }

    [data-theme="dark"] .experience-achievements__header .icon .iconify {
        color: #FFC107 !important;
    }

    [data-theme="dark"] .experience-achievements__title {
        color: #F57C00 !important;
    }

    [data-theme="dark"] .experience-achievements__content li:before {
        color: #FFC107 !important;
    }

    [data-theme="dark"] .experience-achievements__content ol li:before {
        color: #FFC107 !important;
    }

    [data-theme="dark"] .experience-achievements__content u {
        border-bottom-color: #FFC107 !important;
    }

    [data-theme="dark"] .experience-link {
        background: #f7f8fb !important;
        border-color: rgba(0, 0, 0, 0.18) !important;
    }

    [data-theme="dark"] .experience-link__preview {
        background: #e9ecf6 !important;
    }

    [data-theme="dark"] .skill-keyword {
        background-color: #F5F5F5 !important;
        color: #000000 !important;
    }

    [data-theme="dark"] #extraSkillsSection .section-title {
        color: #5a17e8 !important;
        border-bottom-color: #5a17e8 !important;
    }

    [data-theme="dark"] #extraSkills strong,
    [data-theme="dark"] #extraSkills b {
        color: #5a17e8 !important;
    }

    [data-theme="dark"] #interestsSection .section-title {
        color: #10B981 !important;
        border-bottom-color: #10B981 !important;
    }

    [data-theme="dark"] #interests strong,
    [data-theme="dark"] #interests b {
        color: #10B981 !important;
    }

    [data-theme="dark"] #educationLanguagesSection .section-title {
        color: #10B981 !important;
        border-bottom-color: #10B981 !important;
    }

    [data-theme="dark"] #educationLanguages strong,
    [data-theme="dark"] #educationLanguages b {
        color: #10B981 !important;
    }

    [data-theme="dark"] .contact-item a,
    [data-theme="dark"] .contact-info>a.contact-item {
        color: #000000 !important;
        text-decoration: none !important;
    }

    [data-theme="dark"] .contact-item a:hover,
    [data-theme="dark"] .contact-info>a.contact-item:hover {
        color: #000000 !important;
        text-decoration: none !important;
    }

    [data-theme="dark"] .avatar {
        border-color: #F5F5F5 !important;
    }

    /* Link tags for print */
    .link-tag {
        background-color: #F5F5F5 !important;
        color: #000000 !important;
        border-color: #CCCCCC !important;
    }

    .link-tag__icon {
        color: #2196F3 !important;
    }

    /* Force page breaks to respect element boundaries */
    .header,
    .header-content,
    .header-info,
    .contact-info {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .experience-content {
        page-break-inside: auto;
        break-inside: auto;
    }

    .header-bar,
    .header-bar__controls,
    .pdf-download-btn,
    .theme-toggle-btn,
    .view-mode-switcher {
        display: none !important;
    }
}

/* ==================== Typography ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

p {
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    image-rendering: auto;
}

/* Ensure icons don't inherit link color */
a .iconify {
    color: currentColor !important;
}

strong,
b {
    font-weight: 700;
    color: var(--color-accent);
}

em,
i {
    font-style: italic;
}

u {
    text-decoration: underline;
}

/* ==================== Header Section ==================== */
.header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.view-mode-switcher {
    position: fixed;
    top: 24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 0;
    z-index: 2000;
    pointer-events: auto;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .view-mode-switcher {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.view-mode-switcher__option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--color-black);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
}

.view-mode-switcher__icon {
    font-size: 16px;
    color: currentColor;
}

.view-mode-switcher__text {
    min-width: auto;
}

.view-mode-switcher__option:first-child {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.view-mode-switcher__option:last-child {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.view-mode-switcher__option:hover {
    background-color: var(--color-light-gray);
}

.view-mode-switcher__option--active {
    background-color: var(--color-accent);
    color: #ffffff;
}

.view-mode-switcher__option--active:hover {
    background-color: var(--color-accent);
}

.view-mode-switcher__option--active .view-mode-switcher__icon {
    color: #ffffff;
}

[data-theme="dark"] .view-mode-switcher__option {
    color: var(--color-black);
}

[data-theme="dark"] .view-mode-switcher__option:hover {
    background-color: #353535;
}

[data-theme="dark"] .view-mode-switcher__option--active {
    background-color: var(--color-accent);
    color: #ffffff;
}

.header-bar {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    justify-content: flex-end;
    width: auto;
    z-index: 2000;
    pointer-events: none;
}

.header-bar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.pdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    color: var(--color-black);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pdf-download-btn:hover,
.pdf-download-btn:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f0f7ff;
    text-decoration: none !important;
}

[data-theme="dark"] .pdf-download-btn {
    background-color: #2a2a2a;
    color: var(--color-black);
}

[data-theme="dark"] .pdf-download-btn:hover,
[data-theme="dark"] .pdf-download-btn:focus-visible {
    background-color: #353535;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none !important;
}

.pdf-download-btn__icon,
.pdf-download-btn .iconify {
    font-size: 16px;
    color: var(--color-accent) !important;
}

.pdf-download-btn__text {
    min-width: auto;
}

.language-switcher {
    position: relative;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: auto;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    color: var(--color-black);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #f0f7ff;
}

.theme-toggle-btn__icon {
    font-size: 20px;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle-btn {
    background-color: #2a2a2a;
    color: var(--color-black);
}

[data-theme="dark"] .theme-toggle-btn:hover,
[data-theme="dark"] .theme-toggle-btn:focus-visible {
    background-color: #353535;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle-btn__icon {
    color: #FFC107;
}

.language-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    color: var(--color-black);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.language-switcher__trigger:hover,
.language-switcher__trigger:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .language-switcher__trigger {
    background-color: #2a2a2a;
    color: var(--color-black);
}

[data-theme="dark"] .language-switcher__trigger:hover,
[data-theme="dark"] .language-switcher__trigger:focus-visible {
    background-color: #353535;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-switcher__label {
    min-width: 32px;
    text-align: center;
}

.language-switcher__icon {
    font-size: 16px;
}

.language-switcher__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    min-width: 140px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.3s ease;
}

[data-theme="dark"] .language-switcher__list {
    background-color: #2a2a2a;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.language-switcher[data-open="true"] .language-switcher__list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.language-switcher__option {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 16px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-black);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.language-switcher__option:hover,
.language-switcher__option:focus-visible {
    background-color: var(--color-light-gray);
    color: var(--color-accent);
}

.language-switcher__option--active,
.language-switcher__option[aria-selected="true"] {
    color: var(--color-accent);
}

@media (max-width: 1024px) {
    .view-mode-switcher {
        top: 16px;
        left: 16px;
    }

    .view-mode-switcher__option {
        padding: 8px 12px;
        font-size: 11px;
    }

    .header-bar {
        top: 16px;
        right: 16px;
    }

    .header-bar__controls {
        gap: 6px;
    }

    .pdf-download-btn {
        padding: 8px 12px;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    align-items: flex-start;
}

.name {
    font-size: 30px;
    font-weight: 800;
    color: var(--color-black);
    letter-spacing: -1px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

.job-title {
    font-size: 17px;
    color: var(--color-accent);
    margin-bottom: 10px;
    font-weight: 700;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 6px;
    row-gap: 4px;
    width: 100%;
}

.contact-info>.contact-item,
.contact-info>a.contact-item {
    display: inline-flex;
    align-items: center;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 0;
}

.contact-item a,
.contact-info>a.contact-item {
    color: var(--color-black) !important;
    text-decoration: none !important;
}

.contact-item a:hover,
.contact-info>a.contact-item:hover {
    color: var(--color-black) !important;
    text-decoration: none !important;
}

.contact-item a .icon,
.contact-info>a.contact-item .icon {
    color: inherit;
}

.contact-item a .icon .favicon,
.contact-info>a.contact-item .icon .favicon {
    opacity: 1;
    filter: none;
}

.contact-item .icon {
    font-style: normal;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.contact-item[data-contact-type="location"] .icon {
    color: var(--color-red);
}

.contact-item[data-contact-type="location"] .icon .iconify {
    color: var(--color-red);
}

.contact-item .icon .iconify {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.contact-item .icon .favicon {
    width: 16px;
    height: 16px;
    display: block;
    border-radius: 4px;
    object-fit: contain;
    vertical-align: middle;
}

.header-avatar {
    flex-shrink: 0;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-light-gray);
    transition: border-color 0.3s ease;
}

/* ==================== Main Content - Two Columns ==================== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "about expectation"
        "extra-skills right-stack"
        "experience experience"
        "projects projects"
        "skills skills";
    column-gap: 16px;
    row-gap: 12px;
    align-items: start;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.main-content>* {
    min-width: 0;
    overflow: visible;
}

.left-column,
.right-column {
    display: contents;
}

#aboutSection {
    grid-area: about;
}

#expectationSection {
    grid-area: expectation;
}

#extraSkillsSection {
    grid-area: extra-skills;
}

#skillsSection {
    grid-area: skills;
}

#rightStack {
    grid-area: right-stack;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#experienceSection {
    grid-area: experience;
}

#projectsSection {
    grid-area: projects;
}

.section-full-width {
    grid-column: 1 / -1;
}

/* ==================== Section Styles ==================== */
.section {
    page-break-inside: auto;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-black);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-black);
    display: flex;
    align-items: center;
    gap: 8px;
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
}

.section-title .icon {
    font-style: normal;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
}

.section-title .icon .iconify {
    width: 20px;
    height: 20px;
    color: inherit !important;
}

.section-title.accent-red {
    color: var(--color-red);
    border-bottom-color: var(--color-red);
}

.section-title.accent-yellow {
    color: #F57C00;
    border-bottom-color: #F57C00;
}

[data-theme="dark"] .section-title.accent-yellow {
    color: #FFB74D;
    border-bottom-color: #FFB74D;
}

.section-title.accent-green {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

[data-theme="dark"] .section-title.accent-green {
    color: #66BB6A;
    border-bottom-color: #66BB6A;
}

.section-content {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible;
}

.section-content>*:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ==================== Common List Styles ==================== */
.section-content ul,
#about ul,
.experience-responsibilities ul,
#extraSkills ul,
#interests ul,
#expectation ul {
    list-style: none;
    padding-left: 0;
}

.section-content ol,
#about ol,
.experience-responsibilities ol,
#extraSkills ol,
#interests ol,
#expectation ol {
    list-style: none;
    padding-left: 0;
    counter-reset: list-counter;
}

.section-content li,
#about li,
.experience-responsibilities li,
#extraSkills li,
#interests li,
#expectation li {
    position: relative;
    padding-left: 16px;
    line-height: 1.5;
    page-break-inside: avoid;
    break-inside: avoid;
}

.section-content li:before,
#about li:before,
.experience-responsibilities li:before,
#extraSkills li:before,
#interests li:before,
#expectation li:before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Numbered list items */
.section-content ol li,
#about ol li,
.experience-responsibilities ol li,
#extraSkills ol li,
#interests ol li,
#expectation ol li {
    counter-increment: list-counter;
}

.section-content ol li:before,
#about ol li:before,
.experience-responsibilities ol li:before,
#extraSkills ol li:before,
#interests ol li:before,
#expectation ol li:before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
}

/* ==================== About Section ==================== */
#about {
    margin-bottom: 0;
    padding-bottom: 0;
}

#about p {
    margin-bottom: 8px;
}

#about ul {
    margin-bottom: 0;
}

#about li {
    margin-bottom: 4px;
}

#about p:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ==================== Experience Section ==================== */
.experience-item {
    page-break-inside: auto;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dotted var(--color-border);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.experience-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.experience-header {
    margin-bottom: 6px;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: avoid;
    break-after: avoid;
}

.experience-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
    page-break-after: avoid;
    break-after: avoid;
}

.experience-title-row__left {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.experience-position {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-black);
    page-break-after: avoid;
    break-after: avoid;
}

.experience-company {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent);
    page-break-after: avoid;
    break-after: avoid;
}

#extraSkillsSection .section-title {
    color: #5a17e8;
    border-bottom-color: #5a17e8;
}

[data-theme="dark"] #extraSkillsSection .section-title {
    color: #b794f6;
    border-bottom-color: #b794f6;
}

.experience-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 10px;
    color: var(--color-gray);
    margin-bottom: 0;
    flex-shrink: 0;
}


.experience-meta .icon {
    font-style: normal;
    display: inline-flex;
    align-items: center;
}

.experience-meta .icon .iconify {
    width: 14px;
    height: 14px;
    color: inherit !important;
}

.experience-about {
    font-size: 13px;
    color: var(--color-gray);
    font-style: italic;
    margin-bottom: 8px;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

.experience-about p {
    font-size: 13px;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

.experience-content {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    align-items: flex-start;
    flex: 1;
    position: relative;
}

.experience-responsibilities,
.experience-achievements {
    flex: 1;
    margin-bottom: 0;
}

.experience-responsibilities p {
    margin-bottom: 3px;
}

.experience-responsibilities p:last-child {
    margin-bottom: 0;
}

.experience-responsibilities li {
    margin-bottom: 3px;
}

/* ==================== Experience Achievements - Enhanced Styles ==================== */
.experience-achievements {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border-left: 4px solid #FFC107;
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 0;
    transition: background 0.3s ease;
}

[data-theme="dark"] .experience-achievements {
    background: linear-gradient(135deg, #3d2f1a 0%, #4a3a1f 100%);
    border-left-color: #756226;
}

.experience-achievements__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .experience-achievements__header {
    border-bottom-color: rgba(255, 213, 79, 0.4);
}

.experience-achievements__header .icon {
    font-style: normal;
    display: inline-flex;
    align-items: center;
}

.experience-achievements__header .icon .iconify {
    width: 18px;
    height: 18px;
    color: #FFC107;
}

[data-theme="dark"] .experience-achievements__header .icon .iconify {
    color: #FFD54F;
}

.experience-achievements__title {
    font-size: 13px;
    font-weight: 700;
    color: #F57C00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .experience-achievements__title {
    color: #FFB74D;
}

.experience-achievements__content {
    margin-top: 0;
}

.experience-achievements__content ul {
    margin: 0;
    padding-left: 0;
}

.experience-achievements__content ol {
    margin: 0;
    padding-left: 0;
    counter-reset: achievements-counter;
}

.experience-achievements__content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    line-height: 1.5;
    color: var(--color-black);
    font-weight: normal;
}

.experience-achievements__content li:before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0.25em;
    color: #FFC107;
    font-weight: bold;
    font-size: 10px;
}

[data-theme="dark"] .experience-achievements__content li:before {
    color: #ae9236;
}

/* Numbered list items in achievements section */
.experience-achievements__content ol li {
    counter-increment: achievements-counter;
}

.experience-achievements__content ol li:before {
    content: counter(achievements-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #FFC107;
    font-size: 13px;
}

[data-theme="dark"] .experience-achievements__content ol li:before {
    color: #FFD54F;
}

.experience-achievements__content li:last-child {
    margin-bottom: 0;
}

.experience-achievements__content p {
    margin-bottom: 6px;
    font-weight: normal;
}

.experience-achievements__content p:last-child {
    margin-bottom: 0;
}

.experience-achievements__content u {
    text-decoration: none;
    border-bottom: 3px solid #FFC107;
    border-radius: 3px;
    padding-bottom: 1px;
}

[data-theme="dark"] .experience-achievements__content u {
    border-bottom-color: #ae9236;
}

.experience-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    width: 85%;
    margin-top: auto;
    align-self: flex-start;
}

/* When links are positioned absolutely in bottom-left of experience-content */
.experience-content>.experience-links {
    position: absolute;
    bottom: 0;
    left: 0;
    width: fit-content;
    margin-top: 0;
    margin-bottom: 0;
}

/* When links are inside responsibilities, adjust styling */
.experience-responsibilities>.experience-links {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 0;
}

.experience-link {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    text-decoration: none;
    background: #f7f8fb;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: inherit;
    flex: 0 1 calc(50% - 5px);
    min-width: 0;
    min-height: 44px;
    page-break-inside: avoid;
    break-inside: avoid;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .experience-link {
    background: #353535;
    border-color: rgba(255, 255, 255, 0.18);
}

/* Специфичные стили для секции experience - ссылки по размеру контента */
#experienceSection .experience-links {
    width: fit-content;
}

#experienceSection .experience-link {
    flex: 0 0 auto;
}

.experience-link--no-description {
    min-height: 15px;
}

.experience-link__preview {
    position: relative;
    flex: 0 0 auto;
    width: 50px;
    height: 100%;
    background: #e9ecf6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

[data-theme="dark"] .experience-link__preview {
    background: #404040;
}

.experience-link__preview--fallback {
    background: #e9ecf6;
}

[data-theme="dark"] .experience-link__preview--fallback {
    background: #404040;
}

.experience-link--no-description .experience-link__preview {
    width: 30px;
}

.experience-link__favicon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.experience-link--no-description .experience-link__favicon {
    width: 16px;
    height: 16px;
}

.experience-link__preview--fallback {
    background: #e9ecf6;
}

.experience-link__fallback {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

.experience-link--no-description .experience-link__fallback {
    width: 16px;
    height: 16px;
}


.experience-link__content {
    flex: 1;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    text-decoration: none;
}

.experience-link__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-black);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.experience-link:hover .experience-link__title {
    text-decoration: underline;
}

.experience-link__description {
    font-size: 11px;
    color: var(--color-gray);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.experience-link:hover .experience-link__description {
    text-decoration: underline;
}

.experience-link__accessory {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    gap: 4px;
    min-width: 0;
    text-decoration: none;
}

.experience-link .experience-link__accessory-icon.iconify {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-gray) !important;
}

.experience-link .experience-link__accessory-icon.iconify svg {
    fill: var(--color-gray) !important;
}

[data-theme="dark"] .experience-link .experience-link__accessory-icon.iconify {
    color: var(--color-gray) !important;
}

[data-theme="dark"] .experience-link .experience-link__accessory-icon.iconify svg {
    fill: var(--color-gray) !important;
}

.experience-link__accessory-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-gray);
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none !important;
}

.experience-link:hover .experience-link__accessory-value {
    text-decoration: none !important;
}

[data-theme="dark"] .experience-link__accessory-value {
    color: var(--color-gray);
}

/* ==================== Skills Section ==================== */
.skills-intro {
    margin-bottom: 5px;
    font-style: italic;
    font-size: 12px;
    color: var(--color-gray);
}

.skill-category {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--color-border);
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: visible;
}

.skill-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.skill-category-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
    page-break-after: avoid;
    break-after: avoid;
}


.skill-keywords {
    display: flex;
    flex-wrap: wrap;
    margin: -6px 0 0 -6px;
}

.skill-keyword {
    background-color: var(--color-light-gray);
    color: var(--color-black);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: inline-block;
    margin: 6px 0 0 6px;
    page-break-inside: avoid;
    break-inside: avoid;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== Extra Skills Section ==================== */
#extraSkills p {
    margin-bottom: 4px;
    line-height: 1.5;
}

#extraSkills p:last-child {
    margin-bottom: 0;
}

#extraSkills li {
    margin-bottom: 4px;
    line-height: 1.5;
}

#extraSkills strong,
#extraSkills b {
    color: #5a17e8;
}

[data-theme="dark"] #extraSkills strong,
[data-theme="dark"] #extraSkills b {
    color: #b794f6;
}

/* ==================== Interests Section ==================== */
#interestsSection .section-title {
    color: #10B981;
    border-bottom-color: #10B981;
}

[data-theme="dark"] #interestsSection .section-title {
    color: #66BB6A;
    border-bottom-color: #66BB6A;
}

/* ==================== Education Section - Title Styles ==================== */
#educationLanguagesSection .section-title {
    color: #10B981;
    border-bottom-color: #10B981;
}

[data-theme="dark"] #educationLanguagesSection .section-title {
    color: #66BB6A;
    border-bottom-color: #66BB6A;
}

#educationLanguages strong,
#educationLanguages b {
    color: #10B981;
}

[data-theme="dark"] #educationLanguages strong,
[data-theme="dark"] #educationLanguages b {
    color: #66BB6A;
}

#interests p {
    margin-bottom: 4px;
    line-height: 1.5;
}

#interests p:last-child {
    margin-bottom: 0;
}

#interests li {
    margin-bottom: 4px;
    line-height: 1.5;
}

#interests strong,
#interests b {
    color: #10B981;
}

[data-theme="dark"] #interests strong,
[data-theme="dark"] #interests b {
    color: #66BB6A;
}

/* ==================== Link Tags (Markdown Links as Tags) ==================== */
.link-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0px 2px;
    border-radius: 6px;
    background-color: var(--color-light-gray);
    color: var(--color-black);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 0.7;
}

.link-tag__favicon {
    width: 10px;
    height: 10px;
    max-width: 10px;
    max-height: 10px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    border-radius: 2px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.link-tag__icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.link-tag__icon--fallback {
    display: none;
}

/* ==================== Projects Section ==================== */
.project-item {
    margin-bottom: 10px;
    overflow: visible;
}

.project-title {
    font-weight: 700;
    margin-bottom: 4px;
    page-break-after: avoid;
    break-after: avoid;
}

.project-description {
    font-size: 14px;
    color: var(--color-black);
}

#projectsSection .experience-links {
    width: 100%;
    row-gap: 8px;
    column-gap: 10px;
}

#projectsSection .experience-link:last-child,
#projectsSection .experience-link:nth-last-child(2):nth-child(odd) {
    margin-bottom: 0;
}

/* ==================== Education Section ==================== */
.education-item {
    margin-bottom: 10px;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: visible;
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-degree {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    page-break-after: avoid;
    break-after: avoid;
}

.education-university {
    color: var(--color-gray);
    font-size: 14px;
    margin-bottom: 4px;
}

.education-period {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 4px;
}

.education-period .icon {
    font-style: normal;
    display: inline-flex;
    align-items: center;
}

.education-period .icon .iconify {
    width: 14px;
    height: 14px;
    color: inherit !important;
}

/* ==================== Expectation Section ==================== */
#expectation li {
    margin-bottom: 4px;
    line-height: 1.5;
}

#expectation strong,
#expectation b {
    color: var(--color-red);
}

/* ==================== General Text Flow Control ==================== */
.page-break-before {
    page-break-before: always;
    break-before: always;
}
