:root {
  --accent:  #5b9cf6;
  --accent2: #a78bfa;
}

.projects-hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  text-align: center;
}

.projects-label {
  font-family: 'Fredoka One', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  animation: projFadeDown 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.projects-title {
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: projFadeDown 0.7s 0.07s cubic-bezier(0.16,1,0.3,1) both;
}

.projects-desc {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
  animation: projFadeDown 0.7s 0.14s cubic-bezier(0.16,1,0.3,1) both;
}

.projects-updated {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin-top: 1rem;
  animation: projFadeDown 0.7s 0.2s cubic-bezier(0.16,1,0.3,1) both;
}

.projects-list {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 2rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.repo-card {
  display: flex;
  align-items: stretch;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-surface, rgba(255,255,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 14px);
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  opacity: 0;
  transform: translateY(16px);
}
.repo-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.repo-card:hover {
  background: var(--card-hover, rgba(255,255,255,0.06));
  border-color: rgba(91,156,246,0.4);
  transform: translateY(-3px);
  text-decoration: none;
}

.repo-card-cover {
  flex-shrink: 0;
  width: 140px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.repo-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.repo-card-left {
  flex: 1;
  min-width: 0;
}

.repo-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.repo-card-icon {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.repo-card-name {
  font-family: 'Fredoka One', sans-serif;
  font-size: 1.15rem;
  color: var(--text, #fff);
  word-break: break-word;
}

.repo-card-desc {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

.repo-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.repo-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.repo-lang-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #888;
}

.repo-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.repo-topic {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: rgba(91,156,246,0.1);
  border: 1px solid rgba(91,156,246,0.2);
  color: #8db8f5;
}

.repo-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.repo-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.repo-link-repo {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
}
.repo-link-repo:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}
.repo-link-live {
  background: rgba(91,156,246,0.12);
  border: 1px solid rgba(91,156,246,0.3);
  color: #8db8f5;
}
.repo-link-live:hover {
  background: rgba(91,156,246,0.2);
  color: #fff;
  text-decoration: none;
}

.projects-loading,
.projects-empty {
  text-align: center;
  padding: 4rem 2rem;
  font-family: 'Fredoka', sans-serif;
  color: rgba(255,255,255,0.4);
  font-size: 0.95rem;
}
.projects-loading i {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

@keyframes projFadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .repo-card {
    flex-direction: column;
    gap: 1rem;
  }
  .repo-card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
  }
  .repo-card-right {
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
  }
  .repo-link-btn { flex: 1; justify-content: center; }
}

[data-theme="light"] .projects-title {
  background: linear-gradient(135deg, #0a0a14 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .projects-desc    { color: rgba(10,10,20,0.5); }
[data-theme="light"] .projects-updated { color: rgba(10,10,20,0.35); }
[data-theme="light"] .repo-card-desc   { color: rgba(10,10,20,0.6); }
[data-theme="light"] .repo-card-meta   { color: rgba(10,10,20,0.5); }
[data-theme="light"] .repo-link-repo   { color: rgba(10,10,20,0.7); background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
