/* ==========================================================================
   CrimaDezignz® | Haute-Couture Avant-Garde Trademark Atelier
   Design System: Monolithic Brutalism / Sharp Architecture / 10 3D Galleries
   ========================================================================== */

:root {
  /* Color Palette - Obsidian Noir (Dark Theme Default) */
  --bg-primary: #050507;
  --bg-secondary: #09090d;
  --bg-tertiary: #101117;
  --bg-card: rgba(14, 15, 21, 0.85);
  --bg-card-hover: rgba(22, 23, 33, 0.95);
  --bg-glass: rgba(10, 10, 15, 0.82);
  
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(229, 192, 123, 0.8);
  --border-specular: rgba(255, 255, 255, 0.38);
  
  --text-primary: #f5f5f7;
  --text-secondary: #9a9aa5;
  --text-tertiary: #5e5e6b;
  --text-accent: #e5c07b;
  --text-accent-glow: rgba(229, 192, 123, 0.25);
  
  --accent-gold: #c5a059;
  --accent-gold-light: #f3d79b;
  --accent-gold-dark: #8c6e28;
  --accent-cyan: #00e5d4;
  --accent-crimson: #ff2a5f;
  
  /* STRICTLY ZERO ROUNDED CORNERS - MONOLITHIC PRECISION */
  --card-radius-sm: 0px;
  --card-radius-md: 0px;
  --card-radius-lg: 0px;
  --card-radius-xl: 0px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-elevation: 0 20px 50px -15px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 50px -10px rgba(229, 192, 123, 0.3);
  
  --font-display: "Cinzel", "Syne", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-quick: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  
  --container-width: 1440px;
}

/* Light Theme - Gallery Alabaster (Architectural Bear Depth) */
[data-theme="light"] {
  --bg-primary: #f5f4ef;
  --bg-secondary: #eae8e1;
  --bg-tertiary: #dfdcd4;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);
  
  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-medium: rgba(0, 0, 0, 0.22);
  --border-focus: #8c6e28;
  --border-specular: rgba(0, 0, 0, 0.35);
  
  --text-primary: #0a0a0c;
  --text-secondary: #3b3b44;
  --text-tertiary: #4a4a55; /* High-contrast crisp charcoal for left-aligned metadata */
  --text-accent: #785412;
  --text-accent-glow: rgba(120, 84, 18, 0.15);
  
  --accent-gold: #8c6e28; /* Rich antique bullion gold - 100% readable on white */
  --accent-gold-light: #5f4813; /* Bold dark bronze instead of washed-out pale yellow */
  --accent-gold-dark: #45340a;

  /* Bear Picture Deep Multi-Tier Architectural Drop Shadows */
  --shadow-bear: 0 2px 4px rgba(0, 0, 0, 0.06),
                 8px 16px 32px -4px rgba(0, 0, 0, 0.18),
                 16px 36px 64px -8px rgba(0, 0, 0, 0.25),
                 0 0 1px 1px rgba(0, 0, 0, 0.08);

  --shadow-bear-hover: 0 4px 8px rgba(0, 0, 0, 0.08),
                       12px 24px 44px -4px rgba(0, 0, 0, 0.24),
                       24px 50px 95px -8px rgba(0, 0, 0, 0.34),
                       0 0 1px 1px rgba(0, 0, 0, 0.12);
  
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-elevation: var(--shadow-bear);
  --shadow-glow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

/* CSS Reset & Foundations */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* STRICT ENFORCEMENT: ZERO ROUNDED CORNERS */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Magnetic Interactive Cursor */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent-gold);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.05s ease;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent-gold);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s ease, 
              border-color 0.3s ease, 
              opacity 0.2s ease;
}

.custom-cursor-ring.cursor-hover {
  width: 64px;
  height: 64px;
  background-color: rgba(229, 192, 123, 0.14);
  border-color: var(--accent-gold-light);
  backdrop-filter: invert(0.15);
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }
}

