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

:root {
    --bg-color: #0d1117;
    --sidebar-bg: rgba(22, 27, 34, 0.7);
    --card-bg: rgba(33, 38, 45, 0.6);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #79c0ff;
    --accent-glow: rgba(88, 166, 255, 0.4);
    --border-color: rgba(240, 246, 252, 0.1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --glass-blur: blur(12px);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(163, 113, 247, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    line-height: 1.6;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(90deg, #58a6ff, #a371f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.sidebar-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sidebar Search */
.sidebar-search {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--sidebar-bg);
    position: sticky;
    top: 0;
    z-index: 5;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-input-wrapper input {
    width: 100%;
    padding: 8px 32px 8px 30px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.search-input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.8rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--text-primary);
}

.candidate-count-bar {
    margin-top: 6px;
    min-height: 16px;
}

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

.candidate-count .count-highlight {
    color: var(--accent-color);
    font-weight: 600;
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 24px 0;
}

.candidate-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.candidate-list::-webkit-scrollbar {
    width: 6px;
}
.candidate-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.candidate-card {
    padding: 7px 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.candidate-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.candidate-card.active {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    box-shadow: 0 0 20px var(--accent-glow);
}

.avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58a6ff, #a371f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: white;
}

.candidate-info h3 {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    line-height: 1.3;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}
.main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cv-container {
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cv-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Section Styling */
.section {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-section {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #58a6ff, #a371f7, #58a6ff);
    background-size: 200% auto;
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f6feb, #8957e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 30px rgba(31, 111, 235, 0.3);
}

.header-details h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-details p {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.header-details i {
    color: var(--accent-color);
    width: 16px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.1);
    padding: 8px;
    border-radius: 8px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Items */
.item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.item-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.item-subtitle {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 12px;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Timeline specific */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -29px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-glow);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background: rgba(163, 113, 247, 0.15);
    color: #c9abfc;
    border: 1px solid rgba(163, 113, 247, 0.3);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Button */
.btn-primary {
    background: linear-gradient(135deg, #1f6feb, #8957e5);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-main);
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(31, 111, 235, 0.4);
    transform: translateY(-1px);
}


/* Responsive */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Forms & Filters */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.form-control option {
    background: var(--bg-color);
}
