/* Experiments section — lo-fi browser experiments */

.experiments-intro {
  font-style: italic;
  opacity: 0.85;
  max-width: 55ch;
}

.experiment-card .post-card__glyph {
  color: #d4a574;
}

.experiment-card .read-more {
  font-family: 'Space Mono', monospace;
}

/* Experiment container */
.experiment-container {
  margin: 2rem 0;
  border: 1px solid #444;
  background: #0a0a0a;
  border-radius: 2px;
  overflow: hidden;
}

.experiment-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
  image-rendering: pixelated;
}

.experiment-controls {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #111;
  border-top: 1px solid #333;
  flex-wrap: wrap;
}

.exp-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: #1a1a1a;
  color: #aaa;
  border: 1px solid #333;
  border-radius: 2px;
  cursor: pointer;
  text-transform: lowercase;
  transition: color 0.15s, border-color 0.15s;
}

.exp-btn:hover,
.exp-btn:focus {
  color: #fff;
  border-color: #666;
  outline: none;
}

.exp-btn:active {
  background: #222;
}

/* ASCII State Machine */
.asm-display {
  padding: 1.5rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.asm-face {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem;
  line-height: 1.3;
  color: #33ff33;
  margin: 0;
  white-space: pre;
  transition: color 0.3s;
}

.asm-mood {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.asm-history {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: #444;
  margin-top: 0.5rem;
  min-height: 1em;
}

/* Palette-specific glow for dust painter */
.experiment-canvas[data-palette="amber"] {
  box-shadow: inset 0 0 30px rgba(255, 176, 0, 0.05);
}

.experiment-canvas[data-palette="green"] {
  box-shadow: inset 0 0 30px rgba(51, 255, 51, 0.05);
}

.experiment-canvas[data-palette="white"] {
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.03);
}

/* Responsive */
@media (max-width: 600px) {
  .experiment-container {
    margin: 1rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .asm-face {
    font-size: 1.1rem;
  }

  .experiment-controls {
    justify-content: center;
  }
}
