/* components.css — reusable UI components: cards, tags, timeline, badges */

/* ── Section divider ── */

.section {
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* ── Entry / timeline card ── */

.entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.entry:last-child {
  border-bottom: 1px solid var(--border);
}

.entry-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding-top: 3px;
  line-height: 1.5;
  white-space: nowrap;
}

.entry-body {}

.entry-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.entry-title a:hover {
  color: var(--accent);
  opacity: 1;
}

.entry-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.entry-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.entry-desc ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-desc li {
  position: relative;
  padding-left: 1rem;
}

.entry-desc li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* ── Project card ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.card-link {
  color: var(--text-dim);
  transition: color var(--transition);
  flex-shrink: 0;
}

.card-link:hover {
  color: var(--accent);
  opacity: 1;
}

.card-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

/* ── Tags / pills ── */

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

.tag {
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
  transition: border-color var(--transition);
}

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

/* ── Badge ── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-success {
  background: rgba(63, 185, 80, 0.12);
  color: #3fb950;
}

.badge-warning {
  background: rgba(210, 153, 34, 0.12);
  color: #d29922;
}

.badge-info {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Stat row (for homepage) ── */

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Divider ── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
