:root {
  --obsidian: #030407;
  --pearl: #f4f7fb;
  --silver: #9aa6b8;
  --silver-dim: rgba(154, 166, 184, 0.72);
  --glacial: #d6f1ff;
  --ice-blue: #7cc6ee;
  --slate-mist: #243f59;
  --glass-border: rgba(214, 241, 255, 0.22);
  --font-sans: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overscroll-behavior: none; touch-action: none; overflow: hidden; font-family: var(--font-sans); color: var(--pearl); }
.sz-stage { position: fixed; inset: 0; background: var(--obsidian); overflow: hidden; user-select: none; -webkit-user-select: none; outline: none; }
.sz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.sz-canvas:active { cursor: grabbing; }

.sz-header {
  position: absolute;
  top: clamp(14px, 2.2vw, 24px);
  left: clamp(14px, 2.6vw, 32px);
  right: clamp(14px, 2.6vw, 32px);
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.sz-nav {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  grid-column: 2;
  justify-self: center;
  gap: 2px;
  height: 40px;
  padding: 3px 5px;
  border-radius: 999px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid transparent;
  box-shadow: none;
  transition: box-shadow 260ms ease;
}

.sz-nav:hover {
  box-shadow: 0 0 28px rgba(124, 198, 238, 0.22);
}

.sz-nav::before, .sz-circle-btn::before {
  content: "";
  position: absolute;
  inset: 0 1px auto;
  height: 50%;
  border-radius: inherit;
  background: radial-gradient(220px circle at 50% 0%, rgba(214, 241, 255, 0.34), transparent 68%);
  opacity: 0.28;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.sz-nav:hover::before, .sz-circle-btn:hover::before {
  opacity: 0.68;
}

.sz-nav-btn {
  position: relative;
  background: transparent;
  border: 0;
  outline: none;
  border-radius: 999px;
  color: rgba(220, 232, 246, 0.84);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  padding: 7px 14px;
  text-shadow: 0 1px 6px rgba(2, 5, 12, 0.88);
  cursor: pointer;
  transition: color 200ms ease, background 240ms ease, text-shadow 220ms ease;
}
.sz-nav-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--glacial), #ffffff, var(--glacial), transparent);
  box-shadow: 0 0 8px rgba(124, 198, 238, 0.72);
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.sz-nav-btn:hover:not(.is-active), .sz-nav-btn:focus-visible {
  color: #ffffff;
  background: radial-gradient(ellipse 80% 85% at 50% 50%, rgba(214, 241, 255, 0.09), transparent 76%);
  text-shadow: 0 0 12px rgba(214, 241, 255, 0.48), 0 1px 6px rgba(2, 5, 12, 0.88);
}
.sz-nav-btn.is-active {
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 0 14px rgba(214, 241, 255, 0.72), 0 0 26px rgba(124, 198, 238, 0.34);
  background: radial-gradient(ellipse 84% 88% at 50% 50%, rgba(214, 241, 255, 0.14), rgba(124, 198, 238, 0.03) 64%, transparent 100%);
  box-shadow: none;
}
.sz-nav-btn.is-active::after {
  opacity: 0.92;
  transform: translateX(-50%) scaleX(1);
}
.sz-nav-sep { width: 1px; height: 11px; background: rgba(214, 241, 255, 0.22); }

.sz-bottom-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(14px, 2.2vw, 24px) clamp(16px, 2.8vw, 32px);
  pointer-events: none;
}

.sz-circle-btn {
  position: relative;
  overflow: hidden;
  grid-column: 3;
  justify-self: end;
  pointer-events: auto;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  outline: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--glacial);
  box-shadow: none;
  cursor: pointer;
  transition: transform 200ms ease, color 200ms ease, box-shadow 240ms ease;
}

.sz-circle-btn:hover, .sz-circle-btn:focus-visible {
  transform: translateY(-2px);
  border-color: transparent;
  background: transparent;
  box-shadow: 0 0 28px rgba(124, 198, 238, 0.26);
  color: #ffffff;
}
.sz-circle-btn svg { width: 100%; height: 100%; display: block; }
.sz-circle-btn.sz-music-btn {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sz-eq-bars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 14px;
  pointer-events: none;
}
.sz-eq-bar {
  width: 1.8px;
  height: 13px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: none;
  opacity: 0.68;
  transform: scaleY(0.24);
  transform-origin: center;
  animation: none;
}
.sz-music-btn.is-playing .sz-eq-bar {
  box-shadow: 0 0 8px rgba(124, 198, 238, 0.55);
  animation: szEqBreath 2.4s ease-in-out infinite;
}
.sz-eq-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.sz-eq-bar:nth-child(2) { height: 14px; animation-delay: -0.8s; }
.sz-eq-bar:nth-child(3) { height: 9px; animation-delay: -1.5s; }
.sz-music-btn.is-muted { color: rgba(154, 166, 184, 0.52); }
.sz-music-btn.is-muted .sz-eq-bar { animation: none; transform: scaleY(0.18); box-shadow: none; opacity: 0.55; }
@keyframes szEqBreath {
  0%, 100% { transform: scaleY(0.38); opacity: 0.68; }
  50% { transform: scaleY(1); opacity: 1; }
}
.sz-scroll-hint { grid-column: 2; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 7px; opacity: 0.85; transition: opacity 260ms ease; }
.sz-scroll-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--silver); }
.sz-progress-track { width: 112px; height: 2px; border-radius: 2px; background: rgba(214, 241, 255, 0.14); overflow: hidden; }
.sz-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--ice-blue), var(--glacial));
  box-shadow: 0 0 10px var(--ice-blue);
  transform: scaleX(0.04);
  transform-origin: left center;
  will-change: transform;
}

.sz-about-slot {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms linear;
}

.sz-about-head {
  position: absolute;
  top: clamp(66px, 8.2%, 86px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.34em;
  color: rgba(214, 241, 255, 0.72);
  text-shadow: 0 0 18px rgba(124, 198, 238, 0.24);
  white-space: nowrap;
}

.sz-stage.is-showcase-open .sz-about-slot,
.sz-stage.is-showcase-open #sz-work-slot,
.sz-stage.is-showcase-open .sz-spatial-root,
.sz-stage.is-showcase-open .sz-card,
.sz-stage.is-showcase-open .sz-header,
.sz-stage.is-showcase-open .sz-bottom-ui {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 220ms ease, visibility 220ms ease;
}

@media (max-width: 720px) {
  .sz-nav { grid-column: 1 / -1; justify-self: center; max-width: calc(100vw - 24px); }
  .sz-nav-btn { padding: 6px 10px; font-size: 8.5px; }
  .sz-scroll-label { font-size: 8px; letter-spacing: 0.16em; }
}

@media (max-width: 520px) {
  .sz-header { left: 10px; right: 10px; top: 10px; }
  .sz-nav { height: 36px; padding: 2px 5px; gap: 0; }
  .sz-nav-btn { padding: 6px 10px; font-size: 9px; letter-spacing: 0.11em; }
  .sz-circle-btn { width: 34px; height: 34px; padding: 8px; }
  .sz-bottom-ui { padding: 10px 12px; }
}

@media (max-height: 480px) {
  .sz-header { top: 8px; }
  .sz-bottom-ui { padding: 8px 16px; }
}

.sz-cursor-canvas { position: absolute; left: 0; top: 0; width: 320px; height: 320px; z-index: 40; pointer-events: none; display: block; will-change: transform; }
@media (pointer: fine) {
  .sz-stage.sz-has-cursor, .sz-stage.sz-has-cursor * { cursor: none !important; }
}
