:root[data-theme="modern-light"] {
    --primary: #0B8C7D;
    --primary-rgb: 11, 140, 125;
    --accent: #17B794;
    --accent-rgb: 23, 183, 148;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme="modern-dark"] {
    --primary: #60A5FA;
    --primary-rgb: 96, 165, 250;
    --accent: #22C55E;
    --accent-rgb: 34, 197, 94;
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.25);
}

:root[data-theme="vintage"] {
    --primary: #9B2C2C;
    --primary-rgb: 155, 44, 44;
    --accent: #B7791F;
    --accent-rgb: 183, 121, 31;
    --bg-primary: #FFFAF0;
    --bg-secondary: #FEEBC8;
    --bg-tertiary: #FBD38D;
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --border: #ECC94B;
    --shadow: rgba(237, 137, 54, 0.2);
}

:root[data-theme="minimal"] {
    --primary: #2D3748;
    --primary-rgb: 45, 55, 72;
    --accent: #718096;
    --accent-rgb: 113, 128, 150;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7FAFC;
    --bg-tertiary: #EDF2F7;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.05);
}

:root[data-theme="colorful"] {
    --primary: #6366F1;
    --primary-rgb: 99, 102, 241;
    --accent: #EC4899;
    --accent-rgb: 236, 72, 153;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F3F4F6;
    --bg-tertiary: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #374151;
    --border: #D1D5DB;
    --shadow: rgba(99, 102, 241, 0.1);
}

:root[data-theme="professional"] {
    --primary: #0F766E;
    --primary-rgb: 15, 118, 110;
    --accent: #0369A1;
    --accent-rgb: 3, 105, 161;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --border: #CBD5E1;
    --shadow: rgba(15, 23, 42, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    background: var(--bg-tertiary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px var(--shadow);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px var(--shadow);
}

.skill-progress-bar {
    height: 12px;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 6px;
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skill-progress-bar[data-progress]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

.timeline-wrapper {
    position: relative;
    padding-left: 2rem;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--accent);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 20px var(--shadow);
}

.timeline-item:hover::before {
    transform: scale(1.2);
    background-color: var(--primary);
}

.timeline-date {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.timeline-details {
    list-style-type: none;
}

.timeline-details li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.25rem;
}

.timeline-details li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--accent);
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px var(--shadow);
    color: var(--text-primary);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        top: auto;
        transform: translateY(100%);
    }

    .timeline-wrapper {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

    .timeline-item:hover {
        transform: none;
    }

    .skill-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.theme-preset-btn {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.theme-preset-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.theme-color-input {
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
}

.tippy-box[data-theme~='custom'] {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.tippy-box[data-theme~='custom'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: var(--bg-tertiary);
}
