/* ============================================
   CYBER CARD - CS2 Inspect Style
   Business Card Format
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cyan: #00f5ff;
  --cyan-dim: #00f5ff44;
  --magenta: #ff00ff;
  --magenta-dim: #ff00ff33;
  --bg-dark: #e0e0e0;
  --bg-card: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --card-w: 540px;
  --card-h: 310px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  background: var(--bg-dark);
  color: var(--text-primary);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Top Logo ---------- */
.top-logo {
  position: fixed;
  top: 20px;
  right: 24px;
  height: 36px;
  width: auto;
  z-index: 100;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* ---------- Background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Solar System Canvas ---------- */
#solarSystem {
  position: fixed;
  inset: 0;
  z-index: 5;
  cursor: grab;
  transition: opacity 0.6s ease;
}
#solarSystem:active {
  cursor: grabbing;
}
#solarSystem.fade-out {
  opacity: 0;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px
  );
}

/* ---------- Hint ---------- */
.hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  opacity: 0.7;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hint.hidden { opacity: 0; }
.hint-icon {
  display: inline-block;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---------- Back Button ---------- */
.back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 120;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #555;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.4s ease;
  opacity: 0;
}
.back-btn.visible {
  display: flex;
  opacity: 1;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #222;
}

/* ---------- 3D Scene ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transition: none;
}
.scene.hidden-scene {
  pointer-events: none;
  visibility: hidden;
}
.scene.transitioning .card {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.scene.transitioning-back .card {
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.card {
  width: var(--card-w);
  height: var(--card-h);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateX(0deg) rotateY(0deg);
}

/* ---------- Card Faces ---------- */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: var(--bg-card);
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.card-front {
  transform: translateZ(0);
}
.card-back {
  transform: rotateY(180deg) translateZ(0);
}


/* ---------- Holo & Specular ---------- */
.holo-layer {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  mix-blend-mode: soft-light;
  background: linear-gradient(125deg,
    transparent 0%, rgba(0,245,255,0.15) 20%,
    rgba(255,0,255,0.12) 40%, rgba(0,170,255,0.15) 60%,
    transparent 80%);
  background-size: 200% 200%;
}

.specular {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
}

/* ---------- Emboss Canvas ---------- */
.emboss-canvas {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  image-rendering: auto;
}

/* Front emboss: bottom-left corner area */
.emboss-canvas-front {
  left: 16px;
  bottom: 16px;
  width: 140px;
  height: 58px;
}

/* Back emboss: centered, covering the logo */
.emboss-canvas-back {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 125px;
}

/* ---------- Front Content ---------- */
.front-content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
}

.front-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.front-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-primary);
}

.front-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: right;
  line-height: 1.5;
}

.front-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img {
  height: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}

.front-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

/* ---------- Back Content ---------- */
.back-content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.back-logo {
  width: 240px;
}
.back-logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ---------- Email Me (bottom-left in card mode) ---------- */
.email-wrap {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 120;
  display: none;
}
.email-wrap.visible {
  display: block;
}
.email-btn {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #555;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.4s ease;
}
.email-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #222;
}
.email-btn.hidden {
  opacity: 0;
  pointer-events: none;
}
.email-text {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}
.email-text.show {
  opacity: 1;
}

/* ---------- Card mode cursors ---------- */
body.card-mode {
  cursor: grab;
}
body.card-mode:active {
  cursor: grabbing;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  :root {
    --card-w: 380px;
    --card-h: 218px;
  }
  .front-content { padding: 16px 20px; }
  .front-name { font-size: 13px; }
  .front-title { font-size: 9px; }
  .avatar-wrapper { width: 100px; height: 100px; }
  .back-logo { width: 180px; }
  .emboss-canvas-front { width: 100px; height: 42px; }
  .emboss-canvas-back { width: 220px; height: 92px; }
}

