/* UZ Portfolio 3D — Core Stylesheet */
:root {
  --ground: #060608;
  --surface: #0e0e12;
  --surface-elevated: #15151b;
  --ink: #f2efe9;
  --muted: #938f88;
  --line: rgba(242, 239, 233, 0.11);
  --line-strong: rgba(242, 239, 233, 0.24);
  --copper: #d4956a;
  --copper-bright: #eab892;
  --copper-soft: rgba(212, 149, 106, 0.14);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--ground);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.admin-bar .uz-sticky-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .uz-sticky-header { top: 46px; }
}

.font-display { font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif; }
.font-editorial { font-family: 'Cormorant Garamond', Georgia, serif; }
.font-mono-tech { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.cinema-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 68% 42%, transparent 18%, rgba(6, 6, 8, 0.72) 78%),
    linear-gradient(180deg, rgba(6, 6, 8, 0.45) 0%, rgba(6, 6, 8, 0.12) 40%, rgba(6, 6, 8, 0.85) 100%);
}

.page-shell { position: relative; z-index: 10; }

#introCurtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #060608;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  pointer-events: none;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

.glass-panel {
  background: rgba(14, 14, 18, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-copper {
  position: relative;
  overflow: hidden;
  background: var(--copper);
  color: #060608;
  font-weight: 700;
  transition: transform 0.35s var(--ease-expo), background-color 0.3s ease;
}
.btn-copper:hover {
  background: var(--copper-bright);
  transform: translateY(-2px);
}

.btn-outline-ivory {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(6, 6, 8, 0.45);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s var(--ease-expo);
}
.btn-outline-ivory:hover {
  border-color: var(--copper);
  background: var(--copper-soft);
  transform: translateY(-2px);
}

.project-row {
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s var(--ease-expo), border-color 0.35s ease, padding-left 0.35s var(--ease-expo);
}
.project-row:hover {
  background: rgba(212, 149, 106, 0.06);
  border-bottom-color: rgba(212, 149, 106, 0.45);
  padding-left: 0.75rem;
}
.project-row:hover .project-arrow {
  transform: translate(4px, -4px);
  color: var(--copper);
}
.project-arrow { transition: transform 0.35s var(--ease-expo), color 0.3s ease; }

.service-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-expo);
}
.service-item[data-open="true"] .service-body { grid-template-rows: 1fr; }
.service-item[data-open="true"] .service-plus { transform: rotate(45deg); color: var(--copper); }

.filter-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(14, 14, 18, 0.6);
  transition: all 0.25s var(--ease-expo);
}
.filter-pill:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-pill[aria-pressed="true"] {
  background: var(--copper);
  border-color: var(--copper);
  color: #060608;
  font-weight: 700;
}

.shader-btn {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(6, 6, 8, 0.65);
  transition: all 0.25s ease;
}
.shader-btn[aria-pressed="true"] {
  border-color: var(--copper);
  color: var(--ink);
  background: var(--copper-soft);
}

/* Interactive 3D Living Portrait Entity */
.portrait-stage { perspective: 1100px; }

@keyframes entityBreathe {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-8px) rotateZ(0.6deg); }
}
.portrait-float { animation: entityBreathe 5.5s ease-in-out infinite; }

.portrait-card-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-expo), box-shadow 0.45s var(--ease-expo), border-color 0.35s ease;
  cursor: pointer;
  will-change: transform;
  background: linear-gradient(160deg, rgba(24, 21, 22, 0.86) 0%, rgba(8, 8, 11, 0.94) 100%);
  border: 1px solid rgba(212, 149, 106, 0.34);
  box-shadow: 0 28px 65px -20px rgba(0, 0, 0, 0.85), 0 0 40px -12px rgba(212, 149, 106, 0.22);
}
.portrait-card-3d:hover {
  border-color: rgba(234, 184, 146, 0.72);
  box-shadow: 0 34px 75px -18px rgba(0, 0, 0, 0.9), 0 0 55px -10px rgba(212, 149, 106, 0.36);
}
.portrait-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(280px circle at var(--px, 50%) var(--py, 30%), rgba(234, 184, 146, 0.24), transparent 65%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  z-index: 3;
}
.portrait-depth-layer { transform: translateZ(34px); }
.portrait-depth-mid { transform: translateZ(20px); }

.portrait-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 1.75rem;
  border: 1.5px solid rgba(212, 149, 106, 0.65);
  opacity: 0;
  pointer-events: none;
}
@keyframes pulseBurst {
  0% { transform: scale(0.96); opacity: 0.85; }
  100% { transform: scale(1.09); opacity: 0; }
}
.portrait-pulse-ring.is-bursting { animation: pulseBurst 0.75s var(--ease-expo) forwards; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .portrait-float { animation: none; }
  #introCurtain { display: none !important; }
}
/* =========================================================
   UZ Custom Animated Cursor (Desktop Fine-Pointer Only)
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  body.uz-custom-cursor,
  body.uz-custom-cursor a,
  body.uz-custom-cursor button,
  body.uz-custom-cursor [role="button"] {
    cursor: none !important;
  }

  .uz-cursor-dot,
  .uz-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    will-change: transform, width, height, opacity;
    transition: opacity 0.25s ease;
  }

  .uz-cursor-dot {
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 9999px;
    background: #eab892;
    box-shadow: 0 0 12px rgba(212, 149, 106, 0.9);
  }

  .uz-cursor-ring {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 9999px;
    border: 1.5px solid rgba(212, 149, 106, 0.72);
    background: rgba(212, 149, 106, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #060608;
    transition:
      width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      margin 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      background-color 0.25s ease,
      border-color 0.25s ease,
      opacity 0.25s ease;
  }

  .uz-cursor-ring.is-hover {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    background: rgba(212, 149, 106, 0.16);
    border-color: #eab892;
    backdrop-filter: blur(2px);
  }

  .uz-cursor-ring.is-label {
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    background: #d4956a;
    border-color: #eab892;
    box-shadow: 0 10px 30px -6px rgba(212, 149, 106, 0.55);
  }

  .uz-cursor-ring.is-pressed {
    transform-origin: center;
    border-color: #ffffff;
    background: rgba(234, 184, 146, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .uz-cursor-dot,
  .uz-cursor-ring {
    display: none !important;
  }
}