/* ---------------------------------------------
   GLOBAL RESET & BASE
--------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Mode Palette (default) */
  --bg-deep: #06060f;
  --bg-space: #0a0a1a;
  --neon-cyan: #00F5FF;
  --purple-glow: #6D5DFF;
  --soft-blue: #7EE8FF;
  --white-pure: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --shadow-glow: 0 0 25px rgba(0, 245, 255, 0.15);
  --card-bg: rgba(10, 10, 30, 0.4);
  --card-border: rgba(255, 255, 255, 0.1);
  --blur-amount: 30px;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light mode overrides */
body.light-mode {
  --bg-deep: #f0f2f5;
  --bg-space: #e8ecf1;
  --neon-cyan: #0077cc;
  --purple-glow: #5a4fcf;
  --soft-blue: #5aa9e6;
  --text-primary: #1a1a2e;
  --text-secondary: rgba(0, 0, 0, 0.7);
  --text-muted: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --shadow-glow: 0 0 25px rgba(0, 119, 204, 0.15);
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(0, 0, 0, 0.1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none; /* custom cursor handles this */
  position: relative;
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---------------------------------------------
   TYPOGRAPHY
--------------------------------------------- */
h1, h2, h3, p, span, a, button {
  font-weight: 400;
}

/* ---------------------------------------------
   CANVAS BACKGROUND
--------------------------------------------- */
#neuralCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------------------------------------------
   CUSTOM CURSOR
--------------------------------------------- */
.custom-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px solid var(--neon-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
  backdrop-filter: blur(2px);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.6);
}

.custom-cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--neon-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--neon-cyan);
}

body.light-mode .custom-cursor {
  border-color: var(--purple-glow);
  box-shadow: 0 0 15px rgba(109, 93, 255, 0.6);
}
body.light-mode .custom-cursor-dot {
  background: var(--purple-glow);
  box-shadow: 0 0 10px var(--purple-glow);
}

/* ---------------------------------------------
   MOUSE SPOTLIGHT
--------------------------------------------- */
.mouse-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at center, rgba(0, 245, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.6;
  transition: opacity 0.3s;
}

/* ---------------------------------------------
   LOADING SCREEN
--------------------------------------------- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  backdrop-filter: blur(20px);
}

.loading-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loading-pulse-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  opacity: 0;
  animation: pulseRing 2s infinite;
}

.loading-pulse-ring--delay {
  animation-delay: 0.5s;
}
.loading-pulse-ring--delay2 {
  animation-delay: 1s;
}

.loading-core {
  width: 12px;
  height: 12px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--neon-cyan);
  z-index: 2;
}

.loading-text {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2rem;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ---------------------------------------------
   THEME TOGGLE & CLOCK
--------------------------------------------- */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 100;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.theme-toggle:hover {
  background: var(--glass-highlight);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s;
}

.theme-icon--sun { display: none; }
.theme-icon--moon { display: block; }

body.light-mode .theme-icon--sun { display: block; }
body.light-mode .theme-icon--moon { display: none; }

.live-clock {
  position: fixed;
  top: 2.5rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  color: var(--text-secondary);
  font-feature-settings: "tnum";
}

.live-clock__time {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

.live-clock__date {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ---------------------------------------------
   MAIN CONTAINER
--------------------------------------------- */
.main-container {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  perspective: 1200px;
}

/* ---------------------------------------------
   GLASS CARD
--------------------------------------------- */
.glass-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: 3rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), var(--shadow-glow);
  overflow: hidden;
  transition: transform 0.2s ease-out, box-shadow 0.3s;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
}

.glass-card:hover {
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.6), 0 0 40px rgba(0,245,255,0.2);
}

/* Animated border glow */
.glass-card__border-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, var(--neon-cyan), var(--purple-glow), var(--neon-cyan));
  z-index: -1;
  opacity: 0.6;
  filter: blur(15px);
  animation: rotateGradient 8s linear infinite;
  background-size: 300% 300%;
}

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

/* Glass shine reflection */
.glass-card__shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.glass-card:hover .glass-card__shine {
  opacity: 0.8;
}

