/* ============================================
   MerLean — Modern Light Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fb;
  --bg-glass: rgba(0, 0, 0, 0.02);
  --border-color: #e2e5ea;
  --border-hover: #c8cdd5;
  --text-primary: #1a1d24;
  --text-secondary: #5a6070;
  --text-muted: #8b90a0;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.08);
  --accent-glow-strong: rgba(79, 70, 229, 0.18);
  --green: #059669;
  --green-glow: rgba(5, 150, 105, 0.08);
  --amber: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Subtle background — none for pure white */



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

a:hover {
  color: var(--accent-light);
}

/* ---- Layout ---- */
.wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- Top Nav ---- */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.nav-brand img {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  border-radius: 0;
}

.nav-brand span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  position: relative;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-left: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-github:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--accent);
}

.nav-tab.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---- Tab Content ---- */
.tab-content {
  display: none;
  padding: 48px 0 60px;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Home Tab ---- */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 24px;
  border-radius: 0;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(79, 70, 229, 0.12));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

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

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Authors strip ---- */
.authors-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 48px 0 16px;
}

.author-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.author-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.author-card img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: border-color var(--transition);
}

.author-card:hover img {
  border-color: var(--accent);
}

.author-info {
  text-align: left;
  min-width: 0;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-affil {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.author-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* ---- About section ---- */
.about-section {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.about-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

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

/* ---- Fundraising section ---- */
.fundraising-section {
  margin-top: 32px;
  padding: 32px;
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fundraising-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.fundraising-section > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 760px;
}

.fundraising-contact strong {
  color: var(--text-primary);
}

.fundraising-contact a {
  font-weight: 600;
}

.fundraising-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fundraising-card {
  min-width: 0;
  padding: 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.fundraising-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.fundraising-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---- Results section ---- */
.results-section {
  margin-top: 32px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.results-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.results-section > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
}

.result-card {
  min-width: 0;
  padding: 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.lean-eval-card {
  margin-bottom: 22px;
}

.lean-eval-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lean-eval-table-panel {
  min-width: 0;
}

.lean-eval-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.lean-eval-copy p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0;
  max-width: 75%;
}

.lean-eval-table th:first-child,
.lean-eval-table td:first-child {
  width: 64px;
  text-align: right;
}

.lean-eval-table th:nth-child(2),
.lean-eval-table td:nth-child(2) {
  white-space: normal;
  min-width: 260px;
  text-align: left;
}

.table-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.35;
}

.results-table.compact {
  font-size: 0.82rem;
}

.results-table th,
.results-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
}

.results-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
}

.results-table td {
  color: var(--text-secondary);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.highlight-row td,
.summary-row td,
.best {
  color: var(--accent);
  font-weight: 700;
}

.table-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 1.44rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-value-lines {
  display: flex;
  min-height: 4.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  line-height: 1.16;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}

/* ---- BibTeX ---- */
.bibtex-section {
  margin-top: 32px;
}

.bibtex-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.bibtex-block {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-family: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

/* ---- Publications Tab ---- */
.pub-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 20px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.pub-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.pub-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 12px;
}

.pub-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pub-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all var(--transition);
  text-decoration: none;
}

.pub-link:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.disclaimer-note {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* ---- Videos Tab ---- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.video-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.video-card video {
  width: 100%;
  display: block;
  background: #000;
}

.video-card-info {
  padding: 20px 24px;
}

.video-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.video-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.video-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.video-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

/* ---- Blogs Tab ---- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  display: block;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.blog-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.blog-read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

/* Blog post view */
.blog-post-view {
  display: none;
}

.blog-post-view.active {
  display: block;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color var(--transition);
}

.blog-back:hover {
  color: var(--accent);
}

.blog-post-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.blog-post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.blog-post-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.blog-post-body h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 14px;
}

.blog-post-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
}

.blog-post-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
}

.blog-post-body p {
  margin-bottom: 16px;
}

.blog-post-body ul, .blog-post-body ol {
  margin: 0 0 16px 24px;
}

.blog-post-body li {
  margin-bottom: 6px;
}

.blog-post-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  margin-bottom: 16px;
  line-height: 1.7;
}

.blog-post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.blog-post-body pre code {
  background: none;
  padding: 0;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}

.blog-post-body th, .blog-post-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.blog-post-body th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.blog-post-body td {
  color: var(--text-secondary);
}

.blog-post-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-post-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* ---- Examples Tab ---- */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.example-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.example-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.example-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
  margin-bottom: 14px;
  color: var(--accent);
}

.example-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.example-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.example-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.example-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  transition: all var(--transition);
  text-decoration: none;
}

.example-link:hover {
  background: var(--accent-light);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow-strong);
}

