:root {
  --bg-dark: #030303;
  --line: #1f1f1f;
}

body {
  background-color: var(--bg-dark);
  color: #e4e4e7;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  cursor: none;
  margin: 0;
  padding: 0;
}

.heading-font {
  font-family: 'Space Grotesk', sans-serif;
}

.mono-font {
  font-family: 'JetBrains Mono', monospace;
}

/* CUSTOM CURSOR */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1), height 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

body.hovering .cursor-dot {
  width: 80px;
  height: 80px;
  background-color: white;
  opacity: 0.9;
  mix-blend-mode: difference;
}

/* TEXT REVEAL */
.shutter-wrapper {
  overflow: hidden;
  display: block;
}

.shutter-text {
  display: block;
  transform: translateY(110%);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.loaded .shutter-text {
  transform: translateY(0);
}

/* GRID DRAWING */
.grid-cell {
  position: relative;
}

.grid-cell::before,
.grid-cell::after {
  content: '';
  position: absolute;
  background: linear-gradient(90deg, transparent, #333, transparent);
  transition: all 1s ease-in-out;
  opacity: 0.5;
}

.grid-cell::before {
  top: 0;
  left: 0;
  width: 0%;
  height: 1px;
}

.grid-cell::after {
  top: 0;
  left: 0;
  width: 1px;
  height: 0%;
}

.grid-cell.active::before {
  width: 100%;
}

.grid-cell.active::after {
  height: 100%;
}

/* NOISE & GRADIENTS */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glow-text {
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* SCROLL BAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ANIMATIONS */
@keyframes scan {
  0% { top: 0; opacity: 0 }
  10% { opacity: 1 }
  90% { opacity: 1 }
  100% { top: 100%; opacity: 0 }
}

@keyframes data-flow {
  0% { transform: translateX(-100%) }
  100% { transform: translateX(300%) }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7) }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0) }
  100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0) }
}

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

@keyframes dash {
  to { stroke-dashoffset: 0; }
}

.animate-scan {
  animation: scan 3s ease-in-out infinite;
}

.animate-data-flow {
  animation: data-flow 2.5s cubic-bezier(.4, 0, .2, 1) infinite;
}

.animate-pulse-ring {
  animation: pulse-ring 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-blink {
  animation: blink 1s step-end infinite;
}

.sparkline path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 4s ease-out forwards;
}

.glass-card {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* TOUCH DEVICE — hide custom cursor, restore default */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot {
    display: none !important;
  }
  body {
    cursor: auto;
  }
  * {
    cursor: auto !important;
  }
}

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 767px) {
  /* Smaller marquee text on phones */
  .marquee-content span {
    font-size: 3.5rem !important;
  }

  /* Reduce manifesto section padding */
  .py-40 {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  /* Make bento grid stack cleaner */
  .glass-card {
    min-height: 180px;
  }

  /* Reduce work card spacing */
  .space-y-40 > * + * {
    margin-top: 5rem;
  }

  /* Smaller contact heading */
  .glow-text {
    font-size: 2.5rem;
  }

  /* Footer name size */
  footer a[class*="text-[13vw]"] {
    font-size: 18vw;
  }
}

/* SMALL HEIGHT SCREENS */
@media (max-height: 600px) {
  .min-h-screen {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}
