/* --- Farbvariablen für Hell- und Dunkelmodus --- */
html {
    scroll-behavior: smooth;
}

html[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #0f172a;
    --cloud-color: #0082c9;
    --hover-bg: #f8fafc;
    --contact-btn-bg: #0f172a;
    --contact-btn-text: #ffffff;
    --admin-bar-bg: #f1f5f9;
}

html[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --accent-color: #3b82f6;
    --cloud-color: #0082c9;
    --hover-bg: #1e293b;
    --contact-btn-bg: #1e293b;
    --contact-btn-text: #f8fafc;
    --admin-bar-bg: #1e293b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- NAVIGATION REPARATUR --- */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    padding: 30px 40px; 
    width: 100%;
    background-color: transparent;
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    grid-column: 1;
    justify-self: start;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    grid-column: 2;
    justify-self: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-color);
}

.nav-cloud-btn {
    color: var(--cloud-color) !important;
    font-weight: 600 !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px; 
    grid-column: 3;
    justify-self: end;
}

.btn-contact-header {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 0 20px;
    height: 38px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.btn-contact-header:hover {
    opacity: 0.9;
}

.lang-btn, .theme-btn {
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0 14px;
    height: 38px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

.lang-btn:hover, .theme-btn:hover {
    background-color: var(--hover-bg);
}

html[data-theme="light"] .btn-contact-header {
    background-color: #0f172a;
    color: #ffffff;
}

/* --- ADMIN BAR STYLES --- */
.admin-bar {
    width: calc(100% - 80px);
    margin: 10px 40px;
    padding: 10px 20px;
    background-color: var(--admin-bar-bg);
    border: 1px dashed var(--accent-color);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.admin-bar-actions {
    display: flex;
    gap: 10px;
}

.admin-bar-actions input {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
}

.admin-bar-actions button {
    padding: 6px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

#admin-save-btn { background-color: #22c55e; color: white; }
#admin-logout-btn { background-color: #ef4444; color: white; }

.editable-active {
    outline: 2px dashed var(--accent-color) !important;
    padding: 4px;
    border-radius: 4px;
    background-color: var(--hover-bg);
}

/* --- LÖSCH-BUTTON FÜR TIMELINE-EINTRÄGE --- */
.timeline-item {
    position: relative;
}

.admin-delete-btn {
    display: none; 
    position: absolute;
    left: -35px;
    top: 5px;
    background-color: #ef4444;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s ease;
}

.admin-delete-btn:hover {
    transform: scale(1.15);
    background-color: #dc2626;
}

.admin-mode-active .admin-delete-btn {
    display: inline-flex;
}

/* --- LOGIN MODAL WINDOW --- */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-modal-content {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    width: 320px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.login-modal-content h3 { margin-bottom: 15px; }
.login-modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
}

.login-modal-buttons {
    display: flex;
    justify-content: space-between;
}

.login-modal-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

#login-confirm-btn { background-color: var(--accent-color); color: var(--bg-color); }
#login-cancel-btn { background-color: var(--border-color); color: var(--text-color); }

/* --- Hero Layout --- */
.hero-section {
    height: 100vh; 
    min-height: 650px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.hero-container-layout {
    height: 100%;
    width: 100%;
    max-width: 100% !important;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    align-items: center;
    padding-bottom: 40px; 
}

.hero-content {
    max-width: 650px;
    margin: auto 0; 
    text-align: center;
    padding: 0 24px;
}

.profile-image-container {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background-color: var(--hover-bg);
    margin: 0 auto 25px auto;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
}

html[data-theme="light"] .hero-content h1 {
    color: #0f172a;
}

.hero-subtext {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 1.4rem;
}

.social-icon {
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.scroll-arrow {
    position: absolute;
    bottom: 30px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: var(--text-muted);
    animation: bounce 2s infinite;
    z-index: 99;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-arrow:hover {
    color: var(--text-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -8px); }
    60% { transform: translate(-50%, -4px); }
}

/* --- Content Wrapper unter dem Knick --- */
.main-content-wrapper {
    padding-top: 60px;
}

.main-content-wrapper .container {
    max-width: 850px; 
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 35px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.focus-section, .timeline-section {
    margin-bottom: 90px;
}

.focus-item {
    margin-bottom: 30px;
}

.focus-item h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.focus-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Lebenslauf Timeline --- */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-meta {
    width: 100px;
    padding-right: 25px;
    text-align: right;
    margin-top: 2px;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-content {
    flex: 1;
    padding-left: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 96px;
    top: 8px;
    width: 9px;
    height: 9px;
    background-color: var(--bg-color);
    border: 1px solid var(--text-muted);
    border-radius: 50%;
}

.timeline-item:hover::after {
    border-color: var(--text-color);
    background-color: var(--text-color);
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

html[data-theme="dark"] .timeline-company {
    color: var(--accent-color);
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Kontakt-Sektion --- */
.bottom-contact-section {
    text-align: center;
    padding: 60px 0 40px 0;
}

.bottom-contact-section h2 {
    font-size: 2.2rem;
    --text-color: inherit;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 15px;
}

html[data-theme="light"] .bottom-contact-section h2 {
    color: #0f172a;
}

.bottom-contact-section p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.5;
}

.btn-say-hello {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--contact-btn-bg);
    color: var(--contact-btn-text);
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: 1px solid var(--border-color);
}

.btn-say-hello:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* --- Footer --- */
.site-footer {
    padding: 60px 0 40px 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.footer-credits {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-divider {
    color: var(--border-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile --- */
@media (max-width: 850px) {
    header {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .nav-links { order: 3; }
    .admin-bar { width: calc(100% - 40px); margin: 10px 20px; flex-direction: column; gap: 10px; }
}