/* Research & Publications page — Team-page-styled hero.
   Hero is a light-grey panel with a diagonal bottom edge (clip-path).
   Sections below are white. */

.page-publications {
  --pub-bg: #ffffff;
  --pub-bg-soft: #f3f4f6;
  --pub-text: #0e1116;
  --pub-text-soft: #57606a;
  --pub-border: rgba(14, 17, 22, 0.10);
  --pub-accent-hover: #000000;

  background: var(--pub-bg);
  color: var(--pub-text);
  padding: 0 0 120px;
  font-family: 'Neurial Grotesk', system-ui, sans-serif;
}

.page-publications * {
  font-family: inherit;
}

.page-publications__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

@media (max-width: 820px) {
  .page-publications__inner {
    padding: 0 24px;
  }
}

/* ── Hero: grey panel with diagonal bottom ───────────────────── */

/* Vertical padding mirrors the theme's block-page-banner (180px top etc.)
   so the eyebrow lands at the same height as Team page's "OUR TEAM". */
.page-publications__hero {
  background: var(--pub-bg-soft);
  padding: 180px 0 200px;
  margin-bottom: -100px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 120px));
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 120px));
}

@media (max-width: 1024px) {
  .page-publications__hero {
    padding: 140px 0 170px;
  }
}

@media (max-width: 820px) {
  .page-publications__hero {
    padding: 130px 0 140px;
    margin-bottom: -60px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 60px));
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 60px));
  }
}

@media (max-width: 620px) {
  .page-publications__hero {
    padding: 120px 0 120px;
  }
}

/* Eyebrow — matches theme's .ng-14-700 */
.page-publications__eyebrow {
  font-family: 'Neurial Grotesk', system-ui, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  line-height: 121%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pub-text);
  margin: 0 0 40px;
}

/* Title — exact replica of theme's .ng-70-700 (default h1) */
.page-publications__title {
  font-family: 'Neurial Grotesk', system-ui, sans-serif;
  font-style: normal;                /* explicit — avoid Exbold-italic trap */
  font-weight: 700;
  font-size: 70px;
  line-height: 110%;
  letter-spacing: -0.033em;
  margin: 0 0 40px;
  color: var(--pub-text);
}

@media (max-width: 1080px) {
  .page-publications__title { font-size: 56px; }
}
@media (max-width: 820px) {
  .page-publications__title { font-size: 46px; }
}
@media (max-width: 620px) {
  .page-publications__title { font-size: 34px; }
}

/* Body intro — matches theme's .ng-18-400 */
.page-publications__intro {
  font-family: 'Neurial Grotesk', system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 138%;
  letter-spacing: -0.02em;
  max-width: 820px;
  color: var(--pub-text-soft);
}

.page-publications__intro p {
  margin: 0 0 12px;
}

.page-publications__intro p:last-child {
  margin-bottom: 0;
}

/* ── Sections (BOOKS, etc.) ──────────────────────────────────── */

.page-publications__sections {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

.page-publications__list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.page-publications__empty {
  color: var(--pub-text-soft);
  font-size: 16px;
}

/* ── Publication item ─────────────────────────────────────────── */

.publication-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 720px) {
  .publication-item {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.publication-item__cover {
  width: 100%;
}

.publication-item__cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(14, 17, 22, 0.08), 0 8px 24px rgba(14, 17, 22, 0.06);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.publication-item__cover a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(14, 17, 22, 0.10), 0 12px 32px rgba(14, 17, 22, 0.10);
}

@media (max-width: 720px) {
  .publication-item__cover {
    max-width: 220px;
  }
}

.publication-item__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--pub-text);
}

.publication-item__title a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.publication-item__title a:hover {
  color: var(--pub-accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.publication-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--pub-text-soft);
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.publication-item__meta-sep {
  margin-left: -8px;
  margin-right: -8px;
  user-select: none;
  opacity: 0.35;
}

.publication-item__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pub-text);
  background: var(--pub-bg-soft);
  border: 1px solid var(--pub-border);
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.2;
}

.publication-item__description {
  font-size: 15px;
  line-height: 1.55;            /* within-paragraph line gap (~23px) */
  color: var(--pub-text);
  max-width: 680px;
}

.publication-item__description p {
  margin: 0 0 20px;
}

.publication-item__description p:first-child {
  margin-top: 0;
}
.publication-item__description p:last-child {
  margin-bottom: 0;
}

/* Single Enter in the WP editor produces a <br> inside one <p>.
   Promote each <br> to a block element with a meaningful top margin so
   the paragraph gap is visibly larger than the within-paragraph line gap. */
.publication-item__description br {
  display: block;
  content: "";
  margin-top: 24px;             /* paragraph gap = 24px on top + 23px line = ~47px, vs 23px between wrapped lines */
}

.publication-item__description p:last-child {
  margin-bottom: 0;
}

.publication-item__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 20px;
  border: 1px solid var(--pub-text);
  border-radius: 999px;
  color: var(--pub-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.publication-item__link:hover {
  background: var(--pub-text);
  color: var(--pub-bg);
  border-color: var(--pub-text);
}

.publication-item__link span {
  transition: transform 160ms ease;
}

.publication-item__link:hover span {
  transform: translateX(2px);
}

/* ── "Purchase Here" CTA button (shown when External Link is filled) ── */
.publication-item__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 22px;
  background: var(--pub-text);
  color: var(--pub-bg);
  border: 1px solid var(--pub-text);
  border-radius: 999px;
  font-family: 'Neurial Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.publication-item__cta:hover,
.publication-item__cta:focus-visible {
  background: var(--pub-bg);
  color: var(--pub-text);
  border-color: var(--pub-text);
}

.publication-item__cta-arrow {
  display: inline-block;
  transition: transform 160ms ease;
}

.publication-item__cta:hover .publication-item__cta-arrow,
.publication-item__cta:focus-visible .publication-item__cta-arrow {
  transform: translateX(3px);
}
