:root {
  --bg: #080812;
  --panel: rgba(17, 18, 38, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f3ff;
  --muted: #b9b4d6;
  --cyan: #4dfcff;
  --pink: #ff4fd8;
  --purple: #8b5cf6;
  --gold: #f7c873;
  --dark: #0d0d1a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(77, 252, 255, 0.18), transparent 35%),
    var(--bg);
  overflow-x: hidden;
}

.dev-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: -1;
}

.dev-header {
  padding: 32px 7vw 18px;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan);
}

.back-link:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.82rem;
}

.dev-header h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  color: var(--cyan);
  text-shadow:
    0 0 18px rgba(77, 252, 255, 0.45),
    0 0 36px rgba(255, 79, 216, 0.18);
}

.subtitle {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
}

.dev-stage {
  padding: 10px 7vw 110px;
}

.tree-shell {
  position: relative;
  width: min(1100px, 100%);
  height: 760px;
  margin: 0 auto;
  border: 1px solid rgba(77, 252, 255, 0.22);
  border-radius: 36px;
  background:
    radial-gradient(circle at center, rgba(77, 252, 255, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(77,252,255,0.03)),
    rgba(8, 8, 18, 0.65);
  box-shadow:
    0 0 45px rgba(77, 252, 255, 0.12),
    0 0 70px rgba(255, 79, 216, 0.07),
    inset 0 0 30px rgba(77, 252, 255, 0.03);
  overflow: hidden;
}

.tree-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 79, 216, 0.05), transparent 30%),
    repeating-linear-gradient(
      90deg,
      transparent 0 48px,
      rgba(77, 252, 255, 0.03) 48px 49px
    );
  pointer-events: none;
}

.tree-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  min-height: 270px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background:
    radial-gradient(circle, rgba(77, 252, 255, 0.18), rgba(17, 18, 38, 0.95) 68%);
  border: 2px solid rgba(77, 252, 255, 0.35);
  box-shadow:
    0 0 24px rgba(77, 252, 255, 0.35),
    0 0 52px rgba(255, 79, 216, 0.12),
    inset 0 0 24px rgba(255, 79, 216, 0.08);
  z-index: 3;
}

.core-label {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
}

.tree-core h2 {
  margin: 8px 0;
  color: var(--cyan);
}

.tree-core p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.branch-btn {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(77, 252, 255, 0.35);
  background: rgba(12, 12, 28, 0.88);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 0 14px rgba(77, 252, 255, 0.08);
}

.branch-btn:hover,
.branch-btn.active {
  background: linear-gradient(135deg, rgba(77,252,255,0.2), rgba(255,79,216,0.16));
  border-color: var(--pink);
  box-shadow:
    0 0 20px rgba(77, 252, 255, 0.24),
    0 0 30px rgba(255, 79, 216, 0.14);
  transform: scale(1.04);
}

.top-left { top: 80px; left: 90px; }
.top-right { top: 80px; right: 90px; }
.bottom-left { bottom: 150px; left: 90px; }
.bottom-right { bottom: 150px; right: 90px; }
.bottom-center { bottom: 34px; left: 50%; transform: translateX(-50%); }

.tree-line {
  position: absolute;
  background: linear-gradient(90deg, rgba(77, 252, 255, 0.16), rgba(255, 79, 216, 0.18));
  box-shadow: 0 0 10px rgba(77, 252, 255, 0.12);
  z-index: 1;
}

.line-top-left {
  width: 220px;
  height: 2px;
  top: 140px;
  left: 245px;
  transform: rotate(24deg);
}

.line-top-right {
  width: 220px;
  height: 2px;
  top: 140px;
  right: 245px;
  transform: rotate(-24deg);
}

.line-bottom-left {
  width: 220px;
  height: 2px;
  bottom: 240px;
  left: 245px;
  transform: rotate(-24deg);
}

.line-bottom-right {
  width: 220px;
  height: 2px;
  bottom: 240px;
  right: 245px;
  transform: rotate(24deg);
}

.line-bottom-center {
  width: 2px;
  height: 135px;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
}

.skill-cluster {
  position: absolute;
  width: 240px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(10, 10, 24, 0.88);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 0 20px rgba(77, 252, 255, 0.08),
    inset 0 0 20px rgba(255, 79, 216, 0.04);
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: 0.35s ease;
  z-index: 5;
}

