/* ==========================================================================
   iDominiqe Spatial OS — Liquid Glass Portfolio & Studio Stylesheet
   ========================================================================== */

:root {
  /* Active Palette Tokens (default: aurora) */
  --bg-1: #0b0e1c;
  --bg-2: #151436;
  --bg-3: #102a43;
  --orb-1: rgba(139, 92, 246, 0.58);
  --orb-2: rgba(56, 189, 248, 0.48);
  --orb-3: rgba(244, 114, 182, 0.42);
  --orb-4: rgba(251, 146, 60, 0.30);

  --accent: #8b5cf6;
  --accent-2: #38bdf8;
  --accent-3: #f472b6;
  --accent-glow: rgba(139, 92, 246, 0.45);
  --cta-bg: #ffffff;
  --cta-fg: #0b0e1c;

  /* Liquid Glass Surface Tokens (default: dark) */
  --glass-shell: rgba(24, 27, 46, 0.44);
  --glass-card: rgba(255, 255, 255, 0.075);
  --glass-card-hover: rgba(255, 255, 255, 0.125);
  --glass-pill: rgba(255, 255, 255, 0.10);
  --glass-modal: rgba(18, 20, 36, 0.78);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-border-soft: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.48);
  --glass-refract: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 32px 90px rgba(0, 0, 0, 0.48), 0 8px 28px rgba(0, 0, 0, 0.28);

  --text-primary: #f8fafc;
  --text-secondary: rgba(241, 245, 249, 0.76);
  --text-muted: rgba(226, 232, 240, 0.54);
  --caustic-color: rgba(255, 255, 255, 0.20);
  --ring-track: rgba(255, 255, 255, 0.12);

  /* Interactive FX Controls */
  --glass-blur: 28px;
  --glow-strength: 1;
  --parallax-depth: 1;
  --bg-dim: 0.28;
  --bg-image-blur: 0px;

  /* Typography & Radii */
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --radius-shell: 34px;
  --radius-card: 24px;
  --radius-pill: 999px;
}