/* Subtle Film Grain Noise Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Ambient Canvas Layer */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar (Sharp Monolithic Architecture)
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--container-width), calc(100% - 36px));
  height: 68px;
  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: var(--shadow-elevation);
  transition: var(--transition-smooth);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-emblem-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1.5px solid var(--accent-gold);
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.nav-brand:hover .brand-avatar {
  transform: scale(1.06);
}

.emblem-glow-ring {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: radial-gradient(circle, rgba(229, 192, 123, 0.4), transparent 70%);
  opacity: 0.6;
  filter: blur(4px);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--transition-quick);
  padding: 8px 14px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   Header Tactile 3D Button & Dropdown Menu
   ========================================================================== */
.gallery-3d-dropdown-wrap {
  position: relative;
}

.btn-3d-mode {
  background: linear-gradient(180deg, #1f202c 0%, #0c0d13 100%);
  border: 1px solid var(--accent-gold);
  color: #fff;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 0 #73581c, 0 8px 18px rgba(0, 0, 0, 0.7);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.btn-3d-mode:hover {
  background: linear-gradient(180deg, #282a3a 0%, #13141f 100%);
  border-color: var(--accent-gold-light);
  box-shadow: 0 4px 0 #8c6e28, 0 10px 24px rgba(197, 160, 89, 0.25);
}

.btn-3d-mode:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #73581c, 0 2px 6px rgba(0, 0, 0, 0.7);
}

.btn-3d-cube-icon {
  color: var(--accent-gold);
  font-size: 0.9rem;
}

.dropdown-chevron {
  font-size: 0.7rem;
  color: var(--accent-gold);
  transition: transform 0.25s ease;
}

.gallery-3d-dropdown-wrap.open .dropdown-chevron {
  transform: rotate(180deg);
}

/* 3D Dropdown Menu */
.gallery-3d-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: rgba(10, 11, 16, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(197, 160, 89, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 480px;
  overflow-y: auto;
}

.gallery-3d-dropdown-wrap.open .gallery-3d-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.gallery-3d-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  width: 100%;
}

.gallery-3d-item:last-child {
  border-bottom: none;
}

.gallery-3d-item:hover, .gallery-3d-item.active {
  background: rgba(197, 160, 89, 0.15);
}

.gallery-3d-item.active {
  border-left: 3px solid var(--accent-gold);
}

.mode-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.mode-info {
  display: flex;
  flex-direction: column;
}

.mode-info strong {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mode-info small {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Control Pills */
.pill-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 8px 16px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-quick);
}

.pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

/* Light Theme Tactile 3D Header Button & Menu */
[data-theme="light"] .btn-3d-mode {
  background: linear-gradient(180deg, #ffffff 0%, #ece9e0 100%);
  border: 1.5px solid #8c6e28;
  color: #0a0a0c;
  box-shadow: 0 4px 0 #73581c, 0 8px 18px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .btn-3d-mode:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ded9cb 100%);
  box-shadow: 0 4px 0 #73581c, 0 10px 22px rgba(115, 88, 28, 0.2);
}

[data-theme="light"] .btn-3d-mode:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #73581c, 0 2px 6px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .gallery-3d-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid #8c6e28;
  box-shadow: var(--shadow-bear);
}

[data-theme="light"] .gallery-3d-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .gallery-3d-item:hover,
[data-theme="light"] .gallery-3d-item.active {
  background: rgba(140, 110, 40, 0.1);
}

[data-theme="light"] .gallery-3d-item strong {
  color: #0a0a0c;
}

[data-theme="light"] .gallery-3d-item small {
  color: #4a4a55;
}

[data-theme="light"] .gallery-3d-item .mode-number {
  color: #8c6e28;
}

[data-theme="light"] .pill-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
  color: #0a0a0c;
}

[data-theme="light"] .pill-btn:hover {
  background: #f5f4ef;
  border-color: #8c6e28;
}

/* ==========================================================================
   Hero Section: Centered 3D Gyroscope Identity Crucible (Sharp Brutalist)
   ========================================================================== */
.hero-section {
  padding-top: 130px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-aurora-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.22) 0%, rgba(0, 229, 212, 0.08) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.crucible-stage-wrap {
  width: 100%;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 30px;
  box-sizing: border-box;
}

