﻿/* ========================================
   CV BASE STYLES
   Silnik wyglądu CV (Podgląd + Wydruk)
   ======================================== */

/* ========================================
   1. ASSETS - Definicje Fontów
   ======================================== */

/* === LATO === */
@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === ROBOTO === */
@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === MERRIWEATHER === */
@font-face {
    font-family: 'Merriweather';
    src: url('/assets/fonts/Merriweather-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Merriweather';
    src: url('/assets/fonts/Merriweather-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === OPEN SANS === */
@font-face {
    font-family: 'Open Sans';
    src: url('/assets/fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/assets/fonts/OpenSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === EB GARAMOND === */
@font-face {
    font-family: 'EB Garamond';
    src: url('/assets/fonts/EBGaramond-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/assets/fonts/EBGaramond-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* ========================================
   2. GLOBAL CONTAINER - Punkt wejścia zmiennych
   ======================================== */
.cv-container {
    /* Tutaj C# wstrzykuje zmienną --font-family */
    font-family: var(--font-family, 'Lato', sans-serif);
    /* Domyślne wartości (Fallback), gdyby C# nie zadziałał */
    --primary-color: #2d3748;
    --font-base: 10pt;
    --line-height: 1.35;
}

/* ========================================
   3. PAPER - Wygląd kartki A4
   (Zastępuje stare .cv-paper i .paper-shadow)
   ======================================== */
.cv-paper {
    /* Fizyka A4 */
    width: 210mm;
    min-height: 297mm;
    background: white;
    /* Ułożenie na ekranie */
    margin: 2rem auto;
    /* Magia 3D (Cień) */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Padding (Marginesy dokumentu) */
    /* Domyślnie 15mm, ale można sterować zmienną --margin z C# */
    padding: var(--margin, 15mm);
    box-sizing: border-box;
    overflow: hidden;
    /* Pozycjonowanie dla wizualizacji marginesów */
    position: relative;
    z-index: 1;
}

    /* Opcjonalnie: Tryb Debugowania Marginesów (jeśli dodasz klasę .show-margins) */
    .cv-paper.show-margins::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: var(--margin, 15mm) solid rgba(255, 107, 53, 0.1);
        pointer-events: none;
        z-index: 10;
    }

/* ========================================
   4. TYPOGRAPHY - Style tekstowe
   ======================================== */

/* Główny nagłówek (Imię i Nazwisko) */
.cv-h1 {
    font-size: calc(var(--font-base) * var(--h1-scale));
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 2mm 0;
    color: var(--primary-color);
}

/* Podtytuł (np. Stanowisko) */
.cv-h2 {
    font-size: calc(var(--font-base) * var(--h2-scale));
    font-weight: 300;
    margin: 0 0 5mm 0;
    color: var(--primary-color);
}

/* Mniejsze nagłówki (np. nazwa firmy) */
.cv-h3 {
    font-size: calc(var(--font-base) * var(--h3-scale));
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

/* Tekst główny */
.cv-body {
    font-size: calc(var(--font-base) * var(--body-scale));
    color: #2d3748;
    line-height: var(--line-height, 1.35);
}

/* Tytuły sekcji (np. DOŚWIADCZENIE) */
.cv-section-title {
    font-size: calc(var(--font-base) * var(--h2-scale));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5pt;
    color: var(--primary-darkened, var(--primary-color));
    margin: 0 0 3mm 0;
    border-bottom: 1pt solid var(--primary-darkened, var(--primary-color));
    padding-bottom: 1mm;
}

.cv-section-title--sidebar {
    font-size: calc(var(--font-base) * var(--h3-scale));
    margin-bottom: 3mm;
    border: none;
    padding-bottom: 0;
    color: var(--primary-darkened, var(--primary-color));
}

/* ========================================
   5. LAYOUT - Kontenery sekcji
   ======================================== */
.cv-section {
    margin-bottom: 7mm;
}

.cv-entry {
    margin-bottom: 4mm;
}

    .cv-entry:last-child {
        margin-bottom: 0;
    }

.cv-entry__title {
    font-size: calc(var(--font-base) * var(--h3-scale));
    color: #2d3748;
    font-weight: 700;
    margin: 0;
}

.cv-entry__meta {
    font-size: calc(var(--font-base) * var(--meta-scale));
    color: var(--text-secondary, #718096);
    font-weight: 500;
    font-style: italic;
    margin: 1.5mm 0;
}

/* ========================================
   6. LISTS - Logika punktowania (Killer Kropek)
   ======================================== */
.cv-entry__description {
    font-size: calc(var(--font-base) * var(--body-scale));
    color: #2d3748;
    line-height: var(--line-height, 1.35);
    margin-top: 1.5mm;
}

    /* Reset UL */
    .cv-entry__description ul {
        list-style: none !important;
        list-style-type: none !important;
        padding: 0;
        margin: 0;
    }

    /* Style LI */
    .cv-entry__description li {
        list-style: none !important;
        list-style-type: none !important;
        position: relative;
        /* Dynamiczne wcięcia z C# */
        padding-left: var(--list-indent, 5mm);
        margin-bottom: var(--list-item-spacing, 2mm);
    }

        /* Usunięcie ::marker */
        .cv-entry__description li::marker {
            content: none !important;
            display: none !important;
        }

        /* Własny punktor (::before) */
        .cv-entry__description li::before {
            content: var(--bullet-symbol, '•');
            display: var(--bullet-display, block);
            position: absolute;
            left: 0;
            top: 0;
            color: var(--primary-color);
            width: var(--list-indent, 5mm);
            text-align: center;
            font-weight: bold;
        }

/* ========================================
   7. EXTRAS - Sidebar, Zdjęcia, Utilities
   ======================================== */

/* Sidebar */
.cv-info-list {
    font-size: calc(var(--font-base) * var(--meta-scale));
    color: #2d3748;
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

.cv-info-item {
    margin-bottom: 2mm;
    display: flex;
    align-items: flex-start;
    word-break: break-word;
}

.cv-icon {
    min-width: 4mm;
    margin-right: 3mm;
    color: var(--primary-color);
    text-align: center;
    margin-top: 2px;
}

/* Zdjęcie */
.cv-photo-container {
    margin-bottom: 5mm;
    display: flex;
    justify-content: center;
}

.cv-photo-frame {
    width: 38mm;
    height: var(--photo-height, 38mm);
    border-radius: var(--photo-radius, 50%);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background-color: #f7fafc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .cv-photo-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Utilities */
.cv-text-center {
    text-align: center;
}

.cv-text-right {
    text-align: right;
}

.cv-text-justify {
    text-align: justify;
}

.cv-bold {
    font-weight: 700;
}

.cv-italic {
    font-style: italic;
}
