/* ===================== PROJECTS PREMIUM SHINY GLASS CSS ===================== */
:root {
  --glass-surface: linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.05) 100%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.25);
  --btn-glow: rgba(255, 255, 255, 0.5);
}

.projects-wrap {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background: #000;
  font-family: 'Outfit', sans-serif;
}

/* Typography Centering */
.projects-title {
  text-align: center;
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 5px;
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff, #777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
}

.projects-tagline {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 80px;
}

/* --- DECK CONTAINER --- */
.projects-cards {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: clamp(520px, 75vh, 680px);
  margin: 0 auto;
  perspective: 2000px;
}

.p-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(100% - 24px); 
  max-width: 820px;
  height: 100%;
  /* FORCES 20px GAP on Left, Right, Bottom sides for photo */
  padding: 25px 20px 20px; 
  border-radius: 40px;
  background: var(--glass-surface);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: all 0.9s cubic-bezier(0.2, 1, 0.3, 1);
  /* Added internal shine/glow */
  box-shadow: 
    0 40px 100px rgba(0,0,0,0.7),
    inset 0 0 30px rgba(255,255,255,0.05);
}

/* Top Shine Reflection Overlay */
.p-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(80% 40% at 50% 0%, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

/* CENTERED INFO SECTION */
.p-card-info {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}
.p-card-head { 
  font-weight: 300; 
  font-size: 2.2rem; 
  letter-spacing: 3px; 
  margin-bottom: 12px;
  color: #fff;
}
.p-card-sub { 
  font-weight: 300; 
  color: rgba(255,255,255,0.7); 
  font-size: 1rem; 
  line-height: 1.6;
  max-width: 85%;
  margin: 0 auto;
}

/* --- IMAGE CONTAINER --- */
.p-imgbox {
  position: relative;
  width: 100%;
  flex-grow: 1; /* Fills card to bottom */
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: #050505;
}
.p-img-link { display: block; width: 100%; height: 100%; }
.p-imgbox img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }

/* --- GLOWING ANALYZE BUTTON --- */
.p-btn-analyze {
  position: absolute;
  right: 20px; /* Corner alignment */
  bottom: 20px;
  padding: 12px 28px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 5;
  animation: glowPulse 2.5s infinite ease-in-out;
  transition: all 0.3s ease;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 5px rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 25px var(--btn-glow); border-color: rgba(255,255,255,0.9); }
  100% { box-shadow: 0 0 5px rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
}

.p-btn-analyze:hover {
  background: #fff;
  color: #000;
  animation: none; /* Stops pulse on hover for clarity */
  box-shadow: 0 0 30px #fff;
}

/* --- SPREAD LAYOUT (DESKTOP) --- */
.p-card[data-role="front"] { z-index: 10; opacity: 1; transform: translateX(-50%) scale(1); }
.p-card[data-role="right"] { z-index: 5; opacity: 0.45; transform: translateX(5%) scale(0.85) rotateY(-15deg); filter: blur(3px); }
.p-card[data-role="left"] { z-index: 5; opacity: 0.45; transform: translateX(-105%) scale(0.85) rotateY(15deg); filter: blur(3px); }

/* --- MOBILE SAFETY --- */
@media (max-width: 900px) {
  .p-card[data-role="right"] { transform: translateX(-35%) scale(0.9) rotateY(-10deg); }
  .p-card[data-role="left"] { transform: translateX(-65%) scale(0.9) rotateY(10deg); }
}

@media (max-width: 480px) {
  .projects-cards { height: 520px; }
  .p-card { padding: 15px; }
  .p-card[data-role="right"] { transform: translateX(-43%) scale(0.9); opacity: 0.3; }
  .p-card[data-role="left"] { transform: translateX(-57%) scale(0.9); opacity: 0.3; }
}