/* Ergänzungen zum Portfolio-Design (base.css): Menü, laufende Projekte, Pipeline, Posts, Formulare, Beitrag */

.section-sub { margin: 10px 0 0; max-width: 640px; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Handy-Menü ---------- */
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,20,68,.6); padding: 11px 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; margin: 4px 0; background: var(--blue-ice); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .2s; }
@media (max-width: 640px) {
  .menu-btn { display: block; }
  .topbar-nav { position: fixed; inset: 72px 12px auto 12px; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 18px;
    background: #040f3a; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease-out); }
  .topbar-nav a, .topbar-nav a:not(.topbar-cta) { display: block; padding: 12px 14px; border-radius: 12px; }
  body.menu-open .topbar-nav { opacity: 1; transform: none; pointer-events: auto; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Laufende Projekte ---------- */
.run-card .project-tag { margin: 0 0 8px; }
.run-card h3 { margin: 0 0 8px; }
.run-card p { color: var(--muted); }

/* ---------- Pipeline ---------- */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; counter-reset: step; }
.pipeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 34px; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), var(--blue-light), var(--blue), transparent);
  background-size: 200% 100%; animation: pipe-flow 4s linear infinite; opacity: .6; }
@keyframes pipe-flow { to { background-position: -200% 0; } }
.pipe-step { position: relative; padding: 20px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); backdrop-filter: blur(10px); }
.pipe-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .8rem; font-weight: 800; color: #021032;
  background: linear-gradient(135deg, var(--blue-light), var(--blue)); box-shadow: 0 0 0 6px rgba(25,155,215,.15), 0 0 18px rgba(25,155,215,.6); }
.pipe-step h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.pipe-step p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 960px) { .pipeline { grid-template-columns: 1fr; } .pipeline::before { left: 33px; right: auto; top: 6%; bottom: 6%; width: 2px; height: auto; background: linear-gradient(180deg, transparent, var(--blue), transparent); } .pipe-step { padding-left: 64px; } .pipe-num { position: absolute; left: 18px; top: 20px; } .pipe-step h3 { margin-top: 2px; } }

