:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111111;
  --muted: #4d4d4d;
  --accent: #111111;
  --card: #f2f2f2;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2")
    format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik One";
  src: url("assets/fonts/0nkqC9H5Je0aiyQv-6PIaCTv.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}


.main {
  padding: 56px 0 80px;
}

.layout {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  grid-template-areas:
    "portrait artwork"
    "text artwork";
  gap: 40px;
  align-items: start;
}

.portrait-card {
  grid-area: portrait;
}

.text-card {
  grid-area: text;
}

.artwork {
  grid-area: artwork;
  background: var(--card);
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
}

.card {
  background: var(--card);
  border-radius: 8px;
  padding: 25px;
}

.card.portrait-card {
  padding: 0;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.portrait-card img {
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
}

.artwork video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

h1 {
  font-family: "Rubik One", "Impact", sans-serif;
  font-size: 1.6rem;
  margin: 0 0 16px;
  font-weight: 400;
}

.text-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 160ms ease;
}

.btn + .btn {
  margin-left: 10px;
}

.btn:hover {
  background: #222222;
}

.btn-secondary {
  background: #777777;
}

.btn-secondary:hover {
  background: #666666;
}

.home-blog {
  margin-top: 52px;
}

.home-blog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-blog h2 {
  font-family: "Rubik One", "Impact", sans-serif;
  font-size: 1.3rem;
  margin: 0;
  font-weight: 400;
}

.home-blog-actions {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}

#home-blog-more {
  background: transparent;
  color: var(--text);
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  box-shadow: none;
  font-weight: 400;
}

#home-blog-more:hover {
  background: #f3f3f3;
  color: var(--text);
}

.masonry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.masonry-item {
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.masonry-item.has-media {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.masonry-item .post-body {
  min-width: 0;
}

.masonry-item .post-media {
  width: 100%;
}

.post-slider {
  position: relative;
  touch-action: pan-y;
  cursor: grab;
}

.post-slider:focus-visible {
  outline: 2px solid #333333;
  outline-offset: 2px;
}

.post-slider.is-dragging {
  cursor: grabbing;
}

.post-slide {
  display: none;
  border-radius: 6px;
  overflow: hidden;
  cursor: inherit;
}

.post-slide.is-active {
  display: block;
}

.masonry-item .post-media img,
.masonry-item .post-media video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #000000;
}

.masonry-item .post-media img {
  user-select: none;
  -webkit-user-drag: none;
}

.post-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(17, 17, 17, 0.75);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.post-slider-prev {
  left: 8px;
}

.post-slider-next {
  right: 8px;
}

.post-slider-counter {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(17, 17, 17, 0.7);
  color: #ffffff;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 3px 8px;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox-content {
  width: min(1100px, 92vw);
  max-height: 90vh;
}

.lightbox-content img,
.lightbox-content video {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  background: #000000;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(17, 17, 17, 0.7);
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.masonry-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.masonry-item .post-content {
  color: #222222;
  overflow-wrap: anywhere;
}

.masonry-item .post-content > *:last-child {
  margin-bottom: 0;
}

.blog-shell {
  max-width: 860px;
  margin: 0 auto;
}

.blog-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.blog-head h1 {
  margin: 0;
}

.post-list {
  display: grid;
  gap: 20px;
}

.post-card {
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.post-card img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.post-card h2 {
  margin: 0 0 8px;
}

.post-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 10px;
}

.blog-empty {
  color: var(--muted);
}

.post-form {
  display: grid;
  gap: 14px;
}

.post-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.post-form input[type="text"],
.post-form input[type="password"],
.post-form textarea,
.post-form input[type="file"],
.post-form select {
  width: 100%;
  border: 1px solid #cccccc;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}

.post-form button[type="submit"] {
  background: transparent;
  color: var(--text);
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  box-shadow: none;
  font-weight: 400;
}

.post-form button[type="submit"]:hover {
  background: #f3f3f3;
  color: var(--text);
}

#delete-post {
  background: #b42318;
  color: #ffffff;
  border: 1px solid #991b1b;
}

#delete-post:hover {
  background: #991b1b;
}

.admin-media-title {
  margin: 4px 0 8px;
  font-weight: 600;
}

.admin-media-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-media-item {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.admin-media-preview img,
.admin-media-preview video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  background: #000000;
}

#editor {
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 6px;
}

#editor .ql-editor {
  min-height: 220px;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

.post-content p {
  margin: 0 0 0.8em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 0.8em 1.2em;
}

.form-status {
  margin-top: 14px;
  min-height: 1.2em;
}

.imprint {
  padding: 0 0 32px;
  text-align: center;
  font-size: 0.85rem;
}

.imprint a {
  color: var(--text);
  text-decoration: none;
}

.imprint a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}


@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "artwork"
      "text";
  }
  .main {
    padding: 36px 0 64px;
  }
  .home-blog-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .masonry-item.has-media {
    grid-template-columns: 1fr;
  }
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
}
