/* ═══════════════════ CSS VARIABLES ═══════════════════ */
:root {
    --bg: #0d1117; --bg-card: #161b22; --bg-hover: #1c2128; --border: #30363d;
    --text: #e6edf3; --text-muted: #8b949e;
    --accent: #7c3aed; --accent-light: #a78bfa; --accent-glow: rgba(124, 58, 237, 0.3);
    --green: #3fb950; --orange: #f0883e; --red: #f85149; --blue: #58a6ff;
    --shadow: 0 4px 24px rgba(0,0,0,0.4); --radius: 14px; --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="light"] {
    --bg: #f6f8fa; --bg-card: #ffffff; --bg-hover: #f0f2f5; --border: #d0d7de;
    --text: #1f2328; --text-muted: #656d76;
    --accent: #6226d9; --accent-light: #8957e5; --accent-glow: rgba(98, 38, 217, 0.15);
    --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* ═══════════════════ RESET ═══════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh; display: flex; flex-direction: column;
}

/* ═══════════════════ HEADER ═══════════════════ */
.header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.logo-icon { font-size: 1.8rem; }
.logo-text { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-accent { color: var(--accent-light); }
.header-nav { display: flex; gap: 8px; align-items: center; }
.nav-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.nav-btn:hover { background: var(--bg-hover); border-color: var(--accent); transform: translateY(-1px); }

/* ═══════════════════ HERO ═══════════════════ */
.hero { text-align: center; padding: 60px 24px 32px; max-width: 800px; margin: 0 auto; }
.hero-title { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 12px; background: linear-gradient(135deg, var(--text), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px; }
.search-bar { position: relative; max-width: 560px; margin: 0 auto; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
#searchInput { width: 100%; padding: 14px 20px 14px 48px; font-size: 1rem; font-family: inherit; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); color: var(--text); transition: all var(--transition); }
#searchInput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }

/* ═══════════════════ FILTER BAR ═══════════════════ */
.filter-bar { max-width: 1280px; margin: 0 auto; padding: 0 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.filter-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip { padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.category-chip:hover { border-color: var(--accent); color: var(--text); }
.category-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 12px var(--accent-glow); }
.filter-extras { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select { padding: 8px 14px; font-size: 0.85rem; font-family: inherit; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; transition: all var(--transition); }
.filter-select:hover { border-color: var(--accent); }
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ═══════════════════ STATS BAR ═══════════════════ */
.stats-bar { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; justify-content: center; gap: 32px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-item span:first-child { font-size: 1.4rem; font-weight: 800; color: var(--accent-light); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ═══════════════════ NEWS GRID ═══════════════════ */
.news-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; flex: 1; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; padding-bottom: 48px; }

/* ═══════════════════ NEWS CARD ═══════════════════ */
.news-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all var(--transition); display: flex; flex-direction: column; animation: fadeInUp 0.4s ease both; }
.news-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.news-card-img { width: 100%; height: 180px; object-fit: cover; background: linear-gradient(135deg, var(--accent-glow), transparent); }
.news-card-img-img { width: 100%; height: 180px !important; object-fit: cover; background-color: var(--bg-hover); transition: transform 0.4s ease; }
.news-card:hover .news-card-img-img { transform: scale(1.05); }
.news-card-img { display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; overflow: hidden; }
.news-card-img .img-gradient { position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent-glow), rgba(0,0,0,0.1)); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.news-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.news-card-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.news-category-tag { font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.news-card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-desc { font-size: 0.9rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-muted); }
.news-source { font-weight: 600; color: var(--accent-light); max-width: 65%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-date { white-space: nowrap; }

/* Category Colors */
.cat-forschung { background: rgba(88, 166, 255, 0.15); color: var(--blue); }
.cat-produkte { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.cat-ethik { background: rgba(240, 136, 62, 0.15); color: var(--orange); }
.cat-business { background: rgba(124, 58, 237, 0.15); color: var(--accent-light); }
.cat-tools { background: rgba(246, 130, 59, 0.15); color: var(--orange); }
.cat-regulierung { background: rgba(248, 81, 73, 0.15); color: var(--red); }
.cat-bildung { background: rgba(88, 166, 255, 0.15); color: var(--blue); }
.cat-opensource { background: rgba(63, 185, 80, 0.15); color: var(--green); }

/* ═══════════════════ NO RESULTS ═══════════════════ */
.no-results { text-align: center; padding: 80px 24px; color: var(--text-muted); font-size: 1.1rem; }
.no-results p:first-child { font-size: 3rem; margin-bottom: 12px; }
.hidden { display: none !important; }

/* ═══════════════════ ABOUT ═══════════════════ */
.about-section { max-width: 800px; margin: 0 auto; padding: 48px 24px; text-align: center; border-top: 1px solid var(--border); }
.about-section h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 14px; color: var(--accent-light); }
.about-section p { color: var(--text-muted); font-size: 1rem; }

/* ═══════════════════ FOOTER ═══════════════════ */
.footer { text-align: center; padding: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.footer a { color: var(--accent-light); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ═══════════════════ ANIMATIONS ═══════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 768px) {
    .hero-title { font-size: 1.6rem; } .hero-sub { font-size: 0.9rem; }
    .header-inner { padding: 12px 16px; } .news-grid { grid-template-columns: 1fr; gap: 16px; }
    .filter-bar, .news-container { padding: 0 16px; } .stats-bar { gap: 16px; }
    .stat-item span:first-child { font-size: 1.1rem; } .nav-btn { padding: 6px 10px; font-size: 0.78rem; }
}
@media (max-width: 480px) {
    .hero { padding: 32px 16px 24px; } .filter-extras { flex-direction: column; }
    .filter-select { width: 100%; } .modal-header { height: 140px; font-size: 3rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--accent); }