/* =========================================
   1. BASIS-SETUP & VARIABLEN
   ========================================= */
@font-face {
    font-family: 'Montserrat';
    src: url("../fonts/montserrat/Montserrat-Regular.203d753a8055.ttf") format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url("../fonts/montserrat/Montserrat-Bold.c300fff4e4ae.ttf") format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-1: #0f1115;
    --bg-2: #151922;
    --surface: #1d2330;
    --text: #e6e9ef;
    --muted: #aab1c6;
    --border: #2a3140;
    --accent: #41d1a5;
    --accent-2: #2dbb90;
    --radius: 12px;
    --shadow: 0 6px 18px rgba(0,0,0,0.35);
    --space-m: 16px;
    --space-l: 24px;
    --space-xl: 40px;
}

html { color-scheme: dark; }
body, html {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background: var(--bg-1);
    margin: 0; padding: 0; height: 100%;
}

/* =========================================
   2. HELPER & BARRIEREFREIHEIT
   ========================================= */
.skip-link {
    position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: static; width: auto; height: auto; padding: 10px;
    background: var(--accent); color: #000; z-index: 9999;
}

/* =========================================
   3. TYPOGRAFIE (Desktop Defaults)
   ========================================= */
h1, h2, h3 { font-family: 'Montserrat', sans-serif; color: #fff; }
h1 { font-weight: 800; line-height: 1.15; font-size: clamp(28px, 3.2vw, 40px); }
h2 { font-weight: 700; line-height: 1.20; font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 1.5rem; }
p, li { line-height: 1.65; font-size: clamp(15px, 1.2vw, 17px); color: var(--text); }
.muted { color: var(--muted); }
a { color: var(--accent); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--accent-2); text-decoration: none; }

/* =========================================
   4. LAYOUT & SIDEBAR
   ========================================= */
.left-column {
    background: var(--bg-2) !important;
    border-right: 1px solid var(--border);
    display: block !important;
    padding: 0;
    z-index: 1000;
}

@media (min-width: 992px) {
    .left-column {
        position: fixed; width: 240px; top: 0; left: 0; bottom: 0; height: 100vh;
    }
    .right-column {
        margin-left: 240px; width: calc(100% - 240px); overflow-y: auto;
    }
    .collapse.navbar-collapse { display: block !important; }
    .mobile-toggle { display: none; }
}

