/* ============================================================
   OPEN SOURCE PAGE — Git log, Repo cards, 3D section, CTA
   ============================================================ */

/* ── 3D code blocks section ── */
.repo-3d-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0 0 2.5rem;
}

.repo-3d-section .container {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
}

#repo-3d-blocks {
  position: relative;
  width: 100%;
  height: 680px;
  overflow: hidden;
  background: transparent;
  cursor: default;
}

@media (max-width: 1199px) {
  .repo-3d-section { display: none !important; }
}

/* ── Animated background layers ── */
.repo-3d-section::before {
  content: '';
  position: absolute;
  inset: -80px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99,102,241,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.10) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: repo3d-grid 22s linear infinite;
  will-change: transform;
}

.repo-3d-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 90% at 16% 55%, rgba(99,102,241,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 52% 72% at 84% 38%, rgba(14,165,233,0.10) 0%, transparent 65%);
  animation: repo3d-glow 11s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes repo3d-grid {
  from { transform: translate(0, 0); }
  to   { transform: translate(64px, 64px); }
}

@keyframes repo3d-glow {
  from { transform: translate(0,   0)   scale(1.00); opacity: 0.60; }
  to   { transform: translate(3%, 2%)   scale(1.12); opacity: 1.00; }
}

html:not([data-theme="dark"]) .repo-3d-section::before {
  background-image:
    linear-gradient(rgba(79,70,229,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.045) 1px, transparent 1px);
}

html:not([data-theme="dark"]) .repo-3d-section::after {
  background:
    radial-gradient(ellipse 65% 90% at 16% 55%, rgba(79,70,229,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 52% 72% at 84% 38%, rgba(2,132,199,0.055) 0%, transparent 65%);
}

/* ── Git log terminal block ── */
.git-log {
  max-width: 560px;
  margin: 0 auto 4rem;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  font-family: 'SFMono-Regular','Consolas','Liberation Mono',monospace;
  font-size: 0.82rem;
  line-height: 1.75;
}

.git-log-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.git-log-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.git-log-dot--r { background: #ff5f57; }
.git-log-dot--y { background: #ffbd2e; }
.git-log-dot--g { background: #28c840; }

.git-log-title {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: #484f58;
  letter-spacing: 0.04em;
}

.git-log-body {
  padding: 1.1rem 1.4rem 1.25rem;
  color: #c9d1d9;
}

.git-log-cmd  { color: #6e7681; margin-bottom: 0.9rem; }
.git-log-cmd span { color: #07a0f6; }

.git-log-row {
  display: flex;
  align-items: center;
  padding: 0.18rem 0;
}

.git-log-repo {
  color: #e6edf3;
  font-weight: 600;
  min-width: 200px;
}

.git-log-status            { font-size: 0.75rem; letter-spacing: 0.06em; }
.git-log-status--active    { color: #3fb950; }
.git-log-status--maintain  { color: #07a0f6; }
.git-log-status--archive   { color: #484f58; }

/* ── Repo cards grid ── */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) { .repo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .repo-grid { grid-template-columns: 1fr; } }

.repo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color var(--dur-base) cubic-bezier(0.4,0,0.2,1),
              box-shadow var(--dur-slow) cubic-bezier(0.4,0,0.2,1),
              transform var(--dur-slow) var(--ease-spring);
  box-shadow: var(--shadow);
  will-change: transform;
}

.repo-card:hover {
  border-color: rgba(7,160,246,0.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.repo-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid rgba(7,160,246,0.18);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.repo-card-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.repo-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.repo-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.repo-card-includes {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  padding: 0;
  list-style: none;
}

.repo-card-includes li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
}

.repo-card-includes li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

.repo-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.repo-card-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.repo-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Status badges ── */
.repo-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
}

.repo-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.repo-status--active {
  background: rgba(63,185,80,0.12);
  color: #3fb950;
  border: 1px solid rgba(63,185,80,0.25);
}
.repo-status--active .repo-status-dot { background: #3fb950; }

.repo-status--maintained {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(7,160,246,0.25);
}
.repo-status--maintained .repo-status-dot { background: var(--accent); }

.repo-status--archived {
  background: var(--card);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.repo-status--archived .repo-status-dot { background: var(--text-dim); }

/* ── Open source hero actions ── */
.hero-oss-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.hero-gh-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: 'SFMono-Regular','Consolas',monospace;
  letter-spacing: 0.04em;
  animation: fadeInUp 0.6s 0.24s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── GitHub CTA strip ── */
.oss-cta {
  text-align: center;
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.oss-cta-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-family: 'SFMono-Regular','Consolas',monospace;
  letter-spacing: 0.04em;
}

.oss-cta-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.oss-cta-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Repo section header column alignment ── */
.oss-desc-col { align-self: flex-end; }
