:root {
  --obsidian: #0b0b0c;
  --wall: #eeeae1;
  --concrete: #141416;
  --halogen: #ffb454;
  --halogen-dim: #7a5730;
  --ink: #f5f3ee;
  --muted: #9a978f;
  --line: rgba(245, 243, 238, 0.12);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--obsidian);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}
h1,
h2,
h3,
.serif {
  font-family: "Fraunces", serif;
}
.mono {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--obsidian);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  transition:
    opacity 1s ease,
    visibility 1s ease;
}
#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#preloader .mono {
  font-size: 11px;
  color: var(--halogen);
  text-transform: uppercase;
}
#preloader .bar {
  width: 180px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
#preloader .bar span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--halogen);
  transition: width 1.4s ease;
}

/* ---------- Nav ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 3vw, 22px) clamp(18px, 5vw, 40px);
  mix-blend-mode: difference;
  gap: 16px;
}
/* keep nav legible in true color once the opaque mobile panel is open,
     rather than difference-blending against it */
body.menu-open nav {
  mix-blend-mode: normal;
}
nav .wordmark {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(15px, 3vw, 18px);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
nav .wordmark em {
  font-style: italic;
  color: var(--halogen);
}
nav ul {
  list-style: none;
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}
nav a:hover {
  opacity: 1;
}

/* ---------- Hamburger toggle ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 70;
  position: relative;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.25s ease,
    background 0.3s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Mobile menu overlay ---------- */
#mobileMenu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--obsidian);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 clamp(28px, 8vw, 60px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}
#mobileMenu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#mobileMenu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#mobileMenu a {
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 10vw, 56px);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.85;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
  padding: 10px 0;
  display: inline-block;
  transform: translateY(14px);
  opacity: 0;
}
#mobileMenu.open a {
  animation: riseIn 0.6s ease forwards;
}
#mobileMenu.open a:nth-child(1) {
  animation-delay: 0.08s;
}
#mobileMenu.open a:nth-child(2) {
  animation-delay: 0.15s;
}
#mobileMenu.open a:nth-child(3) {
  animation-delay: 0.22s;
}
#mobileMenu a:hover,
#mobileMenu a:active {
  opacity: 1;
  color: var(--halogen);
}
#mobileMenu .mono {
  position: absolute;
  bottom: 40px;
  left: clamp(28px, 8vw, 60px);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  nav ul {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}
@media (max-width: 420px) {
  nav ul {
    gap: 12px;
  }
  nav a {
    font-size: 10px;
  }
}
body.menu-open {
  overflow: hidden;
}

/* ---------- Hero / 3D stage ---------- */
#stage {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  touch-action: none;
}
#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.stage-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(18px, 5vw, 40px) clamp(80px, 14vh, 56px);
}
.stage-kicker {
  font-size: clamp(9px, 2vw, 11px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--halogen);
  margin-bottom: clamp(8px, 2vw, 14px);
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn 0.9s ease forwards;
  animation-delay: 0.4s;
}
.stage-title {
  font-size: clamp(30px, 8vw, 88px);
  font-weight: 500;
  line-height: 1.02;
  max-width: 14ch;
  opacity: 0;
  transform: translateY(16px);
  animation: riseIn 1s ease forwards;
  animation-delay: 0.55s;
}
.stage-sub {
  margin-top: clamp(10px, 2vw, 18px);
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(13px, 2vw, 15px);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn 1s ease forwards;
  animation-delay: 0.75s;
}
@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.drag-hint {
  position: absolute;
  bottom: clamp(20px, 5vh, 56px);
  right: clamp(18px, 5vw, 40px);
  pointer-events: none;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: riseIn 1s ease forwards;
  animation-delay: 1s;
}
.drag-hint .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--halogen);
  animation: pulse 1.8s ease infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
@media (max-width: 480px) {
  .stage-title {
    max-width: 11ch;
  }
  .stage-sub {
    display: none;
  }
}

#tooltip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  transform: translate(-50%, -140%);
  background: rgba(11, 11, 12, 0.85);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  padding: 8px 12px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
#tooltip.show {
  opacity: 1;
}
#tooltip .t-cat {
  font-size: 10px;
  color: var(--halogen);
}
#tooltip .t-title {
  font-family: "Fraunces", serif;
  font-size: 14px;
  margin-top: 2px;
}

