/* ============================================================
   1. VARIABLEN & RESET
   ============================================================ */
:root {
    --bg: #050505;
    --card-bg: #111111;
    --text: #ffffff;
    --accent: #d4a373; 
    --accent-gold: #d4a373;
    --muted: #888;
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background: var(--bg); 
    color: var(--text); 
    font-family: var(--font-main); 
    overflow-x: hidden;
    line-height: 1.6;
}

.italic-serif { 
    font-family: var(--font-serif); 
    font-style: italic; 
    color: var(--accent); 
}

/* ============================================================
   2. FLOATING NAVIGATION
   ============================================================ */
.glass-nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1000px;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(20px);
    padding: 15px 40px; border-radius: 100px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo { font-weight: 700; font-size: 1.5rem; }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.nav-links a:hover { color: var(--accent); }

.nav-cta { 
    background: #fff; 
    color: #000 !important; 
    padding: 8px 20px; 
    border-radius: 50px; 
    font-weight: 700; 
}

/* ============================================================
   3. FANCY HERO (Slide-In & Kreativ)
   ============================================================ */
.fancy-hero { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    background: radial-gradient(circle at center, #111 0%, #050505 100%);
}

.hero-title {
    /* Hier wird die Hauptgröße definiert */
    font-size: clamp(3rem, 12vw, 8rem);
    line-height: 1.1; /* Etwas mehr Luft für die Zeilen */
    text-transform: uppercase;
    margin: 20px 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-line {
    display: block;
    /* Visible ist wichtig, damit die Bögen des & rausschauen dürfen */
    overflow: visible; 
    padding: 0.05em 0; 
    position: relative;
}

.ampersand-fix {
    display: inline-block;
    /* Zwingt das Zeichen, die volle Größe der h1 anzunehmen */
    font-size: inherit; 
    line-height: 1;
    vertical-align: middle;
    /* Schiebt es minimal nach oben für die optische Mitte */
    transform: translateY(-0.05em); 
    padding: 0 0.02em;
}

.hero-title .title-line {
    animation: slideUp 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    transform: translateY(100%);
}
.hero-title .title-line:nth-child(2) { animation-delay: 0.2s; }

@keyframes slideUp { to { transform: translateY(0); } }

.thin-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    text-transform: lowercase;
    color: var(--accent-gold);
    /* Auch hier die Größe sicherstellen */
    font-size: inherit; 
}

.highlight-text {
    letter-spacing: -2px;
    background: linear-gradient(to right, var(--accent-gold), #fff);
    -webkit-background-clip: text;
    background-clip: text;         
    -webkit-text-fill-color: transparent;
}

.eyebrow { 
    color: var(--accent); 
    text-transform: uppercase; 
    letter-spacing: 5px; 
    font-size: 0.8rem; 
    opacity: 0;
    animation: fadeIn 1.5s ease forwards 0.8s;
}

.hero-sub { 
    color: var(--muted); 
    font-size: 1.2rem; 
    max-width: 600px; 
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlide 1.2s ease forwards 1s;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeInSlide { to { opacity: 1; transform: translateY(0); } }

.hero-scroll { margin-top: 50px; animation: bounce 2s infinite; }
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}
/* ============================================================
   4. BENTO EXPERTISE
   ============================================================ */
.bento-section { padding: 120px 10%; max-width: 1400px; margin: 0 auto; }
.section-tag { color: var(--accent); text-transform: uppercase; letter-spacing: 5px; text-align: center; margin-bottom: 50px; }

.bento-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; 
}

.bento-item { 
    background: var(--card-bg); 
    border-radius: 30px; 
    padding: 40px; 
    border: 1px solid rgba(255, 255, 255, 0.03); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-item:hover { 
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(212, 163, 115, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.expertise-main, .skill-card-wide { grid-column: span 2; }

.status-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    display: inline-block;
    margin-left: 10px;
}

.tech-stack-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tech-tag { 
    background: rgba(212, 163, 115, 0.1); 
    color: var(--accent); 
    padding: 8px 16px; 
    border-radius: 12px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    border: 1px solid rgba(212, 163, 115, 0.2); 
    transition: 0.3s; 
}
.tech-tag:hover { background: var(--accent); color: #000; transform: translateY(-3px); }

.dev-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.icon-large { font-size: 3rem; }
.code-badge { 
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; 
    padding: 4px 10px; border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; 
}

/* ============================================================
   5. PERSONAL ABOUT (Bunt & Rund)
   ============================================================ */
.personal-about { padding: 150px 10%; background: #000; }
.about-split-container { display: flex; align-items: center; gap: 80px; max-width: 1200px; margin: 0 auto; }

.about-image-side { 
    flex: 1; 
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 350px; /* Quadratische Basis für den Kreis */
    height: 350px;
    border-radius: 50%; /* Kreisform */
    padding: 8px;
    background: linear-gradient(145deg, var(--accent-gold), transparent);
    box-shadow: 0 0 30px rgba(212, 163, 115, 0.15);
}

.image-frame img { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; /* Bild rund */
    object-fit: cover; 
    filter: grayscale(0%); /* BUNT */
    transition: 0.5s ease;
}

.image-frame:hover img { transform: scale(1.05); }

.about-text-side { flex: 1.2; }
.tag { color: var(--accent); text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; }
.lead { font-size: 1.5rem; color: var(--accent); margin-top: 10px; margin-bottom: 20px; }

/* ============================================================
   6. WORK SECTION (Fix für flexible Cards)
   ============================================================ */
.projects-section { padding: 120px 10%; background: #050505; }

.project-grid-fancy { 
    display: grid; 
    /* ÄNDERUNG: minmax auf 280px senken, damit es auf jedes Handy passt */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-top: 50px; 
}

.project-card-premium {
    position: relative; 
    border-radius: 30px; 
    overflow: hidden;
    background: #111; 
    cursor: pointer; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    width: 100%; /* Sicherstellen, dass die Card nicht breiter als der Container wird */
}

/* ÄNDERUNG: Höhe auf 'auto' oder einen kleineren Wert für Mobile setzen */
.project-image-wrapper { 
    position: relative; 
    width: 100%; 
    height: 400px; /* Etwas niedriger für bessere Proportionen */
}
/* 1. Der Container (Der Rahmen) */
.project-image-wrapper { 
    position: relative; 
    width: 100%; 
    height: 400px; /* Deine gewünschte Höhe */
    overflow: hidden; /* WICHTIG: Alles, was übersteht, wird abgeschnitten */
    background: #111; /* Dunkler Hintergrund, falls Bild lädt */
    border-radius: 30px; /* Passend zu deinen Cards */
}

/* 2. Das Bild (Der Inhalt) */
.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* DAS IST DIE LÖSUNG: Das Bild füllt den Platz aus, ohne zu verzerren */
    object-position: center; /* Das Bild wird mittig ausgerichtet */
    display: block;
    transition: transform 0.8s ease; /* Für deinen Hover-Effekt */
}
.project-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex; align-items: flex-end; padding: 40px;
    opacity: 0; transition: all 0.5s ease;
}

.project-card-premium:hover .project-overlay { opacity: 1; }
.project-card-premium:hover img { transform: scale(1.1); }

.project-category { color: var(--accent-gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.project-tags span { font-size: 0.7rem; padding: 5px 12px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; background: rgba(255,255,255,0.05); margin-right: 5px;}

/* ============================================================
   7. FOOTER (Optimiert für Mail & Phone)
   ============================================================ */
.fancy-footer { padding: 120px 10% 40px; background: #000; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }

.contact-info { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; align-items: center; }

.giant-mail, .phone-number { 
    font-size: clamp(1.2rem, 4vw, 3rem); 
    text-decoration: none; 
    color: #fff; 
    font-weight: 200; 
    transition: 0.4s; 
}

.giant-mail { border-bottom: 1px solid rgba(255,255,255,0.1); }
.giant-mail:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Handynummer etwas dezenter aber im selben Stil */
.phone-number { font-family: var(--font-main); opacity: 0.8; font-size: clamp(1rem, 3vw, 2rem); }

.footer-bottom { margin-top: 80px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 40px; }
.designer-name { font-family: var(--font-serif); font-size: 1.5rem; }

/* Fact-List Fix (Variable korrigiert) */
.fact-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    border-left: 2px solid var(--accent); /* Hier stand vorher ein Fehler */
    padding-left: 20px;
    text-align: left; /* Text linksbündig für bessere Lesbarkeit */
}

.fact-list li { margin-bottom: 12px; font-size: 1rem; color: var(--muted); }
.fact-list strong { color: var(--text); }

/* ============================================================
   8. RESPONSIVE (Feinschliff)
   ============================================================ */
@media (max-width: 1000px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .about-split-container { flex-direction: column; text-align: center; gap: 40px; }
    .fact-list { display: inline-block; text-align: left; } /* Zentriert die Liste im Mobile-Modus */
    .nav-links { display: none; } /* Versteckt Menü auf kleinen Screens (Standard für Mobile-Designs ohne Burger-Menü) */
}

@media (max-width: 600px) {
    .bento-grid { grid-template-columns: 1fr; }
    .expertise-main, .skill-card-wide { grid-column: span 1; }
    .image-frame { width: 280px; height: 280px; }
    .hero-title { font-size: 3.5rem; } /* Bessere Lesbarkeit auf dem Handy */
    .footer-bottom { flex-direction: column; gap: 20px; }
}
/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .about-split-container { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
    .bento-grid { grid-template-columns: 1fr; }
    .expertise-main, .skill-card-wide { grid-column: span 1; }
    .image-frame { width: 280px; height: 280px; }
}

/* ============================================================
   8. RESPONSIVE (Zusatz für kleine Screens)
   ============================================================ */
@media (max-width: 600px) {
    .projects-section { padding: 80px 5%; } /* Weniger Abstand am Rand auf dem Handy */
    
    .project-image-wrapper { 
        height: 300px; /* Bilder auf dem Handy etwas kleiner machen */
    }
    
    .project-overlay {
        opacity: 1; /* Auf Touch-Geräten (Handy) das Overlay immer zeigen, da es kein 'Hover' gibt */
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    }
}

/* ============================================================
   8. RESPONSIVE (Handy-Navigation Fix)
   ============================================================ */
@media (max-width: 1000px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .about-split-container { flex-direction: column; text-align: center; gap: 40px; }
    .fact-list { display: inline-block; text-align: left; }
}

@media (max-width: 600px) {
    /* Navigation für Handy optimieren statt verstecken */
    .glass-nav { 
        padding: 10px 20px; 
        width: 95%;
    }
    
    .logo { font-size: 1.1rem; }

    .nav-links { 
        gap: 10px; /* Weniger Abstand zwischen den Links */
    }

    .nav-links a { 
        font-size: 0.65rem; /* Schrift etwas kleiner machen */
        letter-spacing: 0.5px;
    }

    /* Den "Kontakt"-Button am Handy etwas schmaler */
    .nav-cta { 
        padding: 5px 12px; 
    }

    /* Restliche Handy-Anpassungen */
    .bento-grid { grid-template-columns: 1fr; }
    .expertise-main, .skill-card-wide { grid-column: span 1; }
    .image-frame { width: 280px; height: 280px; }
    .hero-title { font-size: 3.2rem; }
    .footer-bottom { flex-direction: column; gap: 20px; }
}

.glass-nav {
    position: fixed; 
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    width: 90%; 
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* Für Safari am Handy */
    padding: 15px 40px; 
    border-radius: 100px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    
    /* WICHTIG: Die Bar muss ganz nach vorne! */
    z-index: 9999; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Stellt sicher, dass Klicks durchgehen */
    pointer-events: auto; 
}

.nav-links a, .nav-cta {
    cursor: pointer;
    position: relative;
    z-index: 10000;
}

/* Burger-Button Positionierung */
.burger-menu {
    display: none; /* Desktop: versteckt */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 10002; /* Ganz oben */
}

.burger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile-Ansicht (Handy) */
@media (max-width: 600px) {
    .nav-links { 
        display: none !important; /* Versteckt die normalen Links */
    }

    .burger-menu { 
        display: flex; /* Zeigt den Burger am Handy an */
    }
}

/* Wenn das Menü offen ist: Animation zum X */
.burger-menu.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-menu.open span:nth-child(2) { opacity: 0; }
.burger-menu.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============================================================
   MOBILE OVERLAY STYLING (Das eigentliche Menü)
   ============================================================ */
.mobile-overlay {
    position: fixed;
    top: 0;
    right: -100%; /* Startet unsichtbar außerhalb des rechten Rands */
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98); /* Fast schwarz mit leichtem Durchschein */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 10001; /* Zwischen Nav-Bar und Burger-Button */
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Wenn das Menü aktiv ist, schiebt es sich auf den Bildschirm */
.mobile-overlay.active {
    right: 0;
}

.mobile-overlay a {
    color: #fff;
    text-decoration: none;
    font-size: 2.5rem;
    font-family: var(--font-serif); /* Dein schöner Serif-Stil */
    font-style: italic;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

/* Kleiner Animationstrick: Die Links erscheinen verzögert */
.mobile-overlay.active a {
    opacity: 1;
    transform: translateY(0);
    transition: 0.4s ease forwards;
}

.mobile-overlay.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-overlay.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-overlay.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-overlay.active a:nth-child(4) { transition-delay: 0.4s; }

.mobile-overlay a:hover {
    color: var(--accent);
}