/* ============================================================
   dai.guru Theme – main.css
   Nüchtern, technisch, mobilfreundlich. Keine externen Fonts.
   Akzentfarbe: #2a6496 (gedämpftes Blau)
   ============================================================ */

/* ---- Reset & Box Model ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Typografie & Grundfarben ---- */
:root {
  --accent:        #1e73be;
  --accent-dark:   #155a91;
  --accent-light:  #e8f3fb;
  --text:          #1a1a1a;
  --text-muted:    #555;
  --bg:            #ffffff;
  --bg-alt:        #f5f5f5;
  --border:        #d0d0d0;
  --code-bg:       #f0f0f0;
  --font-sans:     system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display:  Georgia, "Times New Roman", serif;
  --font-mono:     "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --max-width:     860px;
  --sidebar-width: 220px;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Links ---- */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-dark); }

/* ---- Überschriften ---- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 600;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  color: var(--text);
}
h1 { font-size: 1.9rem; margin-top: 0; }
h2 { font-size: 1.45rem; border-bottom: 1px solid var(--border); padding-bottom: 0.2em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1em; }

ul, ol { margin: 0 0 1em 1.5em; }
li { margin-bottom: 0.25em; }

blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.5em 1em;
  margin: 1.2em 0;
  background: var(--accent-light);
  color: var(--text-muted);
  font-style: italic;
}

hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---- Tabellen ---- */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; font-size: 0.93rem; }
th { background: var(--bg-alt); text-align: left; padding: 0.5em 0.75em; border: 1px solid var(--border); }
td { padding: 0.45em 0.75em; border: 1px solid var(--border); }
tr:nth-child(even) td { background: var(--bg-alt); }

/* ---- Code ---- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1em 1.2em;
  overflow-x: auto;
  margin-bottom: 1.5em;
  line-height: 1.45;
}
pre code { background: none; padding: 0; font-size: 0.85rem; }

/* ---- Highlight-Klassen (Hugo Chroma monokailight) ---- */
.highlight { margin-bottom: 1.5em; }
.highlight pre { margin-bottom: 0; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--accent);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(21, 90, 145, 0.24);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.2rem;
  gap: 1rem;
}
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-logo {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  color: #fff;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 180ms ease;
}
.site-title:hover { color: var(--accent-light); text-decoration: none; }
.site-title:hover .site-logo {
  color: #c36b48;
}

@media (prefers-reduced-motion: reduce) {
  .site-logo { transition: none; }
}

