/* === Our Work Page - Complete Redesign === */
/* Immersive Project Gallery Theme */

:root {
  --work-bg: #0a0a0a;
  --work-surface: #141414;
  --work-card: #1a1a1a;
  --work-text: #f5f5f5;
  --work-muted: #8a8a8a;
  --work-accent: #D4AF37;
  --work-accent-soft: #E6C99A;
  --work-border: rgba(255, 255, 255, 0.08);
  --work-glass: rgba(20, 20, 20, 0.7);
  --work-radius: 16px;
  --work-radius-lg: 24px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* === Base Styles === */
body.normal-scroll {
  background: var(--work-bg) !important;
  color: var(--work-text);
  font-family: 'Manrope', 'Inter', sans-serif;
  overflow-x: hidden;
}

.work-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* === Noise Overlay === */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================
   HERO SECTION
   ========================================== */
.work-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 5% 80px;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(230, 201, 154, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--work-bg) 0%, #0d0d0d 100%);
  z-index: 0;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--work-accent);
  border-radius: 50%;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1200px;
  width: 100%;
}

/* Hero Title */
.hero-title-wrap {
  margin-bottom: 2rem;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.title-line {
  display: block;
  overflow: hidden;
  opacity: 0;
  transform: translateY(100%);
}

.title-accent {
  color: var(--work-accent);
  font-style: italic;
  font-weight: 400;
}

.title-underline {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--work-accent), transparent);
  margin: 1.5rem auto 0;
  opacity: 0;
  transform: scaleX(0);
}

/* Hero Tagline */
.hero-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--work-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
}

/* Filter Pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--work-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--work-border);
  border-radius: 50px;
  color: var(--work-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.filter-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--work-accent), var(--work-accent-soft));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.filter-pill:hover {
  color: var(--work-text);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.filter-pill.active {
  color: #000;
  border-color: var(--work-accent);
}

.filter-pill.active::before {
  opacity: 1;
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-pill.active .pill-count {
  background: rgba(0, 0, 0, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, var(--work-accent) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--work-accent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateY(-100%); opacity: 0; }
  50% { transform: translateY(150%); opacity: 1; }
}

.scroll-text {
  font-size: 0.7rem;
  color: var(--work-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects-section {
  position: relative;
  padding: 4rem 5% 8rem;
  background: var(--work-bg);
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  grid-auto-flow: dense;
}

/* Project Card Base */
.project-card {
  position: relative;
  background: var(--work-card);
  border-radius: var(--work-radius-lg);
  overflow: hidden;
  border: 1px solid var(--work-border);
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s ease;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 175, 55, 0.1);
}

/* Bento Grid Sizes */
.project-card.size-large {
  grid-column: span 8;
  grid-row: span 2;
}

.project-card.size-medium {
  grid-column: span 6;
  grid-row: span 1;
}

.project-card.size-small {
  grid-column: span 4;
  grid-row: span 1;
}

.project-card.size-wide {
  grid-column: span 8;
  grid-row: span 1;
}

.project-card.size-tall {
  grid-column: span 4;
  grid-row: span 2;
}

/* Card Image */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
}

.project-card.size-large .card-image-wrap,
.project-card.size-tall .card-image-wrap {
  min-height: 450px;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
  filter: brightness(0.85) saturate(0.9);
}

.project-card:hover .card-image {
  transform: scale(1.08);
  filter: brightness(1) saturate(1);
}

/* Card Overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0.2) 70%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: background 0.5s ease;
}

.project-card:hover .card-overlay {
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.98) 0%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0.3) 80%,
    transparent 100%
  );
}

/* Card Content */
.card-category {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--work-accent);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s var(--ease-out-expo);
}

.project-card:hover .card-category {
  opacity: 1;
  transform: translateY(0);
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  color: var(--work-text);
  margin: 0 0 0.75rem 0;
  line-height: 1.1;
  transform: translateY(10px);
  transition: transform 0.5s var(--ease-out-expo);
}

.project-card:hover .card-title {
  transform: translateY(0);
}

.card-description {
  font-size: 0.9rem;
  color: var(--work-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s var(--ease-out-expo);
}

.project-card:hover .card-description {
  max-height: 100px;
  opacity: 1;
}

/* Tech Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.5s var(--ease-out-expo) 0.1s;
}

.project-card:hover .card-tags {
  opacity: 1;
  transform: translateY(0);
}

.card-tag {
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.7rem;
  color: #bbb;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Card Link */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--work-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.5s var(--ease-out-expo) 0.15s;
}

.project-card:hover .card-link {
  opacity: 1;
  transform: translateY(0);
}

.card-link i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.card-link:hover {
  color: var(--work-accent);
}

.card-link:hover i {
  transform: translateX(4px);
}

/* Empty State */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  background: var(--work-surface);
  border-radius: var(--work-radius-lg);
  border: 1px dashed var(--work-border);
}

.empty-state.visible {
  display: flex;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--work-text);
  margin: 0 0 0.5rem;
}

.empty-state p {
  color: var(--work-muted);
  font-size: 0.9rem;
}

/* ==========================================
   CTA SECTION
   ========================================== */
.work-cta {
  padding: 8rem 5%;
  background: linear-gradient(180deg, var(--work-bg) 0%, #0d0d0d 100%);
  position: relative;
}

.work-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--work-border), transparent);
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--work-text);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.cta-text {
  font-size: 1rem;
  color: var(--work-muted);
  margin-bottom: 2.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--work-accent) 0%, var(--work-accent-soft) 100%);
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all 0.4s var(--ease-out-expo);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

.cta-btn i {
  transition: transform 0.3s ease;
}

.cta-btn:hover i {
  transform: translateX(4px);
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .project-card.size-large {
    grid-column: span 6;
  }
  
  .project-card.size-medium,
  .project-card.size-wide {
    grid-column: span 6;
  }
  
  .project-card.size-small,
  .project-card.size-tall {
    grid-column: span 3;
  }
  
  .card-image-wrap {
    min-height: 220px;
  }
  
  .project-card.size-large .card-image-wrap,
  .project-card.size-tall .card-image-wrap {
    min-height: 350px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .work-hero {
    min-height: auto;
    padding: 140px 5% 60px;
  }
  
  .hero-title {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  
  .filter-pills {
    gap: 0.5rem;
  }
  
  .filter-pill {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
  
  .pill-count {
    min-width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .project-card.size-large,
  .project-card.size-medium,
  .project-card.size-small,
  .project-card.size-wide,
  .project-card.size-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .card-image-wrap,
  .project-card.size-large .card-image-wrap,
  .project-card.size-tall .card-image-wrap {
    min-height: 280px;
  }
  
  .card-overlay {
    padding: 1.5rem;
  }
  
  /* Show content by default on mobile */
  .card-category,
  .card-tags,
  .card-link {
    opacity: 1;
    transform: translateY(0);
  }
  
  .card-description {
    max-height: 80px;
    opacity: 1;
  }
  
  .projects-section {
    padding: 2rem 4% 4rem;
  }
  
  .work-cta {
    padding: 4rem 5%;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.5rem, 18vw, 4rem);
  }
  
  .hero-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
  }
  
  .filter-pills {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-pill {
    justify-content: space-between;
  }
  
  .card-title {
    font-size: 1.5rem;
  }
  
  .card-overlay {
    padding: 1.25rem;
  }
}

/* ==========================================
   ANIMATION UTILITIES
   ========================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-fade {
  opacity: 0;
}

.stagger-item {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}