/* ---------- Section shell ---------- */
section {
  padding: clamp(64px, 12vw, 120px) clamp(18px, 5vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(32px, 6vw, 56px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  gap: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 500;
}
.section-head p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

/* ---------- Catalog grid ---------- */
.catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.work {
  background: var(--obsidian);
  padding: clamp(18px, 3.5vw, 28px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.work.in-view {
  opacity: 1;
  transform: translateY(0);
}
.work canvas {
  width: 100%;
  aspect-ratio: 1/1;
  display: block;
  border: 1px solid var(--line);
  transition:
    border-color 0.3s ease,
    filter 0.3s ease;
}
.work:hover canvas,
.work:active canvas {
  border-color: var(--halogen);
  filter: brightness(1.08);
}
.work .num {
  font-size: 11px;
  color: var(--halogen);
  margin-top: 18px;
}
.work h3 {
  font-size: clamp(17px, 2.4vw, 19px);
  font-weight: 500;
  margin-top: 6px;
}
.work .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 900px) and (min-width: 641px) {
  .catalog {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- About ---------- */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 60px);
}
#about p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 16px;
}
#about .stat {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 28px;
}
#about .stat span {
  display: block;
}
#about .stat .n {
  font-family: "Fraunces", serif;
  font-size: clamp(26px, 4vw, 34px);
}
#about .stat .l {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

footer {
  padding: clamp(24px, 5vw, 40px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Modal ---------- */
#modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  padding: 30px;
}
#modal.open {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  width: 100%;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--obsidian);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#modal.open .modal-card {
  transform: scale(1) translateY(0);
}
.modal-card canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
@media (max-width: 860px) {
  .modal-card canvas {
    height: 52vh;
    max-height: 340px;
  }
}
.modal-info {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-info .num {
  color: var(--halogen);
  font-size: 12px;
}
.modal-info h3 {
  font-size: 30px;
  margin-top: 12px;
  font-weight: 500;
}
.modal-info .artist {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}
.modal-info .desc {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.modal-info .close {
  margin-top: 32px;
  align-self: flex-start;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 0.3s,
    color 0.3s;
}
.modal-info .close:hover {
  border-color: var(--halogen);
  color: var(--halogen);
}

@media (max-width: 860px) {
  .catalog {
    grid-template-columns: 1fr;
  }
  #about .about-grid {
    grid-template-columns: 1fr;
  }
  .modal-card {
    grid-template-columns: 1fr;
    max-height: 88vh;
    overflow-y: auto;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-head p {
    text-align: left;
    max-width: none;
  }
}
@media (max-width: 640px) {
  .modal-info {
    padding: 28px 22px;
  }
  .modal-info h3 {
    font-size: 24px;
  }
  .modal-info .close {
    padding: 12px 18px;
    width: 100%;
    text-align: center;
  }
  footer {
    flex-direction: column;
    text-align: left;
  }
}
/* touch devices: no hover state to rely on, keep tap targets comfortable */
@media (hover: none) {
  .work,
  .modal-info .close,
  nav a {
    -webkit-tap-highlight-color: transparent;
  }
  .work {
    padding-bottom: 24px;
  }
}
/* short / landscape phones: hero text was eating the whole viewport */
@media (max-height: 480px) and (orientation: landscape) {
  #stage {
    height: 100svh;
    min-height: 340px;
  }
  .stage-title {
    font-size: clamp(24px, 6vw, 40px);
  }
  .stage-sub {
    display: none;
  }
  .drag-hint {
    bottom: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Mini chatbot ---------- */
#chatToggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--halogen);
  color: var(--obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 0 rgba(255, 180, 84, 0.5);
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}
#chatToggle:hover {
  transform: translateY(-2px) scale(1.04);
}
#chatToggle.open {
  background: var(--concrete);
  color: var(--ink);
}
#chatToggle svg {
  transition: transform 0.3s ease;
}
#chatToggle.open svg {
  transform: rotate(90deg);
}
#chatDot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5c5c;
  border: 2px solid var(--obsidian);
  animation: pulse 2s ease infinite;
}
#chatToggle.open #chatDot,
#chatToggle.seen #chatDot {
  display: none;
}

#chatPanel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 119;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100svh - 140px);
  background: var(--obsidian);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.98);
  transform-origin: bottom right;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#chatPanel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#chatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--concrete);
  flex-shrink: 0;
}
#chatHeaderTitle {
  font-family: "Fraunces", serif;
  font-size: 15px;
}
#chatHeaderSub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  flex-shrink: 0;
}
#chatClose {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s ease;
}
#chatClose:hover {
  color: var(--halogen);
}

#chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
#chatMessages::-webkit-scrollbar {
  width: 6px;
}
#chatMessages::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.chat-msg {
  max-width: 82%;
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 13px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(6px);
  animation: chatIn 0.35s ease forwards;
}
@keyframes chatIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--concrete);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--halogen);
  color: var(--obsidian);
  border-bottom-right-radius: 3px;
}
.chat-msg .mono {
  display: block;
  font-size: 9px;
  color: var(--halogen);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.chat-msg.user .mono {
  color: rgba(11, 11, 12, 0.55);
}

.chat-typing {
  align-self: flex-start;
  background: var(--concrete);
  padding: 11px 14px;
  border-radius: 10px;
  border-bottom-left-radius: 3px;
  display: flex;
  gap: 4px;
}
.chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: chatBounce 1.1s ease infinite;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chatBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

#chatChips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 18px 12px;
  flex-shrink: 0;
}
.chat-chip {
  font-size: 11px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
}
.chat-chip:hover {
  border-color: var(--halogen);
  color: var(--halogen);
}

#chatForm {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
#chatInput {
  flex: 1;
  background: var(--concrete);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 13px;
  font-family: "Inter", sans-serif;
  outline: none;
  transition: border-color 0.2s ease;
}
#chatInput:focus {
  border-color: var(--halogen);
}
#chatInput::placeholder {
  color: var(--muted);
}
#chatSend {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--halogen);
  color: var(--obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
#chatSend:hover {
  transform: scale(1.08);
}
#chatSend:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

@media (max-width: 480px) {
  #chatToggle {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
  #chatPanel {
    right: 8px;
    left: 8px;
    bottom: 80px;
    width: auto;
    max-width: none;
    height: min(64svh, 520px);
  }
}

/* ---------- Enhanced 3D Gallery ---------- */
.gallery-controls {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 94vw;
}
.gallery-btn,
.filter-btn {
  background: rgba(11, 11, 12, 0.82);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 12px;
  font:
    10px "IBM Plex Mono",
    monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: 0.25s;
}
.gallery-btn:hover,
.gallery-btn.active,
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--halogen);
  color: var(--halogen);
}
.room-badge {
  position: absolute;
  top: 142px;
  left: clamp(18px, 5vw, 40px);
  z-index: 20;
  font:
    10px "IBM Plex Mono",
    monospace;
  color: var(--halogen);
  background: rgba(11, 11, 12, 0.68);
  padding: 7px 10px;
  border: 1px solid var(--line);
}
.search-panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  align-items: center;
}
#artSearch {
  flex: 1;
  min-width: 220px;
  background: var(--concrete);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 13px 15px;
  outline: none;
  font:
    13px Inter,
    sans-serif;
}
#artSearch:focus {
  border-color: var(--halogen);
}
.filter-select {
  background: var(--concrete);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px;
  font:
    12px Inter,
    sans-serif;
  outline: none;
}
.artist-chip {
  display: inline-block;
  margin-top: 10px;
  color: var(--halogen);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.artist-chip:hover {
  border-color: var(--halogen);
}
.compare-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 180;
  display: none;
  gap: 10px;
  align-items: center;
  background: rgba(20, 20, 22, 0.96);
  border: 1px solid var(--line);
  padding: 10px 14px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}
