/* ===========================
   SLIM DESIGN - Kompaktes CV Layout
   =========================== */

:root {
    --primary-color: #00CB9C;
    --primary-dark: #00a67d;
    --primary-light: #33d9b3;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e6ed;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    background: #ffffff;
    padding: 0;
    font-size: 14px;
}

/* Optimierung für PDF-Ausgabe */
@page {
    size: A4 portrait;
    margin: 0;
}

/* ===========================
   Loading Indicator
   =========================== */

.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    font-size: 1em;
    color: var(--text-dark);
    font-weight: 500;
}

#cv-container {
    display: none;
}

/* ===========================
   Container
   =========================== */

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

/* ===========================
   Header - Kompakt
   =========================== */

.cv-header {
    background: var(--primary-color);
    color: white;
    padding: 25px 40px 20px 40px;
    position: relative;
    border-bottom: 3px solid var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.header-content {
    flex: 1;
}

.header-content h1 {
    font-size: 2em;
    margin-bottom: 3px;
    font-weight: 600;
}

.header-content .tagline {
    font-size: 0.95em;
    opacity: 0.9;
    font-weight: 300;
}

.export-btn {
    position: absolute;
    top: 25px;
    right: 40px;
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
}

.export-btn i {
    font-size: 1em;
}

/* ===========================
   Sections - Reduzierte Abstände
   =========================== */

.cv-section {
    padding: 25px 40px;
    border-bottom: 1px solid var(--border-color);
}

.cv-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.4em;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.section-title i {
    color: var(--primary-color);
    font-size: 0.85em;
}

/* ===========================
   Personal Info - Kompakt
   =========================== */

.personal-info {
    background: var(--bg-light);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.info-label {
    font-size: 0.75em;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.info-value {
    font-size: 0.95em;
    color: var(--text-dark);
    font-weight: 500;
}

/* ===========================
   Timeline - Schlankes Design
   =========================== */

.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-period {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 1.1em;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 0.95em;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-department {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-department i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.timeline-description {
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 6px;
    font-size: 0.9em;
}

.timeline-description strong {
    font-size: 0.85em;
    color: var(--text-dark);
}

.timeline-description ul {
    margin-left: 18px;
    margin-top: 5px;
}

.timeline-description li {
    margin-bottom: 3px;
}

/* ===========================
   Skills - Kompakt
   =========================== */

.skills-category {
    margin-bottom: 20px;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-subtitle {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.skills-subtitle i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}

.skill-item .skill-name {
    font-weight: 600;
}

.skill-item .skill-level {
    font-size: 0.9em;
    opacity: 0.9;
    margin-left: 6px;
}

/* ===========================
   Interests - Kompakt
   =========================== */

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.interest-item {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.interest-item i {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.interest-item .interest-name {
    font-size: 0.85em;
    color: var(--text-dark);
    font-weight: 600;
}

/* ===========================
   Footer
   =========================== */

.cv-footer {
    background: var(--bg-light);
    padding: 15px 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8em;
}

/* ===========================
   Print/PDF Styles
   =========================== */

@media print {
    body {
        background: white;
        padding: 0;
        font-size: 11px;
        line-height: 1.4;
    }

    .container {
        max-width: 100%;
        box-shadow: none;
    }

    .export-btn {
        display: none !important;
    }

    /* Kompakter Header für PDF */
    .cv-header {
        padding: 15px 20px 12px 20px;
    }

    .profile-photo {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }

    .header-content h1 {
        font-size: 1.6em;
        margin-bottom: 2px;
    }

    .header-content .tagline {
        font-size: 0.85em;
    }

    /* Reduzierte Section-Abstände */
    .cv-section {
        page-break-inside: avoid;
        padding: 12px 20px;
    }

    /* Persönliche Infos kompakter */
    .personal-info {
        padding: 10px 20px;
    }

    .info-grid {
        gap: 8px;
    }

    .info-item {
        padding: 6px 8px;
    }

    .info-label {
        font-size: 0.7em;
        margin-bottom: 2px;
    }

    .info-value {
        font-size: 0.85em;
    }

    /* Section Titles kompakter */
    .section-title {
        font-size: 1.15em;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }

    /* Timeline optimiert */
    .timeline {
        padding-left: 18px;
    }

    .timeline::before {
        width: 1.5px;
    }

    .timeline-item {
        page-break-inside: avoid;
        margin-bottom: 12px;
        padding: 8px 10px;
    }

    .timeline-item::before {
        width: 8px;
        height: 8px;
        left: -24px;
        top: 12px;
        border-width: 1.5px;
        box-shadow: 0 0 0 1.5px var(--primary-color);
    }

    .timeline-period {
        padding: 2px 8px;
        font-size: 0.7em;
        margin-bottom: 4px;
    }

    .timeline-title {
        font-size: 0.95em;
        margin-bottom: 3px;
    }

    .timeline-subtitle {
        font-size: 0.85em;
        margin-bottom: 4px;
    }

    .timeline-department {
        font-size: 0.75em;
        margin-bottom: 5px;
    }

    .timeline-description {
        font-size: 0.8em;
        margin-top: 4px;
        line-height: 1.35;
    }

    .timeline-description strong {
        font-size: 0.8em;
    }

    .timeline-description ul {
        margin-left: 14px;
        margin-top: 3px;
    }

    .timeline-description li {
        margin-bottom: 2px;
    }

    /* Skills kompakter */
    .skills-category {
        margin-bottom: 12px;
        page-break-inside: avoid;
    }

    .skills-subtitle {
        font-size: 0.9em;
        margin-bottom: 6px;
    }

    .skills-list {
        gap: 5px;
    }

    .skill-item {
        padding: 4px 10px;
        font-size: 0.75em;
        page-break-inside: avoid;
    }

    .skill-item .skill-level {
        font-size: 0.85em;
        margin-left: 4px;
    }

    /* Interests kompakter */
    .interests-grid {
        gap: 6px;
    }

    .interest-item {
        padding: 8px;
        page-break-inside: avoid;
    }

    .interest-item i {
        font-size: 1.2em;
        margin-bottom: 4px;
    }

    .interest-item .interest-name {
        font-size: 0.75em;
    }

    /* Footer */
    .cv-footer {
        padding: 12px 30px;
        font-size: 0.7em;
        page-break-inside: avoid;
        display: none !important;  /* Footer nicht im Druck */
    }

    /* Seitenumbruch-Kontrolle */
    .cv-section {
        page-break-after: auto;
    }

    /* Verhindere ungünstige Umbrüche */
    h2, h3 {
        page-break-after: avoid;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .cv-header {
        padding: 20px 20px 15px 20px;
    }

    .header-content h1 {
        font-size: 1.6em;
    }

    .export-btn {
        position: static;
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }

    .cv-section {
        padding: 20px;
    }

    .section-title {
        font-size: 1.2em;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -26px;
    }

    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cv-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.4em;
    }

    .section-title {
        font-size: 1.1em;
    }

    .timeline-title {
        font-size: 1em;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }
}
