/*
  Styles für: IT‑Projekte & Dokumentationen Hub
  Sprache: Deutsch
  Hinweis: Hell/Dunkel‑Modus via CSS‑Variablen
*/

:root {
  --bg: #0f172a;           /* Hintergrund (dunkel) */
  --text: #e5e7eb;         /* Primärtext */
  --muted: #cbd5e1;        /* Sekundärtext */
  --card: #111827;         /* Kartenhintergrund */
  --border: #334155;       /* Rahmen */
  --primary: #38bdf8;      /* Primärfarbe */
  --primary-contrast: #082f49;
  --accent: #a78bfa;       /* Akzent */
  --success: #22c55e;      /* Erfolgsfarbe */
  --warn: #f59e0b;         /* Warnung */
}

/* Hellmodus */
.light {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
  --primary: #0ea5e9;
  --primary-contrast: #e0f2fe;
  --accent: #7c3aed;
  --success: #16a34a;
  --warn: #d97706;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container { width: min(1100px, 92vw); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--primary); color: #000; padding: .5rem .75rem; border-radius: .5rem; }

.site-header {
  position: sticky; top: 0; z-index: 1000; backdrop-filter: saturate(180%) blur(10px);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; }
.logo { font-weight: 700; }
.main-nav ul { display: flex; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.main-nav a, .main-nav button { color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: .5rem; }
.main-nav a:hover { background: var(--primary-contrast); }

.hero { padding: 3rem 0 2rem; text-align: left; }
.hero .lead { color: var(--muted); max-width: 70ch; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1rem; }

.filters { padding: 2rem 0; border-top: 1px solid var(--border); }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 720px) {
  .filter-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.label { font-weight: 600; }
input[type="search"] { width: 100%; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--card); color: var(--text); }
fieldset { border: 1px solid var(--border); border-radius: .6rem; padding: .5rem .75rem; }
legend { padding: 0 .25rem; color: var(--muted); }
.help { color: var(--muted); }
.result-count { color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 840px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 2px 8px color-mix(in oklab, var(--bg) 80%, transparent); }
.card header { display: flex; align-items: center; justify-content: space-between; }
.badge { font-size: .8rem; padding: .25rem .5rem; border-radius: .5rem; border: 1px solid var(--border); }
.level-anfaenger { background: color-mix(in oklab, var(--success) 18%, transparent); }
.level-fortgeschrittene { background: color-mix(in oklab, var(--accent) 18%, transparent); }
.level-experte { background: color-mix(in oklab, var(--warn) 18%, transparent); }
.meta { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.tag { display: inline-block; padding: .1rem .35rem; border-radius: .35rem; background: var(--primary-contrast); color: var(--text); }
.card-actions { display: flex; gap: .5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .85rem; border-radius: .6rem; border: 1px solid var(--border); cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--primary); color: #001018; }
.btn-secondary { background: var(--accent); color: #fff; border-color: color-mix(in oklab, var(--accent) 80%, #000); }
.btn-ghost { background: transparent; color: var(--text); }
.btn:hover { transform: translateY(-1px); }

.features-list { display: grid; grid-template-columns: 1fr; gap: .5rem; padding-left: 1rem; }
@media (min-width: 720px) { .features-list { grid-template-columns: repeat(2, 1fr); } }

.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1rem 0; color: var(--muted); }

/* Modal */
dialog { border: none; border-radius: .8rem; padding: 0; width: min(800px, 92vw); background: var(--card); color: var(--text); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.modal-body { padding: 1rem; }

/* Fokus‑Styles für Tastaturbedienung */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
