.news-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: var(--color-background);
}

.news-page::before {
  position: absolute;
  top: -220px;
  right: -120px;
  z-index: -1;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 42%, rgba(133, 73, 208, 0.12), rgba(133, 73, 208, 0) 70%);
  content: "";
  pointer-events: none;
}

.news-page__inner {
  padding-top: 42px;
  padding-bottom: 30px;
}

.news-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
  color: #a1aabc;
  font-size: 14px;
  font-weight: 700;
}

.news-breadcrumbs a {
  color: var(--color-purple-dark);
  text-decoration: none;
}

.news-breadcrumbs a:hover {
  text-decoration: underline;
}

.news-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
  align-items: end;
  gap: 40px;
  margin-bottom: 32px;
}

.news-eyebrow {
  margin-bottom: 12px;
  color: var(--color-purple);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.news-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.news-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.news-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  overflow: hidden;
  /* Placeholder theme for articles with no photo — mirrors the tag category color
     and stays in place even if an <img> is present (it just sits underneath it). */
  background: linear-gradient(135deg, var(--color-purple), var(--color-purple-dark));
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.035);
}

.news-card__media--circles {
  background: linear-gradient(135deg, #ffd65c, var(--color-yellow));
}

.news-card__media--contest {
  background: linear-gradient(135deg, var(--color-pink), var(--color-pink-dark));
}

.news-card__media--camp {
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
}

.news-card__media--career {
  background: linear-gradient(135deg, #ffd65c, var(--color-yellow));
}

.news-card__media__mark {
  position: relative;
  z-index: 1;
  display: flex;
  width: 64px;
  height: 64px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
}

.news-card__media__mark::after {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.news-card__media--contest .news-card__media__mark::after {
  border-radius: 4px;
  transform: rotate(45deg);
}

.news-card__media--camp .news-card__media__mark::after {
  border-radius: 6px;
}

.news-card__media--career .news-card__media__mark::after {
  border-radius: 50% 50% 50% 4px;
}

.news-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tag-color, var(--color-purple));
  color: var(--tag-text, #fff);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(35, 22, 48, 0.12);
}

.news-card__tag--circles,
.news-card__tag--career {
  --tag-color: var(--color-yellow);
  --tag-text: #6333a2;
}

.news-card__tag--contest {
  --tag-color: var(--color-pink);
}

.news-card__tag--camp {
  --tag-color: var(--color-teal);
}

.news-card__body {
  display: flex;
  min-height: 200px;
  flex-direction: column;
  padding: 18px 22px 22px;
}

.news-card__date {
  margin: 0 0 7px;
  color: #9aa4b4;
  font-size: 13px;
  font-weight: 800;
}

.news-card h2 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.12;
}

.news-card h2 a {
  text-decoration: none;
}

.news-card h2 a:hover {
  color: var(--color-purple-dark);
}

.news-card__excerpt {
  display: -webkit-box;
  max-height: 4.65em;
  overflow: hidden;
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card__more {
  width: fit-content;
  margin-top: auto;
  color: var(--color-purple-dark);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
}

.news-card__more:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .news-page__inner {
    padding-top: 28px;
  }

  .news-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 26px;
  }

  .news-heading h1 {
    font-size: 40px;
  }
}

@media (max-width: 580px) {
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .news-card__media {
    height: auto;
    aspect-ratio: 1.72 / 1;
  }

  .news-card__body {
    min-height: 0;
  }
}

@media print {
  .utility-bar,
  .site-header,
  .site-footer {
    display: none !important;
  }

  .news-page__inner {
    padding-top: 0;
  }

  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