/* ---------------- COLOR PALETTES ---------------- */
html[data-palette="flat"] {
  --bg-1: #090a0f;
  --bg-2: #090a0f;
  --bg-3: #090a0f;
  --orb-1: transparent;
  --orb-2: transparent;
  --orb-3: transparent;
  --orb-4: transparent;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-3: #818cf8;
  --accent-glow: rgba(59, 130, 246, 0.18);
  --glass-shell: #101218;
  --glass-card: #151821;
  --glass-card-hover: #1b1f2b;
  --glass-pill: #151821;
  --glass-modal: #12151d;
  --glass-border: #242938;
  --glass-border-soft: #1f2432;
  --glass-highlight: transparent;
  --glass-refract: transparent;
  --glass-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

html[data-palette="aurora"] {
  --bg-1: #0b0e1c;
  --bg-2: #18133a;
  --bg-3: #0f2c47;
  --orb-1: rgba(139, 92, 246, 0.58);
  --orb-2: rgba(56, 189, 248, 0.50);
  --orb-3: rgba(244, 114, 182, 0.44);
  --orb-4: rgba(251, 146, 60, 0.30);
  --accent: #8b5cf6;
  --accent-2: #38bdf8;
  --accent-3: #f472b6;
  --accent-glow: rgba(139, 92, 246, 0.48);
}

html[data-palette="vision"] {
  --bg-1: #1d1c1a;
  --bg-2: #2d2b27;
  --bg-3: #3e3a34;
  --orb-1: rgba(226, 214, 198, 0.36);
  --orb-2: rgba(167, 178, 194, 0.34);
  --orb-3: rgba(214, 184, 148, 0.32);
  --orb-4: rgba(120, 130, 145, 0.28);
  --accent: #e5dfd5;
  --accent-2: #93c5fd;
  --accent-3: #fbbf24;
  --accent-glow: rgba(229, 223, 213, 0.32);
}

html[data-palette="cyber"] {
  --bg-1: #09080f;
  --bg-2: #1f0a14;
  --bg-3: #101729;
  --orb-1: rgba(244, 63, 94, 0.56);
  --orb-2: rgba(249, 115, 22, 0.44);
  --orb-3: rgba(56, 189, 248, 0.38);
  --orb-4: rgba(168, 85, 247, 0.32);
  --accent: #f43f5e;
  --accent-2: #fb923c;
  --accent-3: #38bdf8;
  --accent-glow: rgba(244, 63, 94, 0.48);
}

html[data-palette="emerald"] {
  --bg-1: #061316;
  --bg-2: #0a2524;
  --bg-3: #102a3c;
  --orb-1: rgba(16, 185, 129, 0.52);
  --orb-2: rgba(34, 211, 238, 0.44);
  --orb-3: rgba(250, 204, 21, 0.32);
  --orb-4: rgba(52, 211, 153, 0.34);
  --accent: #10b981;
  --accent-2: #22d3ee;
  --accent-3: #facc15;
  --accent-glow: rgba(16, 185, 129, 0.46);
}

html[data-palette="sunset"] {
  --bg-1: #160c1a;
  --bg-2: #2e1227;
  --bg-3: #321b20;
  --orb-1: rgba(251, 113, 133, 0.54);
  --orb-2: rgba(251, 146, 60, 0.48);
  --orb-3: rgba(192, 132, 252, 0.44);
  --orb-4: rgba(253, 224, 71, 0.30);
  --accent: #fb7185;
  --accent-2: #fb923c;
  --accent-3: #c084fc;
  --accent-glow: rgba(251, 113, 133, 0.48);
}

html[data-palette="arctic"] {
  --bg-1: #091221;
  --bg-2: #122440;
  --bg-3: #173454;
  --orb-1: rgba(96, 165, 250, 0.52);
  --orb-2: rgba(165, 243, 252, 0.44);
  --orb-3: rgba(129, 140, 248, 0.42);
  --orb-4: rgba(226, 232, 240, 0.28);
  --accent: #60a5fa;
  --accent-2: #67e8f9;
  --accent-3: #818cf8;
  --accent-glow: rgba(96, 165, 250, 0.48);
}

/* ---------------- LIGHTING MODES ---------------- */
html[data-lighting="light"] {
  --glass-shell: rgba(255, 255, 255, 0.46);
  --glass-card: rgba(255, 255, 255, 0.42);
  --glass-card-hover: rgba(255, 255, 255, 0.62);
  --glass-pill: rgba(255, 255, 255, 0.52);
  --glass-modal: rgba(246, 248, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-border-soft: rgba(255, 255, 255, 0.55);
  --glass-highlight: rgba(255, 255, 255, 0.95);
  --glass-refract: rgba(255, 255, 255, 0.38);
  --glass-shadow: 0 28px 80px rgba(30, 41, 59, 0.16), 0 8px 24px rgba(30, 41, 59, 0.08);
  --text-primary: #0f172a;
  --text-secondary: rgba(15, 23, 42, 0.76);
  --text-muted: rgba(30, 41, 59, 0.56);
  --caustic-color: rgba(255, 255, 255, 0.65);
  --ring-track: rgba(15, 23, 42, 0.12);
  --cta-bg: #0f172a;
  --cta-fg: #ffffff;
  --bg-dim: 0.04;
}

html[data-lighting="light"][data-palette="flat"] {
  --bg-1: #f4f5f7;
  --bg-2: #f4f5f7;
  --bg-3: #f4f5f7;
  --glass-shell: #ffffff;
  --glass-card: #f8f9fb;
  --glass-card-hover: #eef1f6;
  --glass-pill: #ffffff;
  --glass-modal: #ffffff;
  --glass-border: #e2e8f0;
  --glass-border-soft: #e2e8f0;
  --glass-highlight: transparent;
  --glass-refract: transparent;
  --glass-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  --accent: #2563eb;
  --accent-2: #3b82f6;
}
html[data-lighting="light"][data-palette="aurora"] {
  --bg-1: #eef2ff;
  --bg-2: #e0f2fe;
  --bg-3: #fce7f3;
}
html[data-lighting="light"][data-palette="vision"] {
  --bg-1: #ebe7e1;
  --bg-2: #dfd9cf;
  --bg-3: #ece9e4;
  --accent: #334155;
}
html[data-lighting="light"][data-palette="cyber"] {
  --bg-1: #fff1f2;
  --bg-2: #ffedd5;
  --bg-3: #f1f5f9;
}
html[data-lighting="light"][data-palette="emerald"] {
  --bg-1: #ecfdf5;
  --bg-2: #cffafe;
  --bg-3: #f0fdf4;
}
html[data-lighting="light"][data-palette="sunset"] {
  --bg-1: #fff1f2;
  --bg-2: #ffedd5;
  --bg-3: #fae8ff;
}
html[data-lighting="light"][data-palette="arctic"] {
  --bg-1: #eff6ff;
  --bg-2: #ecfeff;
  --bg-3: #eef2ff;
}

html[data-lighting="iridescent"] {
  --glass-shell: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(167, 139, 250, 0.14) 50%, rgba(56, 189, 248, 0.18));
  --glass-card: rgba(255, 255, 255, 0.14);
  --glass-card-hover: rgba(255, 255, 255, 0.24);
  --glass-pill: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.42);
  --glass-highlight: rgba(255, 255, 255, 0.80);
  --caustic-color: rgba(186, 230, 253, 0.34);
}

