:root {
  --neon-green: #34d399; /* emerald-400 */
  --neon-green-strong: #10b981; /* emerald-500 */
  --indigo: #6366f1; /* indigo-500 */
  --bg-deep: #0b1020; /* deep navy */
}

body {
  font-family: 'Inter', sans-serif;
  color: #e5e7eb;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(1200px 600px at -10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(1000px 500px at 110% 110%, rgba(16, 185, 129, 0.15), transparent 60%),
    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: auto, auto, 24px 24px, 24px 24px;
  background-position: 0 0, 0 0, 0 0, 0 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.fade-in {
  animation: fadeIn 1s ease-out;
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

.pulse {
  animation: pulse 0.3s ease-in-out;
}

.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease-in-out;
}

.title {
  font-size: 50px;
  line-height: 1.1;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  letter-spacing: 0.5px;
  color: var(--neon-green);
  text-shadow:
    0 0 8px rgba(52, 211, 153, 0.6),
    0 0 16px rgba(52, 211, 153, 0.35),
    0 0 28px rgba(99, 102, 241, 0.25);
}

.social-icon {
  width: 24px;
  height: 24px;
}

/* Avatar positioning for portrait images */
.avatar {
  object-position: 50% 20%; /* bias towards face area */
}

/* Tighter crop for shoulder-to-head framing using wrapper + scaled img */
.avatar-inset {
  object-position: 50% 18%;
  transform: scale(1.3);
  transform-origin: center 20%;
}

/* New, clean avatar framing approach: wrapper + inner image */
.avatar-frame {
  overflow: hidden;
  border-radius: 9999px;
}
.avatar-crop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.38) translateY(11%);
  transform-origin: 50% 50%;
}

/* Glassmorphism card */
.glass-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  box-shadow:
    0 10px 30px rgba(16, 185, 129, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Avatar subtle neon glow */
.avatar-glow {
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.35)) drop-shadow(0 0 14px rgba(99, 102, 241, 0.25));
}

/* Neon button */
.btn-neon {
  background-image: linear-gradient(135deg, var(--neon-green-strong), var(--indigo));
  box-shadow:
    0 8px 20px rgba(16, 185, 129, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-neon:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 25px rgba(16, 185, 129, 0.35),
    0 0 20px rgba(99, 102, 241, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  filter: saturate(1.1);
}
.btn-neon:active { transform: translateY(0); }

/* Neon link glow */
.link-neon {
  color: #a5b4fc; /* indigo-300 */
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.15s ease;
}
.link-neon:hover {
  color: var(--neon-green);
  text-shadow:
    0 0 6px rgba(52, 211, 153, 0.6),
    0 0 16px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

/* Toggle switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-track {
  width: 38px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.35);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.25);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: radial-gradient(circle at 30% 30%, #fff, #d1fae5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: transform 0.2s ease;
}
.switch input:checked + .switch-track {
  background: linear-gradient(135deg, var(--neon-green-strong), var(--indigo));
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 10px rgba(16,185,129,0.35);
}
.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Temporary visibility aid */
.debug-highlight {
  outline: 2px solid #fbbf24; /* amber-400 */
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35), 0 0 16px rgba(251, 191, 36, 0.55);
  border-radius: 10px;
}

/* Panels / sections */
.surface-muted {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.75rem;
}

/* Optional scanlines for hacker vibe */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 2px,
    transparent 4px
  );
}

/* Cursor-reactive glow using CSS variables set by JS */
.interactive-radius { position: relative; isolation: isolate; }
.interactive-radius::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    180px 160px at var(--mx, 50%) var(--my, 50%),
    rgba(16, 185, 129, 0.24),
    rgba(99, 102, 241, 0.18) 30%,
    transparent 60%
  );
  opacity: var(--glow-opacity, 0);
  transition: opacity 0.2s ease;
}

/* 3D tilt base */
.tilt-3d {
  will-change: transform, filter;
  transform-style: preserve-3d;
  transform-origin: center;
  transition: transform 0.15s ease, filter 0.2s ease;
}

/* Input neon caret + focus */
.input-neon {
  caret-color: var(--neon-green);
}
.input-neon:focus {
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.35),
    0 0 18px rgba(16, 185, 129, 0.25);
}

/* Toast styles */
@keyframes slideUpFade {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  to { transform: translateY(8px); opacity: 0; }
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #eafffb;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  z-index: 50;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  animation: slideUpFade 180ms ease both, fadeOut 220ms ease 2600ms forwards;
}

/* Matrix canvas layering */
#matrixCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  pointer-events: none;
  display: none;
}

#app { position: relative; z-index: 1; }

/* Brand icon tint */
.social-icon {
  filter: invert(76%) sepia(12%) saturate(1290%) hue-rotate(201deg) brightness(96%) contrast(94%);
  transition: filter 0.2s ease, transform 0.15s ease;
}
.link-neon:hover .social-icon {
  filter: invert(79%) sepia(30%) saturate(803%) hue-rotate(92deg) brightness(105%) contrast(105%) drop-shadow(0 0 8px rgba(16,185,129,0.45));
  transform: translateY(-1px) scale(1.05);
}

/* Soft grain/noise overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.02) 0.5px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,0.02) 0.5px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.02) 0.5px, transparent 1px),
    radial-gradient(circle at 60% 60%, rgba(255,255,255,0.02) 0.5px, transparent 1px);
  background-size: 120px 120px, 160px 160px, 140px 140px, 200px 200px;
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .scale-in, .slide-in, .pulse { animation: none !important; }
  .hover-scale, .btn-neon, .tilt-3d, .interactive-radius::after { transition: none !important; }
}


