/* Research paper pages — editorial / preprint styling */

.paper-page {
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(64px, 10vw, 96px);
}

.paper-breadcrumb {
  font-size: 0.8125rem;
  color: #737373;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.paper-breadcrumb a {
  color: #525252;
  text-decoration: none;
}

.paper-breadcrumb a:hover {
  color: #141414;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.paper-article {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.paper-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #737373;
  margin-bottom: 0.75rem;
}

.paper-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.625rem, 4vw, 2.125rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0a0a0a;
  margin-bottom: 1rem;
}

.paper-subtitle {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: #525252;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.paper-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.875rem;
  color: #525252;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e8e7e4;
}

.paper-meta-row strong {
  color: #141414;
  font-weight: 600;
}

.paper-abstract {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 3px solid #141414;
  background: rgba(20, 20, 20, 0.03);
  margin-bottom: 2.5rem;
}

.paper-abstract h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #525252;
  margin-bottom: 0.75rem;
}

.paper-abstract p {
  font-size: 1rem;
  line-height: 1.75;
  color: #404040;
  margin: 0;
}

.paper-keywords {
  font-size: 0.875rem;
  color: #525252;
  margin-top: 1rem;
}

.paper-keywords span {
  color: #737373;
}

.paper-section {
  margin-bottom: 2.5rem;
}

.paper-section h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
}

.paper-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #141414;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

.paper-section p,
.paper-section li {
  font-size: 1rem;
  line-height: 1.75;
  color: #404040;
  margin-bottom: 1rem;
}

.paper-section ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.paper-section li {
  margin-bottom: 0.5rem;
}

.paper-figure {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e4e3df;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
}

.paper-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #525252;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0efec;
}

.paper-figure-num {
  font-weight: 600;
  color: #141414;
}

.paper-callout {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #404040;
  padding: 1rem 1.25rem;
  background: var(--bg-muted);
  border-radius: 6px;
  border: 1px solid #e8e7e4;
  margin: 1.25rem 0;
}

.paper-code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  padding: 1rem 1.25rem;
  background: #1c1c1c;
  color: #e8e8e6;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.25rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.paper-ref {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #404040;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  text-indent: -1.5rem;
}

.paper-ref a {
  color: #141414;
  font-weight: 500;
}

.paper-footer-note {
  font-size: 0.8125rem;
  color: #737373;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e7e4;
}

@media (max-width: 640px) {
  .paper-figure {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 1rem;
  }
}