/* ---------------- RESET & BASE ---------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  font-size: 16px;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-1);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.55s ease, color 0.4s ease;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------- AMBIENT BACKGROUND & CUSTOM WALLPAPER ---------------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, var(--orb-1), transparent 52%),
    radial-gradient(circle at 85% 18%, var(--orb-2), transparent 50%),
    radial-gradient(circle at 78% 82%, var(--orb-3), transparent 52%),
    radial-gradient(circle at 22% 85%, var(--orb-4), transparent 50%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  transition: background 0.6s ease;
}

#ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.bg-wallpaper {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(var(--bg-image-blur));
  transform: scale(1.04);
  transition: opacity 0.6s ease, filter 0.3s ease;
}

.bg-wallpaper.active {
  opacity: 1;
}

.bg-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, var(--bg-dim));
  transition: background 0.4s ease;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
}

/* ---------------- CUSTOM SPATIAL CURSOR ---------------- */
.spatial-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.custom-cursor-on .spatial-cursor {
  opacity: 1;
}

.cursor-halo {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 72%);
  transform: translate(-50%, -50%);
  transition: width 0.22s ease, height 0.22s ease, border-color 0.22s ease;
  backdrop-filter: blur(2px);
}

.cursor-core {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 14px var(--accent-2);
  transform: translate(-50%, -50%);
}

.spatial-cursor.is-hover .cursor-halo {
  width: 64px;
  height: 64px;
  border-color: var(--accent-2);
}

@media (hover: none), (pointer: coarse) {
  .spatial-cursor {
    display: none !important;
  }
}

/* ---------------- LIQUID GLASS MIXIN CLASS ---------------- */
.liquid-glass {
  position: relative;
  background: var(--glass-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 1px var(--glass-highlight),
    inset 0 -1px 1px var(--glass-refract),
    var(--glass-shadow);
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.35s ease;
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 20%),
    var(--caustic-color),
    transparent 62%
  );
  opacity: calc(0.85 * var(--glow-strength));
  transition: opacity 0.3s ease;
  z-index: 0;
}

.liquid-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.03) 34%,
    transparent 56%,
    rgba(255, 255, 255, 0.09) 100%
  );
  z-index: 0;
}

.liquid-glass > * {
  position: relative;
  z-index: 1;
}

/* Zero-GPU Flat Mode Override */
html[data-palette="flat"] .liquid-glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: var(--glass-shadow);
}

html[data-palette="flat"] .liquid-glass::before,
html[data-palette="flat"] .liquid-glass::after,
html[data-palette="flat"] .bg-noise {
  display: none !important;
}

html[data-palette="flat"] .hero-status-chip,
html[data-palette="flat"] .glass-tag,
html[data-palette="flat"] .btn-secondary-glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: var(--glass-border);
}

html[data-palette="flat"] .hero-visual-bg {
  opacity: 0.28;
}

html[data-palette="flat"][data-lighting="light"] .hero-visual-bg {
  opacity: 0.14;
}

