:root {
    --primary: #2563eb;
    --secondary: #475569;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --bg-page: #ffffff;
    --accent: #f8fafc;
}

* { box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    line-height: 1.5; 
    color: var(--text-dark); 
    margin: 0; 
    padding: 0; 
    background-color: #f1f5f9; 
}

.page { 
    width: 210mm; 
    min-height: 297mm; 
    padding: 15mm 20mm; 
    margin: 20px auto; 
    background: var(--bg-page); 
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    position: relative;
}

/* Reszponzivitás mobilra */
@media screen and (max-width: 210mm) {
    .page {
        width: 95%;
        margin: 10px auto;
        padding: 10mm 15mm;
    }
}

@media screen and (max-width: 768px) {
    .cv-header {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }
    
    .header-left {
        width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        justify-content: center;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .item-period {
        align-self: flex-start;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .no-print {
        position: fixed;
        bottom: 20px;
        right: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 1000;
        background: transparent;
        padding: 0;
        width: auto;
    }
}

.cv-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}

@media print {
    .cv-header { display: block; position: relative; min-height: 140px; }
    .header-left { width: 75%; display: inline-block; vertical-align: top; }
    .profile-img { position: absolute; top: 10mm; right: 0; }
    
    .contact-grid { display: block !important; width: 100% !important; padding-top: 10px; }
    .contact-item { display: inline-block !important; width: 48% !important; margin-bottom: 5px !important; vertical-align: top; }
    .contact-item i { display: inline-block; margin-right: 5px; }
    
    section { clear: both; width: 100%; }

    h2 { display: block; clear: both; width: 100%; }
    h2 i { display: inline-block; margin-right: 10px; vertical-align: middle; }

    .item-header { display: block; }
    .item-title { display: inline-block; width: 70%; }
    .item-period { display: inline-block; width: 28%; text-align: right; background: none !important; padding: 0; }

    .skill-tags { display: block; }
    .tag { display: inline-block; margin-right: 5px; margin-bottom: 5px; }

    .skills-grid { display: block; }
    .skill-cat { display: inline-block; width: 48%; vertical-align: top; }
}

.header-left h1 { 
    margin: 0; 
    font-size: 32pt; 
    color: var(--text-dark); 
    letter-spacing: -0.025em;
    font-weight: 800;
}

.subtitle {
    font-size: 14pt;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.b2b-cta {
    font-size: 11pt;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 15px;
    font-style: italic;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 10pt;
}

.contact-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: var(--text-light);
    word-break: break-all;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
}

.contact-item i { 
    width: 14px; 
    color: var(--primary); 
}

.profile-img { 
    width: 140px; 
    height: 140px; 
    object-fit: cover; 
    border-radius: 12px;
    border: 1px solid var(--border);
}

h2 { 
    font-size: 14pt; 
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px; 
    margin-bottom: 12px; 
    color: var(--text-dark); 
    text-transform: uppercase;
    font-weight: 700;
    background: var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
}

h2 i { color: var(--primary); font-size: 0.9em; }

.section-content { padding-left: 10px; }

.item { margin-bottom: 18px; page-break-inside: avoid; break-inside: avoid; }
section { page-break-inside: avoid; break-inside: avoid; }
h2 { page-break-after: avoid; }

.item-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline;
    margin-bottom: 2px;
}

.item-title { 
    font-weight: 700; 
    font-size: 11pt;
    color: var(--text-dark);
}

.item-period { 
    color: var(--text-light); 
    font-size: 9pt; 
    font-weight: 500;
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 12px;
}

.item-sub { 
    color: var(--primary); 
    font-size: 10pt; 
    font-weight: 600;
    margin-bottom: 4px;
}

.item-desc { 
    font-size: 10pt; 
    color: var(--secondary);
    margin-bottom: 6px;
}

.item-desc p { margin: 0 0 5px 0; }
.item-desc ul { margin: 5px 0; }

.skill-tags { 
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tag {
    font-size: 8pt; 
    font-weight: 600; 
    color: var(--primary); 
    background: rgba(37, 99, 235, 0.1); 
    padding: 1px 8px; 
    border-radius: 4px; 
}

.skills-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 20px; 
}

.skill-cat strong {
    display: block;
    font-size: 10pt;
    margin-bottom: 8px;
    color: var(--text-dark);
}

ul { margin: 0; padding-left: 18px; font-size: 10pt; color: var(--secondary); }
li { margin-bottom: 2px; }

.no-print {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.btn-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.btn-minimal:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.2s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); }

.btn-pdf { background: var(--primary); color: white; }

@media print { 
    body { background: none; } 
    .page { margin: 0; border: none; width: 100%; padding: 10mm; box-shadow: none; }
    .no-print { display: none; }
    .item-period { background: #eee !important; -webkit-print-color-adjust: exact; }
    h2 { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; }
    .tag { background: #eef2ff !important; -webkit-print-color-adjust: exact; }
}
