/* ── Component Styles ────────────────────────────────────── */

/* ── Publications ───────────────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s;
}

.pub-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.pub-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--light);
  text-align: right;
  padding-top: 0.15rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.pub-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--mid);
  margin-bottom: 0.2rem;
}

.pub-authors strong {
  color: var(--dark);
}

.pub-venue {
  font-size: 0.78rem;
  color: var(--light);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pub-badges {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.badge {
  font-size: 0.72rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  margin-right: -1px;
  background: var(--bg);
  transition: color 0.12s, background 0.12s;
}

.badge:first-child {
  border-radius: 4px 0 0 4px;
}

.badge:last-child {
  border-radius: 0 4px 4px 0;
  margin-right: 0;
}

.badge:only-child {
  border-radius: 4px;
}

.badge:hover {
  color: var(--accent);
  background: var(--accent-lt);
  border-color: #bfdbfe;
  z-index: 1;
  position: relative;
}

/* ── GitHub Repos ───────────────────────────────────────── */
#repos {
  background: var(--bg2);
}

.repos-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.repo-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s, border-color 0.15s;
  background: var(--bg);
}

.repo-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-color: #94a3b8;
}

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

.repo-name a:hover {
  text-decoration: underline;
}

.repo-left {
  min-width: 0;
}

.repo-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.repo-icon {
  font-size: 0.8rem;
  color: var(--light);
}

.repo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-desc {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.5;
}

.repo-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--mid);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.repo-stars, .repo-docs, .repo-download {
  font-size: 0.72rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  color: var(--mid);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.repo-downloads {
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  border: none;
}

.repo-docs, .repo-download {
  font-weight: 600;
  transition: color 0.12s, border-color 0.12s;
}

.repo-docs:hover, .repo-download:hover {
  color: var(--accent);
  border-color: #bfdbfe;
  text-decoration: none;
}

.repo-role {
  font-size: 0.72rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-lt);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.3rem;
}

.role-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.role-legend-label {
  font-size: 0.75rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: var(--light);
  margin-right: 0.2rem;
}

.role-legend .repo-role {
  margin-left: 0;
}