/* ============================================================
       GALLERY PAGE STYLES
       ============================================================ */

    .gallery-hero {
      padding-top: calc(80px + var(--space-16));
      padding-bottom: var(--space-12);
      background:
        radial-gradient(ellipse 70% 50% at 50% 20%, rgba(0,212,255,0.06) 0%, transparent 70%),
        var(--color-bg);
    }

    .gallery-hero .section-title {
      margin-bottom: var(--space-3);
    }

    .gallery-count {
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--color-text-faint);
      margin-top: var(--space-4);
    }

    .gallery-count span {
      color: var(--color-primary);
    }

    /* Grid */
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-4);
      padding-bottom: var(--space-20);
    }

    @media (max-width: 900px) {
      .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 500px) {
      .gallery-grid { grid-template-columns: 1fr; }
    }

    /* Gallery item */
    .gallery-item {
      position: relative;
      border-radius: var(--radius-xl);
      overflow: hidden;
      background: var(--color-surface);
      border: 1px solid var(--color-divider);
      cursor: pointer;
      transition: border-color 0.3s var(--ease-out),
                  transform 0.3s var(--ease-out),
                  box-shadow 0.3s var(--ease-out);
    }

    .gallery-item:hover {
      border-color: var(--color-primary);
      transform: translateY(-4px);
      box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-cyan);
    }

    .gallery-item-img-wrap {
      position: relative;
      width: 100%;
      aspect-ratio: 4 / 3;
      overflow: hidden;
    }

    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s var(--ease-out);
    }

    .gallery-item:hover img {
      transform: scale(1.05);
    }

    /* Thermal badge for thermal images */
    .gallery-thermal-badge {
      position: absolute;
      top: var(--space-3);
      right: var(--space-3);
      padding: 3px var(--space-3);
      background: rgba(255, 107, 53, 0.9);
      color: white;
      font-family: var(--font-mono);
      font-size: 9px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      border-radius: var(--radius-full);
      z-index: 2;
    }

    /* Image overlay on hover */
    .gallery-item-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(0deg, rgba(8,12,18,0.85) 0%, rgba(8,12,18,0.1) 50%, transparent 100%);
      opacity: 0;
      transition: opacity 0.3s var(--ease-out);
      display: flex;
      align-items: flex-end;
      padding: var(--space-5);
      z-index: 1;
    }

    .gallery-item:hover .gallery-item-overlay {
      opacity: 1;
    }

    .gallery-overlay-text {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--color-primary);
    }

    /* Gallery card body */
    .gallery-item-body {
      padding: var(--space-5);
    }

    .gallery-item-title {
      font-family: var(--font-display);
      font-size: var(--text-lg);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      color: var(--color-text);
      line-height: 1.2;
      margin-bottom: var(--space-2);
    }

    .gallery-item-desc {
      font-size: var(--text-sm);
      color: var(--color-text-muted);
      line-height: 1.6;
      margin-bottom: var(--space-3);
    }

    .gallery-item-meta {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-2);
    }

    .gallery-meta-tag {
      padding: 2px var(--space-3);
      background: var(--color-surface-offset, var(--color-surface-2));
      border: 1px solid var(--color-divider);
      border-radius: var(--radius-full);
      font-family: var(--font-mono);
      font-size: 9px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--color-text-faint);
    }

    .gallery-meta-tag--thermal {
      border-color: rgba(255, 107, 53, 0.3);
      color: var(--color-accent);
    }

    /* Lightbox */
    .lightbox {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(8, 12, 18, 0.95);
      backdrop-filter: blur(20px);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s var(--ease-out);
    }

    .lightbox.active {
      opacity: 1;
      pointer-events: auto;
    }

    .lightbox img {
      max-width: 90vw;
      max-height: 85vh;
      object-fit: contain;
      border-radius: var(--radius-lg);
      box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
      transform: scale(0.92);
      transition: transform 0.4s var(--ease-out);
    }

    .lightbox.active img {
      transform: scale(1);
    }

    .lightbox-close {
      position: absolute;
      top: var(--space-6);
      right: var(--space-6);
      width: 48px;
      height: 48px;
      background: var(--color-surface);
      border: 1px solid var(--color-divider);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-text);
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
      z-index: 1001;
    }

    .lightbox-close:hover {
      border-color: var(--color-primary);
      background: var(--color-surface-2);
    }

    .lightbox-caption {
      position: absolute;
      bottom: var(--space-8);
      left: 50%;
      transform: translateX(-50%);
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--color-text-muted);
      text-align: center;
      max-width: 600px;
    }

    /* Nav/arrow buttons */
    .lightbox-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 48px;
      height: 48px;
      background: var(--color-surface);
      border: 1px solid var(--color-divider);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-text);
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
      z-index: 1001;
    }

    .lightbox-nav:hover {
      border-color: var(--color-primary);
      background: var(--color-surface-2);
    }

    .lightbox-prev { left: var(--space-6); }
    .lightbox-next { right: var(--space-6); }

    @media (max-width: 640px) {
      .lightbox-prev { left: var(--space-2); }
      .lightbox-next { right: var(--space-2); }
      .lightbox-nav { width: 40px; height: 40px; }
    }

    /* Gallery CTA */
    .gallery-cta {
      text-align: center;
      padding-bottom: var(--space-20);
    }

    .gallery-cta p {
      font-size: var(--text-base);
      color: var(--color-text-muted);
      margin-bottom: var(--space-6);
      max-width: 480px;
      margin-inline: auto;
    }