/* Shared proportions follow the approved landing #journal grid at every breakpoint. */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.article-card {
  --card-title-lines: 4;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  background: #fff;
  color: var(--ink, #191c26);
  border: 1px solid #fff;
  border-radius: 26px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.article-card:hover {
  border-color: #dcd2ef;
  box-shadow: 0 12px 35px #24203b08;
}
.article-card__media {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #e5e7ed;
}
.article-card__image-link {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}
.article-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.article-card:hover .article-card__image { transform: scale(1.045); }
/* Tags remain independent links: the image anchor never contains other anchors. */
.article-card__tags {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.article-card__tags li { margin: 0; padding: 0; max-width: 100%; line-height: 1; }
.article-card__tags a {
  display: block;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid #ffffff33;
  border-radius: 6px;
  background: rgba(25,28,38,.92);
  color: #fff;
  font: 500 10px/14px Manrope, Arial, sans-serif;
  text-decoration: none;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.article-card__tags a:hover { background: rgba(113,67,203,.92); color: #fff; text-decoration: underline; }
.article-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 10px 10px;
}
.article-card__date {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-bottom: 13px;
  color: #7b6a97;
  font: 400 11px/18px "IBM Plex Mono", monospace;
}
.article-card__date::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--purple, #905bff);
}
.article-card__title {
  min-height: calc(var(--card-title-lines) * 1.35em);
  margin: 0 0 15px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.55px;
  overflow-wrap: break-word;
}
.article-card__title a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.article-card__title a:hover { text-decoration: underline; }
.article-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.75em);
  max-height: calc(3 * 1.75em);
  margin: 0;
  color: #777d89;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.article-card__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 20px 0 0;
  color: #7450b9;
  font-size: 12px;
  line-height: 20px;
}
.article-card__link span { font-size: 18px; line-height: 1; }
/* Only the text itself is an interactive link; whitespace and arrow do not trigger it. */
.article-card__link a { display: inline-block; text-decoration: none; text-underline-offset: 4px; }
.article-card__link a:hover { text-decoration: underline; }
.article-card a:focus-visible { outline: 2px solid #905bff; outline-offset: 3px; }
@media(max-width:1100px) {
  .article-grid { gap: 14px; }
  .article-card { padding: 11px; }
  .article-card__body { padding: 20px 6px 10px; }
  .article-card__title { font-size: 19px; }
}
@media(max-width:800px) { .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .article-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .article-card { padding: 12px; }
  .article-card__body { padding: 18px 10px 10px; }
  .article-card__title { font-size: 22px; }
  .article-card__tags { top: 8px; left: 8px; right: 8px; }
  .article-card__tags a { font-size: 9px; padding: 3px 5px; }
}
@media(prefers-reduced-motion:reduce) {
  .article-card, .article-card__image, .article-card__link span { transition: none; transform: none!important; }
}
