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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: #1e1e1e;
  color: #f0f0f0;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 40px 20px 30px;
}

h1 {
  color: #ffcc00;
  font-size: 2.2em;
  margin-bottom: 15px;
}

.description {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1em;
  line-height: 1.5;
  color: #ccc;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 15px;
  }
}

.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: #2a2a2a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding: 60px 15px 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #ffe680;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-teaser {
  font-size: 0.9em;
  color: #ddd;
  line-height: 1.4;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-date {
  font-size: 0.75em;
  color: #999;
  margin-bottom: 5px;
}

/* Text-only card for posts without images */
.card.text-only {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

.card.text-only .card-overlay {
  background: transparent;
  top: 0;
  padding: 20px;
  justify-content: center;
}

.card.text-only .card-teaser {
  font-size: 1em;
}

/* Android app: roomier cards, bigger type. */
html.app header {
  padding: 28px 16px 16px;
}
html.app .card-grid {
  padding: 10px;
  gap: 12px;
}
html.app .card-title {
  font-size: 1.45em;
}
html.app .card-teaser {
  font-size: 1em;
}
