/* =====================================================
   PROJECTS: 3D ring carousel
   (stage is built by js/projects-ring.js from the .pr-data list)
===================================================== */
.projects { position: relative; z-index: 1; overflow-x: clip; padding: clamp(90px, 13svh, 150px) var(--pad) clamp(60px, 9svh, 110px); background: radial-gradient(45% 30% at 10% 0%, rgba(242,217,138,.06), transparent 70%), var(--bg); border-top: 1px solid var(--line); }

.projects .sec-head { margin-bottom: clamp(34px, 6svh, 64px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

.projects .sec-head h3 { font-size: clamp(1.8rem, 4vw, 3.6rem); max-width: 14ch; }

.projects .sec-head p { color: rgba(244,244,241,.6); max-width: 34ch; font-size: .98rem; line-height: 1.6; }


.pr { --accent: #f2d98a; --cw: 700px; position: relative; isolation: isolate; transition: --accent .9s ease; }

.pr-glow {
  position: absolute; z-index: -1; left: -8vw; right: -8vw; top: -90px; height: 700px; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 30%, rgba(242,217,138,.14), transparent 72%);
  background: radial-gradient(50% 60% at 50% 32%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 72%);
  -webkit-mask-image: radial-gradient(closest-side, #000 50%, transparent 100%); mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
}


/* no-JS fallback: plain list of cards */
.pr-data { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.pr-data li { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.03); line-height: 1.6; color: rgba(255,255,255,.72); }

.pr-data h4 { color: var(--text); margin-bottom: 8px; }

.pr-data a { color: var(--gold); margin-right: 14px; }

.pr-data[hidden] { display: none; }


/* ---------- 3D stage ---------- */
.pr-stage { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; perspective: 1900px; perspective-origin: 50% 35%; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }

.pr-stage::after { /* soft floor glow under the active card */
  content: ""; position: absolute; left: 50%; bottom: 6px; width: calc(var(--cw) * .9); height: 60px; translate: -50% 0; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(242,217,138,.3), transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent); filter: blur(10px);
}

.pr-ring { position: absolute; left: 50%; top: 14px; transform-style: preserve-3d; }

.pr-ring { will-change: transform; }
   /* rotation is driven frame-by-frame by projects-ring.js (spring) */
.pr-stage.is-dragging { cursor: grabbing; }

.pr-stage.is-dragging .pr-face { transition: none; }

.pr-card { position: absolute; inset: 0; display: block; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; cursor: pointer; outline: none; }

.pr-face {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #101010;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);   /* big blurred shadows made every frame of the 3D slide expensive: the glow comes from .pr-glow instead */
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .35s var(--ease-out);
}

.pr-face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.pr-dim { position: absolute; inset: 0; background: #000; opacity: .62; pointer-events: none; will-change: opacity; }

.pr-card.is-active .pr-face { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 55%, rgba(255,255,255,.25)); }

.pr-card.is-far { pointer-events: none; }

.pr-open {
  position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: rgba(10,10,10,.72); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; translate: 0 8px; transition: opacity .35s, translate .35s var(--ease-out);
}

.pr-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pr-card.is-active:hover .pr-open,.pr-card.is-active:focus-visible .pr-open { opacity: 1; translate: 0 0; }

.pr-card:focus-visible .pr-face { outline: 2px solid var(--gold); outline-offset: 5px; }


/* ---------- controls ---------- */
.pr-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 8px; }

.pr-dots { display: flex; align-items: center; gap: 10px; }

.pr-dot { width: 10px; height: 10px; padding: 0; border-radius: 99px; border: 0; cursor: pointer; background: rgba(255,255,255,.22); transition: width .45s var(--ease-out), background .3s; }

.pr-dot:hover { background: rgba(255,255,255,.5); }

.pr-dot.is-active { width: 34px; background: var(--accent); }

.pr-dot:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }


/* ---------- details panel ---------- */
.pr-panel { max-width: 1100px; margin: clamp(26px, 4svh, 44px) auto 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; transition: opacity .25s ease, transform .25s ease; }

.pr-panel.swap { opacity: 0; transform: translateY(10px); }

.pr-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }

.pr-cat { font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

.pr-count { font-family: var(--display); font-size: .78rem; letter-spacing: .16em; color: rgba(255,255,255,.5); }

.pr-count b { color: var(--text); font-weight: 600; }

.pr-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 14px; }

.pr-desc { color: rgba(255,255,255,.7); line-height: 1.65; max-width: 52ch; }

.pr-side { display: flex; flex-direction: column; gap: 22px; }

.pr-stack { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }

.pr-stack li { padding: 7px 14px; border-radius: 999px; font-size: .84rem; color: var(--text); border: 1px solid rgba(255,255,255,.2); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: rgba(255,255,255,.03); }

.pr-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; cursor: pointer;
  font-size: .84rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  transition: transform .35s var(--ease-out), background .3s, border-color .3s, color .3s, box-shadow .35s;
}

.pr-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pr-btn.pr-code svg.gh { fill: currentColor; stroke: none; width: 18px; height: 18px; }

.pr-live { background: linear-gradient(135deg, #f7ecc4, #e6c76f); color: #14110a; border: 1px solid transparent; }

.pr-live:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -8px rgba(242,217,138,.55); }

.pr-code { color: var(--text); border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.04); }

.pr-code:hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(242,217,138,.08); color: var(--gold); }

.pr-code[aria-disabled="true"] { opacity: .5; cursor: not-allowed; border-style: dashed; }

.pr-code[aria-disabled="true"]:hover { transform: none; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); color: var(--text); }

.pr-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }


@media (max-width: 900px) {
  .pr-panel { grid-template-columns: 1fr; gap: 22px; align-items: start; }

}

@media (max-width: 560px) {
  .pr-controls { gap: 14px; }

  .pr-btn { flex: 1 1 100%; }

  .pr-open { display: none; }

}


.foot { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px var(--pad); border-top: 1px solid var(--line); background: var(--bg); color: rgba(244,244,241,.55); font-size: .88rem; }

.foot a:hover { color: var(--gold); }

