:root {
  --bg: #f9f9f9;
  --text: #555;
  --text-muted: #777;
  --border: #eee;
  --shadow: #d3d3d3;
  --quad-muted: rgba(85, 85, 85, 0.06);
}
[data-theme="dark"] {
  --bg: #111;
  --text: #ccc;
  --text-muted: #999;
  --border: #333;
  --shadow: rgba(255,255,255,0.2);
  --quad-muted: rgba(200, 200, 200, 0.06);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'Tinos', 'Times New Roman', Times, serif;
  position: relative;
  transition: background 0.3s;
}
body::before {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid var(--border);
}
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}
.wrapper {
  font-size: clamp(3rem, 8vw, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 200px;
  perspective-origin: top center;
  transform: scale(0.5);
  z-index: 9999;
}
@keyframes textAppear {
  from {
    transform: translateY(-0.03em) scaleY(0);
  }
  to {
    transform: translateY(0.22em) scaleY(1.0);
  }
}
.text {
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.15em;
  z-index: 1;
  animation: textAppear 1s ease-out forwards;
  animation-play-state: paused;
  transform-origin: bottom center;
  transition: color 0.3s;
}
@keyframes shadowAppear {
  from {
    transform: translateY(-1.1em) scaleY(0) rotateX(0deg) scaleX(0.95);
  }
  to {
    transform: translateY(-1.25em) scaleY(-0.5) rotateX(-30deg) scaleX(0.95);
  }
}
.shadow-animated {
  font-weight: 500;
  color: var(--shadow);
  letter-spacing: 0.15em;
  transform-origin: bottom center;
  z-index: 0;
  animation: shadowAppear 1s ease-out forwards;
  animation-play-state: paused;
  transition: color 0.3s;
}
.shadow {
  font-weight: 500;
  color: var(--shadow);
  letter-spacing: 0.15em;
  transform: translateY(calc(5rem * 0.34)) scaleY(-0.5) rotateX(-30deg) scaleX(1.185);
  transform-origin: top center;
  z-index: 0;
}
@keyframes quadAppear {
  from { opacity: 0; }
  to { opacity: 1; }
}
.quad {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: color 0.6s, background 0.3s;
  color: var(--quad-muted);
  z-index: 2;
  opacity: 0;
  animation: quadAppear 0.5s ease-out forwards;
  animation-delay: 1s;
  animation-play-state: paused;
}
.quad:hover {
  color: var(--text);
}
.quad-tl { top: 0; left: 0; right: 50%; bottom: 50%; }
.quad-tr { top: 0; left: 50%; right: 0; bottom: 50%; }
.quad-bl { top: 50%; left: 0; right: 50%; bottom: 0; }
.quad-br { top: 50%; left: 50%; right: 0; bottom: 0; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  filter: var(--noise-filter, none);
}
.noise rect {
  opacity: 0.03;
}
.quad-label {
  position: relative;
  z-index: 1;
}
.quad-content {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  margin-top: 1.5rem;
  text-align: center;
}
.quad-content p {
  font-size: clamp(0.6rem, 0.9vw, 1.3rem);
  color: var(--text-muted);
  line-height: 1.6;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  margin: 0;
  transition: color 0.3s;
}
.word {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(4px);
}
.quad-content.reveal .word {
  animation: wordFadeInBlur 0.4s ease-out forwards;
  animation-delay: var(--word-delay);
}
@keyframes wordFadeInBlur {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.theme-toggle:hover {
  background: var(--quad-muted);
}
.page-loaded .text,
.page-loaded .shadow-animated,
.page-loaded .quad {
  animation-play-state: running;
}

canvas#neuro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .10;
}
