:root {
  --bg: #07090a;
  --panel: #0c1012;
  --border: #1a2428;
  --green: #00ff9f;
  --cyan: #00e5ff;
  --amber: #ffb000;
  --text: #c8d6d6;
  --muted: #5a6b6b;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 3px
  );
  z-index: 1000;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 999;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 9, 10, 0.9);
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 0.85rem;
}

.status { display: flex; align-items: center; gap: 0.5rem; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.ticker {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero-visual {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}

.dog-frame {
  position: relative;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 1;
  overflow: hidden;
}

.dog-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9);
  transition: opacity 0.4s;
}

.frame-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.75);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
}

.glitch {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--green);
  line-height: 0.9;
  position: relative;
  text-shadow: 0 0 20px rgba(0,255,159,0.3);
}

.tagline {
  margin: 0.8rem 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.ca-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
}

.ca-box .label { color: var(--amber); }
.ca-box code { flex: 1; color: var(--cyan); word-break: break-all; }
.ca-box button {
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  padding: 0.3rem 0.7rem;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.75rem;
}
.ca-box button:hover { background: var(--green); color: #000; }

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--cyan);
}

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.panel-body {
  padding: 1.2rem 1.2rem 1.4rem;
  line-height: 1.6;
  font-size: 0.92rem;
}

.lore p { margin-bottom: 0.8rem; }
.lore .highlight {
  color: var(--green);
  margin-top: 1rem;
  font-weight: 700;
}

/* Thoughts */
.thoughts-feed {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.thought {
  border-left: 2px solid var(--green);
  padding: 0.6rem 0.8rem;
  background: rgba(0,255,159,0.03);
  font-size: 0.88rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.thought .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.thought .agent { color: var(--cyan); }

.thought-form {
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.prompt { color: var(--green); white-space: nowrap; }

.input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.input-row button {
  background: var(--green);
  color: #000;
  border: none;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8rem;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--muted);
}

footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .hero-visual { grid-template-columns: 1fr; }
  .dog-frame { max-width: 280px; margin: 0 auto; }
  footer { flex-direction: column; gap: 0.5rem; }
}
