/* =========================================
   0. LOKALE SCHRIFTEN
   ========================================= */

/* --- INTER (Variable Font) --- 
   Wir nutzen die Datei "Inter-VariableFont...", da sie alle 
   Gewichtungen (Light bis Bold) in einer Datei enthält. 
*/
@font-face {
    font-family: 'Inter';
    font-weight: 100 900; /* Deckt alles von Thin bis Black ab */
    font-style: normal;
    font-stretch: normal;
    /* Achte darauf, dass der Dateiname EXAKT so heißt wie in deinem Screenshot */
    src: url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
}

/* --- IBM PLEX MONO (Static Fonts) --- 
   Hier nutzen wir die einzelnen Dateien aus deinem Screenshot.
*/

/* Regular (400) */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/IBMPlexMono-Regular.ttf') format('truetype');
}

/* Medium (500) - Nutzen wir für Überschriften im Code-Look */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    src: url('fonts/IBMPlexMono-Medium.ttf') format('truetype');
}

/* Bold (700) - Falls du mal was hervorheben willst */
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 700;
    src: url('fonts/IBMPlexMono-Bold.ttf') format('truetype');
}

/* Hinweis: Stelle sicher, dass die Dateinamen im 'url' exakt 
   mit deinen Dateien im Ordner 'fonts' übereinstimmen! */


/* =========================================
   1. DESIGN TOKENS (Variablen)
   ========================================= */
:root {
    /* LIGHT MODE (Standard) */
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #555555;
    --line-color: #e5e5e5;
    --card-bg: #f9f9f9;
    --accent-color: #000000;

    /* Typografie */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Abstände */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    --container-width: 1100px;
    --header-height: 80px;
}

/* DARK MODE OVERRIDES */
body.dark-mode {
    --bg-color: #111111;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --line-color: #333333;
    --card-bg: #1a1a1a;
    --accent-color: #ffffff;
}

/* =========================================
   2. BASIS & RESET
   ========================================= */

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Verhindert horizontales Scrollen komplett */
}

* {
    box-sizing: border-box; /* Padding vergrößert nicht mehr die Gesamtbreite */
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.6; }



/* =========================================
   3. NAVIGATION & TOGGLE
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.site-nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line-color);
}

.logo { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.05em; }

.nav-right { display: flex; align-items: center; gap: var(--space-md); }
.nav-links { display: flex; gap: var(--space-md); }
.nav-links a { font-size: 0.95rem; font-weight: 500; }

/* Theme Toggle Button Style */
#theme-toggle {
    background: none;
    border: 1px solid var(--line-color);
    color: var(--text-main);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: var(--line-color);
}

/* Icons umschalten */
.icon-moon { display: none; }
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }

/* =========================================
   4. TYPOGRAFIE (Hero)
   ========================================= */
.page-header { padding: var(--space-xl) 0 var(--space-lg) 0; }

.page-title {
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    font-weight: 400;
}

/* =========================================
   5. SKILLSET GRID (3-Säulen)
   ========================================= */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    border-top: 1px solid var(--line-color);
    padding-top: var(--space-lg);
}


.skill-number {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    display: block;
}

/* =========================================
   5. SKILLSET GRID (3-Säulen)
   ========================================= */
.skill-grid {
    display: grid;
    /* Wir nutzen minmax, damit die Spalten nicht zu schmal werden */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: var(--space-md);
    
    /* WICHTIG: Stellt sicher, dass die Karten selbst gleich hoch sind */
    align-items: start; 
    
    padding-top: var(--space-lg);
    /* Die Linie oben drüber nehmen wir hier weg und setzen sie in die Karten */
    border-top: none; 
}

.skill-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100%; /* Karte nimmt volle Höhe des Grids an */
    
    /* STRUKTUR: Eine Linie über JEDER Karte sorgt für klare Abgrenzung */
    border-top: 1px solid var(--line-color); 
    padding-top: var(--space-sm);
}

.skill-number {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    
    /* DER FIX: Wir reservieren immer Platz für mind. 2 Zeilen */
    /* 1.25rem Schriftgröße * 1.3 Line-Height * 2 Zeilen = ca 3.25rem */
    min-height: 3.5rem; 
    
    /* Damit einzeilige Titel nicht komisch in der Luft hängen, kann man sie optional mittig setzen. 
       Für deinen cleanen Look empfehle ich aber, sie oben zu lassen (Standard). */
    display: flex;
    align-items: flex-start; 
}

.skill-card p {
    color: var(--text-muted); /* Im Darkmode ist das grau, im Lightmode dunkelgrau */
    font-size: 1rem;
    line-height: 1.7;
    
    /* Optional: Begrenzt die Breite für bessere Lesbarkeit */
    max-width: 95%; 
}


/* =========================================
   6. ÜBER MICH (Text Sektion)
   ========================================= */
.about-section {
    border-top: 1px solid var(--line-color);
    padding-top: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.about-content {
    max-width: 700px;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.highlight-text {
    font-weight: 600;
    color: var(--text-main);
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

/* =========================================
   7. FOOTER & MOBILE
   ========================================= */

/* Zentraler Container für alle Inhalte */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    /* Erhöhtes Padding für mobile Endgeräte */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Speziell für den Footer, falls dieser separat gestylt ist */
.site-footer {
    padding-top: 2rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--line-color);
    display: flex;
    flex-direction: column; /* Stapelt Text auf Mobile untereinander */
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Media Query für Desktop: Hier kann das Padding wieder kleiner sein */
@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .site-footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Grundstruktur */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-right, .nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobil-spezifische Regeln */
@media (max-width: 600px) {
    /* Die Text-Links "Lösungen" & "Profil" entfernen */
    .nav-links-desktop {
        display: none;
    }

    /* Den CTA-Button auf Mobile etwas kompakter machen */
    .cta-mini {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
        border: 1px solid var(--line-color);
        border-radius: 4px;
        white-space: nowrap; /* Verhindert Umbruch im Button */
    }

    /* Verhindert, dass die H1 die Seite nach rechts drückt */
    .page-title {
        font-size: 1.6rem; 
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Desktop-Anpassung */
@media (min-width: 601px) {
    .nav-links-desktop {
        display: flex;
        gap: 1.5rem;
    }
}


/* MOBIL-OPTIMIERUNG (für Bildschirme kleiner als 600px) */
@media (max-width: 600px) {
    .nav-links {
        display: none; /* Versteckt die Text-Links auf sehr kleinen Screens */
        /* Optional: Später durch ein Burger-Menü ersetzen */
    }
    
    .logo {
        font-size: 1.2rem; /* Etwas kleineres Logo auf Mobile */
    }

    .page-title {
        font-size: 2.1rem; /* Verhindert, dass extrem lange Wörter die Breite sprengen */
        hyphens: auto;      /* Erlaubt automatische Silbentrennung */
    }
}