@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --color-cyan: #00f0ff;
  --color-cyan-glow: rgba(0, 240, 255, 0.4);
  --color-purple: #a855f7;
  --color-purple-glow: rgba(168, 85, 247, 0.4);
  --color-blue: #3b82f6;
  --color-emerald: #10b981;
  --bg-black: #03060d;
  --bg-card: rgba(10, 16, 30, 0.7);
}

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

html {
  overflow: hidden;
  height: 100%;
  width: 100%;
  font-family: var(--font-main);
  background-color: var(--bg-black);
  color: #f1f5f9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
  background-color: var(--bg-black);
  color: #f1f5f9;
  cursor: default;
  font-family: var(--font-main);
  user-select: none;
  -webkit-user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  display: none;
}

/* Selection */
::selection {
  background: rgba(0, 240, 255, 0.3);
  color: #ffffff;
}

/* Three.js Canvas Container */
#dark-grid-canvas {
  display: none;
}

/* Dynamic Mouse Spotlight Flashlight (Disabled for max 120 FPS performance) */
.mouse-spotlight {
  display: none;
}

/* ========================================================== */
/* TYPOGRAPHY & HEADINGS (100% Vietnamese Font Safe)          */
/* ========================================================== */
.editorial-title {
  font-family: var(--font-main);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.96;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6.8vw, 6.4rem);
  text-shadow: 0 4px 35px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 240, 255, 0.25);
}

.chroma-heading {
  font-family: var(--font-main);
  background-image: linear-gradient(115deg, #94a3b8, #ffffff 20%, #00f0ff 45%, #a855f7 65%, #f43f5e 80%, #ffffff 95%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chroma-shift 12s ease-in-out infinite alternate;
}

@keyframes chroma-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.fx-spotlight {
  --ink: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: 0.03em;
  background: radial-gradient(3.5ch 100% at 50% 50%, var(--ink) 25%, color-mix(in srgb, var(--ink) 25%, transparent) 80%) 0 0/300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========================================================== */
/* FLIPPING NAV BUTTON                                        */
/* ========================================================== */
.flip-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-button-text-normal {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-button-text-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-button:hover .flip-button-text-normal {
  transform: translateY(-100%);
}

.flip-button:hover .flip-button-text-hover {
  transform: translateY(0);
}

/* ========================================================== */
/* GLASS PANELS & CARDS WITH INTERACTIVE MOUSE BORDER GLOW    */
/* ========================================================== */
.glass-panel {
  background: rgba(8, 14, 28, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.glass-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(8, 14, 28, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(400px circle at var(--card-mouse-x, -500px) var(--card-mouse-y, -500px), rgba(0, 240, 255, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 30px 60px -15px rgba(0, 240, 255, 0.18), inset 0 1px 0 rgba(0, 240, 255, 0.3);
}

/* Project Visual Window Mockup */
.mockup-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* Neon Glows */
.glow-cyan {
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.3);
}
.glow-purple {
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.3);
}

/* Pulsing Beacon */
@keyframes beacon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.3; }
}
.animate-beacon {
  animation: beacon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Interactive Cursor */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  background-color: var(--color-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--color-cyan);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(0, 240, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out, width 0.25s, height 0.25s, border-color 0.25s;
}

body.cursor-hover .custom-cursor-dot {
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  box-shadow: 0 0 20px #ffffff;
}

body.cursor-hover .custom-cursor-ring {
  width: 56px;
  height: 56px;
  border-color: rgba(0, 240, 255, 0.9);
  background: rgba(0, 240, 255, 0.08);
}

@media (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-ring {
    display: none !important;
  }
}

/* Interactive Terminal Window */
.terminal-window {
  font-family: var(--font-mono);
  background: rgba(5, 9, 18, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 240, 255, 0.12);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: var(--color-cyan);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Audio Bars */
@keyframes wave-bounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}
.audio-bar-1 { animation: wave-bounce 1s ease-in-out infinite 0.1s; }
.audio-bar-2 { animation: wave-bounce 1s ease-in-out infinite 0.3s; }
.audio-bar-3 { animation: wave-bounce 1s ease-in-out infinite 0.2s; }
.audio-bar-4 { animation: wave-bounce 1s ease-in-out infinite 0.4s; }

/* ========================================================== */
/* 3D ISOMETRIC DEVELOPER ROOM STYLES                         */
/* ========================================================== */
#room-3d-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: auto;
}

#room-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* Glass Floating HUD */
.room-hud-pill {
  background: rgba(4, 9, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.room-hud-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-hud-btn:hover {
  transform: translateY(-1px);
}

.room-hud-btn:active {
  transform: translateY(1px);
}

/* Subtle background vignette behind UI sections to ensure crystal-clear text readability */
section {
  position: relative;
  z-index: 10;
}

.content-backdrop {
  background: radial-gradient(circle at 50% 50%, rgba(3, 6, 13, 0.6) 0%, rgba(3, 6, 13, 0.25) 100%);
  border-radius: 2rem;
}

/* ========================================================== */
/* INTERACTIVE INFO DRAWER / MODAL STYLES                     */
/* ========================================================== */
#info-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 4, 10, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#info-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

#info-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: min(880px, 94vw);
  max-height: 86vh;
  z-index: 70;
  background: rgba(4, 8, 18, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 1.5rem;
  box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 240, 255, 0.18);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#info-drawer.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  flex: 1;
  scroll-behavior: smooth;
}

.drawer-body::-webkit-scrollbar {
  width: 6px;
}
.drawer-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
  border-radius: 3px;
}

/* 3D Hover Tooltip */
#room-hover-tooltip {
  position: fixed;
  z-index: 55;
  pointer-events: none;
  transform: translate(-50%, -130%);
  background: rgba(4, 8, 20, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #00f0ff;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.15s ease-out;
  white-space: nowrap;
}

#room-hover-tooltip.active {
  opacity: 1;
}

/* Interactive Ripple Beacon */
@keyframes ping-glow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.2; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.beacon-ring {
  animation: ping-glow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ========================================================== */
/* ULTRA-SMOOTH 3D STAGE & ARROW CAROUSEL STYLES             */
/* ========================================================== */
#scroll-progress-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #00f0ff, #a855f7, #3b82f6);
  z-index: 60;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
}

.stage-wrapper {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.stage-card {
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.stage-card.active {
  pointer-events: auto;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Glowing Interactive Arrow Button */
.arrow-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(6, 12, 28, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.arrow-nav-btn:hover {
  background: #00f0ff;
  color: #000000;
  border-color: #00f0ff;
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
}

.arrow-nav-btn:active {
  transform: scale(0.95);
}

/* Mouse Scroll Indicator */
.mouse-scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.4s ease;
}

.mouse-scroll-wheel {
  width: 20px;
  height: 32px;
  border: 2px solid rgba(0, 240, 255, 0.6);
  border-radius: 12px;
  position: relative;
}

.mouse-scroll-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 4px;
  height: 6px;
  background-color: #00f0ff;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: mouse-wheel-bob 1.6s ease-in-out infinite;
}

@keyframes mouse-wheel-bob {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 12px); opacity: 0; }
}
