/* --- Apple Color Palette & Variables --- */
:root { 
    --bg-color: #fbfbfd; --text-color: #1d1d1f; --text-muted: #86868b; 
    --card-bg: #ffffff; --nav-bg: rgba(251, 251, 253, 0.8); 
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04); --accent: #0071e3; --overlay-bg: #ffffff;
}
.dark-mode { 
    --bg-color: #000000; --text-color: #f5f5f7; --text-muted: #a1a1a6; 
    --card-bg: #1c1c1e; --nav-bg: rgba(0, 0, 0, 0.8); 
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5); --accent: #2997ff; --overlay-bg: #000000;
}

/* --- Globals --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif; 
    background-color: var(--bg-color); color: var(--text-color); 
    line-height: 1.47059; -webkit-font-smoothing: antialiased; overflow-x: hidden; 
    transition: background-color 0.3s ease;
}

/* --- Navigation --- */
.glass-nav { 
    position: fixed; top: 0; width: 100%; height: 52px;
    background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); 
    -webkit-backdrop-filter: saturate(180%) blur(20px); 
    z-index: 9999; border-bottom: 1px solid rgba(128,128,128,0.1); 
}
.nav-container { 
    max-width: 1024px; margin: 0 auto; height: 100%; 
    padding: 0 22px; display: flex; justify-content: space-between; align-items: center; 
}
.nav-logo { font-size: 19px; font-weight: 600; text-decoration: none; color: var(--text-color) !important; letter-spacing: -0.01em; }

.nav-links { display: flex; list-style: none; gap: 32px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-color) !important; font-size: 14px; opacity: 0.8; transition: 0.3s; }
.nav-links a:hover { opacity: 1; }

/* Dropdown Logic */
.dropdown { position: relative; list-style: none; }
.dropdown-trigger::after { content: '▾'; font-size: 10px; margin-left: 4px; opacity: 0.5; display: inline-block; transition: transform 0.3s; }
.dropdown:hover .dropdown-trigger::after { transform: rotate(180deg); opacity: 1; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(128, 128, 128, 0.1);
    border-radius: 18px;
    padding: 8px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(8px);
}

.dropdown-menu li { display: block; width: 100%; margin: 0; }
.dropdown-menu a {
    padding: 10px 14px;
    display: block;
    font-size: 13px;
    font-weight: 500;
    border-radius: 12px;
    color: var(--text-color) !important;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(128, 128, 128, 0.08);
    opacity: 1;
    color: var(--accent) !important;
    transform: translateX(3px);
}

/* Dropdown Fix: Unterstreichung im Header ausblenden für Menü-Links */
.dropdown-menu a::after { display: none !important; }

.nav-right { display: flex; align-items: center; gap: 24px; }

#theme-toggle { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-color); display: flex; align-items: center; }
.btn-login { background-color: var(--text-color); color: var(--bg-color) !important; text-decoration: none !important; padding: 6px 14px; border-radius: 14px; font-size: 13px; font-weight: 500; transition: opacity 0.2s; }

/* --- Premium Apple Badge (FIX FÜR INDEX) --- */
.badge-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

.apple-badge-premium {
    display: inline-flex;
    align-items: center;
    background: rgba(128, 128, 128, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 20px 8px 10px;
    border-radius: 50px;
    border: 1px solid rgba(128, 128, 128, 0.15);
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-color) !important;
}

.apple-badge-premium:hover {
    transform: scale(1.03) translateY(-2px);
    background: rgba(128, 128, 128, 0.12);
    border-color: var(--accent);
}

.dark-mode .apple-badge-premium:hover {
    box-shadow: 0 10px 30px rgba(41, 151, 255, 0.15);
}

.badge-tag {
    background: var(--accent);
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 50px;
    margin-right: 14px;
}

.badge-content { font-size: 15px; font-weight: 500; }