.crucible-3d-card {
  width: 780px;
  max-width: calc(100vw - 48px);
  height: 480px;
  background: radial-gradient(circle at 50% 50%, rgba(26, 27, 38, 0.9), rgba(9, 9, 13, 0.98));
  border: 1px solid var(--border-medium);
  box-shadow: 0 35px 90px -20px rgba(0, 0, 0, 0.95), 0 0 60px rgba(197, 160, 89, 0.16);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  flex-shrink: 0;
}

.crucible-3d-card:active {
  cursor: grabbing;
}

.card-specular-light {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(circle 450px at var(--light-x, 50%) var(--light-y, 50%), rgba(255, 255, 255, 0.14), transparent 70%);
  mix-blend-mode: overlay;
  z-index: 10;
}

.crucible-emblem-core {
  position: relative;
  transform: translateZ(65px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.crucible-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  position: relative;
  z-index: 2;
}

.emblem-energy-halo {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.4) 0%, rgba(0, 229, 212, 0.18) 50%, transparent 70%);
  filter: blur(32px);
  z-index: 1;
  animation: energyBreathe 6s ease-in-out infinite alternate;
}

@keyframes energyBreathe {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.18); opacity: 0.95; }
}

.crucible-hud {
  position: absolute;
  bottom: 24px;
  left: 36px;
  right: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transform: translateZ(40px);
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  white-space: nowrap;
}

.hud-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hud-center {
  text-align: center;
}

.hud-right {
  text-align: right;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.hud-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold-light);
}

/* Light Theme Hero Crucible & Bear Shadow Depth (Clean, No Inner Frame) */
[data-theme="light"] .crucible-3d-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08),
              14px 28px 55px -4px rgba(0, 0, 0, 0.22),
              28px 60px 110px -8px rgba(0, 0, 0, 0.3),
              0 0 1px 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .crucible-hud {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .hud-label {
  color: #4a4a55;
  font-weight: 700;
}

[data-theme="light"] .hud-val {
  color: #0a0a0c;
  font-weight: 800;
}

[data-theme="light"] .crucible-image {
  border: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   3D Gallery Interactive Toolbar
   ========================================================================== */
.gallery-3d-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  margin-bottom: 28px;
}

.toolbar-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: var(--transition-quick);
}

.toolbar-nav-btn:hover {
  background: var(--accent-gold);
  color: #050507;
  border-color: var(--accent-gold);
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toolbar-mode-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
}

.toolbar-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
}

/* Light Theme Toolbar (Clean, No Heavy Shadow on First Page) */
[data-theme="light"] .gallery-3d-toolbar {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: none;
}

[data-theme="light"] .toolbar-nav-btn {
  background: #f5f4ef;
  border: 1px solid rgba(0, 0, 0, 0.16);
  color: #0a0a0c;
}

[data-theme="light"] .toolbar-nav-btn:hover {
  background: #0a0a0c;
  color: #ffffff;
  border-color: #0a0a0c;
}

[data-theme="light"] .toolbar-mode-badge {
  color: #0a0a0c;
  font-weight: 800;
}

[data-theme="light"] .toolbar-counter {
  color: #4a4a55;
  font-weight: 600;
}

/* ==========================================================================
   The Darkroom Exhibition (10 Switchable 3D Visual Gallery Modes)
   ========================================================================== */
.section-wrapper {
  padding: 10px 0 80px;
  position: relative;
}

.exhibition-grid {
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 520px;
}

/* Card Element Foundations (Strict Zero Radius) */
.exhibition-item {
  position: relative;
  background: #000;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease,
              opacity 0.35s ease,
              filter 0.35s ease;
  overflow: hidden;
}

.exhibition-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exhibition-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.exhibition-item:hover .exhibition-thumb {
  transform: scale(1.08);
}

.exhibition-floating-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.95) 0%, rgba(5, 5, 7, 0.6) 70%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.exhibition-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* --------------------------------------------------------------------------
   MODE 01: 3D Spatial Tilt Grid (Default)
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-tilt {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.darkroom-active .exhibition-grid.mode-tilt:hover .exhibition-item:not(:hover) {
  opacity: 0.32;
  filter: grayscale(40%) blur(0.5px);
  transform: scale(0.98);
}

.exhibition-grid.mode-tilt .exhibition-item:hover {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.03) translateY(-6px) !important;
  border-color: var(--accent-gold);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(197, 160, 89, 0.3);
  z-index: 10;
}