html[data-palette="flat"][data-lighting="light"] .hero-status-chip,
html[data-palette="flat"][data-lighting="light"] .glass-tag,
html[data-palette="flat"][data-lighting="light"] .btn-secondary-glass,
html[data-palette="flat"][data-lighting="light"] .panel-badge,
html[data-palette="flat"][data-lighting="light"] .palette-chip,
html[data-palette="flat"][data-lighting="light"] .anim-chip,
html[data-palette="flat"][data-lighting="light"] .tech-pill,
html[data-palette="flat"][data-lighting="light"] .lang-switcher,
html[data-palette="flat"][data-lighting="light"] .lighting-quick-pill,
html[data-palette="flat"][data-lighting="light"] .domain-omnibox {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Staged Preloading & Deferred Hydration */
.deferred-section {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.deferred-section.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.preload-placeholder {
  padding: 22px;
  border-radius: 18px;
  border: 1px dashed var(--glass-border-soft);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------------- FLOATING 3D PARALLAX SHAPES ---------------- */
.parallax-stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 20px 24px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1800px;
}

.floating-3d-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  perspective: 1400px;
  transition: opacity 0.4s ease;
}

body.no-shards .floating-3d-layer {
  opacity: 0;
}

.glass-artifact {
  position: absolute;
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.72),
    inset 0 -4px 14px rgba(139, 92, 246, 0.22),
    0 20px 50px rgba(0, 0, 0, 0.25);
  will-change: transform;
}

.artifact-cube {
  top: 18%;
  left: 3%;
  width: 82px;
  height: 82px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(139, 92, 246, 0.18));
}

.artifact-sphere {
  bottom: 16%;
  left: 4.5%;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.78), rgba(56, 189, 248, 0.22) 55%, rgba(244, 114, 182, 0.22));
}

.artifact-ring {
  bottom: 11%;
  right: 3.5%;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.55),
    0 22px 45px rgba(0, 0, 0, 0.25);
}

.artifact-prism {
  top: 14%;
  right: 4%;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(251, 146, 60, 0.22));
}

/* ---------------- TOP FLOATING SPATIAL BAR (Ref Image 1 & 2) ---------------- */
.top-spatial-bar {
  width: min(1240px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
  z-index: 30;
  position: sticky;
  top: 14px;
  background: var(--glass-pill);
}

.bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pill-icon-btn:hover {
  transform: translateY(-1px) scale(1.04);
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--glass-highlight);
}

.pill-icon-btn svg {
  width: 16px;
  height: 16px;
}

.domain-omnibox {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-soft);
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

html[data-lighting="light"] .domain-omnibox {
  background: rgba(255, 255, 255, 0.45);
}

.domain-url {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#omnibox-url-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  flex-shrink: 0;
}

.omnibox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-btn.active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lighting-quick-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.light-mode-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}

.light-mode-btn.active {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

/* ---------------- WORKSPACE GRID: LEFT DOCK + MAIN SHELL ---------------- */
.spatial-workspace {
  width: min(1340px, 100%);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  transform-style: preserve-3d;
}

/* Left Detached Dock (Ref Image 1 & 2) */
.left-dock {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-radius: var(--radius-pill);
  z-index: 20;
}

.dock-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.dock-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.dock-btn.active {
  background: var(--cta-bg);
  color: var(--cta-fg);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.dock-btn svg {
  width: 20px;
  height: 20px;
}

.dock-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 56px;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--glass-modal);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dock-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.dock-divider {
  width: 26px;
  height: 1px;
  background: var(--glass-border-soft);
  margin: 2px 0;
}

/* ---------------- MAIN GLASS SHELL ---------------- */
.main-glass-shell {
  border-radius: var(--radius-shell);
  background: var(--glass-shell);
  padding: 26px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Shell Header (Search + Category Tabs + Profile) */
.shell-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-card);
  min-width: 190px;
  flex: 0 1 225px;
}

.search-pill svg {
  width: 17px;
  height: 17px;
  opacity: 0.72;
  flex-shrink: 0;
}

.search-pill input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.search-pill input::placeholder {
  color: var(--text-muted);
}

.shell-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.shell-tab {
  border: 1px solid transparent;
  background: transparent;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.22s ease;
}

.shell-tab:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
}

.shell-tab.active {
  background: var(--glass-pill);
  border-color: var(--glass-border);
  color: var(--text-primary);
  box-shadow: inset 0 1px 1px var(--glass-highlight);
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-card);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-pill:hover {
  transform: translateY(-1px);
  border-color: var(--glass-highlight);
}

.avatar-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.profile-name {
  font-size: 0.84rem;
  font-weight: 700;
}

.profile-handle {
  font-size: 0.71rem;
  color: var(--text-muted);
}