.compare-bar.show {
  display: flex;
}
.compare-bar span {
  font:
    10px "IBM Plex Mono",
    monospace;
  color: var(--muted);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  width: min(1100px, 96vw);
}
.compare-item {
  background: var(--obsidian);
  padding: 18px;
}
.compare-item canvas {
  width: 100%;
  display: block;
}
.artist-panel {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  padding: 20px;
}
.artist-panel.open {
  opacity: 1;
  visibility: visible;
}
.artist-card {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--obsidian);
  border: 1px solid var(--line);
  padding: clamp(24px, 5vw, 50px);
}
.artist-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.artist-head h2 {
  font-size: clamp(28px, 5vw, 46px);
}
.artist-bio {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
  margin: 20px 0;
}
.artist-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.artist-works button {
  background: var(--concrete);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px;
  cursor: pointer;
  text-align: left;
}
.artist-works button:hover {
  border-color: var(--halogen);
}
.modal-tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.modal-tools button {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 11px;
  cursor: pointer;
  font:
    10px "IBM Plex Mono",
    monospace;
  text-transform: uppercase;
}
.modal-tools button:hover {
  border-color: var(--halogen);
  color: var(--halogen);
}
#modalCanvas {
  transition: transform 0.3s ease;
  cursor: grab;
}
.room-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid var(--line);
  padding: 9px 12px;
  font:
    9px "IBM Plex Mono",
    monospace;
  color: var(--muted);
}
@media (max-width: 720px) {
  .gallery-controls {
    top: 78px;
  }
  .room-badge {
    top: 125px;
  }
  .artist-works {
    grid-template-columns: 1fr 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.artist-close-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font:
    28px/34px Inter,
    sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.artist-close-icon:hover {
  border-color: var(--halogen);
  color: var(--halogen);
  transform: rotate(90deg);
}
.artist-profile-hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0 28px;
}
.artist-profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--concrete);
}
.artist-profile-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.artist-work-card {
  background: var(--concrete);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: 0.2s;
}
.artist-work-card:hover {
  border-color: var(--halogen);
  transform: translateY(-2px);
}
.artist-work-card img {
  width: 100%;
  aspect-ratio: 1/1;
  display: block;
  object-fit: cover;
}
.artist-work-card-info {
  padding: 10px;
}
.artist-work-card-info strong {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
@media (max-width: 720px) {
  .artist-profile-hero {
    grid-template-columns: 90px 1fr;
    gap: 15px;
  }
  .artist-profile-image {
    width: 90px;
    height: 90px;
  }
  .artist-profile-works {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Responsive Artist Profile: Artwork Left / Artist Right ---------- */
.artist-card-columns {
  width: min(1100px, 96vw);
  max-height: 90vh;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  overflow: hidden;
}

.artist-column {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
}

.artist-art-column {
  background: var(--concrete);
  border-right: 1px solid var(--line);
  overflow: auto;
}

.artist-info-column {
  background: var(--obsidian);
  overflow: auto;
}

.artist-column-label,
.artist-section-label {
  color: var(--halogen);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.artist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.artist-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 25px 0 28px;
}

.artist-profile-image {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--concrete);
}

.artist-profile-hero h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  margin: 0;
}

.artist-style-line {
  color: var(--muted);
  margin-top: 10px;
}

.artist-bio {
  color: var(--muted);
  line-height: 1.85;
  font-size: 14px;
  margin: 0 0 28px;
}

.artist-featured-art {
  width: 100%;
  aspect-ratio: 1/1;
  background: #080809;
  border: 1px solid var(--line);
  overflow: hidden;
}

.artist-featured-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.artist-art-info {
  padding: 18px 0 16px;
}

.artist-art-number {
  color: var(--halogen);
  margin-bottom: 8px;
}

.artist-art-info h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.artist-art-info p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.artist-profile-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 5px;
}

.artist-work-card {
  background: var(--obsidian);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: 0.2s;
}

.artist-work-card:hover {
  border-color: var(--halogen);
  transform: translateY(-2px);
}

.artist-work-card img {
  width: 100%;
  aspect-ratio: 1/1;
  display: block;
  object-fit: cover;
}

.artist-work-card-info {
  padding: 9px;
}

.artist-work-card-info strong {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.artist-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 25px;
}

.artist-details div {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
}

.artist-details div:nth-child(2n) {
  border-right: 0;
}

.artist-details div:last-child {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  border-right: 0;
}

.artist-details .mono {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 6px;
}

.artist-details strong {
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .artist-card-columns {
    grid-template-columns: 1fr 1fr;
    width: min(960px, 96vw);
  }

  .artist-column {
    padding: 25px;
  }

  .artist-profile-image {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .artist-profile-works {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .artist-panel {
    padding: 10px;
    align-items: flex-start;
  }

  .artist-card-columns {
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
  }

  .artist-art-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    order: 1;
    overflow: visible;
  }

  .artist-info-column {
    order: 2;
    overflow: visible;
  }

  .artist-featured-art {
    max-width: 520px;
    margin: auto;
  }

  .artist-profile-hero {
    margin-top: 20px;
  }

  .artist-profile-image {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
  }

  .artist-profile-hero h2 {
    font-size: 30px;
  }

  .artist-details {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .artist-column {
    padding: 20px 16px;
  }

  .artist-profile-works {
    grid-template-columns: 1fr 1fr;
  }

  .artist-profile-image {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .artist-profile-hero h2 {
    font-size: 25px;
  }
}
