/* ============================================================
   greblea.de — Design-System „Interview mit einer Datenbank"
   Markenfarbe #1f3a68 = Blau der Bewerbungsunterlagen
   ============================================================ */

:root {
  --brand: #1f3a68;
  --brand-soft: #2c4f8c;
  --deep: #16243d;
  --deep-2: #0f1a2e;
  --paper: #f5f7fa;
  --card: #ffffff;
  --ink: #1b2540;
  --muted: #5a6780;
  --line: #dde4ee;
  --accent: #f2a33c;
  --accent-deep: #d9861b;
  --teal: #2e9e8f;
  --coral: #d95d67;
  --font-display: "Archivo", "Segoe UI", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(22, 36, 61, 0.10);
  --shadow-soft: 0 4px 14px rgba(22, 36, 61, 0.07);
  --nav-h: 72px;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
::selection { background: var(--accent); color: var(--deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skiplink {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--deep);
  padding: 10px 18px; font-weight: 600; border-radius: 0 0 8px 0;
}
.skiplink:focus { left: 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(245, 247, 250, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); height: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--accent); background: var(--brand);
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center; letter-spacing: 0;
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  font-size: 1.02rem; line-height: 1.15; display: flex; flex-direction: column;
}
.brand-sub {
  font-family: var(--font-mono); font-weight: 400; font-size: 0.68rem;
  color: var(--muted); letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  text-decoration: none; color: var(--ink);
  font-weight: 500; font-size: 0.98rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a.active { border-bottom-color: var(--accent); color: var(--brand); }
.nav-links a.nav-cta {
  background: var(--brand); color: #fff;
  padding: 9px 20px; border-radius: 999px; border-bottom: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-links a.nav-cta:hover { background: var(--brand-soft); transform: translateY(-1px); }
.nav-links a.nav-cta.active { background: var(--accent-deep); }
.nav-toggle { display: none; }

@media (max-width: 840px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 0 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 28px; border-bottom: none; font-size: 1.05rem; }
  .nav-links a.active { color: var(--brand); background: rgba(31, 58, 104, 0.06); border-left: 3px solid var(--accent); }
  .nav-links a.nav-cta { margin: 10px 24px 0; text-align: center; border-left: none; }
}

/* ---------- Layout ---------- */
main { padding-top: var(--nav-h); }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

.section-dark { background: linear-gradient(160deg, var(--deep) 0%, var(--brand) 130%); color: #e8edf6; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #ffffff; }
.section-dark p { color: #c3cde0; }
.section-dark .lead { color: #aebadb; }
.section-white { background: var(--card); }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.06em; color: var(--accent-deep);
  display: block; margin-bottom: 14px; text-transform: lowercase;
}
.eyebrow::before { content: "-- "; opacity: 0.75; }
.section-dark .eyebrow { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  padding: 14px 28px; border-radius: 999px; border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--deep-2); }
.btn-primary:hover { background: #ffb54d; box-shadow: 0 8px 22px rgba(242, 163, 60, 0.35); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.section-dark .btn-outline { border-color: rgba(232, 237, 246, 0.55); color: #e8edf6; }
.section-dark .btn-outline:hover { background: rgba(232, 237, 246, 0.12); }

/* ---------- Cards & Grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(31, 58, 104, 0.28); }

/* ---------- KPI (BI-Kachel) ---------- */
.kpi {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 20px 22px 16px;
  box-shadow: var(--shadow-soft);
}
.kpi-value {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.1;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.kpi-label {
  font-size: 0.88rem; color: var(--muted); margin-top: 6px;
  font-weight: 500; letter-spacing: 0.01em;
}
.section-dark .kpi { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
.section-dark .kpi-value { color: var(--accent); }
.section-dark .kpi-label { color: #aebadb; }

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.82rem;
  background: rgba(31, 58, 104, 0.07); color: var(--brand);
  border: 1px solid rgba(31, 58, 104, 0.18);
  border-radius: 999px; padding: 5px 14px; margin: 0 6px 8px 0;
  white-space: nowrap;
}
.chip-accent { background: rgba(242, 163, 60, 0.14); color: var(--accent-deep); border-color: rgba(242, 163, 60, 0.4); }
.section-dark .chip { background: rgba(255, 255, 255, 0.08); color: #dbe4f4; border-color: rgba(255, 255, 255, 0.2); }

/* ---------- Terminal (Signatur-Element) ---------- */
.terminal {
  background: var(--deep-2); border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 60px rgba(10, 18, 34, 0.5);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 0.92rem; line-height: 1.7;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #e0655f; } .dot-y { background: #e5b654; } .dot-g { background: #6fbf73; }
.terminal-title {
  margin-left: 10px; color: #7d8db0; font-size: 0.78rem; letter-spacing: 0.04em;
}
.terminal-body { padding: 22px 24px 26px; color: #d7e0f0; overflow-x: auto; }
.t-prompt { color: #6fbf73; user-select: none; }
.t-kw { color: var(--accent); font-weight: 500; }
.t-str { color: #7fd4c7; }
.t-comment { color: #64749a; font-style: italic; }
.t-line { display: block; min-height: 1.7em; white-space: pre-wrap; }
.t-caret {
  display: inline-block; width: 9px; height: 1.15em;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.t-result { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease; }
.terminal.done .t-result { opacity: 1; transform: none; }
.terminal.done .t-caret { animation: none; opacity: 0; }
.t-table { border-collapse: collapse; margin-top: 8px; font-size: 0.85rem; }
.t-table th, .t-table td {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px; text-align: left; color: #d7e0f0; white-space: nowrap;
}
.t-table th { color: var(--accent); font-weight: 500; background: rgba(255, 255, 255, 0.04); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--brand), var(--accent));
  border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 44px 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -31px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 58, 104, 0.12);
}
.tl-item.tl-now::before { background: var(--accent); border-color: var(--accent-deep); }
.tl-date {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-deep);
  letter-spacing: 0.05em; display: block; margin-bottom: 4px;
}
.tl-org { color: var(--muted); font-weight: 500; }

/* ---------- Foto ---------- */
.portrait {
  border-radius: var(--radius);
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.footer { background: var(--deep-2); color: #b9c4dc; margin-top: 0; }
.footer a { color: #e8edf6; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 0.8fr; gap: 36px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: #fff; margin: 0 0 4px; }
.footer-role { font-size: 0.92rem; margin: 0; color: #8fa0c4; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.footer-note {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 36px;
  font-size: 0.8rem; color: #64749a; font-family: var(--font-mono);
}

/* ---------- Scroll-Reveals & Motion ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
  .t-result { opacity: 1; transform: none; }
}
