/**
 * Стили страницы для печати резюме.
 * Упрощённое ч/б оформление, контакты обязательны.
 */

/* === Экран: предпросмотр перед печатью === */
.print-page {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #fff;
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 32px 48px;
}

.print-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ddd;
}

.print-back {
    color: #333;
    text-decoration: none;
}

.print-back:hover {
    text-decoration: underline;
}

.print-btn {
    padding: 8px 16px;
    font-size: 14px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.print-btn:hover {
    background: #333;
}

.print-content {
    color: #1a1a1a;
}

.print-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.print-header-text {
    flex: 1;
}

.print-header-photo img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #444;
}

.print-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #000;
}

.print-role {
    font-size: 1rem;
    margin: 0 0 4px 0;
    color: #333;
}

.print-location {
    font-size: 0.9rem;
    margin: 0;
    color: #555;
}

.print-section {
    margin-bottom: 20px;
}

.print-h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
    color: #000;
}

.print-section p {
    margin: 0 0 8px 0;
}

.print-about-text p {
    /* Выравниваем стиль и размер шрифта для всех абзацев «О себе» */
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin: 0 0 6px 0 !important;
    text-indent: 1.5em;
}

.print-list {
    margin: 0;
    padding-left: 20px;
}

.print-list li {
    margin-bottom: 4px;
}

/* Контакты слева, QR справа в одной строке (как на макете) */
.print-contacts-row {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 32px;
    align-items: start;
}

.print-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: auto;
    max-width: none;
}

.print-contact-list li {
    margin-bottom: 6px;
}

.print-qr {
    justify-self: end;
    align-self: start;
    margin: 0;
    padding: 0;
}

.print-qr-image {
    display: block;
    width: 100px;
    height: 100px;
    border: 1px solid #333;
    border-radius: 4px;
}

/* Опыт работы и проекты (только печатная версия) */
.print-work-item,
.print-project-item {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.print-work-item:last-child,
.print-project-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.print-work-org,
.print-project-title {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.print-work-specialty,
.print-project-type {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 0.9rem;
}

.print-work-skills-list {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: #444;
}

.print-work-skills-list li {
    margin-bottom: 2px;
}

.print-project-desc {
    margin: 6px 0 8px 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #333;
}

/* Markdown в описании проекта для печати */
.print-project-desc p {
    margin: 0 0 6px 0;
}

.print-project-desc p:last-child {
    margin-bottom: 0;
}

.print-project-desc ul,
.print-project-desc ol {
    margin: 4px 0 8px 0;
    padding-left: 1.25rem;
}

.print-project-desc li {
    margin-bottom: 2px;
}

.print-project-desc strong {
    font-weight: 700;
    color: #000;
}

.print-project-desc code {
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
    background: #f0f0f0;
    padding: 0 4px;
    border-radius: 2px;
}

.print-project-desc pre {
    margin: 6px 0;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.8rem;
}

.print-project-desc pre code {
    background: none;
    padding: 0;
}

.print-project-desc h3,
.print-project-desc h4 {
    margin: 8px 0 4px 0;
    font-size: 0.95rem;
    color: #000;
}

.print-project-stack {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.4;
}

.print-footer {
    margin-top: 32px;
    font-size: 0.85rem;
    color: #666;
}

.print-footer a {
    color: #333;
}

/* === Печать: только контент, ч/б === */
@media print {
    .print-page {
        padding: 0;
        max-width: none;
    }

    .no-print {
        display: none !important;
    }

    .print-content {
        color: #000;
    }

    .print-name,
    .print-h2 {
        color: #000;
    }

    .print-role,
    .print-location,
    .print-section p,
    .print-list {
        color: #222;
    }

    .print-h2 {
        border-bottom-color: #000;
    }

    .print-section {
        page-break-inside: avoid;
    }

    .print-contacts-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: start !important;
    }

    .print-qr {
        page-break-inside: avoid;
    }

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