.main-nav { display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.main-nav a {
  color: rgba(255,255,255,0.86);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active { color: #fff; background: rgba(255,255,255,0.18); text-decoration: none; }

.lang-switcher {
  display: flex;
  gap: 0.3rem;
  margin-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.3);
  padding-left: 1rem;
}
.lang-switcher a {
  color: rgba(255,255,255,0.78);
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
}
.lang-switcher a:hover,
.lang-switcher a.active { color: #fff; background: rgba(255,255,255,0.18); text-decoration: none; }

/* Hamburger (nur mobil) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: #fff;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: 0.2s;
}

/* ============================================================
   HAUPTINHALT
   ============================================================ */
.site-main { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---- Startseite ---- */
.hero {
  margin: 1rem 0 2.5rem;
  padding: 2.1rem 2.3rem;
  background: linear-gradient(135deg, var(--accent-light) 0%, #f8fbfd 72%);
  border: 1px solid #b8d4e7;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(30, 77, 114, 0.08);
}
.hero .lead {
  max-width: 760px;
  margin: 0;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Datensicherheits-Banner */
.data-safety-banner {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.85rem 1.2rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--text);
}
.data-safety-banner strong { color: var(--accent-dark); }

/* Kacheln */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}
.tile {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.2rem 1.4rem;
  background: var(--bg-alt);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tile:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(42,100,150,0.12); }
.tile h3 { margin-top: 0; font-size: 1.05rem; color: var(--accent); }
.tile p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* ---- Listen-Seiten (Logbuch, Projekte) ---- */
.list-header { margin-bottom: 2rem; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.post-list li:last-child { border-bottom: none; }
.post-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.post-title { font-size: 1.1rem; font-weight: 600; }
.post-summary { font-size: 0.93rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ---- Einzelartikel ---- */
.article-header { margin-bottom: 1.8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.article-header h1 { margin-bottom: 0.4rem; }
.article-meta { font-size: 0.83rem; color: var(--text-muted); }

/* ---- Konzept: drei getrennte Systemebenen ---- */
.architecture-diagram {
  margin: 2rem 0 2.5rem;
}
.architecture-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  padding: 0.7rem 1rem;
  margin: 0 auto 0.8rem;
  max-width: 680px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.architecture-contact-label {
  color: var(--accent-dark);
  font-weight: 600;
}
.architecture-flow {
  max-width: 760px;
  margin: 0 auto;
}
.architecture-layer {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.architecture-layer-test {
  background: var(--accent-light);
  border-color: var(--accent);
}
.architecture-layer-customer {
  border-left-color: var(--text);
}
.architecture-layer-number {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.architecture-layer-customer .architecture-layer-number {
  background: var(--text);
}
.architecture-layer-content h3 {
  margin: 0.08rem 0 0.25rem;
  font-size: 1.08rem;
}
.architecture-layer-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.architecture-kicker {
  color: var(--accent-dark) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.architecture-boundary {
  justify-self: end;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.architecture-connector {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  min-height: 3rem;
  padding: 0.7rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.77rem;
  font-weight: 600;
}
.architecture-connector::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px solid var(--border);
  z-index: -1;
}
.architecture-connector span {
  align-self: center;
  padding: 0 0.4rem;
  background: var(--bg);
}
.architecture-diagram figcaption {
  max-width: 680px;
  margin: 0.85rem auto 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ---- Dokumentation mit Sidebar ---- */
.doc-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.doc-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: 4rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  font-size: 0.88rem;
}
.doc-sidebar nav ul { list-style: none; margin: 0; padding: 0; }
.doc-sidebar nav li { margin-bottom: 0.2rem; }
.doc-sidebar nav a { color: var(--text-muted); display: block; padding: 0.2rem 0.4rem; border-radius: 3px; }
.doc-sidebar nav a:hover,
.doc-sidebar nav a.active { color: var(--accent); background: var(--accent-light); text-decoration: none; }
.doc-sidebar nav ul ul { margin-left: 0.8rem; }
.doc-content { flex: 1; min-width: 0; }

/* Inhaltsverzeichnis */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
}
.toc-title { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.toc nav ul { margin: 0; padding-left: 1.2em; }
.toc nav li { margin-bottom: 0.15rem; }

/* ---- Projekte ---- */
.project-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  background: var(--bg-alt);
}
.project-card h2 { margin-top: 0; font-size: 1.2rem; border: none; padding: 0; }
.project-status {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-konzept  { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.status-aktiv    { background: #d1e7dd; color: #0a3622; border: 1px solid #198754; }
.status-pause    { background: #f8d7da; color: #58151c; border: 1px solid #dc3545; }
.status-concept  { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.status-active   { background: #d1e7dd; color: #0a3622; border: 1px solid #198754; }

/* ---- Archiv ---- */
.archive-year { margin-bottom: 2rem; }
.archive-year h2 { font-size: 1.15rem; }

/* ---- Platzhalter-Hinweis ---- */
.placeholder-notice {
  background: #fffbe6;
  border: 1px dashed #e6c200;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: #7a6000;
  margin-bottom: 1.2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .hero {
    padding: 1.35rem 1.25rem;
    border-left-width: 4px;
  }
  .hero .lead { font-size: 1.1rem; }

  .header-inner { flex-wrap: wrap; height: auto; padding: 0.6rem 0; }
  .main-nav { display: none; flex-direction: column; width: 100%; padding: 0.5rem 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.5rem 0.4rem; }
  .lang-switcher { border-left: none; padding-left: 0; margin-left: 0; }
  .nav-toggle { display: block; }

  .doc-layout { flex-direction: column; }
  .doc-sidebar { width: 100%; position: static; max-height: none; }

  .tile-grid { grid-template-columns: 1fr; }
  .architecture-layer {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1rem;
  }
  .architecture-boundary {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }
  .architecture-connector {
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Projekt-Filter ─────────────────────────────────────── */
.project-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 1.5rem 0 1.2rem;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.filter-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
  white-space: nowrap;
}
.filter-btn {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1.6;
}
.filter-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.filter-empty {
  color: var(--text-muted);
  font-style: italic;
  margin: 1rem 0;
}

@media print {
  .site-header, .site-footer, .doc-sidebar { display: none; }
  body { font-size: 12pt; }
  a { color: inherit; text-decoration: underline; }
}
