:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #3b82f6;
    --tag-bg: #eff6ff;
    --tag-text: #1e40af;
    --tag-active-bg: #2563eb;
    --tag-active-text: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) {
        --primary-color: #3b82f6;
        --primary-hover: #60a5fa;
        --secondary-color: #94a3b8;
        --background: #0f172a;
        --surface: #1e293b;
        --border: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --accent: #60a5fa;
        --tag-bg: #1e3a8a;
        --tag-text: #93c5fd;
        --tag-active-bg: #3b82f6;
        --tag-active-text: #ffffff;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    }
}

/* Manual dark mode override */
:root.dark-mode {
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary-color: #94a3b8;
    --background: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --accent: #60a5fa;
    --tag-bg: #1e3a8a;
    --tag-text: #93c5fd;
    --tag-active-bg: #3b82f6;
    --tag-active-text: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Manual light mode override */
:root.light-mode {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #3b82f6;
    --tag-bg: #eff6ff;
    --tag-text: #1e40af;
    --tag-active-bg: #2563eb;
    --tag-active-text: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle,
.print-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 1;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.theme-toggle i,
.print-toggle i {
    font-size: 1.125rem;
    line-height: 1;
    display: inline-block;
}

.theme-toggle:hover,
.print-toggle:hover {
    color: var(--text-primary);
}



.language-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--border);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

/* Profile Section */
.profile-section {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.profile-section:hover {
    box-shadow: var(--shadow-md);
}

.profile-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    align-items: start;
}

.profile-left-column {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-content .section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-content .section-icon {
    font-size: 1rem;
    width: 1.5rem;
    height: 1.5rem;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.profile-location {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-location::before {
    content: "📍";
    font-size: 0.875rem;
}

.work-experience-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    align-self: flex-start;
    box-shadow: var(--shadow-sm);
}

.work-experience-nav-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.work-experience-nav-btn:active {
    transform: translateY(0);
}

.nav-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.work-experience-nav-btn:hover .nav-arrow {
    transform: translateY(2px);
}

.profile-right-column {
    min-width: 200px;
}

.contact-section {
    width: 100%;
}

.contact-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s, transform 0.2s;
    padding: 0.5rem 0;
}

.contact-link:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.contact-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-link:hover .contact-icon {
    color: var(--primary-color);
}

.profile-text {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.85;
    max-width: none;
}

.profile-text p {
    margin-bottom: 1.25rem;
}

.profile-text p:last-child {
    margin-bottom: 0;
}

.profile-text p:first-child {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.75;
}

/* Section Dividers */
.profile-section::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 1.5rem 0;
}



/* Skills & Education Section */
.skills-education-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
    position: relative;
}


.skills-column,
.education-column {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skills-column::before,
.education-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-column:hover,
.education-column:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.skills-column:hover::before,
.education-column:hover::before {
    transform: scaleY(1);
}

.skills-column .section-title,
.education-column .section-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.skills-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.skills-list:last-child {
    margin-bottom: 0;
}

.skill-item {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    line-height: 1.4;
}

.education-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

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

.education-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.education-details {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0;
    line-height: 1.5;
}


/* Results Section */
.results-section {
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.work-experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.work-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.work-card:hover::before {
    transform: scaleX(1);
}

.work-card-header {
    margin-bottom: 0.75rem;
}

.work-card-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-name {
    font-size: 0.9375rem;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-period {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.employment-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--surface);
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.work-context {
    margin: 0.75rem 0;
    padding: 0.625rem;
    background: var(--surface);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

.context-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.context-item {
    display: inline-block;
    margin: 0.1875rem 0.375rem 0.1875rem 0;
    padding: 0.1875rem 0.4375rem;
    background: var(--background);
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.work-responsibilities {
    margin: 0.75rem 0;
}

.responsibilities-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.responsibilities-list {
    list-style: none;
    padding-left: 0;
}

.responsibilities-list li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.875rem;
}

.responsibilities-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.work-tags {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.tags-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-group {
    margin-bottom: 0.375rem;
}

.tag-group-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    display: block;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-chip {
    padding: 0.1875rem 0.5rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.6875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    line-height: 1.4;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .main {
        padding: 1.5rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .profile-section {
        padding: 1.5rem;
    }

    .profile-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        align-items: center;
        text-align: center;
        padding-bottom: 1.5rem;
    }

    .profile-left-column {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .profile-right-column {
        width: 100%;
        min-width: auto;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 1.75rem;
    }

    .profile-text {
        font-size: 1rem;
    }

    .profile-text p:first-child {
        font-size: 1.0625rem;
    }

    .profile-text p {
        text-align: left;
    }

    .work-experience-nav-btn {
        width: 100%;
        justify-content: center;
    }

    .skills-education-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }


    .work-experience-grid {
        grid-template-columns: 1fr;
    }

    .work-card {
        padding: 1.25rem;
    }

    .work-card-header {
        flex-direction: column;
    }

    .work-period {
        text-align: left;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-section {
        width: 100%;
        text-align: center;
        padding-top: 1rem;
    }

    .contact-links {
        align-items: center;
    }
}

@media (max-width: 480px) {

    .tag-chips {
        gap: 0.375rem;
    }

    .tag-chip {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }
}
