/* =========================
   Post Card
   ========================= */

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-background-surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-card-hover);
}

/* =========================
   Image
   ========================= */

.post-card-img {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
  background: var(--color-background-surface);
}

.post-card-img a {
  position: absolute;
  inset: var(--space-0);
}

.post-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================
   Content
   ========================= */

.post-card-content {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  padding: var(--space-16);
}

/* =========================
   Typography
   ========================= */

.post-title {
  margin-bottom: var(--space-8);
  color: var(--color-text-heading);
  font-size: 1.2rem;
}

.post-card:not(.post-card-archive) .post-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.post-title a:hover,
.post-title a:focus-visible {
  color: inherit;
  text-decoration: underline;
}

.post-title a:focus-visible {
  outline: var(--space-1px) solid var(--color-link-primary);
  outline-offset: var(--space-4);
}

.post-date {
  margin-bottom: var(--space-8);
  color: var(--color-text-subtle);
  font-family: var(--font-family-ui);
  font-size: 0.85rem;
}

.post-card:not(.post-card-archive) .post-date {
  margin-bottom: var(--space-12);
}

.post-date svg {
  width: 1em;
  height: 1em;
  margin-right: var(--space-4);
  vertical-align: -0.125em;
}

.post-summary {
  margin-bottom: var(--space-12);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.post-card:not(.post-card-archive) .post-summary {
  margin-bottom: 0;
}

.post-card:not(.post-card-archive) .post-card-content {
  padding: var(--space-20) var(--space-20) var(--space-24);
}

/* =========================
   Read More
   ========================= */

.post-card:not(.post-card-archive) .post-readmore {
  margin-top: auto;
  padding-top: var(--space-20);
}

.post-card:not(.post-card-archive) .post-readmore a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  gap: var(--space-8);
  padding: 0 var(--space-20);
  border-radius: var(--radius-md);
  background: var(--color-action-primary);
  color: var(--color-white);
  font-family: var(--font-family-ui);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:not(.post-card-archive) .post-readmore-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.post-card:not(.post-card-archive) .post-readmore a:hover {
  background: var(--color-action-primary-hover);
  box-shadow: 0 0.25rem 0.5rem var(--color-shadow-action);
  text-decoration: none;
  transform: translateY(-1px);
}

.post-card:not(.post-card-archive) .post-readmore a:hover .post-readmore-arrow,
.post-card:not(.post-card-archive) .post-readmore a:focus-visible .post-readmore-arrow {
  transform: translateX(0.125rem);
}

.post-card:not(.post-card-archive) .post-readmore a:focus-visible {
  outline: 3px solid var(--color-link-primary);
  outline-offset: var(--space-4);
}

/* =========================
   Archive Card
   ========================= */

.post-card-archive {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

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