.exhibition-grid.mode-tilt .exhibition-item.span-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.exhibition-grid.mode-tilt .exhibition-item.span-featured .exhibition-thumb-wrap {
  min-height: 480px;
}

/* --------------------------------------------------------------------------
   MODE 02: 3D Cylinder Ring (Orbital Carousel)
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-carousel {
  height: 560px;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.exhibition-grid.mode-carousel .exhibition-item {
  position: absolute;
  width: 320px;
  height: 380px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   MODE 03: 3D Coverflow
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-coverflow {
  height: 520px;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exhibition-grid.mode-coverflow .exhibition-item {
  position: absolute;
  width: 360px;
  height: 420px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   MODE 04: 3D Helix Spiral Column
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-spiral {
  height: 600px;
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exhibition-grid.mode-spiral .exhibition-item {
  position: absolute;
  width: 300px;
  height: 340px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
}

/* --------------------------------------------------------------------------
   MODE 05: 3D Quantum Deck (Stack Swipe)
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-stack {
  height: 540px;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exhibition-grid.mode-stack .exhibition-item {
  position: absolute;
  width: 380px;
  height: 460px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95);
}

/* --------------------------------------------------------------------------
   MODE 06: 3D Hypercube Matrix
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  perspective: 1600px;
  transform-style: preserve-3d;
}

.exhibition-grid.mode-matrix .exhibition-item:nth-child(3n+1) {
  transform: translateZ(50px);
}

.exhibition-grid.mode-matrix .exhibition-item:nth-child(3n+2) {
  transform: translateZ(0px);
}

.exhibition-grid.mode-matrix .exhibition-item:nth-child(3n) {
  transform: translateZ(-60px);
  opacity: 0.85;
}

.exhibition-grid.mode-matrix .exhibition-item:hover {
  transform: translateZ(100px) scale(1.05) !important;
  opacity: 1 !important;
  border-color: var(--accent-gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95);
  z-index: 20;
}

/* --------------------------------------------------------------------------
   MODE 07: 3D Void Tunnel Corridor
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-tunnel {
  height: 560px;
  perspective: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(16, 17, 23, 0.6), #000 80%);
}

.exhibition-grid.mode-tunnel .exhibition-item {
  position: absolute;
  width: 340px;
  height: 400px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* --------------------------------------------------------------------------
   MODE 08: 3D Sphere Galaxy Dome
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-spherical {
  height: 580px;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exhibition-grid.mode-spherical .exhibition-item {
  position: absolute;
  width: 280px;
  height: 320px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   MODE 09: 3D Kinetic Wall Parallax
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-kinetic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.exhibition-grid.mode-kinetic .exhibition-item {
  transition: transform 0.25s ease-out;
}

.exhibition-grid.mode-kinetic .exhibition-item:hover {
  transform: translateZ(60px) scale(1.04);
  border-color: var(--accent-gold);
  z-index: 10;
}

/* --------------------------------------------------------------------------
   MODE 10: 3D Hologram Deck (Chromatic RGB Refraction & CRT Scanlines)
   -------------------------------------------------------------------------- */
.exhibition-grid.mode-hologram {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.exhibition-grid.mode-hologram .exhibition-item {
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 212, 0.2);
}

.exhibition-grid.mode-hologram .exhibition-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 3;
}

.exhibition-grid.mode-hologram .exhibition-item:hover {
  box-shadow: -4px 0 25px rgba(255, 42, 95, 0.6), 4px 0 25px rgba(0, 229, 212, 0.6);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-gold);
}

/* ==========================================================================
   Buttons & Modal (Strict Zero Radius)
   ========================================================================== */
.btn-avant-garde {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: linear-gradient(135deg, #f3d79b 0%, #c5a059 50%, #967432 100%);
  color: #050507;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(197, 160, 89, 0.4);
  transition: var(--transition-smooth);
}

.btn-avant-garde:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(197, 160, 89, 0.6);
  filter: brightness(1.1);
}

