#projects {
  background: var(--section-alt);
}

.project-card {
  background: var(--bg-surface);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

:root[data-theme="dark"] .project-card {
  background: var(--bg-soft);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  border-color: var(--accent);
}

.project-card .card-body {
  display: flex;
  flex-direction: column;
}

.project-card .card-title,
.project-card .card-text {
  color: var(--text-main) !important;
}

.project-card .card-text {
  font-size: 0.9rem;
}


.project-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-link {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.badge-link:hover {
  background: rgba(148, 163, 184, 0.22);
  text-decoration: none;
}
.code-container-projects {
  position: relative;
  width: 100%;
  height: 260px;
  transform: rotateX(15deg) rotateY(-10deg);
  transform-style: preserve-3d;
  animation: floatProj 6s ease-in-out infinite;
}

@keyframes floatProj {
  0%,100% { transform: rotateX(15deg) rotateY(-10deg) translateZ(0); }
  50% { transform: rotateX(18deg) rotateY(-7deg) translateZ(14px); }
}

.code-screen-projects {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1d2e 0%, #0f1218 100%);
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 255, 255, 0.2);
}

.code-line-proj {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
  margin: 3px 0;
  white-space: nowrap;
  animation: slideInProj 0.5s ease-out backwards;
}

@keyframes slideInProj {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.keyword { color: #ff79c6; }
.function { color: #50fa7b; }
.string { color: #f1fa8c; }
.number { color: #bd93f9; }
.operator { color: #ff5555; }
.variable { color: #8be9fd; }
.comment { color: #6272a4; font-style: italic; }
.property { color: #ffb86c; }

.glow { text-shadow: 0 0 6px currentColor; }
.code-screen-anim {
  width: 100%;
  max-width: 420px;
  height: 260px;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.code-line {
  width: 100%;
  height: 14px;
  border-radius: 6px;
  background: var(--text-muted);
  animation: codePulse 2.8s ease-in-out infinite;
}

.code-line:nth-child(2) {
  width: 85%;
  animation-delay: 0.25s;
}

.code-line:nth-child(3) {
  width: 65%;
  animation-delay: 0.5s;
}

.code-line:nth-child(4) {
  width: 92%;
  animation-delay: 0.75s;
}

.code-line:nth-child(5) {
  width: 72%;
  animation-delay: 1s;
}

@keyframes codePulse {
  0% {
    background: var(--text-muted);
  }
  50% {
    background: var(--accent);
    opacity: 0.7;
  }
  100% {
    background: var(--text-muted);
  }
}

:root[data-theme="dark"] .code-screen-anim {
  background: var(--bg-soft);
  box-shadow: 0 20px 40px rgba(0,0,0,0.55);
}

:root[data-theme="dark"] .code-line {
  background: var(--wave-2);
  opacity: 0.4;
}

.code-screen-projects {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

:root[data-theme="dark"] .code-screen-projects {
  background: var(--bg-soft);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] .code-line-proj {
  text-shadow: none;
}

:root[data-theme="dark"] .code-line-proj {
  text-shadow: 0 0 6px currentColor;
}

.keyword   { color: #ff79c6; }
.function  { color: #0d9b4c; }
.string    { color: #ffa94d; } 
.number    { color: #bd93f9; } 
.operator  { color: #ff5555; }
.variable  { color: #4169e1; }
.comment   { color: #6272a4; font-style: italic; }
.property  { color: #ffb86c; }

.glow {
  text-shadow: 0 0 6px currentColor;
}