/* ==========================================================================
   UX Portfolio Work Landing Page Architecture
   Staggered Stacking Engine: Right-Aligned Visual Blocks
   ========================================================================== */

/* --- 1. Global Header Override & Base Structure --- */
.main-header {
  background-color: rgba(14, 114, 180, 1);
  border-bottom: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.work-landing {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding-top: clamp(6rem, 5rem + 3vw, 12rem);
  padding-bottom: clamp(4rem, 3rem + 3vw, 10rem);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.work-hero-header {
  margin-bottom: 3rem;
}

.work-hero-header h1 {
  line-height: .95;
  margin-bottom: 1rem;
}

/* --- 2. Portfolio Flex-Stacked Distribution Layer --- */
.portfolio-matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; /* Tight, premium spacing matching your screenshot style */
  width: 100%;
}

/* --- 3. Structural Card Formats with Right-Aligned Images --- */
.portfolio-work-card {
  display: grid;
  /* Visual asset takes up a fixed compact window on the right side */
  grid-template-columns: 1fr 430px; 
  gap: 6rem;
  align-items: center;
  background-color: rgba(0, 50, 78, 0.04); 
  border-left: 4px solid #00324e; /* Clean accent indicator border on the left edge */ 
  padding: 1.75rem; 
  border-radius: 0 8px 8px 0; 
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), all 0.2s ease-in-out;
}

[data-theme="dark"] .portfolio-work-card { 
  background-color: rgba(255, 255, 255, 0.04); 
  border-left-color: #0F7BC2; 
} 

.portfolio-work-card:hover {
  border-left-color: var(--badge-label-accent-text);
}


/* --- 4. Micro-Layout Sub-Component Alignments --- */
/* Forces visual container window to move into the right-hand column slot */
.work-card-visual {
  grid-column: 2;
  position: relative;
  width: 100%;
  height: 100%; /* Constrained height prevents asset window bloat */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0; /* Clears bottom spacing since it sits in a row system */
  background-color: rgba(0, 50, 84, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Forces narrative text layer to move into the left-hand column slot */
.work-card-body {
  grid-column: 1;
  grid-row: 1; /* Aligns parallel directly with the image element slot */
  display: flex;
  flex-direction: column;
  padding: 0;
}

.work-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
  opacity: .6;
}

.portfolio-work-card:hover .work-card-visual img {
  opacity: .9;
  transform: scale(1.03);
}

/* Card Context Tags & Badges matching screenshot geometry */
.card-status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  background-color: #0F7BC2;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
}

.work-card-meta {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06rem;
  color: #0A8049; /* High-contrast green brand indicator line matching image */
  margin-bottom: 0.75rem;
}

.work-card-body h2 {
  font-size: 1.75rem;
  font-family: "Bebas Neue", sans-serif;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: .03rem;
}

.work-card-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555555;
  margin-bottom: 1.5rem;
}

/* Meta UX Technology Pill Array */
.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
}

.work-card-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  background-color: rgba(0, 50, 78, 0.04);
  color: #00324e;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid rgba(0, 50, 78, 0.06);
}

.work-card-actions {
  margin-top: auto;
}

.work-card-actions .btn {
  width: 100%;
  max-width: 320px; /* Limits anchor action button width to maintain layout weight */
  padding: 10px 5px;
  font-size: clamp(.8rem, 5vw, 1.25rem);
}

/* ==========================================================================
   Dark Mode System Configuration Matchups
   ========================================================================== */
[data-theme="dark"] .work-card-visual {
  background-color: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .card-status-badge {
  background-color: #0A8049;
}

[data-theme="dark"] .work-card-meta {
  color: #0d94e2; /* Maps neatly to active link colors in your dark profiles */
}

[data-theme="dark"] .work-card-desc {
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .work-card-tags span {
  background-color: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Responsive Viewport Interventions (Graceful degradation to single stack)
   ========================================================================== */
@media (max-width: 1024px) {
  .portfolio-work-card {
    grid-template-columns: 1fr; /* Drops track to single stream for mobile viewports */
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .work-card-visual {
    grid-column: 1;
    grid-row: 1; /* Pushes image to the top of card block configuration */
    height: 220px;
  }

  .work-card-body {
    grid-column: 1;
    grid-row: 2; /* Pushes descriptive information safely below image */
  }

  .work-card-actions .btn {
    max-width: 100%; /* Spans full button width on handheld breakpoints */
  }

  .work-hero-header {
    margin-bottom: 3.5rem;
    text-align: left;
  }
}
