
  /* ── Scoped variables ── */
  .ws-portfolio {
    --ws-bg: #0a0a0f;
    --ws-surface: #111118;
    --ws-surface-elevated: #18182280;
    --ws-text: #f0eef5;
    --ws-text-muted: #8a879a;
    --ws-purple: #442764;
    --ws-purple-light: #6b3fa0;
    --ws-coral: #EE5946;
    --ws-coral-glow: #ff6f5c;
    --ws-accent-ghost: rgba(238,89,70,.12);
    --ws-radius: 20px;
    --ws-radius-lg: 28px;
    --ws-shadow: 0 14px 36px rgba(0,0,0,.35);
  }

  /* ── Section wrapper — breaks out of any parent container ── */
  .ws-portfolio {
    position: relative;
    background: var(--ws-bg);
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--ws-text);
    /* Full-width breakout */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none !important;
  }

  /* ── WebGL Canvas (scoped to section) ── */
  .ws-portfolio #wsGlCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: .45;
  }

  /* ── Container ── */
  .ws-portfolio .ws-container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 80px 32px 120px;
  }

  /* ── Header ── */
  .ws-portfolio .ws-header {
    display: flex;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 56px;
    flex-wrap: wrap;
  }

  .ws-portfolio .ws-label {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ws-coral);
    margin-bottom: 8px;
    display: block;
    opacity: 0;
  }

  .ws-portfolio .ws-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(52px, 8vw, 96px);
    line-height: .92;
    color: var(--ws-text);
    letter-spacing: -2px;
    opacity: 0;
    margin: 0;
    padding: 0;
  }

  .ws-portfolio .ws-title span {
    display: inline-block;
    background: linear-gradient(135deg, var(--ws-coral) 0%, var(--ws-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ── Filter Tabs ── */
  .ws-portfolio .ws-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: var(--ws-surface-elevated);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 999px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    opacity: 0;
    flex-shrink: 0;
  }
  .ws-portfolio .ws-filter-bar::-webkit-scrollbar { display: none; }

  .ws-portfolio .ws-indicator {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ws-coral) 0%, #d94535 100%);
    box-shadow: 0 4px 20px rgba(238,89,70,.4);
    z-index: 0;
    transition: none;
    pointer-events: none;
  }

  .ws-portfolio .ws-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ws-text-muted);
    padding: 14px 24px;
    border-radius: 999px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    transition: color .3s ease;
    user-select: none;
    flex-shrink: 0;
  }
  .ws-portfolio .ws-tab:hover { color: var(--ws-text); }
  .ws-portfolio .ws-tab.active { color: #fff; }

  /* ── Counter Badge ── */
  .ws-portfolio .ws-counter {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--ws-text-muted);
    margin-left: auto;
    padding-right: 8px;
    white-space: nowrap;
    opacity: 0;
  }
  .ws-portfolio .ws-counter strong {
    color: var(--ws-coral);
    font-size: 22px;
    vertical-align: -2px;
  }

  /* ── Grid ── */
  .ws-portfolio .ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    perspective: 1200px;
  }

  /* ── Card ── */
  .ws-portfolio .ws-card {
    position: relative;
    border-radius: var(--ws-radius);
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform, opacity;
  }

  .ws-portfolio .ws-card .card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--ws-radius);
    background: var(--ws-surface);
    border: 1px solid rgba(255,255,255,.04);
  }

  .ws-portfolio .ws-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.19,1,.22,1);
  }

  .ws-portfolio .ws-card:hover img {
    transform: scale(1.08);
  }

  /* Card overlay */
  .ws-portfolio .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10,10,15,.85) 100%);
    opacity: 0;
    transition: opacity .4s ease;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    border-radius: var(--ws-radius);
  }
  .ws-portfolio .ws-card:hover .card-overlay { opacity: 1; }

  .ws-portfolio .card-overlay .overlay-label {
    font-family: 'Syne', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ws-coral);
  }

  /* Card shine effect */
  .ws-portfolio .card-shine {
    position: absolute;
    inset: 0;
    border-radius: var(--ws-radius);
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255,255,255,.08) 0%, transparent 60%);
  }
  .ws-portfolio .ws-card:hover .card-shine { opacity: 1; }

  /* ── Hidden state ── */
  .ws-portfolio .ws-card[data-hidden="true"] { display: none; }

  /* ── Responsive ── */
  @media (max-width: 1280px) {
    .ws-portfolio .ws-grid { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 992px) {
    .ws-portfolio .ws-grid { grid-template-columns: repeat(2, 1fr); }
    .ws-portfolio .ws-header { gap: 24px; }
    .ws-portfolio .ws-tab { padding: 12px 18px; font-size: 14px; }
  }
  @media (max-width: 600px) {
    .ws-portfolio .ws-container { padding: 40px 16px 64px; }
    .ws-portfolio .ws-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;
      margin-bottom: 32px;
    }
    /* Filter bar stays visible — scrolls horizontally */
    .ws-portfolio .ws-filter-bar {
      width: 100%;
      flex-shrink: 0;
    }
    .ws-portfolio .ws-tab { padding: 11px 16px; font-size: 13px; }
    .ws-portfolio .ws-counter { display: none; }
    .ws-portfolio .ws-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ws-portfolio .ws-card .card-inner { aspect-ratio: 1 / 1; }
  }
  @media (max-width: 400px) {
    .ws-portfolio .ws-grid { grid-template-columns: 1fr; gap: 14px; }
    .ws-portfolio .ws-card .card-inner { aspect-ratio: 4 / 3; }
  }