/* ---------- Posts ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card);
  backdrop-filter: blur(10px); transition: transform .35s var(--ease-out), border-color .3s, box-shadow .3s; }
.post-card:hover, .post-card:focus-visible { transform: translateY(-6px); border-color: rgba(127,211,255,.45); box-shadow: 0 24px 50px -24px rgba(25,155,215,.6); outline: none; }
.post-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease-out); }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.post-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.post-meta { color: var(--blue); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.post-more { margin-top: auto; color: var(--blue-light); font-weight: 600; font-size: .92rem; }

/* ---------- Beitrag (Overlay) ---------- */
.post-view { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: rgba(2,8,36,.82); backdrop-filter: blur(10px); padding: clamp(12px, 4vw, 48px) 16px; animation: view-in .35s var(--ease-out); }
.post-view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; } }
body.post-open { overflow: hidden; }
.post-sheet { position: relative; max-width: 820px; margin: 0 auto; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(170deg, #0a1a52, #040f35); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); animation: sheet-in .5s var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
.post-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8,20,68,.85); color: var(--text); font-size: 1.5rem; cursor: pointer; z-index: 2; }
.post-content { padding: clamp(20px, 5vw, 48px); }
.post-head h1 { margin: 8px 0 18px; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; }
.post-hero img { width: 100%; border-radius: 16px; margin-bottom: 24px; }
.post-content h2 { margin: 30px 0 10px; font-size: 1.35rem; }
.post-content p, .post-content li { color: #d6e6fb; }
.post-content ul { padding-left: 1.2em; }
.post-content li::marker { color: var(--blue); }
.post-figure { margin: 22px 0; }
.post-figure img { border-radius: 14px; width: 100%; }
.post-figure figcaption { margin-top: 8px; color: var(--muted); font-size: .88rem; }
.post-content video { width: 100%; border-radius: 14px; margin: 18px 0; background: #000; }
.code-wrap { position: relative; margin: 20px 0; }
.code-wrap pre { margin: 0; padding: 18px; border-radius: 14px; border: 1px solid var(--line); overflow: auto; font-size: .88rem; background: #020a2a !important; }
.code-copy { position: absolute; top: 8px; right: 8px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8,20,68,.9); color: var(--blue-ice); font-size: .8rem; cursor: pointer; z-index: 1; }

/* ---------- Formulare ---------- */
.form-laser { max-width: 900px; }
.b2f-form { padding: clamp(22px, 5vw, 44px); display: grid; gap: 18px; background: radial-gradient(120% 120% at 50% 0%, #0d2a82 0%, #050f35 70%); text-align: left; }
/* Spalte nie breiter als das Formular: Fieldsets haben sonst min-width:min-content und schieben auf dem Handy alle Felder rechts aus dem Rahmen */
.b2f-form { grid-template-columns: minmax(0, 1fr); }
.b2f-form > *, .b2f-form .field, .b2f-form .grid2 > * { min-width: 0; }
.b2f-form fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.b2f-form legend { margin-bottom: 10px; color: var(--blue-ice); font-weight: 600; font-size: .95rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.b2f-form [hidden] { display: none !important; }
.field > span { color: var(--muted); font-size: .88rem; }
.b2f-form input, .b2f-form select, .b2f-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(127,211,255,.22); background: rgba(2,8,36,.6);
  color: var(--text); font: inherit; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.b2f-form input:focus, .b2f-form select:focus, .b2f-form textarea:focus { border-color: var(--blue-light); box-shadow: 0 0 0 4px rgba(25,155,215,.2); background: rgba(2,8,36,.85); }
.b2f-form textarea { resize: vertical; }
.phone { display: grid; grid-template-columns: 128px 1fr; gap: 8px; }
.code-box { font: 14px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace !important; tab-size: 2; white-space: pre; }
.pin-input { letter-spacing: .3em; font-family: ui-monospace, Consolas, monospace !important; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { width: 100%; }
.seg label, .toggle-q label { position: relative; cursor: pointer; }
.seg input, .toggle-q input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .toggle-q span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(127,211,255,.25); background: rgba(8,20,68,.5); color: var(--muted);
  transition: all .25s var(--ease-out); }
.seg input:checked + span, .toggle-q input:checked + span { color: #021032; background: linear-gradient(135deg, var(--blue-light), var(--blue)); border-color: transparent; box-shadow: 0 6px 18px rgba(25,155,215,.35); }
.seg input:focus-visible + span, .toggle-q input:focus-visible + span { outline: 2px solid var(--blue-light); outline-offset: 2px; }
.toggle-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toggle-q legend { width: 100%; }
.reveal-box { padding: 18px; border-radius: 16px; border: 1px dashed rgba(127,211,255,.3); background: rgba(25,155,215,.05); }
.reveal-box.open { animation: box-open .45s var(--ease-out); }
@keyframes box-open { from { opacity: 0; transform: translateY(-8px) scaleY(.96); } }
.drop { position: relative; display: block; padding: 18px; border-radius: 16px; border: 1.5px dashed rgba(127,211,255,.35); background: rgba(8,20,68,.35); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop:focus-within { border-color: var(--blue-light); background: rgba(25,155,215,.08); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { color: var(--blue-light); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .92rem; cursor: pointer; }
.check input { width: 20px !important; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.captcha-note { margin: 0; color: var(--muted); font-size: .78rem; }
.grecaptcha-badge { visibility: hidden; }
.b2f-form button[type=submit] { justify-self: start; }
.b2f-form.sending button[type=submit] { opacity: .7; cursor: progress; }
.form-status { min-height: 1.4em; font-weight: 600; }
.form-status.ok { color: #6ef0b0; }
.form-status.bad { color: #ff9aa8; }
.form-status.info { color: var(--blue-ice); }
.b2f-form.sent { animation: sent-glow 2.4s var(--ease-out); }
@keyframes sent-glow { 20% { box-shadow: inset 0 0 0 2px rgba(110,240,176,.7), 0 0 60px rgba(110,240,176,.35); } }

@media (prefers-reduced-motion: reduce) {
  .pipeline::before, .post-view, .post-sheet, .reveal-box.open, .b2f-form.sent { animation: none; }
}

/* ---------- Posts-Seite, Kategorien, Galerie, Lightbox (Teil 2b) ---------- */
.posts-all { text-align: center; margin: 28px 0 0; }
.posts-main { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 120px 16px 60px; min-height: 70vh; }
.posts-head { text-align: left; margin-bottom: 22px; }
.posts-head h1 { margin: 6px 0 8px; font-size: clamp(2rem, 5vw, 3rem); }
.posts-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.posts-tab, .posts-tag, .posts-page { border: 1px solid var(--line); background: rgba(8,20,68,.55); color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: .92rem; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.posts-tab:hover, .posts-tag:hover, .posts-page:hover { border-color: var(--blue-light); color: var(--blue-light); }
.posts-tab.on, .posts-page.on { background: linear-gradient(135deg, var(--blue-light), var(--blue)); color: #021032; border-color: transparent; font-weight: 700; }
.posts-tools { margin-bottom: 12px; }
.posts-search { width: 100%; max-width: 420px; border: 1px solid var(--line); background: rgba(8,20,68,.55); color: var(--text); border-radius: 12px; padding: 11px 14px; font: inherit; }
.posts-search:focus { outline: 2px solid var(--blue-light); outline-offset: 1px; }
.posts-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.posts-tag { padding: 4px 11px; font-size: .82rem; color: var(--muted); }
.posts-tag.on { color: var(--blue-light); border-color: var(--blue-light); }
.posts-pager { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.posts-page { min-width: 42px; }
.posts-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; }
.post-cat { align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #021032; background: var(--blue-light); border-radius: 999px; padding: 3px 10px; }
.post-head .post-cat { display: inline-block; margin-bottom: 8px; }
.posts-back { display: inline-block; margin-bottom: 16px; color: var(--blue-light); text-decoration: none; font-weight: 600; }
.post-page { max-width: 860px; margin: 0 auto; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(170deg, rgba(10,26,82,.92), rgba(4,15,53,.92)); }
.post-content h2, .post-content h3 { scroll-margin-top: 100px; }
.post-content h3 { margin: 24px 0 8px; font-size: 1.12rem; }
.post-content ol { padding-left: 1.4em; }
.post-content ol li::marker { color: var(--blue); font-weight: 700; }
.post-toc { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; background: rgba(2,8,36,.45); }
.post-toc strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.post-toc ol { margin: 0; padding-left: 1.2em; }
.post-toc li.sub { margin-left: 1em; list-style: circle; }
.post-toc a { color: #d6e6fb; text-decoration: none; }
.post-toc a:hover { color: var(--blue-light); }
.post-quote { margin: 22px 0; padding: 6px 0 6px 18px; border-left: 3px solid var(--blue); }
.post-quote p { font-size: 1.08rem; font-style: italic; margin: 0; }
.post-quote footer { margin-top: 6px; color: var(--muted); font-size: .9rem; }
.post-quote cite::before { content: '— '; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; }
.post-gal-item { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.post-gal-item figcaption { color: var(--muted); font-size: .85rem; }
.gal-open { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.gal-open img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s var(--ease-out); }
.gal-open:hover img, .gal-open:focus-visible img { transform: scale(1.05); }
.gal-open:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }
.post-figure video { margin: 0; }
.post-full { margin-top: 28px; text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; background: rgba(1,4,18,.94); touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 100vh; padding: 16px 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.lightbox figcaption { color: #d6e6fb; text-align: center; max-width: 70ch; }
.lightbox button { border: 1px solid var(--line); background: rgba(8,20,68,.85); color: var(--text); border-radius: 50%; width: 46px; height: 46px; font-size: 1.6rem; cursor: pointer; justify-self: center; }
.lightbox .lb-close { position: absolute; top: 14px; right: 14px; }
.lightbox .lb-prev { grid-column: 1; grid-row: 1; } .lightbox .lb-next { grid-column: 3; grid-row: 1; }
.lb-count { position: absolute; top: 24px; left: 20px; color: var(--muted); font-size: .9rem; }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) { .lightbox { grid-template-columns: 0 1fr 0; } .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 18px; } .lightbox .lb-prev { left: 30%; } .lightbox .lb-next { right: 30%; } .posts-main { padding-top: 100px; } }

/* ---------- Formulare als Pop-up ---------- */
.form-dialog { width: min(860px, 96vw); max-width: none; max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(170deg, #0a1a52, #040f35); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); overflow: auto; }
.form-dialog::backdrop { background: rgba(2,8,36,.78); backdrop-filter: blur(8px); }
.form-dialog[open] { animation: sheet-in .35s var(--ease-out); }
.fd-sheet { position: relative; padding: clamp(18px, 4vw, 34px); }
.fd-sheet .section-head { text-align: left; margin-bottom: 18px; }
.fd-sheet .section-head h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
.fd-close { position: sticky; top: 0; float: right; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8,20,68,.9); color: var(--text); font-size: 1.5rem; cursor: pointer; }
.fd-close:hover { border-color: var(--blue-light); color: var(--blue-light); }
body.dlg-open { overflow: hidden; }
.b2f-form[hidden], .pin-gate[hidden] { display: none !important; }
.pin-gate { display: grid; gap: 14px; }
.pin-gate .gate-note { margin: 0; color: var(--muted); }
.gate-ok { grid-column: 1 / -1; margin: 0; font-size: .92rem; color: #a7f3d0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue-light); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 640px) { .form-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; margin: 0; } }
