*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text: #1a1a1a;
  --muted: #999;
  --border: #ebebeb;
  --max-width: 660px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: #fff;
  padding: 0 1.5rem;
}

/* Navigation */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-nav .site-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.site-nav ul a {
  font-size: 0.825rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav ul a:hover,
.site-nav ul a.active {
  color: var(--text);
}

/* Post cards (index) */

main {
  max-width: var(--max-width);
  margin: 0 auto 8rem;
}

.post-card {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.post-card:first-child {
  padding-top: 2.5rem;
}

/* Gemeinsames Overlay-Bild für alle Karten */

.card-img-wrap {
  display: block;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3.5rem 1.5rem 1.4rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.card-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.3rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
}

.card-excerpt {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-top: 0.45rem;
}

/* Erster Eintrag etwas größer */

.post-card:first-child .card-img {
  aspect-ratio: 16 / 9;
}

.post-card:first-child .card-title {
  font-size: 1.3rem;
}

.post-card:first-child .card-overlay {
  padding-top: 5rem;
}

/* Single post */

.post-hero {
  max-width: var(--max-width);
  margin: 3rem auto 0;
}

.post-hero-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.post-hero h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 1.75rem;
}

.post-hero-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 3px;
  background: #f0f0f0;
  margin-bottom: 2.5rem;
}

.post-body {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.975rem;
  line-height: 1.85;
  color: #2a2a2a;
}

.post-body p + p {
  margin-top: 1rem;
}

.post-body img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  margin: 1.75rem 0;
  border-radius: 3px;
  background: #f0f0f0;
}

.post-body ul,
.post-body ol {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.post-body li + li {
  margin-top: 0.25rem;
}

.post-body strong {
  font-weight: 600;
  color: var(--text);
}

.post-body em {
  font-style: italic;
  color: #666;
}

.back-link {
  display: inline-block;
  max-width: var(--max-width);
  margin: 2.5rem auto 6rem;
  font-size: 0.825rem;
  color: var(--muted);
  text-decoration: none;
  display: block;
}

.back-link:hover {
  color: var(--text);
}

/* About / static page */

.page-body {
  max-width: var(--max-width);
  margin: 4rem auto 8rem;
}

.page-body h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.page-body p {
  font-size: 0.975rem;
  color: #333;
  line-height: 1.85;
}

.page-body p + p {
  margin-top: 1rem;
}

/* Fotogalerie (Einzelpost) */

.post-gallery {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 160px;
  gap: 3px;
}

.gallery-item {
  overflow: hidden;
  cursor: zoom-in;
  background: #f0f0f0;
}

.gallery-item.portrait {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-item:hover img {
  opacity: 0.88;
}

/* Lightbox */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

#lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

#lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

#lb-prev,
#lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2.25rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
}

#lb-prev { left: 0.5rem; }
#lb-next { right: 0.5rem; }

#lb-close:hover,
#lb-prev:hover,
#lb-next:hover {
  color: #fff;
}

/* Footer */

footer {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
