/* ─────────────────────────────────────────────────────────────────────────────
   CASE STUDY ARCHITECTURE & WALKTHROUGH STYLES
   Minimalist Monochrome Layouts for Deep Dive Case Studies
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Case Study Hero ── */
    .cs-hero {
      padding-top: 3.5rem;
      padding-bottom: 2rem;
    }
    .cs-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      font-size: 0.6875rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: hsl(var(--muted-foreground));
      background: hsl(var(--muted));
      border: 1px solid hsl(var(--border));
      border-radius: 9999px;
      padding: 0.25rem 0.625rem;
      margin-bottom: 1.25rem;
    }
    .cs-title {
      font-size: clamp(2rem, 4.5vw, 3rem);
      font-weight: 800;
      letter-spacing: -0.035em;
      line-height: 1.15;
      margin-bottom: 1rem;
      color: hsl(var(--foreground));
    }
    .cs-lead {
      font-size: 1.125rem;
      color: hsl(var(--muted-foreground));
      line-height: 1.6;
      max-width: 48rem;
      margin-bottom: 2.5rem;
    }

    /* ── Ren Lenon Style: Overview 3-Column Info Cards ── */
    .cs-overview-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.25rem;
      margin-bottom: 3.5rem;
    }
    @media (min-width: 768px) {
      .cs-overview-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }
    .cs-overview-card {
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      padding: 1.25rem 1.5rem;
      background: hsl(var(--card));
    }
    .cs-overview-card h3 {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: hsl(var(--muted-foreground));
      margin-bottom: 0.875rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid hsl(var(--border));
    }
    .cs-meta-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      font-size: 0.875rem;
    }
    .cs-meta-list li {
      display: flex;
      flex-direction: column;
    }
    .cs-meta-label {
      font-size: 0.6875rem;
      color: hsl(var(--muted-foreground));
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .cs-meta-value {
      font-weight: 600;
      color: hsl(var(--foreground));
    }

    .cs-feature-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 0.375rem;
    }
    .cs-feature-pill {
      font-size: 0.75rem;
      font-weight: 500;
      background: hsl(var(--muted));
      border: 1px solid hsl(var(--border));
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
      color: hsl(var(--foreground));
    }

    /* Single Vertical Stack List with Official SVGs */
    .cs-stack-vertical {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .cs-stack-item {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      font-size: 0.8125rem;
    }
    .cs-stack-icon {
      width: 1.5rem;
      height: 1.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .cs-stack-icon svg, .cs-stack-icon i {
      width: 1.25rem;
      height: 1.25rem;
      font-size: 1.15rem;
      display: block;
    }
    .cs-stack-name {
      font-weight: 600;
      color: hsl(var(--foreground));
    }
    .cs-stack-role {
      font-size: 0.6875rem;
      color: hsl(var(--muted-foreground));
      margin-left: auto;
    }

    hr.section-sep {
      border: none;
      height: 1px;
      background: hsl(var(--border));
      margin-block: 3.5rem;
    }

    /* ── Ren Lenon Style: Separate Section Walkthroughs ── */
    .cs-walkthrough-section {
      margin-bottom: 4rem;
    }
    .cs-section-header {
      margin-bottom: 1.25rem;
    }
    .cs-section-title {
      font-size: 1.5rem;
      font-weight: 700;
      letter-spacing: -0.025em;
      color: hsl(var(--foreground));
      margin-bottom: 0.375rem;
    }
    .cs-section-lead {
      font-size: 0.9375rem;
      color: hsl(var(--muted-foreground));
      line-height: 1.6;
    }

    /* Single Screenshot Container */
    .cs-screenshot-wrap {
      margin-top: 1.25rem;
      margin-bottom: 1.5rem;
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      overflow: hidden;
      background: hsl(240 5% 96%);
      box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.03);
      position: relative;
      cursor: zoom-in;
    }
    .cs-screenshot-wrap img {
      width: 100%;
      height: auto;
      display: block;
      transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .cs-screenshot-wrap:hover img {
      transform: scale(1.01);
    }
    .cs-zoom-indicator {
      position: absolute;
      bottom: 0.75rem;
      right: 0.75rem;
      background: hsl(var(--foreground) / 0.75);
      color: hsl(var(--primary-foreground));
      font-size: 0.6875rem;
      font-weight: 600;
      padding: 0.25rem 0.625rem;
      border-radius: 9999px;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      gap: 0.375rem;
      opacity: 0.85;
      transition: opacity 150ms ease;
    }
    .cs-screenshot-wrap:hover .cs-zoom-indicator {
      opacity: 1;
    }

    /* ── Interactive Multi-Slide Image Component ── */
    .cs-slider-container {
      margin-top: 1.25rem;
      margin-bottom: 1.5rem;
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      overflow: hidden;
      background: hsl(240 5% 96%);
      box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.03);
    }
    .cs-slider-main {
      position: relative;
      background: #0f1117;
      cursor: zoom-in;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 22rem;
      max-height: 34rem;
      overflow: hidden;
    }
    .cs-slider-main img {
      max-width: 100%;
      max-height: 34rem;
      width: 100%;
      height: auto;
      object-fit: contain;
      display: block;
      transition: opacity 220ms ease;
    }
    .cs-slider-main img.fade-out {
      opacity: 0;
    }
    .cs-slider-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 10;
      width: 2.75rem;
      height: 2.75rem;
      border-radius: 9999px;
      background: hsl(var(--background) / 0.9);
      color: hsl(var(--foreground));
      border: 1px solid hsl(var(--border));
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.875rem;
      box-shadow: 0 4px 14px rgba(0,0,0,0.18);
      transition: background 150ms ease, transform 150ms ease, color 150ms ease;
    }
    .cs-slider-btn:hover {
      background: hsl(var(--foreground));
      color: hsl(var(--primary-foreground));
      transform: translateY(-50%) scale(1.06);
    }
    .cs-slider-btn.prev { left: 1rem; }
    .cs-slider-btn.next { right: 1rem; }

    .cs-slider-topbar {
      position: absolute;
      top: 0.875rem;
      left: 0.875rem;
      right: 0.875rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
      z-index: 10;
    }
    .cs-slider-badge {
      background: hsl(var(--foreground) / 0.85);
      color: hsl(var(--primary-foreground));
      font-size: 0.6875rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 0.25rem 0.625rem;
      border-radius: 9999px;
      backdrop-filter: blur(4px);
    }
    .cs-slider-counter {
      background: hsl(var(--foreground) / 0.85);
      color: hsl(var(--primary-foreground));
      font-size: 0.6875rem;
      font-weight: 600;
      padding: 0.25rem 0.625rem;
      border-radius: 9999px;
      backdrop-filter: blur(4px);
    }

    .cs-slider-controls {
      background: hsl(var(--card));
      border-top: 1px solid hsl(var(--border));
      padding: 0.875rem 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.625rem;
    }
    .cs-slider-caption-text {
      font-size: 0.875rem;
      font-weight: 600;
      color: hsl(var(--foreground));
      text-align: center;
    }
    .cs-slider-thumbs-strip {
      display: flex;
      gap: 0.5rem;
      overflow-x: auto;
      justify-content: center;
      padding-bottom: 0.25rem;
    }
    .cs-slider-thumb-btn {
      width: 4.75rem;
      height: 2.75rem;
      border-radius: 6px;
      overflow: hidden;
      border: 2px solid transparent;
      opacity: 0.55;
      cursor: pointer;
      flex-shrink: 0;
      background: #000;
      padding: 0;
      transition: opacity 150ms ease, border-color 150ms ease, transform 150ms ease;
    }
    .cs-slider-thumb-btn img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .cs-slider-thumb-btn.active {
      border-color: hsl(var(--foreground));
      opacity: 1;
      transform: scale(1.05);
    }

    /* Structured Bullet List with Bold Labels (like Ren Lenon's PawsitiveCare) */
    .cs-bullets-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1rem;
    }
    .cs-bullets-list li {
      position: relative;
      padding-left: 1.25rem;
      font-size: 0.9375rem;
      color: hsl(var(--muted-foreground));
      line-height: 1.65;
    }
    .cs-bullets-list li::before {
      content: "•";
      position: absolute;
      left: 0.25rem;
      color: hsl(var(--foreground));
      font-weight: 700;
    }
    .cs-bullets-list li strong {
      color: hsl(var(--foreground));
      font-weight: 600;
    }

    /* ── Deep Dive Sections: Core Features, Database, Limitations ── */
    .cs-deepdive-block {
      margin-bottom: 3.5rem;
    }
    .cs-deepdive-title {
      font-size: 1.25rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: hsl(var(--foreground));
      margin-bottom: 1rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid hsl(var(--border));
    }
    .cs-deepdive-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }
    @media (min-width: 640px) {
      .cs-deepdive-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    .cs-feature-card {
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      padding: 1.25rem;
      background: hsl(var(--card));
    }
    .cs-feature-card h4 {
      font-size: 0.9375rem;
      font-weight: 700;
      color: hsl(var(--foreground));
      margin-bottom: 0.375rem;
    }
    .cs-feature-card p {
      font-size: 0.875rem;
      color: hsl(var(--muted-foreground));
      line-height: 1.55;
    }

    /* Database Table */
    .cs-table-wrap {
      overflow-x: auto;
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      margin-top: 1rem;
    }
    .cs-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
      font-size: 0.875rem;
    }
    .cs-table th, .cs-table td {
      padding: 0.75rem 1rem;
      border-bottom: 1px solid hsl(var(--border));
    }
    .cs-table th {
      background: hsl(var(--muted));
      font-weight: 600;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: hsl(var(--foreground));
    }
    .cs-table tr:last-child td {
      border-bottom: none;
    }
    .cs-table code {
      font-family: ui-monospace, SFMono-Regular, monospace;
      font-size: 0.8125rem;
      background: hsl(var(--muted));
      padding: 0.15rem 0.35rem;
      border-radius: 4px;
      font-weight: 600;
      color: hsl(var(--foreground));
    }

    /* ── Project Impact & Call to Action ── */
    .cs-impact-box {
      border: 1px solid hsl(var(--border));
      border-radius: var(--radius);
      padding: 2rem;
      background: hsl(var(--muted) / 0.5);
      margin-top: 2rem;
      margin-bottom: 3.5rem;
    }
    .cs-impact-box h3 {
      font-size: 1.125rem;
      font-weight: 700;
      margin-bottom: 0.75rem;
      color: hsl(var(--foreground));
    }
    .cs-impact-box p {
      font-size: 0.9375rem;
      color: hsl(var(--muted-foreground));
      line-height: 1.7;
    }
