/* ===============================
   GLOBAL RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  background: #050507;
  color: #fff;
  overflow-x: hidden;
}

/* ===============================
   CSS VARIABLES (CUBE GEOMETRY)
================================ */
:root {
  --cube-size: 300px;
  --cube-depth: calc(var(--cube-size) / 2);
}

/* ===============================
   LAYOUT
================================ */
.skills {
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: 100vh;
}

/* ===============================
   LEFT PANEL
================================ */
.preview {
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: #050507;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 60px;
}

.preview h1 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 50px;
}

.preview span {
  color: #7c3aed;
}

/* ===============================
   3D CUBE SCENE
================================ */
.cube-scene {
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 1200px;
  margin-bottom: 20px;
}

/* ===============================
   REAL 3D CUBE
================================ */
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.22,1,.36,1);
}

/* ===============================
   CUBE FACES
================================ */
.face {
  position: absolute;
  width: var(--cube-size);
  height: var(--cube-size);

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);

  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(168,85,247,.35),
    0 20px 60px rgba(168,85,247,.35);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 20px;
  text-align: center;
}

/* ===== REAL CUBE GEOMETRY ===== */
.front  { transform: translateZ(var(--cube-depth)); }
.back   { transform: rotateY(180deg) translateZ(var(--cube-depth)); }
.right  { transform: rotateY(90deg) translateZ(var(--cube-depth)); }
.left   { transform: rotateY(-90deg) translateZ(var(--cube-depth)); }
.top    { transform: rotateX(90deg) translateZ(var(--cube-depth)); }
.bottom { transform: rotateX(-90deg) translateZ(var(--cube-depth)); }

/* ===============================
   FACE CONTENT
================================ */
.face img {
  width: clamp(36px, 6vw, 48px);
  margin-bottom: 10px;
}

.face h3 {
  font-size: clamp(16px, 3.5vw, 18px);
  margin-bottom: 6px;
}

.face p {
  font-size: clamp(12px, 3vw, 14px);
  opacity: .85;
}

/* ===============================
   RIGHT PANEL
================================ */
.panel {
  background: #eef1f4;
  color: #000;
  padding: 60px;
}

.tabs {
  margin-bottom: 24px;
}

.tabs button {
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  margin-right: 8px;
  cursor: pointer;
  background: #fff;
  color: #7c3aed;
}

.tabs button.active {
  background: #7c3aed;
  color: #fff;
}

.panel h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 24px;
  position: relative;
}

.panel h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #7c3aed;
  position: absolute;
  bottom: -10px;
  left: 0;
}

/* ===============================
   SKILLS GRID
================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 16px;
}

.skill {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;

  display: grid;
  place-items: center;

  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  transition: transform .25s ease;
}

.skill:hover {
  transform: translateY(-6px);
}

/* ===============================
   RESPONSIVE BREAKPOINTS
================================ */

/* Tablets */
@media (max-width: 1024px) {
  :root {
    --cube-size: 240px;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .preview {
    padding: 40px;
  }
}

/* Large phones */
@media (max-width: 768px) {
  :root {
    --cube-size: 200px;
  }

  .preview h1 {
    margin-bottom: 30px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --cube-size: 170px;
  }

  .panel {
    padding: 24px;
  }
}

/* Touch devices */
@media (hover: none) {
  .skill:hover {
    transform: none;
  }
}
