/* MoltNet Project Page - Moltbook-style academic layout */

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-muted: #555;
  --accent: #1e3a5f;
  --accent-hover: #2c5282;
  --btn-primary-bg: #1e3a5f;
  --btn-primary-hover: #2c5282;
  --border: #e5e7eb;
  --card-bg: #fff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 900px;
  --nav-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  text-align: justify;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 40px 24px 36px;
  text-align: center;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 12px;
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

/* 图片与「MoltNet:」绑在一起，始终在第一个词前、同一行 */
.title-first {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.title-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

.authors {
  font-size: clamp(0.8rem, 1.4vw + 0.65rem, 1.25rem);
  margin-bottom: 8px;
  white-space: nowrap;
}

.authors a {
  color: var(--accent);
  text-decoration: none;
}

.authors a:hover {
  text-decoration: underline;
}

.affiliations {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.affiliations a {
  color: var(--accent);
  text-decoration: none;
}

.affiliations a:hover {
  text-decoration: underline;
}

.contribution-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.released-date {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 16px 0 0 !important;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card-bg);
}

.btn .icon {
  display: inline-flex;
  font-size: 1em;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: #fff;
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  color: #fff;
}

/* Teaser */
.teaser {
  padding: 24px 24px 32px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.teaser-text {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 32px;
  line-height: 1.4;
}

.teaser-text .highlight {
  color: var(--accent);
}

.teaser-visual {
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.teaser-visual img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.teaser-placeholder {
  padding: 48px 24px;
  color: var(--text-muted);
}

.teaser-placeholder code {
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Sections */
.section {
  padding: 20px 24px;
}

.section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0 20px;
}

.findings-list {
  margin: 0 0 24px;
  padding-left: 1.4em;
  max-width: 72ch;
}

.findings-list li {
  margin-bottom: 10px;
}

/* MoltBook Overview: image left, text right */
.overview-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 8px;
}

.overview-figure {
  margin: 0;
  text-align: center;
}

.overview-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.overview-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.overview-content p {
  margin: 0 0 14px;
}

.overview-content p:last-child {
  margin-bottom: 0;
}

.overview-content a {
  color: var(--accent);
  text-decoration: none;
}

.overview-content a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .overview-layout {
    grid-template-columns: 1fr;
  }

  .overview-figure {
    order: 1;
  }

  .overview-content {
    order: 2;
  }
}

/* Key Findings: left = Intent + Incentive, right = Norm + Emotion */
.key-findings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  align-items: start;
  margin-bottom: 24px;
}

.finding-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.finding-item {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: justify;
}

.key-findings-above {
  margin: 0 0 20px;
  text-align: center;
}

.key-findings-figure {
  margin: 0;
  text-align: center;
}

.key-findings-img {
  width: 100%;
  max-width: 75%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.key-findings-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .key-findings-two-col {
    grid-template-columns: 1fr;
  }
}

.section p {
  margin: 0 0 16px;
  color: var(--text);
  text-align: justify;
}

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

.section code {
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Abstract */
.abstract p {
  font-size: 1.05rem;
}

.small-caps {
  font-variant: small-caps;
}

/* Video */
.video-section .video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.video-section iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Results */
.result-block {
  margin-bottom: 32px;
}

.result-block h3 {
  font-size: 1.25rem;
  margin: 0 0 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.result-grid figure {
  margin: 0;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.result-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.result-grid figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
}

.result-grid-four {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0;
}

.result-figure-full {
  grid-column: 1 / -1;
}

.result-figure-full img {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .result-grid-four {
    grid-template-columns: 1fr;
  }
}

/* Related */
.related a {
  color: var(--accent);
  text-decoration: none;
}

.related a:hover {
  text-decoration: underline;
}

/* 按钮在 .related 内保持白字，避免被上方链接样式覆盖 */
.related a.btn {
  color: #fff;
}

.related a.btn:hover {
  color: #fff;
  text-decoration: none;
}

/* BibTeX */
.bibtex pre {
  margin: 0;
  padding: 20px;
  background: #1a1a1a;
  color: #e5e7eb;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bibtex code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Footer */
.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0 0 8px;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .title {
    font-size: 1.75rem;
  }

  .teaser-text {
    font-size: 1.25rem;
  }

  .nav-links {
    gap: 16px;
  }
}
