/* ===== RESUME STYLES ===== */
/* Designed for both screen viewing and print/PDF generation */

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

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --text: #1a1a1a;
    --text-2: #333;
    --text-3: #555;
    --bg: #fff;
    --border: #d5d5d5;
    --accent: #c9a84c;
    --sidebar-bg: #f0f4f7;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: #e8e8e8;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== PRINT CONTROLS ===== */
.print-controls {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1a1a1a;
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.controls-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover { color: #fff; }

.controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--accent), #e8cc6e);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201,168,76,0.4);
}

.print-hint {
    font-size: 0.75rem;
    color: #666;
}

/* ===== RESUME CONTAINER ===== */
.resume {
    max-width: 900px;
    margin: 24px auto;
    background: var(--bg);
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    border-radius: 4px;
    overflow: hidden;
}

/* ===== HEADER ===== */
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px 36px 24px;
    border-bottom: 3px solid var(--primary);
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.header-left { flex: 1; }

.resume-header h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-3);
    margin-bottom: 12px;
}

.contact-row {
    font-size: 0.78rem;
    color: var(--text-3);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.contact-row a {
    color: var(--primary-light);
    text-decoration: none;
}

.sep { color: #ccc; margin: 0 2px; }

.header-photo img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== BODY LAYOUT ===== */
.resume-body {
    display: grid;
    grid-template-columns: 260px 1fr;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: var(--sidebar-bg);
    padding: 24px 20px;
    border-right: 1px solid #e0e0e0;
}

.sidebar h2 {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary);
}

.sidebar section {
    margin-bottom: 24px;
}

.sidebar section:last-child {
    margin-bottom: 0;
}

.competencies {
    list-style: none;
}

.competencies li {
    font-size: 0.78rem;
    color: var(--text-2);
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.4;
}

.competencies li::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.65rem;
    top: 4px;
}

.edu-item {
    margin-bottom: 10px;
}

.edu-item strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}

.edu-item span {
    font-size: 0.75rem;
    color: var(--text-3);
}

.languages {
    font-size: 0.78rem;
    color: var(--text-2);
}

.achievements {
    list-style: none;
}

.achievements li {
    font-size: 0.73rem;
    color: var(--text-2);
    padding: 3px 0 3px 12px;
    position: relative;
    line-height: 1.45;
    margin-bottom: 6px;
}

.achievements li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 24px 28px;
}

.main-content h2 {
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary);
}

.main-content section {
    margin-bottom: 20px;
}

.summary {
    font-size: 0.8rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* Jobs */
.job {
    margin-bottom: 18px;
    page-break-inside: avoid;
}

.job:last-child { margin-bottom: 0; }

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.job h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.company {
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 500;
    font-style: italic;
}

.period {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
    font-style: italic;
    white-space: nowrap;
    padding-top: 2px;
}

.job ul {
    list-style: none;
    padding: 0;
}

.job li {
    font-size: 0.78rem;
    color: var(--text-2);
    padding: 2px 0 2px 14px;
    position: relative;
    line-height: 1.5;
}

.job li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print { display: none !important; }

    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .resume {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .resume-header {
        padding: 20px 28px 16px;
    }

    .resume-header h1 { font-size: 1.7rem; }

    .sidebar { padding: 16px 14px; }
    .main-content { padding: 16px 20px; }

    .resume-body {
        grid-template-columns: 240px 1fr;
    }

    .job { page-break-inside: avoid; }

    @page {
        size: A4;
        margin: 8mm;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .resume-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .resume-header {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .header-photo { margin-bottom: 12px; }

    .contact-row { justify-content: center; }

    .controls-inner { flex-direction: column; gap: 8px; }
}