.badge-icon {
    margin-left: 10px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.apple-badge-premium:hover .badge-icon {
    transform: translateX(5px);
}

.apple-badge-premium:visited { color: var(--text-color) !important; }

/* --- Layout System --- */
.hero { width: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 22px; }
.content-section { max-width: 1024px; margin: 0 auto; padding: 120px 22px 80px; display: flex; flex-direction: column; align-items: center; }
.section-header { text-align: center; margin-bottom: 50px; width: 100%; }
.section-header h1, .section-header h2 { font-size: 40px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.sub-header { color: var(--text-muted); font-size: 19px; }

/* --- Grid & Cards --- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 44px; width: 100%; }
.card { background: var(--card-bg); padding: 40px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid rgba(128,128,128,0.1); transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-align: left; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card-icon { font-size: 36px; margin-bottom: 20px; }
.card h3 { font-size: 24px; margin-bottom: 12px; font-weight: 600; }
.card p { color: var(--text-muted); font-size: 16px; margin-bottom: 20px; line-height: 1.5; }
.card ul { list-style: none; padding: 0; }
.card li { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; padding-left: 20px; position: relative; }
.card li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* --- Mobile Nav --- */
.apple-nav-toggle { width: 24px; height: 16px; position: relative; cursor: pointer; display: none; flex-direction: column; justify-content: space-between; z-index: 10005; }
.apple-nav-toggle .bar { width: 100%; height: 1.5px; background-color: var(--text-color); transition: 0.3s; }
.apple-nav-toggle.active .bar.top { transform: translateY(7px) rotate(45deg); }
.apple-nav-toggle.active .bar.bottom { transform: translateY(-7.5px) rotate(-45deg); }

.overlay { height: 100vh; width: 100%; position: fixed; z-index: 10000; top: 0; left: 0; background-color: var(--overlay-bg); opacity: 0; visibility: hidden; transition: 0.4s ease; }
.overlay.open { opacity: 1; visibility: visible; }
.overlay-content { position: relative; top: 120px; padding-left: 48px; display: flex; flex-direction: column; }
.overlay-content a { text-decoration: none; font-size: 34px; color: var(--text-color) !important; font-weight: 600; margin-bottom: 22px; letter-spacing: -0.02em; }

/* --- Footer --- */
.site-footer { width: 100%; max-width: 1024px; margin: 80px auto 0; padding: 40px 22px 100px; border-top: 1px solid rgba(128,128,128,0.1); display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted) !important; text-decoration: none; font-size: 12px; transition: 0.2s; }
.site-footer a:hover { color: var(--text-color) !important; text-decoration: underline; }

/* --- Responsive Helpers --- */
@media (max-width: 834px) {
    .grid { grid-template-columns: 1fr; }
    .desktop-only { display: none !important; }
    .apple-nav-toggle { display: flex !important; }
    .hero h1 { font-size: 42px !important; }
    .section-header h1 { font-size: 32px; }
    .footer-links { flex-direction: column; gap: 12px; align-items: center; }
    .site-footer { padding-bottom: 100px; }
}

/* Animations */
@keyframes premiumFadeIn { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }
main { animation: premiumFadeIn 0.8s cubic-bezier(0.15, 0, 0.15, 1) forwards; }

/* --- Bento Portfolio Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    margin-top: 40px;
}

.bento-card {
    background: var(--card-bg);
    border-radius: 32px; 
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(128,128,128,0.1);
    transition: transform 0.3s ease;
}

.bento-card.wide {
    grid-column: span 2;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stat-item {
    background: rgba(128, 128, 128, 0.05);
    padding: 12px 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.stat-item span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.stat-item strong { font-size: 14px; color: var(--text-color); }

.btn-portfolio {
    display: inline-block;
    background: var(--text-color);
    color: var(--bg-color) !important;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
}

.btn-secondary {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

/* Mobile Anpassung */
@media (max-width: 834px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.wide { grid-column: span 1; }
}