:root {
    --bg: #f8f8f8;
    --bg-alt: #ffffff;
    --text: #111111;
    --muted: #666666;
    --accent: #982C10;
    --border: #e0e0e0;
  
    --radius-s: 8px;
    --radius-m: 14px;
    --radius-pill: 999px;
  
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.08);
    --max-width: 1100px;
  }
  
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
  }
  
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; display: block; }
  
  /* page shell */
  .page-shell {
    min-height: 100vh;
    padding: 1.5rem;
  }
  @media (min-width: 768px) {
    .page-shell { padding: 2.5rem; }
  }
  .page-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
  }
  
  /* top back link */
  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.85);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .back-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  }
  
  /* main container card */
  .case-study {
    background: var(--bg-alt);
    border-radius: 22px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: var(--shadow-soft);
    padding: 2rem 1.5rem 2.5rem;
  }
  @media (min-width: 768px) {
    .case-study { padding: 2.5rem 2.5rem 3rem; }
  }
  
  .case-hero {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
  }
  
  .case-title {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 0.75rem;
    font-weight: 650;
  }
  
  .subtitle {
    font-size: 0.98rem;
    color: var(--muted);
    margin: 0 0 1.25rem;
    max-width: 80ch;
  }
  
  .case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
  }
  .case-meta-label {
    font-weight: 600;
    color: var(--text);
  }
  
  .case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
  }
  .case-tag {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(152, 44, 16, 0.08);
  }
  
  /* grid */
  .case-grid {
    display: grid;
    gap: 1.75rem;
  }
  @media (min-width: 960px) {
    .case-grid {
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
      gap: 2.25rem;
    }
  }
  
  .case-section { margin-bottom: 1.5rem; }
  .case-section:last-child { margin-bottom: 0; }
  
  .case-section h2 {
    font-size: 1.1rem;
    margin: 0 0 0.6rem;
  }
  .case-section p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
  }
  .case-section ul {
    margin: 0.25rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.95rem;
    color: var(--muted);
  }
  .case-section li + li { margin-top: 0.25rem; }
  
  /* callout */
  .callout {
    border-radius: var(--radius-m);
    background: #fafafa;
    border: 1px solid var(--border);
    padding: 1rem 1.1rem;
    font-size: 0.92rem;
    margin-top: 0.75rem;
  }
  .callout strong { font-weight: 700; }
  .callout-list { margin: 0.4rem 0 0; padding-left: 1.15rem; }
  
  /* image panels (for your wireframes / task flow / final UI) */
  .image-panel {
    border-radius: var(--radius-m);
    background: #fafafa;
    border: 1px solid var(--border);
    padding: 1rem;
  }
  .image-panel img {
    border-radius: var(--radius-s);
    border: 1px solid rgba(0,0,0,0.10);
  }
  .caption {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
  }

  /* Floating back-to-projects button */
.floating-back {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 100;
  }
  
  /* Reuse your existing back-link styling */
  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: all 0.18s ease;
  }
  
  .back-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  }
  
  
  
  /* footer line */
  .case-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
  }

