.publications-main {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 7.5rem) 0;
}

.publications-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.publications-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.2rem, 7.4vw, 7rem);
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.publications-intro {
  padding-bottom: 0.45rem;
}

.publications-intro > p {
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.48;
}

.publications-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.publications-main > section {
  padding: clamp(3.2rem, 6vw, 5.2rem) 0;
  border-top: 1px solid var(--shell-line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.55fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 29rem;
  margin: 0;
  color: var(--shell-muted);
  line-height: 1.5;
}

.section-number {
  margin: 0 0 0.65rem;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--shell-line);
}

.metrics-grid > div {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 1px solid var(--shell-line);
  background: rgba(11, 17, 23, 0.7);
}

.metrics-grid > div:first-child {
  border-left: 0;
}

.metrics-grid dt {
  color: var(--shell-muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.metrics-grid dd {
  margin: 0.15rem 0 0;
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metrics-grid > div:first-child dd {
  color: var(--red);
}

.metrics-grid small {
  display: block;
  margin-top: 0.7rem;
  color: var(--shell-muted);
  font-size: 0.78rem;
}

.top-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--shell-line);
  list-style: none;
  counter-reset: top-publication;
}

.top-list > li {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) minmax(6rem, auto);
  gap: clamp(0.8rem, 2vw, 1.5rem);
  align-items: start;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--shell-line);
  counter-increment: top-publication;
}

.top-list > li::before {
  content: counter(top-publication, decimal-leading-zero);
  padding-top: 0.18rem;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.top-list .loading-row {
  display: block;
  color: var(--shell-muted);
}

.top-list .loading-row::before {
  display: none;
}

.publication-copy {
  min-width: 0;
}

.publication-title {
  color: #fff;
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  font-weight: 780;
  line-height: 1.35;
  text-decoration-color: rgba(163, 230, 53, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.publication-title:hover,
.publication-title:focus-visible {
  color: #d9f99d;
  text-decoration-color: var(--red);
}

.publication-details {
  margin: 0.48rem 0 0;
  color: var(--shell-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.publication-details span + span::before {
  content: " · ";
  color: #64748b;
}

.citation-count {
  justify-self: end;
  min-width: 6rem;
  color: #d9f99d;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.citation-count strong {
  display: block;
  color: #fff;
  font-size: 1.3rem;
}

.year-navigation {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  margin: 0 0 3rem;
  overflow-x: auto;
  border: 1px solid var(--shell-line);
  scrollbar-width: thin;
}

.year-navigation a {
  display: grid;
  flex: 1 0 3.55rem;
  min-height: 3rem;
  place-items: center;
  padding: 0.68rem 0.4rem;
  border-left: 1px solid var(--shell-line);
  border-radius: 0;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.year-navigation a:first-child {
  border-left: 0;
}

.year-navigation a:last-child {
  flex-basis: 5rem;
}

.year-navigation a:hover,
.year-navigation a:focus-visible {
  background: rgba(163, 230, 53, 0.09);
  color: var(--red);
}

.publication-year {
  display: grid;
  grid-template-columns: minmax(6rem, 0.22fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: 2.2rem 0 3.5rem;
  border-top: 1px solid var(--shell-line);
}

.publication-year:first-child {
  border-top: 0;
}

.publication-year h3 {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  align-self: start;
  margin: 0;
  color: var(--red);
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.year-publications {
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-publications li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6rem, auto);
  gap: 1.2rem;
  align-items: start;
  padding: 0 0 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--shell-line);
}

.year-publications li:last-child {
  margin-bottom: 0;
}

.source-panel {
  display: grid;
  grid-template-columns: minmax(8rem, 0.3fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid rgba(163, 230, 53, 0.32);
  background: rgba(163, 230, 53, 0.055);
}

.source-panel p {
  margin: 0;
}

.source-panel a {
  color: #d9f99d;
  text-underline-offset: 0.2em;
}

.data-error,
.loading-row {
  color: var(--shell-muted);
}

.data-error {
  padding: 1.1rem;
  border: 1px solid rgba(248, 113, 113, 0.5);
}

@media (max-width: 820px) {
  .publications-hero,
  .section-heading {
    grid-template-columns: 1fr;
  }

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

  .metrics-grid > div:nth-child(odd) {
    border-left: 0;
  }

  .metrics-grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--shell-line);
  }
}

@media (max-width: 600px) {
  .publications-main {
    width: min(100% - 1.25rem, 1180px);
  }

  .publications-hero h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .publications-actions .button {
    width: 100%;
  }

  .top-list > li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .top-list .citation-count {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .publication-year {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .publication-year h3 {
    position: static;
  }

  .year-publications li {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .year-publications .citation-count {
    justify-self: start;
    text-align: left;
  }

  .source-panel {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}
