#projects { padding: 90px 0; }

.proj-head {
  max-width: var(--w, 1240px); margin: 0 auto;
  padding: 0 clamp(20px,4vw,56px);
  display: flex; justify-content: space-between;
  align-items: flex-end; flex-wrap: wrap; gap: 20px;
  margin-bottom: 40px;
}
.proj-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.f-btn {
  background: none; border: 1px solid #1a2530;
  color: var(--text-dim, #5a7080);
  padding: 7px 16px; font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all .2s;
}
.f-btn.active, .f-btn:hover {
  background: var(--rust, #c94b2c); border-color: var(--rust, #c94b2c); color: #fff;
}

/* ── Scroll viewport ── */
.c-vp {
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 12px clamp(20px,4vw,56px) 20px;
  cursor: grab;
}
.c-vp::-webkit-scrollbar { display: none; }
.c-vp.grabbing { cursor: grabbing; scroll-snap-type: none; }

/* ── Track ── */
.c-track { display: flex; gap: 14px; width: max-content; }

/* ── Card ── */
.pc {
  width: clamp(248px, 28vw, 310px);
  scroll-snap-align: start; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg2, #0e1214); border: 1px solid #1c2b38;
  position: relative;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.pc:hover {
  border-color: #2e4a60;
  box-shadow: 0 6px 28px rgba(0,0,0,.55);
  transform: translateY(-3px);
}
.pc.hidden { display: none; }

/* category colors */
.pc[data-cat="web"]     { --acc:#3d6e8a; --icol:#4a8fb5; --top-bg:#0a1c2d; }
.pc[data-cat="mobile"]  { --acc:#6a3d8a; --icol:#9b6abc; --top-bg:#130828; }
.pc[data-cat="gamedev"] { --acc:#8a6a10; --icol:#c4951a; --top-bg:#1b1100; }

/* top accent line */
.pc::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px;
  height: 2px; background: var(--acc, #1c2b38);
  opacity: 0; transition: opacity .25s; z-index: 1;
}
.pc:hover::before { opacity: 1; }

/* ── Folder tab ── */
.pc-tab { height: 11px; position: relative; flex-shrink: 0; }
.pc-tab::after {
  content: ''; position: absolute; bottom: 0; left: 16px;
  width: 62px; height: 11px;
  background: var(--top-bg, #0a1c2d);
  clip-path: polygon(7px 100%, 0% 0%, 100% 0%, calc(100% - 7px) 100%);
  border: 1px solid var(--acc, #1c2b38); border-bottom: none;
}

/* ── Body ── */
.pc-body {
  padding: 20px 20px 14px; flex: 1;
  display: flex; flex-direction: column;
  background: linear-gradient(155deg, var(--top-bg, #0a1c2d) 0%, var(--bg2, #0e1214) 50%);
}

.pc-icon {
  width: 42px; height: 42px; color: var(--icol, #4a8fb5);
  margin-bottom: 15px; flex-shrink: 0; transition: transform .3s;
}
.pc:hover .pc-icon { transform: scale(1.1) rotate(-4deg); }

.pc-path {
  font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: .5px;
  color: rgba(141,180,210,.2); margin-bottom: 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-root { color: var(--rust, #c94b2c); opacity: .5; }

.pc-name {
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(11.5px, 1.35vw, 13px); line-height: 1.55;
  color: #c0d2de; flex: 1;
}

.pc-meta {
  margin-top: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.pc-tag {
  font-size: 8px; letter-spacing: 1.2px; text-transform: uppercase;
  border: 1px solid rgba(201,75,44,.4); color: var(--rust, #c94b2c); padding: 2px 5px;
}
.pc-domain {
  font-family: 'Space Mono', monospace; font-size: 8px;
  color: rgba(141,180,210,.2); margin-left: auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}

/* ── Footer ── */
.pc-footer {
  border-top: 1px solid #141e26; padding: 10px 20px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,.22);
}
.pc-num {
  font-family: 'Bebas Neue', sans-serif; font-size: 11px;
  letter-spacing: 2px; color: rgba(255,255,255,.13);
}
.pc-link {
  font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 1px;
  color: rgba(141,180,210,.28); text-decoration: none; transition: color .2s;
}
.pc-link:hover { color: var(--rust, #c94b2c); }

/* ── Controls ── */
.c-controls {
  max-width: calc(var(--w, 1240px) + clamp(40px,8vw,112px));
  margin: 18px auto 0; padding: 0 clamp(20px,4vw,56px);
  display: flex; align-items: center; justify-content: space-between;
}
.c-arrows { display: flex; gap: 8px; }
.c-btn {
  width: 44px; height: 44px; border: 1px solid #1a2530; background: none;
  color: var(--text-dim, #5a7080); font-size: 18px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.c-btn:hover { border-color: var(--rust, #c94b2c); color: var(--rust, #c94b2c); }
.c-btn:disabled { opacity: .2; cursor: default; pointer-events: none; }
.c-bar { flex: 1; max-width: 300px; height: 2px; background: #1a2530; margin: 0 22px; overflow: hidden; }
.c-bar-fill { height: 100%; background: var(--rust, #c94b2c); transition: width .3s ease; width: 0%; }
.c-count {
  font-family: 'Bebas Neue', sans-serif; font-size: 15px;
  letter-spacing: 2px; color: var(--text-dim, #5a7080); white-space: nowrap;
}
.c-count b { color: #fff; font-weight: 400; }
@media (max-width: 560px) { .c-bar { max-width: 70px; margin: 0 10px; } }