.skill-cluster.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.skill-cluster h3 {
  margin-top: 0;
  color: var(--cyan);
}

.cluster-top-left { top: 140px; left: 35px; }
.cluster-top-right { top: 140px; right: 35px; }
.cluster-bottom-left { bottom: 220px; left: 35px; }
.cluster-bottom-right { bottom: 220px; right: 35px; }
.cluster-bottom-center {
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
}

.cluster-bottom-center.active {
  transform: translateX(-50%) scale(1);
}

.skill-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(77,252,255,0.16),
    rgba(255,79,216,0.12)
  );
  border: 1px solid rgba(77,252,255,0.2);
  color: var(--text);
  font-size: 0.9rem;
  transition: 0.25s ease;
  cursor: default;
}

.skill-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(77, 252, 255, 0.16);
}

.dev-floating-menu {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(8, 8, 18, 0.86);
  border: 1px solid rgba(77, 252, 255, 0.28);
  backdrop-filter: blur(14px);
  z-index: 50;
  box-shadow:
    0 0 28px rgba(77, 252, 255, 0.14),
    0 0 45px rgba(255, 79, 216, 0.08);
}

.dev-floating-menu button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

.dev-floating-menu button:hover {
  color: #050511;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(77, 252, 255, 0.45);
}

@media (max-width: 980px) {
  .dev-stage {
    padding: 10px 20px 120px;
  }

  .tree-shell {
    height: auto;
    min-height: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    border-radius: 26px;
  }

  .tree-core,
  .branch-btn,
  .skill-cluster,
  .tree-line,
  .particle-field {
    position: static;
    transform: none !important;
  }

  .tree-line,
  .particle-field {
    display: none;
  }

  .tree-core {
    width: 100%;
    min-height: auto;
    border-radius: 24px;
    padding: 22px;
    order: 1;
  }

  .branch-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    order: 2;
  }

  .skill-cluster {
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: none !important;
    display: block;
    order: 3;
    padding: 16px;
  }

  .cluster-top-left,
  .cluster-top-right,
  .cluster-bottom-left,
  .cluster-bottom-right,
  .cluster-bottom-center {
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }

  .skill-pill-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .skill-pill {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .dev-header {
    padding: 24px 18px 14px;
  }

  .dev-header h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .dev-stage {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tree-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .tree-core {
    padding: 18px;
  }

  .core-orb {
    width: 52px;
    height: 52px;
  }

  .branch-btn {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .skill-cluster {
    border-radius: 18px;
  }

  .skill-cluster h3 {
    font-size: 1.05rem;
  }

  .skill-pill {
    font-size: 0.88rem;
    padding: 10px;
  }

  .dev-floating-menu {
    width: calc(100% - 20px);
    left: 10px;
    right: 10px;
    bottom: 10px;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 18px;
  }

  .dev-floating-menu button {
    white-space: nowrap;
    flex: 0 0 auto;
  }
}
  .dev-floating-menu button {
    white-space: nowrap;
  }
}
/* ===============================
   ADVANCED CYBER SKILL TREE EFFECTS
================================ */

.tree-core.pulse {
  animation: corePulse 0.9s ease;
}

.core-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background:
    radial-gradient(circle, #ffffff 0%, var(--cyan) 20%, var(--purple) 55%, transparent 72%);
  box-shadow:
    0 0 20px rgba(77, 252, 255, 0.75),
    0 0 44px rgba(255, 79, 216, 0.38),
    inset 0 0 18px rgba(255, 255, 255, 0.45);
  animation: orbIdle 2.8s ease-in-out infinite;
}

@keyframes orbIdle {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes corePulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  45% {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow:
      0 0 35px rgba(77, 252, 255, 0.55),
      0 0 70px rgba(255, 79, 216, 0.28),
      inset 0 0 30px rgba(255, 79, 216, 0.16);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Branch lines now animate outward */
.tree-line {
  transform-origin: left center;
  opacity: 0.2;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.tree-line.growing {
  opacity: 1;
  animation: branchGrow 0.75s ease forwards;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  box-shadow:
    0 0 14px rgba(77, 252, 255, 0.45),
    0 0 30px rgba(255, 79, 216, 0.22);
}

.line-top-left.growing {
  animation-name: branchGrowTopLeft;
}

.line-top-right.growing {
  animation-name: branchGrowTopRight;
}

.line-bottom-left.growing {
  animation-name: branchGrowBottomLeft;
}

.line-bottom-right.growing {
  animation-name: branchGrowBottomRight;
}

.line-bottom-center.growing {
  animation-name: branchGrowVertical;
}

@keyframes branchGrowTopLeft {
  from {
    transform: rotate(24deg) scaleX(0);
  }

  to {
    transform: rotate(24deg) scaleX(1);
  }
}

@keyframes branchGrowTopRight {
  from {
    transform: rotate(-24deg) scaleX(0);
  }

  to {
    transform: rotate(-24deg) scaleX(1);
  }
}

@keyframes branchGrowBottomLeft {
  from {
    transform: rotate(-24deg) scaleX(0);
  }

  to {
    transform: rotate(-24deg) scaleX(1);
  }
}

@keyframes branchGrowBottomRight {
  from {
    transform: rotate(24deg) scaleX(0);
  }

  to {
    transform: rotate(24deg) scaleX(1);
  }
}

@keyframes branchGrowVertical {
  from {
    transform: translateX(-50%) scaleY(0);
  }

  to {
    transform: translateX(-50%) scaleY(1);
  }
}

/* Skill pills as project nodes */
.skill-pill {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(247, 200, 115, 0.08);
  border: 1px solid rgba(247, 200, 115, 0.22);
  box-shadow: 0 0 12px rgba(247, 200, 115, 0.1);
}

.skill-meter {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.skill-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 12px rgba(77, 252, 255, 0.55);
  transform-origin: left center;
}

.skill-cluster.active .skill-meter span {
  animation: fillMeter 0.9s ease forwards;
}

@keyframes fillMeter {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* Tooltip */
.skill-tooltip {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  width: min(620px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(8, 8, 18, 0.92);
  border: 1px solid rgba(77, 252, 255, 0.3);
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  z-index: 60;
  box-shadow:
    0 0 22px rgba(77, 252, 255, 0.14),
    0 0 34px rgba(255, 79, 216, 0.08);
  pointer-events: none;
}

/* Floating particles */
.particle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.tree-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow:
    0 0 10px rgba(77, 252, 255, 0.8),
    0 0 20px rgba(255, 79, 216, 0.35);
  animation: particleFloat 1.6s ease-out forwards;
}

.tree-particle:nth-child(even) {
  background: var(--pink);
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) scale(0.4);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translateY(-120px) scale(1);
    opacity: 0;
  }
}

/* Mobile: keep everything readable */
@media (max-width: 980px) {
  .core-orb {
    width: 58px;
    height: 58px;
  }

  .skill-tooltip {
    bottom: 96px;
  }

  .tree-line.growing {
    animation: none;
  }

  .tree-core.pulse {
    animation: mobileCorePulse 0.9s ease;
  }

  @keyframes mobileCorePulse {
    0% {
      transform: scale(1);
    }

    45% {
      transform: scale(1.03);
    }

    100% {
      transform: scale(1);
    }
  }
}
/* ===============================
   CYBERPUNK CUSTOM CURSOR
================================ */

body {
  cursor: none;
}

button,
a,
.portal-card,
.unlock-card,
.world-card,
.case-card,
.video-card,
.skill-pill,
.branch-btn,
.tv-shell,
.book-cover {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 12px rgba(77, 252, 255, 0.9),
    0 0 24px rgba(255, 79, 216, 0.35);
  mix-blend-mode: screen;
}

.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(
      circle,
      rgba(77, 252, 255, 0.18),
      rgba(255, 79, 216, 0.12) 45%,
      transparent 70%
    );
  filter: blur(2px);
  mix-blend-mode: screen;
}

.custom-cursor.cursor-hover {
  width: 34px;
  height: 34px;
  border-color: var(--pink);
  box-shadow:
    0 0 14px rgba(255, 79, 216, 0.95),
    0 0 28px rgba(77, 252, 255, 0.4);
}

.cursor-trail.cursor-hover {
  width: 70px;
  height: 70px;
  background:
    radial-gradient(
      circle,
      rgba(255, 79, 216, 0.2),
      rgba(77, 252, 255, 0.13) 45%,
      transparent 72%
    );
}

@media (max-width: 850px) {
  body,
  button,
  a {
    cursor: auto;
  }

  .custom-cursor,
  .cursor-trail {
    display: none;
  }
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  box-shadow: 0 0 18px rgba(247, 200, 115, 0.45);
}