.archive-load-more {
  text-align: center;
  margin-top: 56px;
}

/* Detail Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.95);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-quick);
  font-size: 1rem;
}

.modal-close-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.modal-image-wrapper {
  width: 100%;
  overflow: hidden;
  background: transparent;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.modal-image-display {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: none;
  outline: none;
  box-shadow: none;
  display: block;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mono-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(229, 192, 123, 0.1);
  border: 1px solid rgba(229, 192, 123, 0.3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.meta-standard {
  color: var(--accent-gold);
}

/* Light Theme Modal & Bear Depth Styling (Only Modal Has Bear Shadow, No Inner Frame) */
[data-theme="light"] .modal-dialog {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08),
              12px 24px 48px -4px rgba(0, 0, 0, 0.22),
              24px 55px 95px -8px rgba(0, 0, 0, 0.32),
              0 0 1px 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-image-wrapper {
  background: transparent;
  border: none;
}

[data-theme="light"] .modal-image-display {
  border: none;
  outline: none;
  box-shadow: none;
}

[data-theme="light"] .modal-close-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #0a0a0c;
}

[data-theme="light"] .modal-close-btn:hover {
  background: #0a0a0c;
  color: #ffffff;
}

/* Fix for Left-Aligned Text in Light Mode (High Contrast & Bold Legibility) */
[data-theme="light"] .mono-badge {
  background: #0a0a0c !important;
  border-color: #0a0a0c !important;
  color: #ffffff !important;
  font-weight: 800;
  letter-spacing: 0.12em;
}

[data-theme="light"] .modal-title-text {
  color: #0a0a0c;
  font-weight: 800;
}

[data-theme="light"] .meta-label {
  color: #4a4a55;
  font-weight: 700;
}

[data-theme="light"] .meta-val {
  color: #0a0a0c;
  font-weight: 800;
}

[data-theme="light"] .meta-standard {
  color: #8c6e28;
  font-weight: 800;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 40px;
  margin-top: 100px;
  background: var(--bg-secondary);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-colophon {
  max-width: 480px;
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.footer-avatar {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--accent-gold);
}

.footer-brand-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
}

.footer-brand-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links-cluster {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-ul a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: var(--transition-quick);
}

.footer-ul a:hover {
  color: var(--accent-gold);
}

.mono-ul li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .exhibition-grid.mode-tilt .exhibition-item.span-featured {
    grid-column: span 1;
    grid-row: span 1;
  }
  .exhibition-grid.mode-tilt .exhibition-item.span-featured .exhibition-thumb-wrap {
    min-height: 280px;
  }
}

@media (max-width: 820px) {
  .site-nav {
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .hero-section {
    padding-top: 110px;
    min-height: auto;
  }
  .crucible-3d-card {
    width: min(720px, calc(100vw - 32px));
    height: 440px;
  }
  .crucible-image {
    width: 190px;
    height: 190px;
  }
  .crucible-hud {
    left: 24px;
    right: 24px;
    bottom: 20px;
    padding-top: 14px;
  }
  .hud-label {
    font-size: 0.62rem;
  }
  .hud-val {
    font-size: 0.72rem;
  }
  .modal-meta-grid {
    grid-template-columns: 1fr;
  }
  .gallery-3d-menu {
    width: 280px;
  }
}

@media (max-width: 600px) {
  .crucible-stage-wrap {
    padding: 10px 12px 30px;
  }
  .crucible-3d-card {
    width: calc(100vw - 24px);
    height: 380px;
  }
  .crucible-image {
    width: 150px;
    height: 150px;
  }
  .emblem-energy-halo {
    width: 220px;
    height: 220px;
  }
  .crucible-hud {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding-top: 10px;
    gap: 8px;
  }
  .hud-label {
    font-size: 0.54rem;
    letter-spacing: 0.04em;
  }
  .hud-val {
    font-size: 0.64rem;
  }
  .gallery-3d-toolbar {
    flex-direction: column;
    gap: 12px;
  }
}