/* Edge highlights */
.glass-card__edge {
  position: absolute;
  background: linear-gradient(to right, var(--neon-cyan), transparent);
  height: 1px;
  width: 100%;
  opacity: 0.3;
}
.glass-card__edge--top { top: 0; left: 0; }
.glass-card__edge--bottom { bottom: 0; left: 0; background: linear-gradient(to right, transparent, var(--purple-glow)); }
.glass-card__edge--left {
  width: 1px;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, var(--neon-cyan), transparent);
}
.glass-card__edge--right {
  width: 1px;
  height: 100%;
  top: 0;
  right: 0;
  background: linear-gradient(to bottom, transparent, var(--purple-glow));
}

/* Inner content */
.glass-card__inner {
  padding: 3rem 2.5rem;
  position: relative;
  z-index: 2;
}

/* ---------------------------------------------
   PROFILE SECTION
--------------------------------------------- */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-image-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
}

.ai-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ai-halo--outer {
  width: 130px;
  height: 130px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  animation: spinSlow 12s linear infinite;
}
.ai-halo--mid {
  width: 125px;
  height: 125px;
  border: 2px solid rgba(109, 93, 255, 0.3);
  animation: spinSlow 8s linear infinite reverse;
}
.ai-halo--inner {
  width: 120px;
  height: 120px;
  border: 1px dashed var(--neon-cyan);
  opacity: 0.4;
  animation: spinSlow 6s linear infinite;
}
.ai-halo--core {
  width: 115px;
  height: 115px;
  box-shadow: 0 0 25px rgba(0,245,255,0.5);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes spinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

.profile-image-container {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 2px solid var(--glass-border);
  overflow: hidden;
  position: relative;
  z-index: 5;
  box-shadow: 0 0 30px rgba(0,245,255,0.25);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple-glow), var(--neon-cyan));
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
}

.profile-info {
  margin-top: 0.5rem;
}

.profile-name {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #c0e0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.profile-title {
  font-size: 1.1rem;
  color: var(--neon-cyan);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.profile-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ---------------------------------------------
   CONTACT GRID
--------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-smooth);
  overflow: hidden;
  isolation: isolate;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0,245,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.contact-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 10px 25px -5px rgba(0,245,255,0.2);
  transform: translateY(-3px);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.6rem;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
}

.contact-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-card__value {
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-word;
}

.contact-card__copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: 0.2s;
  backdrop-filter: blur(5px);
}

.contact-card__copy-btn:hover {
  background: var(--neon-cyan);
  color: #000;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ---------------------------------------------
   ACTIONS SECTION (QR & BUTTONS)
--------------------------------------------- */
.actions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
}

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.qr-code-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 1.2rem;
  background: white;
  padding: 0.4rem;
  box-shadow: 0 0 20px rgba(0,245,255,0.15);
}

.qr-code-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.8rem;
}

.qr-code-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 0.8rem;
}

.qr-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 2.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

.action-btn:hover {
  background: var(--glass-highlight);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0,245,255,0.25);
}

.action-btn--primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--purple-glow));
  border: none;
  color: #000;
  font-weight: 600;
}

.action-btn--primary:hover {
  filter: brightness(1.1);
}

/* ---------------------------------------------
   TOAST NOTIFICATIONS
--------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--neon-cyan);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 3rem;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease, fadeOut 0.3s 1.5s forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ---------------------------------------------
   FOOTER
--------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-heart {
  color: var(--neon-cyan);
}

/* ============================================
   SKIP LINK (Accessibility)
============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--neon-cyan);
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: 0 0 8px 8px;
  z-index: 99999;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   FACEBOOK ICON COLOR
============================================ */
.contact-card__icon--facebook svg {
  color: #1877F2;
}

/* ============================================
   FOCUS VISIBLE (Keyboard Navigation)
============================================ */
.contact-card:focus-visible,
.action-btn:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */
@media (max-width: 768px) {
  .glass-card__inner {
    padding: 2rem 1.5rem;
  }
  .profile-name {
    font-size: 1.8rem;
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .theme-toggle {
    top: 1rem;
    right: 1rem;
  }
  .live-clock {
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.9rem;
  }
}

@media (max-width: 480px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .actions-section {
    flex-direction: column;
    align-items: center;
  }
  .profile-image-wrapper {
    width: 100px;
    height: 100px;
  }
  .profile-image-container {
    width: 90px;
    height: 90px;
  }
}