/* ===== PORTFOLIO PAGE CSS ===== */

.portfolio-header {
  padding: calc(var(--nav-h) + 5rem) 0 5rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.pf-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0,255,180,0.07), transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(60px);
  pointer-events: none;
}

.portfolio-header h1 { margin: 0.5rem 0 1.25rem; }

/* FILTER */
.filter-section {
  padding: 2.5rem 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* PROJECTS */
.projects-section {
  padding: 6rem 0;
  background: var(--bg2);
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  padding: 3rem;
  transition: border-color 0.3s, transform 0.3s;
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.project-card:nth-child(even) {
  direction: rtl;
}
.project-card:nth-child(even) > * { direction: ltr; }

.project-card:hover { border-color: rgba(0,255,180,0.2); transform: translateY(-4px); }

/* MOCKUP */
.pc-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.pc-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.pc-mockup {
  position: relative;
  z-index: 1;
  width: 160px;
}

.pc-mockup-wide { width: 240px; }

.pm-screen {
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Block Shift screen */
.bs-screen {
  background: #0d1520;
  padding: 20px;
  aspect-ratio: 9/16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
  width: 100%;
  aspect-ratio: 1;
}

.bs-block {
  border-radius: 4px;
}

.b1 { background: #00ffb4; grid-column: 1/3; grid-row: 2; animation: slideBlock 3s ease-in-out infinite; }
.b2 { background: #5a7fff; grid-column: 3; grid-row: 1/4; }
.b3 { background: #ff6060; grid-column: 4/6; grid-row: 3; }
.b3.target { box-shadow: 0 0 10px rgba(255,96,96,0.6); }

@keyframes slideBlock {
  0%, 40% { grid-column: 1/3; }
  60%, 100% { transform: translateX(8px); }
}

/* NumChain screen */
.nc-screen {
  background: #1a0d0a;
  padding: 15px;
  aspect-ratio: 9/16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.nc-tile {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}

.t1, .t3 { background: #c06020; }
.t2, .t4 { background: #8060c0; }
.t5, .t6 { background: #20a0c0; }
.t7, .t8 { background: #c0a020; }
.t9 { background: #a02060; }

/* Chromatic Rush screen */
.cr-screen {
  background: #050510;
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.cr-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.cr-lane { height: 100%; }

.cr-ball {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ff6090);
  box-shadow: 0 0 20px #ff6090;
  animation: bounceBall 1.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes bounceBall {
  0%, 100% { bottom: 20%; }
  50% { bottom: 30%; }
}

/* DELUIT LOUIS screen */
.dl-screen {
  background: #1a1608;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.dl-nav {
  height: 12%;
  background: rgba(180,150,80,0.15);
  border-bottom: 1px solid rgba(180,150,80,0.2);
}

.dl-hero {
  height: 88%;
  background: linear-gradient(135deg, #1a1608, #2a2010);
  display: flex;
  align-items: center;
  padding: 15px;
}

.dl-h-text { display: flex; flex-direction: column; gap: 6px; }
.dl-h1 { width: 80px; height: 6px; background: #c9a84c; border-radius: 3px; }
.dl-h2 { width: 55px; height: 4px; background: rgba(201,168,76,0.4); border-radius: 2px; }
.dl-btn { width: 40px; height: 12px; background: #c9a84c; border-radius: 2px; margin-top: 4px; }

/* PROJECT INFO */
.pc-info { }

.pc-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pc-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(0,255,180,0.3);
  border-radius: 4px;
  color: var(--accent);
  background: rgba(0,255,180,0.06);
  letter-spacing: 0.08em;
}

.pc-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.pc-info h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.pc-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.pc-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pc-tech span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.pc-highlights {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pch {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(0,255,180,0.15);
  border-radius: 6px;
  color: var(--text-muted);
  background: rgba(0,255,180,0.04);
}

/* hidden card */
.project-card.hidden {
  display: none;
}

/* CTA */
.cta-section { padding: 8rem 0; background: var(--bg); position: relative; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; }
.cta-bg svg { width: 100%; height: 100%; }
.cta-content { position: relative; z-index: 1; text-align: center; }
.cta-content h2 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
.cta-content p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2.5rem; }

@media (max-width: 900px) {
  .project-card { grid-template-columns: 1fr; direction: ltr !important; }
  .project-card:nth-child(even) { direction: ltr; }
  .pc-visual { min-height: 200px; }
}