/* ---- Section titles ---- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 32px 0 48px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

.site-footer a {
  color: var(--text-secondary);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .fundraising-grid {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .examples-grid {
    grid-template-columns: 1fr;
  }

  .authors-strip {
    gap: 16px;
  }

  .author-card {
    flex: 1;
    min-width: 200px;
  }

  .nav-tab {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* ============================================
   Collaborate tab (research pairing board)
   SPDX-License-Identifier: MIT
   Copyright (c) 2026 Yuanjie (Collin) Ren — see LICENSE-COLLAB.md
   (this section only; the rest of this stylesheet is
   all rights reserved)
   ============================================ */

.collab-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  align-items: start;
}

.collab-sidebar {
  position: sticky;
  top: 24px;
}

.collab-create-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.collab-sidebar-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.collab-search {
  margin-bottom: 16px;
}

.collab-flash {
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--green-glow);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---- Board rows ---- */
.collab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.collab-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.collab-row-main {
  min-width: 0;
}

.collab-row-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.collab-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.collab-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.collab-row-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.collab-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  line-height: 1.8;
}

.collab-empty-sub {
  font-size: 0.78rem;
}

.collab-empty code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---- Chips & badges ---- */
.chip {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  white-space: nowrap;
}

.chip-soft {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 5px;
  white-space: nowrap;
}

.badge-region {
  background: rgba(217, 119, 6, 0.1);
  color: var(--amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-open {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-progress {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ---- Forms ---- */
.collab-form {
  max-width: 720px;
}

.form-field {
  margin-bottom: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .req {
  color: #dc2626;
  font-size: 1.1em;
  font-weight: 700;
}

.form-label .opt {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: -2px 0 8px;
  line-height: 1.5;
}

.form-hint code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 4px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-error {
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
  font-size: 0.84rem;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.form-footnote {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Disclosure banners ---- */
.disclosure-banner {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 26px;
  line-height: 1.55;
}

.disclosure-public {
  background: var(--accent-glow);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--text-primary);
}

.disclosure-private {
  background: var(--green-glow);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--text-primary);
}

/* ---- Region switch ---- */
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 999px;
  transition: background var(--transition);
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.switch input:checked + .switch-slider {
  background: var(--amber);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(18px);
}

.switch-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---- Tag input ---- */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  position: relative;
  cursor: text;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tag-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.ti-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
}

.ti-chip-x {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.ti-chip-x:hover {
  color: var(--accent-light);
}

.ti-field {
  flex: 1;
  min-width: 160px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: transparent;
  padding: 4px 2px;
}

.ti-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.ti-option {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}

.ti-option:hover {
  background: var(--accent-glow);
}

.ti-create {
  color: var(--accent);
  font-weight: 500;
  border-top: 1px solid var(--border-color);
}

/* ---- Career-stage pills ---- */
.pill-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-check span {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.pill-check span:hover {
  border-color: var(--border-hover);
}

.pill-check input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---- Description preview ---- */
.desc-preview {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.65;
}

.desc-preview-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ---- Project detail ---- */
.collab-detail-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.collab-d-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.35;
}

.collab-d-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.collab-d-meta {
  font-size: 0.84rem;
  color: var(--text-secondary);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.collab-d-section {
  margin-top: 22px;
}

.collab-d-section h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.collab-d-desc {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

#collab-d-background {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- Contribute area ---- */
.collab-contribute {
  margin-bottom: 40px;
}

.contribute-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
}

#collab-contribute-form {
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contribute-done {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--green-glow);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .collab-layout {
    grid-template-columns: 1fr;
  }
  .collab-sidebar {
    position: static;
  }
  .collab-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .collab-row-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Region restriction detail ---- */
.region-detail {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(217, 119, 6, 0.05);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-sm);
}

.region-detail .form-input {
  margin-bottom: 0;
}

.region-detail select.form-input {
  margin-bottom: 10px;
}

.region-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: rgba(217, 119, 6, 0.07);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-sm);
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 500;
}

.collab-disclaimer {
  margin: -8px 0 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}

.license-footer p {
  margin: 0 auto;
  max-width: 640px;
  line-height: 1.7;
}

.license-footer p + p {
  margin-top: 6px;
}

.license-footer p:first-child {
  margin-bottom: 14px;
}

/* ---- Collaborate license notice ---- */
.collab-license {
  /* Large reserved whitespace between the board content and the license */
  margin: clamp(360px, 55vh, 700px) 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.collab-license p + p {
  margin-top: 8px;
}

.collab-license a {
  color: var(--text-secondary);
  font-weight: 600;
}

.collab-license a:hover {
  color: var(--accent);
}

/* ---- Pending-confirmation notice (post-submit) ---- */
.pending-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--accent-glow);
  border: 1px solid rgba(79, 70, 229, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pending-notice-icon {
  font-size: 1.5rem;
  line-height: 1.2;
}

.pending-notice-body {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.6;
}

.pending-notice-body strong {
  color: var(--text-primary);
}

.pending-notice-body p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

.pending-notice-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.pending-notice-close:hover {
  color: var(--text-primary);
}