.right-column {
    background: var(--bg-1) !important;
    padding: var(--space-xl) var(--space-l);
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.sidebar { display: grid; grid-template-rows: 1fr auto 1fr; height: 100vh; width: 100%; }
.sidebar-sticky { grid-row: 2; display: flex; flex-direction: column; justify-content: center; padding: 0 2rem; }
.sidebar .footer { grid-row: 3; align-self: end; text-align: center; padding-bottom: 1rem; }
.sidebar .footer p { font-size: 0.8rem; opacity: 0.6; }

.nav-link { color: var(--muted) !important; font-weight: 500; padding: 8px 0; }
.nav-link:hover { color: #e0f7ef !important; }
.nav-link.active { color: #fff !important; border-left: 3px solid var(--accent); padding-left: 12px; }
.nav.flex-column { gap: 8px; }


/* =========================================
   5. HOME & PROFIL (Optimiert)
   ========================================= */
/* Desktop: Engere Zusammenführung von Bild und Text */
.home-hero { 
    gap: 24px; /* Kleinerer Abstand (war 40px), damit sie zusammengehören */
    max-width: 900px; /* Gibt dem Ganzen etwas mehr Raum in der Breite */
    margin: 0 auto; /* Zentriert den Block */
}

.profile {
    flex-shrink: 0; /* Verhindert, dass das Bild zusammengedrückt wird */
}

.profile img {
    width: 250px !important; 
    height: 250px !important; /* Quadratisch erzwingen für perfekten Kreis */
    object-fit: cover; /* Bildinhalt zuschneiden, nicht verzerren */
    border: 2px solid var(--border) !important;
    box-shadow: 0 0 0 6px rgba(65, 209, 165, 0.12);
    border-radius: 50%;
    margin-bottom: 0;
    display: block;
}

.profile-text-container { 
    text-align: left; 
    /* Entfernt max-width Begrenzung, damit Text näher ans Bild rückt */
    flex-grow: 1; 
}

.home-title {
    font-size: 3.5rem; 
    font-weight: 800; 
    letter-spacing: .02em; /* Etwas weniger Spacing für kompakten Look */
    text-transform: uppercase; 
    margin-bottom: 1rem; 
    line-height: 1.1;
    color: #fff;
}

/* Icons */
.social-icons { 
    display: flex; 
    gap: 12px; 
    justify-content: flex-start; /* Links unter dem Text */
    margin-top: 1.5rem; 
}

.social-link {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 44px; 
    height: 44px; 
    border-radius: 50%;
    background: rgba(255,255,255,0.1); 
    color: #fff;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.social-link:hover { 
    transform: translateY(-3px); 
    background: var(--accent); 
    color: #0b0e13; 
}

.social-icon { 
    width: 22px; 
    height: 22px; 
    fill: currentColor; 
    display: block; 
}
/* =========================================
   6. ABOUT SEITE
   ========================================= */
.inner-container-about {
    width: 100%; max-width: 960px; padding: 1.5rem;
    margin: 40px auto 50px; text-align: left;
}
.profile-about img {
    width: 100%; max-width: 720px; height: auto;
    border-radius: 12px; display: block; margin: 0 0 2rem 0;
}
.about-intro {
    font-size: 1.05rem; line-height: 1.8; letter-spacing: .015em;
    color: #f2f5fa; max-width: 720px; margin: 0 0 2.5rem 0; padding-left: 0;
}
.about-intro p + p { margin-top: 1.2rem; }

.skills-interests { color: #fff; margin-top: 3rem; max-width: 720px; }
.skills-interests h2 { font-size: 1.35rem; text-transform: uppercase; margin-bottom: 1.2rem; }
.skills-interests ul { list-style: none; padding: 0; margin: 0; margin-left: 5px; }
.skills-interests li {
    font-size: .95rem; font-weight: 300; position: relative;
    padding-left: 24px; margin-bottom: 0.6rem;
}
.skills-interests li::before {
    content: '•'; position: absolute; left: 0; top: 0;
    color: var(--accent); font-size: 1.2rem; line-height: 1.5;
}

/* =========================================
   7. BLOG
   ========================================= */
.blog-profile-container { max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-l); }
.blog-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-l); }
@media (min-width: 992px) {
    .blog-grid { grid-template-columns: 2fr 1fr 1fr; }
    .blog-grid > :first-child { grid-column: 1 / -1; }
}
.blog-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: transform .15s ease, border-color .15s ease; position: relative;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card .content { padding: var(--space-m); }
.blog-card h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.blog-card .muted { font-size: 0.9rem; }
.blog-card a { color: inherit; }

.blogpost .content { max-width: 760px; margin: 0 auto; }
.blogpost img { border-radius: var(--radius); margin: 16px auto; max-width: 100%; height: auto; }
.blogpost p { font-size: 18px; line-height: 1.75; }
.blogpost pre {
    background: #0b0e13; border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; overflow-x: auto; font-family: monospace;
    font-size: 14px; color: var(--text); max-width: 100%; box-sizing: border-box;
}
.blogpost:not(pre) > code {
    background: #0b0e13; border: 1px solid var(--border); border-radius: 6px;
    padding: 2px 6px; font-size: 0.9em; font-family: monospace; color: var(--text);
}

/* =========================================
   8. LIVE-DATEN & ANIMATIONEN
   ========================================= */
.data-badge {
    display: inline-block; padding: .4em .8em; font-size: 1.1em;
    font-weight: 700; line-height: 1; text-align: center;
    white-space: nowrap; vertical-align: baseline;
    border-radius: var(--radius); min-width: 80px;
}
.data-accent { color: var(--bg-1); background-color: var(--accent); }
.data-neutral { color: var(--text); background-color: var(--surface); border: 1px solid var(--border); }
.data-success { background-color: var(--accent-2); color: var(--bg-1); }
.data-danger { background-color: #f75555; color: var(--bg-1); }

/* ANIMATION KLASSEN */
.fade-in-on-entry { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.is-visible { opacity: 1; transform: translateY(0); }

/* HOME KEYFRAMES */
.animate-up { opacity: 0; animation: slideUp 0.8s ease-out 0.2s forwards; }
.animate-right { opacity: 0; animation: slideRight 0.8s ease-out 0.5s forwards; }
.animate-left { opacity: 0; animation: slideLeft 0.8s ease-out 0s forwards; }

@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }

/* =========================================
   9. MOBILE ANPASSUNGEN (SPEZIFISCH)
   ========================================= */
@media (max-width: 991.98px) {
    /* Layout Reset */
    .left-column { 
        position: relative !important; 
        width: 100% !important; 
        height: auto !important; 
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        z-index: 1000;
    }
    
    .right-column { 
        padding: 1.5rem 1rem !important; 
        margin-left: 0 !important; 
        width: 100% !important; 
        min-height: auto !important;
    }
    
    /* Sidebar & Navi */
    .sidebar { display: block; height: auto; }
    .sidebar-sticky { padding: 0.5rem 1rem; display: block; }
    
    .mobile-toggle { 
        display: flex; 
        justify-content: flex-end; 
        padding: 10px 0;
    }
    
    /* Navbar Toggler (Weiß) */
    .navbar-toggler { border-color: var(--border); padding: 4px 8px; }
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .collapse.navbar-collapse { display: none; }
    .collapse.navbar-collapse.show { display: block; }
    
    /* --- ANPASSUNGEN NACH USER-WUNSCH --- */
    
    /* 1. Font Size auf 2.0rem fixiert */
    h1 { font-size: 2.0rem; line-height: 1.2; }
    h2 { font-size: 1.5rem; }
    
    .home-title { 
        font-size: 2.0rem; /* Genau 2.0rem */
        line-height: 1.3;
        margin-bottom: 1rem;
        word-wrap: break-word; 
    }

    /* 2. Home Hero & Icons */
    .home-hero {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        margin-top: 1rem;
        min-height: auto; 
    }
    
    .profile img {
        width: 160px !important; 
        height: auto;
        margin: 0 auto;
    }
    
    .profile-text-container { 
        text-align: center !important; 
        width: 100%;
        max-width: 100%;
    }

    /* Icons zentriert und kleiner */
    .social-icons { 
        justify-content: center; 
        margin-top: 1.5rem;
    }
    .social-link {
        width: 38px; /* Etwas kleiner als Desktop (48px) */
        height: 38px;
    }
    .social-icon {
        width: 20px; 
        height: 20px;
    }
    
    /* 3. Footer Padding (mind. 60px) */
    .footer {
        padding-top: 60px !important;
        padding-bottom: 20px;
        text-align: center;
        width: 100%;
    }
    
    /* About Seite Mobile */
    .profile-about img {
        margin: 0 auto 1.5rem;
        max-width: 100%;
    }
    
    .about-intro {
        padding-left: 0;
        text-align: left;
        font-size: 1rem; 
    }
    
    .inner-container-about {
        margin: 10px auto;
        padding: 0; 
    }
    
    /* Blog Grid Mobile */
    .blog-grid {
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
}


/* STAFFELUNG FÜR BLOG-KARTEN (Staggered Animation) */
.blog-grid .blog-card {
    opacity: 0; /* Start unsichtbar */
    animation: slideUp 0.8s ease-out forwards;
}

/* Verzögerungen für bis zu 10 Karten */
.blog-grid .blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-grid .blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-grid .blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-grid .blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-grid .blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-grid .blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-grid .blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-grid .blog-card:nth-child(8) { animation-delay: 0.8s; }
.blog-grid .blog-card:nth-child(9) { animation-delay: 0.9s; }
.blog-grid .blog-card:nth-child(10) { animation-delay: 1.0s; }

/* KONTAKT-SEITEN FIX */
/* Sicherstellen, dass der Haupttext Container nicht am Rand klebt, wie auf About */
.profile-text-container {
    margin: 20px auto 50px; /* Zentrieren */
    padding: 1.5rem; /* Standard Padding */
    text-align: left; /* Linksbündig */
}