/* ============================================
   SLATE PROFESSIONAL - EXECUTIVE RESUME TEMPLATE
   Modern dark gray/blue design with sidebar layout
   ============================================ */

:root {
    --primary-color: #2C5F7C;
    --primary-dark: #1E4458;
    --primary-light: #3A7A9F;
    --sidebar-bg: #2D3E50;
    --sidebar-dark: #1F2D3D;
    --text-dark: #2C3E50;
    --text-light: #ECF0F1;
    --text-gray: #7F8C8D;
    --border-color: #BDC3C7;
    --background-white: #FFFFFF;
    --background-light: #F8F9FA;
    --accent-teal: #16A085;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ============================================
   MAIN CONTAINER - SPLIT LAYOUT
   ============================================ */
.resume-builder-container {
    display: flex;
    gap: 25px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
}

/* ============================================
   LEFT SIDE - FORM SECTION
   ============================================ */
.form-section {
    flex: 0 0 450px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

.form-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.form-section h2 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 600;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E8E8E8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 124, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-gray);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Color Picker */
.theme-color-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.theme-color-section label {
    color: white !important;
    font-weight: 600;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
}

.color-input {
    width: 50px;
    height: 50px;
    border: 3px solid white;
    border-radius: 8px;
    cursor: pointer;
}

.color-label {
    flex: 1;
    color: white;
    font-size: 13px;
}

.reset-color-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-color-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

/* Photo Upload */
.photo-upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

/* Buttons */
.add-btn {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sample-data-btn {
    background: linear-gradient(135deg, #16A085 0%, #138D75 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.sample-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e8e8e8;
}

/* Experience/Education/Skill Items */
.experience-item,
.education-item,
.skill-item,
.certification-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

/* ============================================
   RIGHT SIDE - PREVIEW SECTION
   ============================================ */
.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 24px;
    color: var(--text-dark);
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.btn-header-secondary,
.btn-header-success {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-header-secondary {
    background: #95A5A6;
    color: white;
}

.btn-header-secondary:hover {
    background: #7F8C8D;
    transform: scale(1.05);
}

.btn-header-success {
    background: linear-gradient(135deg, #16A085 0%, #138D75 100%);
    color: white;
}

.btn-header-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preview-container {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.preview-container::-webkit-scrollbar {
    width: 8px;
}

.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.preview-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* ============================================
   RESUME PREVIEW - MAIN LAYOUT
   ============================================ */
.resume-preview {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.resume-layout {
    display: flex;
    min-height: 297mm;
}

/* ============================================
   SIDEBAR (LEFT) - DARK BACKGROUND
   ============================================ */
.resume-sidebar {
    flex: 0 0 280px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-dark) 100%);
    padding: 40px 30px;
    color: var(--text-light);
}

/* Profile Photo in Sidebar */
.sidebar-photo-wrapper {
    text-align: center;
    margin-bottom: 35px;
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 5px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.4);
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-teal);
}

/* Contact Information */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.contact-icon {
    font-size: 16px;
    flex-shrink: 0;
    opacity: 0.8;
}

.contact-text {
    word-break: break-word;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid var(--accent-teal);
    transition: all 0.3s ease;
    color: white;
}

/* Certifications List */
.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-item {
    font-size: 13px;
    line-height: 1.6;
    padding-left: 15px;
    position: relative;
}

.cert-item::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
}

/* ============================================
   MAIN CONTENT (RIGHT)
   ============================================ */
.resume-main {
    flex: 1;
    padding: 40px 45px;
    background: white;
}

/* Header with Name and Title */
.main-header {
    margin-bottom: 35px;
}

.header-name {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.header-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-teal) 100%);
    border-radius: 2px;
}

/* Main Sections */
.main-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.title-icon {
    font-size: 20px;
}

.section-content {
    padding-left: 5px;
}

/* Professional Summary */
.summary-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
}

/* Experience Entries */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.experience-entry {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-light);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.exp-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.exp-company {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

.exp-dates {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
    white-space: nowrap;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
}

.exp-achievements {
    list-style: none;
    padding-left: 0;
}

.exp-achievements li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.exp-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
    font-weight: bold;
}

/* Education Entries */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-entry {
    padding-left: 20px;
    border-left: 3px solid var(--primary-light);
}

.edu-degree {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.edu-institution {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.edu-details {
    font-size: 13px;
    color: var(--text-gray);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet View */
@media (max-width: 1400px) {
    .resume-builder-container {
        flex-direction: column;
    }
    
    .form-section {
        flex: 1;
        max-height: none;
    }
    
    .preview-section {
        flex: 1;
    }
    
    .resume-preview {
        transform: scale(0.85);
        transform-origin: top center;
    }
}

/* Mobile View */
@media (max-width: 1024px) {
    body {
        padding: 10px;
    }
    
    .resume-builder-container {
        gap: 15px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-section h2 {
        font-size: 24px;
    }
    
    .preview-container {
        padding: 20px;
    }
    
    .resume-preview {
        transform: scale(0.7);
    }
    
    .resume-layout {
        flex-direction: column;
    }
    
    .resume-sidebar {
        flex: 1;
    }
    
    .header-name {
        font-size: 32px;
    }
    
    .header-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: visible !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
    }

    .resume-builder-container {
        height: auto !important;
        max-height: none !important;
        min-height: auto;
    }

    .form-section {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .preview-section {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .preview-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }
    
    .preview-container {
        overflow-x: auto;
    }

    .resume-preview {
        transform: none;
        width: 100%;
        min-width: 320px;
        font-size: 11px;
    }
    
    .exp-header {
        flex-direction: column;
    }
    
    .exp-dates {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .resume-preview {
        font-size: 10px;
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .header-name {
        font-size: 28px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .form-section,
    .preview-header {
        display: none !important;
    }
    
    .preview-container {
        padding: 0;
        box-shadow: none;
    }
    
    .resume-preview {
        box-shadow: none;
        margin: 0;
        transform: none !important;
    }
    
    .resume-layout {
        page-break-inside: avoid;
    }
}
