/* =========================================
   Project detail pages (MDPI-style layout)
   ========================================= */

/* ---------- Top block ---------- */
.paper-top {
  background: #f5f7fb;
  border-bottom: 1px solid #e3e7f0;
}
.paper-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 24px 30px;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #3b4054;
}
.paper-tag {
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 12px;
  border-radius: 20px;
}

.paper-top h1 {
  margin: 0 0 16px;
  max-width: 900px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 800;
  color: #0b0e1a;
}

.paper-authors {
  margin: 0 0 8px;
  max-width: 900px;
  font-size: 18px;
  line-height: 1.6;
  color: #11141f;
}
.paper-authors strong {
  font-weight: 800;
  color: #0b0e1a;
}
.paper-authors sup,
.paper-affil sup {
  font-size: 12px;
  color: #3b4054;
}

.paper-affil {
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #3b4054;
}

.paper-doi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.paper-doi a {
  color: var(--blue);
  text-decoration: none;
}
.paper-doi a:hover {
  text-decoration: underline;
}
.paper-doi a.paper-btn {
  background: var(--blue);
  color: white;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
}
.paper-doi a.paper-btn:hover {
  background: var(--blue-light);
}
/* ---------- Page layout: menu on the left, article on the right ---------- */
.paper-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 48px;
}

/* ---------- Contents menu ---------- */
.paper-toc {
  position: sticky;
  top: 20px;
  align-self: start;
  font-size: 15px;
  line-height: 1.4;
}
.paper-toc h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.8px;
  color: #3b4054;
}
.paper-toc a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 3px solid #e3e7f0;
  color: #11141f;
  text-decoration: none;
}
.paper-toc a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- Article text ---------- */
.paper-article {
  max-width: 780px;
}
.paper-article h2 {
  margin: 44px 0 12px;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 800;
  color: #0b0e1a;
}
.paper-article h2:first-child {
  margin-top: 0;
}
.paper-article p {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.8;
  color: #11141f;
}

/* Keywords */
.paper-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}
.paper-keywords span {
  font-size: 15px;
  background: #f5f7fb;
  border: 1px solid #e3e7f0;
  padding: 3px 14px;
  border-radius: 20px;
}

/* Figures */
.paper-figure {
  margin: 28px 0;
}
.paper-fig-box {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid #e3e7f0;
  background: linear-gradient(135deg, #16407f, #0b1d3a);
  color: #cfe0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
}
.paper-figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e3e7f0;
}
.paper-figure figcaption {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #3b4054;
}
.paper-figure figcaption strong {
  color: #0b0e1a;
}

/* ---------- Phones: hide the menu, stack everything ---------- */
@media (max-width: 860px) {
  .paper-layout { grid-template-columns: 1fr; }
  .paper-toc { display: none; }
  .paper-article h2 { font-size: 24px; }
}
/* ---------- Phones ---------- */
@media (max-width: 860px) {
  .paper-top h1 { font-size: 30px; }
}
/* ---------- Funding list ---------- */
.paper-list {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 18px;
  line-height: 1.8;
  color: #11141f;
}
.paper-list li {
  margin-bottom: 10px;
}
/* ---------- Figure sizes ---------- */
.paper-figure.medium {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.paper-figure.narrow {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Two figures side by side */
.paper-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.paper-figure-row .paper-figure {
  margin: 0;
}

@media (max-width: 860px) {
  .paper-figure-row { grid-template-columns: 1fr; }
}