/* ============================================================
   Publication pages — clean, scholarly, neumorphic.
   Self-contained: re-declares theme tokens so the page renders
   correctly independent of the homepage stylesheet.
   ============================================================ */

:root {
  --bg-main: #FAF8F3;
  --bg-element: #F8F6F1;
  --text-primary: #333333;
  --text-secondary: #5A5A5A;
  --text-muted: #8B8680;
  --shadow-light: #FFFFFF;
  --shadow-dark: #D1CFC8;
  --accent-warm: #8B8680;
  --border-subtle: #E8E6E1;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.pub-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* breadcrumb / back link */
.pub-breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}
.pub-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.pub-breadcrumb a:hover { color: var(--accent-warm); text-decoration: underline; }
.pub-breadcrumb span { color: var(--text-muted); margin: 0 0.4rem; }

/* headings */
h1.pub-h1 {
  font-family: 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.pub-authors {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.pub-authors .me { font-weight: 600; text-decoration: underline; }

.pub-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--accent-warm);
  font-style: normal;
  margin-bottom: 0.6rem;
}

/* author / research profile links */
.pub-profiles {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
  line-height: 1.7;
}
.pub-profiles a {
  color: var(--accent-warm);
  text-decoration: none;
}
.pub-profiles a:hover { text-decoration: underline; }

/* action buttons */
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.pub-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bg-element);
  box-shadow: 4px 4px 8px var(--shadow-dark),
              -4px -4px 8px var(--shadow-light);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.pub-btn:hover {
  transform: translateY(-1px);
  box-shadow: 2px 2px 5px var(--shadow-dark),
              -2px -2px 5px var(--shadow-light);
}
.pub-btn-primary {
  background: var(--text-primary);
  color: var(--bg-main);
  box-shadow: 4px 4px 8px var(--shadow-dark);
}
.pub-btn-primary:hover { color: var(--bg-main); }

/* sections */
.pub-section { margin-bottom: 2.5rem; }
.pub-section h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}
.pub-section p { color: var(--text-secondary); }
.pub-section p + p { margin-top: 0.9rem; }

/* abstract emphasis */
.pub-abstract { font-size: 1.02rem; }

/* metadata list */
.pub-facts {
  list-style: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}
.pub-facts li { margin-bottom: 0.5rem; color: var(--text-secondary); }
.pub-facts .k { color: var(--text-muted); display: inline-block; min-width: 92px; }
.pub-facts a { color: var(--accent-warm); }

/* bibtex */
.pub-bibtex {
  position: relative;
  background: var(--bg-element);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: inset 3px 3px 7px var(--shadow-dark),
              inset -3px -3px 7px var(--shadow-light);
  overflow-x: auto;
}
.pub-bibtex pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre;
}

.pub-bibtex-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-main);
  border: 0;
  border-radius: 7px;
  padding: 6px 11px;
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark),
              -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s ease, color 0.2s ease;
}
.pub-bibtex-copy:hover {
  box-shadow: inset 2px 2px 4px var(--shadow-dark),
              inset -2px -2px 4px var(--shadow-light);
}
.pub-bibtex-copy.copied { color: var(--accent-warm); }

/* publication list (index page) */
.pub-list { list-style: none; }
.pub-list-item {
  display: block;
  background: var(--bg-element);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 6px 6px 14px var(--shadow-dark),
              -6px -6px 14px var(--shadow-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pub-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px var(--shadow-dark),
              -8px -8px 18px var(--shadow-light);
}
.pub-list-item h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.pub-list-item .pub-list-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}
.pub-list-item p { color: var(--text-secondary); font-size: 0.98rem; }

.pub-lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

/* footer */
.pub-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pub-footer a { color: var(--accent-warm); text-decoration: none; }
.pub-footer a:hover { text-decoration: underline; }

.pub-review {
  font-size: 0.82em;
  font-style: italic;
  color: var(--text-muted);
}

.cite-badge {
  font-style: normal;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Google Scholar stats line (citations + h-index) on the publications index */
.scholar-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: -0.6rem 0 2.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.scholar-stats-icon { flex: 0 0 auto; fill: var(--accent-warm); }
.scholar-stats a { color: var(--accent-warm); text-decoration: none; }
.scholar-stats a:hover { text-decoration: underline; }
.scholar-stats [data-stat] { font-weight: 600; color: var(--text-primary); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .pub-wrap { padding: 1.75rem 1.1rem 3rem; }
  h1.pub-h1 { font-size: 1.35rem; }
  .pub-section h2 { font-size: 1rem; }
  .pub-section p, .pub-abstract { line-height: 1.6; }
  .pub-list-item h2 { font-size: 1.05rem; }
  .pub-btn { font-size: 0.8rem; padding: 7px 13px; }
}
