/* ─── Preview Panel ─────────────────────────────────────── */
.preview-panel {
    flex: 0 0 55%;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg);
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-header h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.preview-legend {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.preview-legend-text {
    font-size: 11px;
    color: var(--text-muted);
}

.preview-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.3s ease;
}

.preview-sections.dimmed {
    opacity: 0.4;
}

/* ─── Preview Section Card ──────────────────────────────── */
.preview-section {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--card);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
}

.preview-section:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.preview-section.modified {
    border-left: 3px solid var(--green);
    border-color: var(--green-border);
}

.preview-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.preview-section-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-modified {
    font-size: 10px;
    color: var(--green);
    font-weight: 500;
}

.preview-edit-icon {
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.preview-section:hover .preview-edit-icon {
    opacity: 1;
}

.preview-section-content {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text);
}

.preview-section-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 12.5px;
}

.lang-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.lang-name {
    color: var(--text);
}

.lang-dots {
    display: inline-flex;
    gap: 4px;
}

.lang-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    display: inline-block;
}

.lang-dot.filled {
    background: var(--red);
}

.edu-row {
    color: var(--text);
}

.edu-spec {
    color: var(--text-muted);
    font-size: 12.5px;
    margin-top: 2px;
}

/* ─── Preview Project Card ──────────────────────────────── */
.preview-project {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--card);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.preview-project:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.preview-project.modified {
    border-left: 3px solid var(--green);
    border-color: var(--green-border);
}

.preview-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.preview-project-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.preview-project-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-project-dates {
    font-size: 11px;
    color: var(--text-muted);
}

.preview-project .preview-edit-icon {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.preview-project:hover .preview-edit-icon {
    opacity: 1;
}

/* ─── Staggered Reveal Animation ───────────────────────── */
@keyframes sectionReveal {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-reveal {
    animation: sectionReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section-reveal--delay-0 { animation-delay: 0ms; }
.section-reveal--delay-1 { animation-delay: 70ms; }
.section-reveal--delay-2 { animation-delay: 140ms; }
.section-reveal--delay-3 { animation-delay: 210ms; }
.section-reveal--delay-4 { animation-delay: 280ms; }
.section-reveal--delay-5 { animation-delay: 350ms; }
.section-reveal--delay-6 { animation-delay: 420ms; }
.section-reveal--delay-7 { animation-delay: 490ms; }
.section-reveal--delay-8 { animation-delay: 560ms; }

/* Subsection labels */
.preview-subsection-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 8px;
}

.preview-subsection-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 4px;
}

/* Technology chips */
.preview-tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.tech-chip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    color: var(--accent-light);
}

/* Responsibilities */
.preview-responsibilities {
    margin: 4px 0 0;
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.preview-responsibilities li {
    margin-bottom: 2px;
}

.preview-responsibilities li.highlight-modified {
    color: var(--green);
}

/* Experience header */
.preview-experience-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 8px;
}

/* ─── Loading Overlay ───────────────────────────────────── */
.preview-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(14,15,19,0.7);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.preview-loading-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #8B6CC1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: spinPulse 1.5s ease-in-out infinite;
}

.preview-loading-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ─── Shimmer Skeleton ─────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        var(--surface) 25%,
        var(--surface-hover) 50%,
        var(--surface) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-block {
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--card-border);
    padding: 14px 16px;
}

.skeleton-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        var(--surface) 25%,
        var(--surface-hover) 50%,
        var(--surface) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-dot--lg { width: 8px; height: 8px; }

/* Width modifiers */
.skeleton-line--w20  { width: 20%; }
.skeleton-line--w28  { width: 28%; }
.skeleton-line--w30  { width: 30%; }
.skeleton-line--w32  { width: 32%; }
.skeleton-line--w35  { width: 35%; }
.skeleton-line--w42  { width: 42%; }
.skeleton-line--w45  { width: 45%; }
.skeleton-line--w48  { width: 48%; }
.skeleton-line--w55  { width: 55%; }
.skeleton-line--w60  { width: 60%; }
.skeleton-line--w62  { width: 62%; }
.skeleton-line--w68  { width: 68%; }
.skeleton-line--w70  { width: 70%; }
.skeleton-line--w75  { width: 75%; }
.skeleton-line--w76  { width: 76%; }
.skeleton-line--w78  { width: 78%; }
.skeleton-line--w82  { width: 82%; }
.skeleton-line--w88  { width: 88%; }
.skeleton-line--w90  { width: 90%; }
.skeleton-line--w92  { width: 92%; }
.skeleton-line--w96  { width: 96%; }
.skeleton-line--w100 { width: 100%; }

/* Height modifiers */
.skeleton-line--h5   { height: 5px; border-radius: 3px; }
.skeleton-line--h9   { height: 9px; }
.skeleton-line--h10  { height: 10px; }
.skeleton-line--h11  { height: 11px; }
.skeleton-line--h12  { height: 12px; }
.skeleton-line--h13  { height: 13px; }
.skeleton-line--h14  { height: 14px; }
.skeleton-line--h22  { height: 22px; border-radius: 6px; }
.skeleton-line--tall { height: 38px; border-radius: 10px; }

/* Animation delay modifiers (stagger) */
.skeleton-line--d0 { animation-delay: 0s; }
.skeleton-line--d1 { animation-delay: 0.06s; }
.skeleton-line--d2 { animation-delay: 0.12s; }
.skeleton-line--d3 { animation-delay: 0.18s; }
.skeleton-line--d4 { animation-delay: 0.24s; }
.skeleton-line--d5 { animation-delay: 0.30s; }
.skeleton-line--d6 { animation-delay: 0.36s; }

/* ─── Loading Dots ──────────────────────────────────────── */
.loading-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.loading-dots .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.2s ease-in-out infinite;
}

.loading-dots .dot:nth-child(1) { animation-delay: 0s; }
.loading-dots .dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.3s; }

/* ─── Edit Modal ────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    width: 560px;
    max-height: 80vh;
    overflow: auto;
    padding: 24px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.btn-modal-close:hover {
    color: var(--text);
}

/* Modal fields */
.modal-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.modal-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    display: block;
}

.modal-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.modal-clear-btn:hover {
    opacity: 1;
    color: var(--error);
    background: rgba(255, 59, 48, 0.1);
}

.modal-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    font-family: var(--font);
}

.modal-textarea:focus {
    border-color: var(--accent);
}

.modal-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    font-family: var(--font);
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: var(--accent);
}

.modal-add-btn {
    margin-top: 8px;
    background: none;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12.5px;
    font-family: var(--font);
    transition: color 0.15s, border-color 0.15s;
}

.modal-add-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.languages-edit-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.lang-edit-row {
    display: grid;
    grid-template-columns: 1fr 160px 28px;
    gap: 8px;
    align-items: center;
}

.lang-edit-row .modal-clear-btn {
    justify-self: center;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-modal-cancel {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font);
}

.btn-modal-cancel:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-modal-save {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font);
}

.btn-modal-save:hover {
    filter: brightness(1.1);
}

/* ─── File attachment display ───────────────────────────── */
.file-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-attachment-name {
    font-size: 13px;
}

.file-attachment-size {
    font-size: 11px;
    color: var(--text-muted);
}

/* ─── Utility ───────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

