/* works.css – Stile für die Works-Liste und das Overlay-Fenster.
   Ergänzt die bestehende style.css, überschreibt sie nicht. */

/* ---------- Liste ---------- */
.works-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.post-teaser {
  cursor: pointer;
  border: 1px solid currentColor;
  border-color: rgba(128, 128, 128, 0.35);
  padding: 1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-teaser:hover,
.post-teaser:focus-visible {
  border-color: currentColor;
  outline: none;
  transform: translateY(-2px);
}

.post-teaser .post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.post-teaser .post-title { font-weight: 600; font-size: 1.15rem; }
.post-date { opacity: 0.6; font-size: 0.9rem; white-space: nowrap; }

.post-teaser .post-image {
  background: #000;
  padding: 0;
  overflow: hidden;
}

.post-teaser .post-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}
.post-teaser .post-body p { margin: 0.75rem 0 0; line-height: 1.55; }
.post-more { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.7; }

.works-empty { opacity: 0.6; }

/* ---------- Overlay-Fenster ---------- */
body.no-scroll { overflow: hidden; }

.work-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}
.work-overlay[hidden] { display: none; }

.work-window {
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: 100%;
  background: #fff;
  color: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.work-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
.work-window-title { font-weight: 600; }
.work-window-close {
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  padding: 0 0.25rem;
}

.work-window-content {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* ---------- Markdown-Inhalt ---------- */
.markdown-body { line-height: 1.65; }
.markdown-body img,
.markdown-body video { max-width: 100%; height: auto; display: block; margin: 1rem 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { line-height: 1.25; margin: 1.5rem 0 0.5rem; }
.markdown-body pre { overflow-x: auto; padding: 0.75rem; background: rgba(0, 0, 0, 0.06); }
.markdown-body code { font-size: 0.9em; }
.markdown-body blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid rgba(0, 0, 0, 0.25); opacity: 0.85; }
.markdown-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.markdown-body table { border-collapse: collapse; }
.markdown-body th, .markdown-body td { border: 1px solid rgba(0, 0, 0, 0.2); padding: 0.3rem 0.6rem; }