/* ---------------- SECTIONS & BENTO OVERVIEW ---------------- */
.shell-section {
  margin-bottom: 34px;
  scroll-margin-top: 96px;
}

.shell-section:last-child {
  margin-bottom: 6px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* Bento Overview Layout (Ref Images 1, 2, 3 Combined) */
.bento-overview {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.bento-col-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-panel {
  border-radius: var(--radius-card);
  padding: 18px;
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.panel-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border-soft);
  color: var(--text-secondary);
}

/* Mini Featured Queue (Ref Image 1 Left Sidebar) */
.mini-build-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-build-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.mini-build-item:hover,
.mini-build-item.active {
  transform: translateX(3px);
  background: var(--glass-card-hover);
  border-color: var(--glass-highlight);
}

.mini-thumb {
  width: 62px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.mini-info h4 {
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Social App Grid (Ref Image 2 AirDrop/Apps Grid) */
.social-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 6px;
  border-radius: 16px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.social-app-tile:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--glass-card-hover);
  border-color: var(--glass-highlight);
}

.social-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.social-app-icon svg {
  width: 18px;
  height: 18px;
}

.social-app-tile span {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Featured Hero Spotlight Card (Ref Image 1 Hero) */
.hero-spotlight {
  border-radius: 28px;
  min-height: 340px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.hero-visual-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: opacity 0.45s ease, transform 0.6s ease;
  opacity: 0.9;
}

.hero-visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(95deg, rgba(8, 11, 24, 0.84) 0%, rgba(8, 11, 24, 0.56) 54%, rgba(8, 11, 24, 0.22) 100%);
}

html[data-lighting="light"] .hero-visual-overlay {
  background: linear-gradient(95deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.62) 56%, rgba(255, 255, 255, 0.24) 100%);
}

.hero-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-content {
  max-width: 600px;
  margin: 22px 0 20px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.glass-tag {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.hero-bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-primary-glass {
  border: none;
  background: var(--cta-bg);
  color: var(--cta-fg);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn-primary-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--accent-glow);
}

.btn-secondary-glass {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn-secondary-glass:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--glass-highlight);
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sub-row inside Main Bento Right Column (Ref Images 2 & 3) */
.bento-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.palette-quick-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.palette-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.palette-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.palette-chip.active {
  border-color: var(--accent-2);
  background: rgba(255, 255, 255, 0.16);
}

html[data-palette="flat"] .palette-chip.active,
html[data-palette="flat"] .anim-chip.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.14);
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ---------------- PORTFOLIO GRID (Ref Image 1 Bottom Cards + Rich Details) ---------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transform-style: preserve-3d;
  cursor: pointer;
}

.project-card:hover {
  background: var(--glass-card-hover);
  border-color: var(--glass-highlight);
}

.project-preview-box {
  height: 158px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
}

.project-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.36);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.project-domain-chip {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.project-wireframe {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  pointer-events: none;
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.project-body p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-pill {
  font-size: 0.69rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border-soft);
  color: var(--text-secondary);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border-soft);
}

