/* ============================================
   TECH STACK PAGE STYLES
   ============================================ */

/* ============================================
   TECH HERO — Full VH + Floating Icons
   ============================================ */
.tech-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 72px;
}

.tech-hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 28px 40px;
}

.page-hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -2px;
  margin: 16px 0;
  line-height: 1;
}

.page-hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Particles ── */
.tech-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tech-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent-purple);
  opacity: 0;
  animation: techParticleFloat linear infinite;
  box-shadow: 0 0 6px var(--accent-purple);
}

@keyframes techParticleFloat {
  0%   { transform: translateY(100%); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100px); opacity: 0; }
}

/* ── Icons Area ── */
.tech-hero-icons {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 420px;
  z-index: 2;
}

/* SVG lines */
.tech-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ── Base Node ── */
.tech-node {
  position: absolute;
  z-index: 2;
  cursor: default;
}

/* Single glass color — all nodes same style */
.tech-node-inner {
  border-radius: 18px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: all 0.35s ease;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

[data-theme="light"] .tech-node-inner {
  background: rgba(139,92,246,0.07);
  border-color: rgba(139,92,246,0.18);
  color: rgba(30,30,60,0.7);
  box-shadow: 0 4px 24px rgba(139,92,246,0.08);
}

.tech-node:hover .tech-node-inner {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.5);
  color: #fff;
  transform: scale(1.12);
  box-shadow:
    0 8px 32px rgba(139,92,246,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Large nodes ── */
.node-large .tech-node-inner {
  width: 64px;
  height: 64px;
  font-size: 1.7rem;
  border-radius: 20px;
}

/* ── Small nodes ── */
.node-small .tech-node-inner {
  width: 42px;
  height: 42px;
  font-size: 1rem;
  border-radius: 13px;
  background: rgba(139,92,246,0.05);
  border-color: rgba(139,92,246,0.12);
}

/* ── LARGE NODE POSITIONS
   Matching the 9 visible icon spots in screenshot ── */

/* Left column — large */
.node-wp     { top: -28%; left: 20%;   animation: nf1 5s ease-in-out infinite 0s; }
.node-python { top: -10%; left: 8%;   animation: nf2 6s ease-in-out infinite 0.6s; }

/* Left-center column */
.node-shopify { top: 16%; left: 22%; animation: nf3 5.5s ease-in-out infinite 1s; }
.node-html    { top: 52%; left: 24%; animation: nf1 4.8s ease-in-out infinite 1.4s; }

/* Center column */
.node-vscode { top: 50%; left: 44%; animation: nf2 6s ease-in-out infinite 0.8s; }

/* Right-center column */
.node-js  { top: 12%; left: 58%; animation: nf3 5s ease-in-out infinite 1.8s; }
.node-css { top: -35%; right: 15%; animation: nf1 5.5s ease-in-out infinite 0.4s; }

/* Right column */
.node-mongo { top: 10%; right: 6%;  animation: nf2 4.5s ease-in-out infinite 2s; }
.node-node  { top: 50%; right: 34%;  animation: nf3 6s ease-in-out infinite 1.2s; }

/* ── SMALL NODE POSITIONS
   Matching the small red boxes in screenshot ── */
.node-s1 { top: -50%; left: 10%;  animation: nf1 7s ease-in-out infinite 0.2s; }
.node-s2 { top: 22%; left: 38%;  animation: nf2 6s ease-in-out infinite 1.1s; }
.node-s3 { top: 36%; left: 6%;   animation: nf3 5s ease-in-out infinite 2.2s; }
.node-s4 { top: 25%; left: 12%;  animation: nf1 6.5s ease-in-out infinite 0.7s; }
.node-s5 { top: 20%; right: 20%; animation: nf2 5.5s ease-in-out infinite 1.6s; }
.node-s6 { top: 43%; right: 13%; animation: nf3 7s ease-in-out infinite 0.5s; }
.node-s7 { top: 65%; left: 14%;  animation: nf1 6s ease-in-out infinite 1.9s; }
.node-s8 { top: 70%; right: 22%; animation: nf2 5s ease-in-out infinite 0.9s; }

/* Float variations */
@keyframes nf1 {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
@keyframes nf2 {
  0%,100% { transform: translateY(0px); }
  40%      { transform: translateY(-14px); }
  70%      { transform: translateY(-7px); }
}
@keyframes nf3 {
  0%,100% { transform: translateY(0px); }
  30%      { transform: translateY(-8px); }
  70%      { transform: translateY(-13px); }
}

/* Scroll indicator */
.tech-hero .scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* ── Tech Section ── */
.tech-section {
  padding: 80px 28px;
}

.tech-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ── Category Block ── */
.tech-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease;
}

.tech-category:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Tech Grid ── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ── Tech Card ── */
.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.tech-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-purple);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.18);
}

