* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0a0a;
  color: #e5e5e5;
  overflow-x: hidden;
}

/* Mobile-first responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Skill card animations */
.skill-card {
  background: linear-gradient(145deg, #1a1a1a, #131313);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
}

.blockchain-card {
  position: relative;
  border-left: 4px solid #d4af37;
  background: linear-gradient(145deg,
      #1a1a1a 0%,
      #131313 50%,
      #1a1a1a 100%);
}

.blockchain-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg,
      transparent,
      rgba(212, 175, 55, 0.03),
      transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blockchain-card:hover::before {
  opacity: 1;
}

/* Gold accent elements */
.gold-gradient {
  background: linear-gradient(135deg, #d4af37, #f7ef8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-bg {
  background: linear-gradient(135deg, #d4af37, #f7ef8a);
}

.gold-border {
  border-color: #d4af37;
}

/* Section titles with animation */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #d4af37, #f7ef8a);
  border-radius: 2px;
}

/* Navigation */
.nav-link {
  position: relative;
  padding: 5px 0;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: white;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #d4af37, #f7ef8a);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero section */
.hero-gradient {
  background: linear-gradient(135deg,
      #0a0a0a 0%,
      #1a1a1a 50%,
      #0a0a0a 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      #d4af37,
      transparent);
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Experience timeline */
.timeline-dot {
  width: 16px;
  height: 16px;
  border: 3px solid #0a0a0a;
  background: linear-gradient(135deg, #d4af37, #f7ef8a);
}

/* Project cards */
.project-card {
  background: linear-gradient(145deg, #1a1a1a, #131313);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 15px 30px rgba(212, 175, 55, 0.1);
}

/* Tags */
.tag {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: #f7ef8a;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
}

/* Social icons */
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: linear-gradient(135deg, #d4af37, #f7ef8a);
  color: #0a0a0a;
  transform: scale(1.1);
}

/* Loading animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


#terminal-input {
  caret-color: #D4AF37;
}

/* Optional: if you want a block cursor */
@keyframes blink {
  50% { opacity: 0; }
}
.cursor-effect::after {
  content: '_';
  animation: blink 1s step-end infinite;
}

/* 1. The Wireframe Effect */
body.debug-mode * {
    border: 0.5px dashed rgba(212, 175, 55, 0.3) !important;
}

/* 2. Component Tooltips */
body.debug-mode [data-component]::before {
    content: "Comp: <" attr(data-component) " /> | Render: " attr(data-render);
    display: block;
    position: absolute;
    top: -12px;
    left: 10px;
    background: #D4AF37;
    color: #0a0a0a;
    font-family: monospace;
    font-size: 8px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
    z-index: 50;
    pointer-events: none;
    text-transform: uppercase;
}

/* 3. Positioning fix for the tooltips */
body.debug-mode [data-component] {
    position: relative !important;
}

/* 4. Scanning Line Animation (Optional) */
body.debug-mode::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 15px #D4AF37;
    z-index: 100;
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}



/* Normal state: Gold rain falling down */
#matrix-canvas {
    transition: filter 0.5s ease, transform 1s ease;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

/* Debug state: Red rain falling up */
body.debug-mode #matrix-canvas {
    /* Changes Gold to Red using hue-rotate and increases intensity */
    filter: hue-rotate(140deg) saturate(3) drop-shadow(0 0 8px #ff0000);
    /* Flips the canvas vertically */
    transform: scaleY(-1); 
}

/* When Debug Mode is ON, make the latency look like a critical system failure */
body.debug-mode #ping-ms {
    animation: glitch-text 0.2s infinite;
    color: #ff0000 !important;
}

@keyframes glitch-text {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}


#skills-physics-container canvas {
    touch-action: none; /* Prevents scrolling/focusing while dragging blocks */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    outline: none;
}

#skills-physics-container canvas {
    max-width: 100%;
    height: auto;
    touch-action: none; /* Crucial: stops the browser from scrolling while dragging */
}

#skills-physics-container {
    touch-action: none; /* Prevents mobile scroll while dragging blocks */
    user-select: none;
}

#skills-physics-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
}