.project-langs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border-soft);
  background: var(--cta-bg);
  color: var(--cta-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card-circle-btn:hover {
  transform: scale(1.08);
}

.card-circle-btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ---------------- SERVICES & SMART CONFIGURATOR (Ref Image 2) ---------------- */
.services-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.service-toggles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-toggle-card {
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.service-toggle-card.is-on {
  border-color: var(--accent-2);
  background: var(--glass-card-hover);
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.service-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ios-switch {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid var(--glass-border-soft);
  position: relative;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.ios-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-toggle-card.is-on .ios-switch {
  background: #22c55e;
  border-color: rgba(34, 197, 94, 0.8);
}

.service-toggle-card.is-on .ios-switch::after {
  transform: translateX(20px);
}

.service-toggle-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.service-toggle-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.service-summary-card {
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.summary-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.summary-kpi {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border-soft);
}

.summary-kpi span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.summary-kpi strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.brief-preview {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-height: 128px;
  overflow-y: auto;
}

html[data-lighting="light"] .brief-preview {
  background: rgba(255, 255, 255, 0.55);
}

/* ---------------- ANALYTICS DASHBOARD (Ref Image 3) ---------------- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.85fr;
  gap: 16px;
}

.chart-card {
  border-radius: 24px;
  padding: 18px;
}

.spline-svg {
  width: 100%;
  height: 165px;
  overflow: visible;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.donut-ring {
  position: relative;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-center strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.donut-center span {
  font-size: 0.66rem;
  color: var(--text-muted);
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kpi-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-tile {
  border-radius: 18px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-tile-gradient-1 {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.38), rgba(168, 85, 247, 0.16));
}
.kpi-tile-gradient-2 {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.36), rgba(37, 99, 235, 0.16));
}
.kpi-tile-gradient-3 {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.38), rgba(244, 63, 94, 0.16));
}

.kpi-tile span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.kpi-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}

/* ---------------- CONNECT / SOCIAL PORTAL ---------------- */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.connect-card {
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.connect-card:hover {
  transform: translateY(-3px);
  background: var(--glass-card-hover);
  border-color: var(--glass-highlight);
}

.connect-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.connect-left h4 {
  font-size: 0.92rem;
  font-weight: 700;
}

.connect-left p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- BOTTOM FLOATING PILL BAR (Ref Image 2) ---------------- */
.bottom-pill-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--glass-pill);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-pill-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav-btn {
  border: none;
  background: transparent;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.bottom-nav-btn.active {
  background: var(--cta-bg);
  color: var(--cta-fg);
}

/* ---------------- STUDIO CUSTOMIZER DRAWER ---------------- */
.studio-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.studio-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.studio-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(390px, calc(100vw - 32px));
  border-radius: 28px;
  background: var(--glass-modal);
  padding: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.studio-drawer.open {
  transform: translateX(0);
}

.drawer-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border-soft);
}

.drawer-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.wallpaper-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.wallpaper-btn {
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.wallpaper-btn.active,
.wallpaper-btn:hover {
  border-color: var(--glass-highlight);
  background: rgba(255, 255, 255, 0.16);
}

.glass-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  outline: none;
}

.glass-input:focus {
  border-color: var(--accent-2);
}

/* ---------------- PROJECT PREVIEW MODAL & COMMAND PALETTE ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.65);
  backdrop-filter: blur(12px);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

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

.project-modal {
  width: min(980px, 100%);
  max-height: 90vh;
  border-radius: 30px;
  background: var(--glass-modal);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.modal-preview-frame {
  width: 100%;
  height: 380px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.35);
}

.modal-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.cmd-modal {
  width: min(560px, 100%);
  border-radius: 24px;
  background: var(--glass-modal);
  padding: 18px;
}

.cmd-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.85rem;
}

.cmd-item:hover {
  border-color: var(--glass-highlight);
  background: rgba(255, 255, 255, 0.14);
}

/* Toast Notification */
.toast-pill {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translate(-50%, -14px);
  z-index: 150;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-modal);
  border: 1px solid var(--glass-highlight);
  font-size: 0.83rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-pill.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- RESPONSIVE BREAKPOINTS (Tablet & Mobile) ---------------- */
@media (max-width: 1120px) {
  .bento-overview {
    grid-template-columns: 1fr;
  }
  .bento-col-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-stack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .services-layout {
    grid-template-columns: 1fr;
  }
  .connect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .parallax-stage {
    padding: 10px 10px 84px;
  }
  .top-spatial-bar {
    position: relative;
    top: 0;
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 8px 10px;
    gap: 8px;
  }
  .domain-omnibox {
    order: 3;
    max-width: 100%;
    width: 100%;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .domain-url {
    min-width: 0;
  }
  .lang-btn {
    padding: 4px 7px;
    font-size: 0.7rem;
  }
  .spatial-workspace {
    grid-template-columns: 1fr;
  }
  .left-dock {
    display: none;
  }
  .main-glass-shell {
    padding: 16px;
    border-radius: 24px;
  }
  .bento-col-side,
  .bento-sub-grid,
  .portfolio-grid,
  .service-toggles-grid,
  .analytics-grid,
  .kpi-stack,
  .connect-grid {
    grid-template-columns: 1fr;
  }
  .lighting-quick-pill .btn-label {
    display: none;
  }
  .bottom-pill-nav {
    width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 20px;
    padding: 5px;
    gap: 3px;
  }
  .bottom-nav-btn {
    padding: 5px 8px;
    font-size: 0.71rem;
  }
  .modal-preview-frame {
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
