/* 1. VARIABLEN & FARBSCHEMA */
:root {
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #2d3436;
    --text-light: #636e72;
    --accent-green: #27ae60;
    --accent-soft: rgba(39, 174, 96, 0.08);
    --border: #e9ecef;
    --progress-bg: #eee;
    --toggle-bg: #dfe6e9;
}

/* DARK MODE LOGIK */
#dark-mode-toggle:checked ~ .page-layout {
    --bg-page: #000000;
    --bg-card: #1a1a1a;
    --text-main: #e0e0e0;
    --text-light: #a0a0a0;
    --accent-soft: rgba(39, 174, 96, 0.15);
    --border: #333;
    --progress-bg: #333;
    --toggle-bg: var(--accent-green);
}

#dark-mode-toggle { display: none; }

/* 2. BASIS LAYOUT */
body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    transition: background 0.3s ease; 
}

.page-layout {
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 60px 5%;
}

.cv-container {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 1000px;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    color: var(--text-main);
}

/* 3. GRID SYSTEM */
.main-cv-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start; /* Richtet Vorname und Kontakt-Pille oben bündig aus */
}

/* 4. TOGGLE SWITCH (AN-AUS DESIGN) */
.toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 62px;
    height: 30px;
    background-color: var(--toggle-bg);
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid var(--border);
    padding: 0 6px;
    box-sizing: border-box;
}

.slider {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.icon {
    font-size: 0.85rem;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

/* Toggle Animation */
#dark-mode-toggle:checked ~ .page-layout .slider {
    transform: translateX(30px);
}

/* 5. RECHTE SPALTE & TOP NAVIGATION */
.top-bar-new {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
    height: 40px; /* Bündigkeit mit H1 links */
    align-items: center;
}

.actions { display: flex; gap: 12px; align-items: center; }

.contact-pill, .lang-pill {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-main);
    transition: 0.2s;
}

.contact-pill { background: var(--accent-green); color: white !important; border: none; }
.contact-pill:hover { transform: translateY(-1px); filter: brightness(1.05); }

.lang-pill-group { 
    display: flex; 
    background: var(--bg-page); 
    border-radius: 50px; 
    padding: 2px; 
    border: 1px solid var(--border); 
}
.lang-pill { border: none; background: transparent; padding: 6px 14px; }
.lang-pill.active { background: var(--accent-green); color: white; border-radius: 50px; }

/* 6. TYPOGRAFIE & BILD */
.profile-header {
    margin-top: -4px; /* Finetuning für die Bündigkeit mit den Buttons rechts */
}

h1 { font-size: 2.2rem; margin: 0; line-height: 1; }
.accent-name { color: var(--accent-green); }
.thin { font-weight: 300; }

.subtitle { color: var(--accent-green); font-weight: 600; margin-top: 12px; font-size: 1.1rem; }
.contact-sub { font-size: 0.85rem; color: var(--text-light); margin-top: 6px; }
.contact-sub a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.contact-sub a:hover { border-bottom-color: var(--accent-green); }

.profile-image-container {
    margin-top: 30px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #ddd; /* Platzhalterfarbe falls Bild fehlt */
    aspect-ratio: 1 / 1;
}

.profile-picture { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 7. SECTIONS */
.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-green);
    background: var(--accent-soft);
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    font-weight: 700;
    display: inline-block;
}

.cv-section { margin-bottom: 45px; }

.entry { margin-bottom: 20px; }
.entry-header { display: flex; justify-content: space-between; font-weight: 600; }
.date { color: var(--text-light); font-weight: 400; font-size: 0.85rem; }
.institution { color: var(--text-light); font-size: 0.9rem; margin-top: 2px; }

/* 8. SKILLS MIT NOTEN */
.skills-container { display: flex; flex-direction: column; gap: 15px; }

.skill-row { 
    display: grid; 
    grid-template-columns: 160px 1fr 50px; 
    align-items: center; 
    gap: 20px; 
}

.head-row { 
    font-size: 0.7rem; 
    font-weight: bold; 
    color: var(--text-light); 
    text-transform: uppercase; 
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.progress-bar { height: 9px; background: var(--progress-bg); border-radius: 10px; overflow: hidden; }
.progress { height: 100%; background: var(--accent-green); border-radius: 10px; }

.grade-badge { 
    font-weight: 800; 
    font-size: 0.8rem; 
    text-align: center; 
    background: var(--bg-page); 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    padding: 3px; 
}

/* RESPONSIVE DESIGN */
@media (max-width: 850px) {
    .main-cv-grid { grid-template-columns: 1fr; }
    .left-column { text-align: center; align-items: center; }
    .profile-image-container { max-width: 200px; }
    .top-bar-new { justify-content: center; margin-top: 20px; }
}