.tech-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px currentColor;
}

/* Tech Icon Colors */
.html   { background: rgba(228,77,38,0.15);   color: #e44d26; }
.css    { background: rgba(38,77,228,0.15);   color: #264de4; }
.js     { background: rgba(247,223,30,0.15);  color: #f7df1e; }
.react  { background: rgba(97,218,251,0.15);  color: #61dafb; }
.next   { background: rgba(255,255,255,0.08); color: #ffffff; }
.tailwind { background: rgba(6,182,212,0.15); color: #06b6d4; }
.node   { background: rgba(104,160,99,0.15);  color: #68a063; }
.express { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.python { background: rgba(55,118,171,0.15);  color: #3776ab; }
.api    { background: rgba(6,182,212,0.15);   color: var(--accent-cyan); }
.mongo  { background: rgba(71,162,72,0.15);   color: #47a248; }
.mysql  { background: rgba(0,117,143,0.15);   color: #00758f; }
.redis  { background: rgba(220,50,50,0.15);   color: #dc3232; }
.firebase { background: rgba(255,160,0,0.15); color: #ffa000; }
.git    { background: rgba(240,80,51,0.15);   color: #f05033; }
.github { background: rgba(255,255,255,0.08); color: #ffffff; }
.docker { background: rgba(13,183,237,0.15);  color: #0db7ed; }
.aws    { background: rgba(255,153,0,0.15);   color: #ff9900; }
.figma  { background: rgba(162,89,255,0.15);  color: #a259ff; }
.vscode { background: rgba(0,122,204,0.15);   color: #007acc; }

.tech-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Skill Bar */
.tech-bar {
  width: 100%;
  height: 4px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.tech-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Learning Section ── */
.learning-section {
  padding: 80px 28px 100px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.learning-container {
  max-width: 1100px;
  margin: 0 auto;
}

.learning-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.learning-card {
  padding: 32px 28px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.learning-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(6, 182, 212, 0.12);
}

.learning-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-cyan);
  margin-bottom: 18px;
}

.learning-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.learning-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.learning-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-bar {
  flex: 1;
  height: 6px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.lp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.learning-progress span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 32px;
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .tech-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .learning-cards { grid-template-columns: 1fr; }
  .tech-category { padding: 24px 20px; }
}

@media (max-width: 560px) {
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
  .tech-section { padding: 60px 16px; }
}

/* ============================================
   RESPONSIVE FIX — Floating Tech Icons
   ============================================ */

/* ───────────────── TABLET ───────────────── */
@media (max-width: 1024px) {

  .tech-hero {
    min-height: auto;
    padding-top: 90px;
  }

  .tech-hero-content {
    padding: 40px 20px 30px;
  }

  .tech-hero-icons {
    min-height: 420px;
    margin-top: 20px;
  }

  /* Remove problematic negative positions */
  .node-wp       { top: 2%;  left: 18%; }
  .node-python   { top: 8%;  left: 4%; }

  .node-shopify  { top: 26%; left: 18%; }
  .node-html     { top: 58%; left: 20%; }

  .node-vscode   { top: 52%; left: 42%; }

  .node-js       { top: 18%; left: 60%; }
  .node-css      { top: 4%;  right: 10%; }

  .node-mongo    { top: 18%; right: 2%; }
  .node-node     { top: 58%; right: 18%; }

  /* Small nodes */
  .node-s1 { top: 0%;  left: 8%; }
  .node-s2 { top: 20%; left: 38%; }
  .node-s3 { top: 40%; left: 4%; }
  .node-s4 { top: 30%; left: 10%; }
  .node-s5 { top: 26%; right: 20%; }
  .node-s6 { top: 48%; right: 10%; }
  .node-s7 { top: 74%; left: 12%; }
  .node-s8 { top: 76%; right: 20%; }
}


/* ───────────────── MOBILE ───────────────── */
@media (max-width: 768px) {

  .tech-hero {
    padding-top: 80px;
    min-height: auto;
  }

  .tech-hero-content {
    padding: 30px 18px 20px;
  }

  .page-hero-title {
    line-height: 1.1;
  }

  .tech-hero-icons {
    min-height: 360px;
    margin-top: 10px;
  }

  /* Smaller icon sizes */
  .node-large .tech-node-inner {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .node-small .tech-node-inner {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  /* Reposition all nodes safely */
  .node-wp       { top: 4%;  left: 14%; }
  .node-python   { top: 12%; left: 2%; }

  .node-shopify  { top: 30%; left: 12%; }
  .node-html     { top: 62%; left: 18%; }

  .node-vscode   { top: 54%; left: 40%; }

  .node-js       { top: 22%; left: 64%; }
  .node-css      { top: 6%;  right: 8%; }

  .node-mongo    { top: 22%; right: 0%; }
  .node-node     { top: 62%; right: 12%; }

  /* Small nodes */
  .node-s1 { top: 2%;  left: 6%; }
  .node-s2 { top: 24%; left: 34%; }
  .node-s3 { top: 44%; left: 2%; }
  .node-s4 { top: 34%; left: 8%; }
  .node-s5 { top: 30%; right: 18%; }
  .node-s6 { top: 52%; right: 8%; }
  .node-s7 { top: 78%; left: 10%; }
  .node-s8 { top: 80%; right: 18%; }

  /* Hide connection lines on mobile */
  .tech-connections {
    display: none;
  }
}


/* ───────────────── SMALL MOBILE ───────────────── */
@media (max-width: 480px) {

  .tech-hero-icons {
    min-height: 320px;
  }

  .node-large .tech-node-inner {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }

  .node-small .tech-node-inner {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .page-hero-title {
    font-size: 2.4rem;
  }

  .page-hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* ============================================
   TWO COLUMN SECTION — Frontend + CMS
   ============================================ */
.two-col-section {
  padding: 80px 28px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.two-col-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Column Header ── */
.col-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.col-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.frontend-icon {
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(139,92,246,0.15);
}

.cms-icon {
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6,182,212,0.15);
}

.col-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.col-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── Frontend Tech Cards ── */
.tech-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tc-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--accent-purple);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 3px 0 0 3px;
}

.tc-card:hover {
  border-color: rgba(139,92,246,0.3);
  transform: translateX(6px);
  box-shadow: 0 6px 24px rgba(139,92,246,0.1);
}

.tc-card:hover::before { opacity: 1; }

.tc-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.tc-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--ic, var(--accent-purple));
  background: color-mix(in srgb, var(--ic, #8b5cf6) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic, #8b5cf6) 20%, transparent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.tc-card:hover .tc-icon {
  transform: rotate(-8deg) scale(1.1);
}

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

.tc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tc-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tc-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 160px;
}

.tc-bar {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: rgba(139,92,246,0.08);
  overflow: hidden;
}

.tc-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: var(--fc, var(--accent-purple));
  opacity: 0.8;
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px var(--fc, rgba(139,92,246,0.5));
}

.tc-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: 'Orbitron', monospace;
  min-width: 32px;
  text-align: right;
}

/* ── CMS Cards Grid ── */
.cms-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cms-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.cms-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right,
    rgba(139,92,246,0.05), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cms-card:hover {
  border-color: rgba(139,92,246,0.3);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(139,92,246,0.12);
}

.cms-card:hover::after { opacity: 1; }

.cms-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cms-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--cc, var(--accent-purple));
  background: color-mix(in srgb, var(--cc, #8b5cf6) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cc, #8b5cf6) 20%, transparent);
  transition: transform 0.3s ease;
}

.cms-card:hover .cms-icon-wrap {
  transform: rotate(-6deg) scale(1.1);
}

.cms-badge {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--accent-purple);
}

.cms-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cms-desc {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.cms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.cms-tags span {
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.cms-card:hover .cms-tags span {
  border-color: rgba(139,92,246,0.2);
  color: var(--accent-purple);
}

.cms-level-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(139,92,246,0.08);
  overflow: hidden;
}

.cms-level-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--cc, var(--accent-purple));
  opacity: 0.7;
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .two-col-container { grid-template-columns: 1fr; }
  .cms-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .two-col-section { padding: 60px 16px; }
  .cms-cards-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BACKEND + DATABASE + TOOLS SECTION
   FIXED VERSION
   ============================================ */

.backend-section {
  padding: 80px 28px;
  border-top: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.backend-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ================= HEADER ================= */

.stack-section-header {
  text-align: center;
  margin-bottom: 54px;
}

.stack-section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-bottom: 12px;
}

.label-line {
  width: 50px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-purple),
    transparent
  );
}

/* =========================
   INFRA SECTION
========================= */

.infra-section{
  padding:90px 28px;
  position:relative;
  overflow:hidden;
}

.infra-container{
  max-width:1200px;
  margin:auto;
}

.infra-header{
  text-align:center;
  margin-bottom:60px;
}

.infra-mini-title{
  font-size:.75rem;
  letter-spacing:4px;
  color:#8b5cf6;
  font-weight:700;
}

.infra-title{
  font-size:clamp(2rem,4vw,3.5rem);
  margin-top:12px;
  color:#fff;
}

.infra-title span{
  background:linear-gradient(90deg,#8b5cf6,#06b6d4);
  background-clip:text;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.infra-grid-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:42px;
}

.infra-subtitle{
  margin-bottom:20px;
  color:#9ca3af;
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:1px;
}

/* DATABASE */

.infra-db-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.infra-db-card{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  padding:22px;
  transition:.4s;
}

.infra-db-card:hover{
  transform:translateY(-6px);
  border-color:#8b5cf6;
}

.primary{
  border-color:rgba(34,197,94,.4);
}

.infra-db-top{
  display:flex;
  justify-content:space-between;
  margin-bottom:14px;
}

.infra-db-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
}

.mongo{
  background:rgba(34,197,94,.1);
  color:#22c55e;
}

.mysql{
  background:rgba(6,182,212,.1);
  color:#06b6d4;
}

.firebase{
  background:rgba(245,158,11,.1);
  color:#f59e0b;
}

.infra-badge{
  font-size:.7rem;
  padding:15px 20px;
  border-radius:999px;
  background:rgba(34,197,94,.1);
  color:#22c55e;
}

.infra-db-card h5{
  color:#fff;
  margin-bottom:8px;
}

.infra-db-card p{
  color:#9ca3af;
  font-size:.88rem;
  line-height:1.6;
}

.infra-progress{
  margin-top:16px;
  height:4px;
  background:rgba(255,255,255,.06);
  border-radius:999px;
  overflow:hidden;
}

.infra-progress-fill{
  width:0%;
  height:100%;
  transition:1.4s;
}

.mongo-fill{
  background:linear-gradient(90deg,#22c55e,#16a34a);
}

.mysql-fill{
  background:linear-gradient(90deg,#06b6d4,#0891b2);
}

.fire-fill{
  background:linear-gradient(90deg,#f59e0b,#d97706);
}

/* BACKEND GRID */

.infra-backend-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.infra-pill{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:20px;
  display:flex;
  align-items:center;
  gap:14px;
  transition:.4s;
}

.infra-pill:hover{
  transform:translateY(-6px);
  border-color:#8b5cf6;
}

.infra-pill-icon{
  width:50px;
  height:50px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.2rem;
}

.node{
  background:rgba(34,197,94,.1);
  color:#22c55e;
}

.python{
  background:rgba(59,130,246,.1);
  color:#3b82f6;
}

.api{
  background:rgba(6,182,212,.1);
  color:#06b6d4;
}

.ai{
  background:rgba(236,72,153,.1);
  color:#ec4899;
}

.infra-pill h5{
  color:#fff;
}

.infra-pill span{
  color:#9ca3af;
  font-size:.8rem;
}

/* TOOLS */

.infra-tools{
  margin-top:32px;

}

.infra-tools-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:30px;
  padding:37px 20px;
  border-radius:22px;
  background:rgba(255, 255, 255, 0.014);
  border:1px solid rgba(255,255,255,.08);
}

.infra-tools-grid:hover{
  border-color:#8a5cf67e;
  box-shadow:0 16px 48px rgba(139,92,246,.12);
  animation: calc(0.4s * 3) glowPulse 1.2s ease-in-out infinite;
}

.infra-tool{
  text-align:center;
}

.infra-tool i{
  width:58px;
  height:58px;
  border-radius:50%;
  border:1px solid rgba(139,92,246,.2);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:auto;
  margin-bottom:10px;
  color:#8b5cf6;
  transition:.4s;
}

.infra-tool:hover i{
  transform:scale(1.15);
  box-shadow:0 0 24px rgba(139,92,246,.4);
}

.infra-tool span{
  color:#9ca3af;
  font-size:.82rem;
}

/* ANIMATION */

.infra-anim{
  opacity:0;
  transform:translateY(40px);
}

.infra-show{
  opacity:1;
  transform:translateY(0);
  transition:
    opacity .8s ease,
    transform .8s ease;
}

/* RESPONSIVE */

@media(max-width:900px){

  .infra-grid-layout{
    grid-template-columns:1fr;
  }

}

@media(max-width:640px){

  .infra-section{
    padding:70px 16px;
  }

  .infra-backend-grid{
    grid-template-columns:1fr;
  }

  .infra-tools-grid{
    grid-template-columns:repeat(2,1fr);
  }

}

/* ============================================
   DEV CHARACTER CTA SECTION
   ============================================ */
.dev-cta-section {
  position: relative;
  padding: 80px 28px;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
}

.dev-cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dev-cta-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* ── Left: Text ── */
.dev-cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 12px 0 16px;
}

.dev-cta-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 420px;
}

/* Stats */
.dev-cta-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

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

.cta-stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-shadow: 0 0 20px rgba(139,92,246,0.4);
  line-height: 1;
}

.cta-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.cta-stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-color);
  margin-top: -8px;
}

.dev-cta-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Right: Character ── */
.dev-character-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
}

/* Speech Bubble */
.speech-bubble {
  position: absolute;
  top: 10px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 20px 20px 4px 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.15);
  animation: bubblePop 3s ease-in-out infinite;
  z-index: 5;
  white-space: nowrap;
}

.bubble-arrow {
  color: var(--accent-purple);
  animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes bubblePop {
  0%,100% { transform: scale(1) rotate(-2deg); }
  50%      { transform: scale(1.04) rotate(0deg); }
}

@keyframes arrowBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ── Developer Character ── */
.dev-character {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: charFloat 4s ease-in-out infinite;
}

@keyframes charFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

/* Head */
.char-head {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  margin-bottom: -8px;
  z-index: 3;
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

.char-hair {
  position: absolute;
  top: -8px;
  left: 8px;
  right: 8px;
  height: 30px;
  border-radius: 40px 40px 0 0;
  background: #1a1a2e;
}

[data-theme="light"] .char-hair { background: #2d1b00; }

.char-headphones {
  position: absolute;
  top: -4px;
  left: -10px;
  right: -10px;
  height: 28px;
  border: 4px solid var(--accent-purple);
  border-bottom: none;
  border-radius: 30px 30px 0 0;
}

.char-headphones::before,
.char-headphones::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 10px rgba(139,92,246,0.5);
}

.char-headphones::before { left: -7px; }
.char-headphones::after  { right: -7px; }

/* Face */
.char-face {
  position: absolute;
  inset: 16px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.char-eyes {
  display: flex;
  gap: 16px;
}

.char-eye {
  width: 12px;
  height: 14px;
  border-radius: 50%;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {
  0%,96%,100% { transform: scaleY(1); }
  98%          { transform: scaleY(0.1); }
}

.char-pupil {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: eyeMove 5s ease-in-out infinite;
}

@keyframes eyeMove {
  0%,100% { transform: translate(0,0); }
  25%      { transform: translate(2px,-1px); }
  75%      { transform: translate(-2px,1px); }
}

.char-mouth {
  width: 20px;
  height: 10px;
  border-radius: 0 0 20px 20px;
  border: 3px solid #1a1a2e;
  border-top: none;
}

/* Body */
.char-body {
  position: relative;
  width: 100px;
  height: 80px;
  z-index: 2;
}

.char-shirt {
  width: 100%;
  height: 100%;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}

.char-code-text {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* Arms */
.char-arm {
  position: absolute;
  top: 10px;
  width: 20px;
  height: 60px;
  background: #fde68a;
  border-radius: 10px;
}

.char-arm-left {
  left: -18px;
  transform: rotate(15deg);
  transform-origin: top center;
  animation: armWaveLeft 2s ease-in-out infinite;
}

.char-arm-right {
  right: -18px;
  transform: rotate(-15deg);
  transform-origin: top center;
  animation: armWaveRight 2s ease-in-out infinite 0.3s;
}

@keyframes armWaveLeft {
  0%,100% { transform: rotate(15deg); }
  50%      { transform: rotate(25deg); }
}

@keyframes armWaveRight {
  0%,100% { transform: rotate(-15deg); }
  50%      { transform: rotate(-5deg); }
}

/* Laptop -->*/
.char-laptop {
  position: relative;
  z-index: 4;
  margin-top: -4px;
}

.char-laptop-screen {
  width: 120px;
  height: 75px;
  background: #0a0a0f;
  border-radius: 8px 8px 0 0;
  border: 2px solid rgba(139,92,246,0.4);
  overflow: hidden;
  padding: 8px;
  box-shadow: 0 0 20px rgba(139,92,246,0.2);
}

[data-theme="light"] .char-laptop-screen {
  background: #1a1a2e;
}

.laptop-code {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.laptop-code span {
  display: block;
  height: 3px;
  border-radius: 3px;
  animation: codeType 2s ease-in-out infinite;
}

.lc-1 { width: 70%; background: #8b5cf6; animation-delay: 0s; }
.lc-2 { width: 90%; background: #06b6d4; animation-delay: 0.3s; }
.lc-3 { width: 50%; background: #22c55e; animation-delay: 0.6s; }
.lc-4 { width: 75%; background: #f7df1e; animation-delay: 0.9s; }

@keyframes codeType {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.char-laptop-base {
  width: 130px;
  height: 8px;
  background: rgba(139,92,246,0.3);
  border-radius: 0 0 4px 4px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(139,92,246,0.2);
}

/* Legs */
.char-legs {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.char-leg {
  width: 22px;
  height: 36px;
  background: #1a1a2e;
  border-radius: 4px 4px 8px 8px;
}

[data-theme="light"] .char-leg { background: #2d1b00; }

/* Shadow */
.char-shadow {
  width: 120px;
  height: 16px;
  background: radial-gradient(ellipse,
    rgba(139,92,246,0.2), transparent 70%);
  border-radius: 50%;
  margin-top: 8px;
  animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%,100% { transform: scaleX(1);   opacity: 0.6; }
  50%      { transform: scaleX(0.7); opacity: 0.3; }
}

/* ── Floating Elements ── */
.char-float {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--accent-purple);
}

.char-float-1 {
  top: 20%; left: 5%;
  animation: floatEl 4s ease-in-out infinite 0s;
  color: #61dafb;
}
.char-float-2 {
  top: 60%; left: 2%;
  animation: floatEl 5s ease-in-out infinite 1s;
  color: #68a063;
}
.char-float-3 {
  top: 15%; right: 8%;
  animation: floatEl 3.5s ease-in-out infinite 0.5s;
  color: #eab308;
}
.char-float-4 {
  top: 55%; right: 5%;
  animation: floatEl 4.5s ease-in-out infinite 1.5s;
  color: #f7df1e;
}
.char-float-5 {
  bottom: 15%; left: 15%;
  animation: floatEl 5s ease-in-out infinite 2s;
  color: #c77b3f;
}

@keyframes floatEl {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(10deg); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .dev-cta-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .dev-cta-desc { margin: 0 auto 28px; }
  .dev-cta-stats { justify-content: center; }
  .dev-cta-buttons { justify-content: center; }
  .section-label { justify-content: center; }
  .dev-character-wrap { height: 360px; }
}

@media (max-width: 560px) {
  .dev-cta-section { padding: 60px 20px; }
  .dev-character-wrap { height: 300px; }
  .char-head { width: 64px; height: 64px; }
  .char-body { width: 80px; }
  .char-laptop-screen { width: 96px; }
}