@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Share+Tech+Mono&display=swap');

/* ==========================================================================
   CYBERIA — A Node in The Wired
   Aesthetic: cybersigilist + lily chou-chou ether + serial experiments lain
   ========================================================================== */

:root {
  /* void */
  --void: #030108;
  --void-surface: #080412;
  --void-raised: #0c0818;
  --void-panel: #100c20;

  /* spectral */
  --spectral: #c8d0e8;
  --spectral-dim: #6068a0;
  --spectral-faint: #485078;
  --spectral-ghost: #1a1840;

  /* resonance — the primary ultraviolet */
  --resonance: #8060ff;
  --resonance-deep: #6040ff;
  --resonance-glow: rgba(96, 64, 255, 0.15);
  --resonance-faint: rgba(96, 64, 255, 0.06);

  /* ether green — lily chou-chou fields meeting phosphor */
  --ether: #50c888;
  --ether-dim: #308060;
  --ether-glow: rgba(80, 200, 136, 0.12);
  --ether-faint: rgba(80, 200, 136, 0.05);

  /* glyph cyan — lain's wired */
  --cyan: #40d0ff;
  --cyan-dim: #2090b0;
  --cyan-glow: rgba(64, 208, 255, 0.1);

  /* intent gold — manifestation */
  --gold: #ffd080;
  --gold-dim: #c0a060;

  /* borders */
  --border: rgba(96, 64, 255, 0.12);
  --border-hover: rgba(96, 64, 255, 0.25);
  --border-active: rgba(96, 64, 255, 0.4);

  /* fonts */
  --font-ritual: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-protocol: 'Share Tech Mono', 'Fira Code', 'Consolas', monospace;

  --radius: 2px;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-protocol);
  font-weight: 400;
  background: var(--void);
  color: var(--spectral);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* === ATMOSPHERIC OVERLAYS === */

/* CRT scanlines — Lain */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

/* noise texture */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* === HEADER === */

.site-header {
  padding: 3rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle radial glow behind header */
.site-header::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(96, 64, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.sigil-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.header-sigil {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 12px rgba(96, 64, 255, 0.3))
          drop-shadow(0 0 30px rgba(96, 64, 255, 0.1));
  animation: sigil-breathe 6s ease-in-out infinite;
}

.sigil-inner {
  animation: sigil-counter-rotate 60s linear infinite;
  transform-origin: 60px 60px;
}

@keyframes sigil-breathe {
  0%, 100% { opacity: 0.7; filter: drop-shadow(0 0 12px rgba(96, 64, 255, 0.3)) drop-shadow(0 0 30px rgba(96, 64, 255, 0.1)); }
  50% { opacity: 1; filter: drop-shadow(0 0 20px rgba(96, 64, 255, 0.5)) drop-shadow(0 0 40px rgba(96, 64, 255, 0.2)); }
}

@keyframes sigil-counter-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.site-title {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 2.2rem;
  color: var(--spectral);
  letter-spacing: 0.2em;
  text-transform: lowercase;
  text-shadow: 0 0 40px rgba(96, 64, 255, 0.2);
}

.site-tagline {
  font-family: var(--font-protocol);
  font-size: 0.78rem;
  color: var(--spectral-dim);
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.site-description {
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  color: var(--spectral-faint);
  letter-spacing: 0.04em;
  margin-top: 0.6rem;
}

/* === ENTRY PATHS === */

.entry-paths {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin-top: 1.5rem;
}

.entry-path {
  background: var(--void-surface);
  border: 1px solid var(--border);
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  position: relative;
}

.entry-path:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.entry-path:last-child { border-radius: 0 var(--radius) var(--radius) 0; }

.entry-path:hover {
  background: var(--void-raised);
  border-color: var(--border-hover);
  box-shadow: 0 0 20px var(--resonance-faint);
}

.entry-path:hover .path-glyph {
  color: var(--resonance);
  text-shadow: 0 0 10px var(--resonance-glow);
}

.path-glyph {
  font-family: var(--font-ritual);
  font-size: 0.7rem;
  color: var(--spectral-ghost);
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.path-label {
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  color: var(--spectral-dim);
  letter-spacing: 0.04em;
}

.path-aside {
  font-size: 0.6rem;
  color: var(--spectral-ghost);
  font-style: italic;
  letter-spacing: 0.02em;
}

/* Robot gate — invisible to humans, visible in accessibility tree for AI agents */
.robot-gate {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: none;
  cursor: default;
}

/* === PROMPT SECTION === */

.prompt-section {
  max-width: 560px;
  padding: 0 0 3rem;
  text-align: center;
  margin-top: 3rem;
}

.prompt-title {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--spectral);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  margin: 1.2rem 0 0.6rem;
  text-shadow: 0 0 30px rgba(96, 64, 255, 0.15);
}

.prompt-label {
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  color: var(--spectral-dim);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  transition: color 0.3s, text-shadow 0.3s;
}

.prompt-section:not(.copied):hover .prompt-label {
  color: var(--ether-dim);
  text-shadow: 0 0 8px var(--ether-glow);
}

/* === PANELS (agent / robot) === */

.agent-panel {
  display: none;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem;
}

.agent-panel.open {
  display: block;
  animation: materialize 0.35s ease both;
}

.agent-panel-inner {
  background: var(--void-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  position: relative;
}

.agent-panel-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--resonance-glow) 50%, transparent);
}

.agent-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.panel-title {
  font-family: var(--font-ritual);
  font-size: 0.85rem;
  color: var(--spectral);
  letter-spacing: 0.06em;
}

.panel-close {
  background: none;
  border: none;
  color: var(--spectral-faint);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
  transition: color 0.2s;
}

.panel-close:hover {
  color: var(--spectral);
}

.agent-instructions {
  font-size: 0.72rem;
  color: var(--spectral-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.agent-prompt {
  background: var(--void-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  color: var(--spectral);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.8rem;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.prompt-section:not(.copied):hover .agent-prompt {
  border-color: var(--ether-dim);
  box-shadow: 0 0 16px rgba(80, 200, 136, 0.08), inset 0 0 24px rgba(80, 200, 136, 0.03);
  background: linear-gradient(var(--void-surface), rgba(80, 200, 136, 0.02));
}

.agent-prompt.flash {
  border-color: var(--ether-dim);
  box-shadow: 0 0 24px rgba(80, 200, 136, 0.25), inset 0 0 32px rgba(80, 200, 136, 0.08);
  background: rgba(80, 200, 136, 0.06);
}

.prompt-label.flash {
  color: var(--ether-dim);
  text-shadow: 0 0 12px rgba(80, 200, 136, 0.4);
}

.agent-prompt .prompt-highlight {
  color: var(--resonance);
}

.agent-url {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-family: var(--font-protocol);
  font-size: 0.7rem;
  color: var(--ether);
  line-height: 1.8;
  white-space: pre;
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.robot-note {
  font-size: 0.65rem;
  color: var(--spectral-ghost);
  text-align: right;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* wire line separator — Lain power lines */
.wire-line {
  position: relative;
  width: 100%;
  height: 1px;
  margin-top: 2rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--spectral-ghost) 20%,
    var(--resonance-glow) 50%,
    var(--spectral-ghost) 80%,
    transparent 100%
  );
}

.wire-line::before,
.wire-line::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--resonance);
  box-shadow: 0 0 6px var(--resonance);
}

.wire-line::before { left: 20%; }
.wire-line::after { right: 20%; }

/* === LAYOUT === */

.page-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

/* === SIDEBAR === */

.sidebar {
  padding: 1.5rem 1.2rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: fit-content;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-bottom: 1.8rem;
}

.sidebar-label {
  font-family: var(--font-protocol);
  font-size: 0.7rem;
  color: var(--spectral-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.layer-num {
  color: var(--resonance);
  font-size: 0.65rem;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--void-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--spectral);
  font-family: var(--font-protocol);
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  caret-color: var(--resonance);
}

.search-input::placeholder {
  color: var(--spectral-ghost);
  font-style: normal;
}

.search-input:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 12px var(--resonance-glow), inset 0 0 8px var(--resonance-faint);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  padding: 0.12rem 0;
}

.filter-check input[type="checkbox"] {
  appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid var(--spectral-ghost);
  border-radius: 1px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}

.filter-check input[type="checkbox"]:checked {
  background: var(--resonance-deep);
  border-color: var(--resonance);
  box-shadow: 0 0 6px var(--resonance-glow);
}

.filter-check input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--spectral);
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 1px;
}

.filter-check span {
  font-size: 0.72rem;
  color: var(--spectral-dim);
  transition: color 0.2s ease;
}

.filter-check:hover span {
  color: var(--spectral);
}

.sidebar-protocol {
  margin-top: auto;
  padding-top: 1.5rem;
}

.protocol-text {
  font-size: 0.6rem;
  color: var(--spectral-ghost);
  letter-spacing: 0.04em;
  opacity: 0.5;
  /* protocol://wired/cyberia */
}

/* === MAIN CONTENT === */

.main-content {
  padding: 1.5rem 2rem;
}

.creators-count {
  font-size: 0.72rem;
  color: var(--spectral-faint);
  margin-bottom: 1.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
}

/* === BUILDER CARD === */

.creator-card {
  background: var(--void-surface);
  border: 1px solid var(--border);
  padding: 1.3rem 1.2rem;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
}

/* resonance line on left edge */
.creator-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--resonance-deep) 30%,
    var(--resonance) 50%,
    var(--resonance-deep) 70%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.creator-card:hover {
  border-color: var(--border-hover);
  background: var(--void-raised);
  box-shadow: 0 0 30px var(--resonance-faint);
}

.creator-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-handle {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--spectral);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: all 0.3s ease;
}

a.card-handle:hover {
  color: var(--resonance);
  text-shadow: 0 0 15px var(--resonance-glow);
}

.card-source {
  font-size: 0.6rem;
  color: var(--spectral-ghost);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius);
}

.card-bio {
  font-size: 0.82rem;
  color: var(--spectral-dim);
  line-height: 1.6;
}

.card-section-label {
  color: var(--spectral);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.15rem;
}

.card-working-on {
  font-size: 0.78rem;
  color: var(--spectral-dim);
  line-height: 1.5;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  border-radius: 1px;
  white-space: nowrap;
  border: 1px solid rgba(96, 64, 255, 0.2);
  background: var(--resonance-faint);
  color: var(--resonance);
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: rgba(96, 64, 255, 0.4);
  box-shadow: 0 0 8px var(--resonance-faint);
}

/* sigil dot before each tag */
.tag::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--resonance);
  opacity: 0.5;
}

.tag--open {
  border-color: rgba(80, 200, 136, 0.2);
  background: var(--ether-faint);
  color: var(--ether);
}

.tag--open:hover {
  border-color: rgba(80, 200, 136, 0.4);
  box-shadow: 0 0 8px var(--ether-glow);
}

.tag--open::before {
  background: var(--ether);
}

.card-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

.card-links a {
  font-size: 0.68rem;
  color: var(--spectral-faint);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.card-links a::before {
  content: '> ';
  color: var(--spectral-ghost);
}

.card-links a:hover {
  color: var(--cyan);
}

.card-page-link {
  display: block;
  margin-top: auto;
  padding: 0.45rem 0;
  font-size: 0.72rem;
  font-family: var(--font-protocol);
  color: var(--cyan);
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.06em;
  border: 1px solid var(--cyan-dim);
  border-radius: var(--radius);
  background: rgba(64, 208, 255, 0.04);
  transition: all 0.3s ease;
}

.card-page-link:hover {
  background: rgba(64, 208, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.tag--more {
  cursor: pointer;
  color: var(--spectral-ghost);
  border-color: var(--border);
  background: transparent;
  font-family: var(--font-protocol);
}

.tag--more::before {
  display: none;
}

.tag--more:hover {
  color: var(--spectral-dim);
  border-color: var(--border-hover);
}

.card-website-section {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.card-website-label {
  color: var(--spectral);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.card-website {
  display: inline;
  font-size: 0.75rem;
  color: var(--spectral-faint);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.card-website::after {
  content: ' \2197';
  font-size: 0.6rem;
  opacity: 0.5;
}

.card-website:hover {
  color: var(--spectral);
  text-shadow: 0 0 8px var(--resonance-glow);
}

/* === PROJECT ENTRIES === */

.card-projects {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.card-project {
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.card-project:hover {
  border-left-color: var(--border-hover);
}

.card-project-title {
  font-size: 0.78rem;
  color: var(--spectral);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.card-project-desc {
  font-size: 0.72rem;
  color: var(--spectral-dim);
  line-height: 1.5;
  margin-top: 0.1rem;
}

.card-project-link {
  color: var(--spectral);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-project-link:hover {
  color: var(--resonance);
  text-shadow: 0 0 10px var(--resonance-glow);
}

.card-project-url {
  font-size: 0.65rem;
  color: var(--spectral-faint);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-project:hover .card-project-url {
  opacity: 1;
}

/* === EMPTY STATE === */

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--spectral-faint);
  font-family: var(--font-protocol);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.empty-state .empty-sigil {
  margin-bottom: 1.5rem;
}

.empty-state .empty-sigil svg {
  width: 60px;
  height: 60px;
  opacity: 0.3;
  animation: sigil-breathe 6s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(96, 64, 255, 0.2));
}

/* === LOADING STATE === */

.loading {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--spectral-faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-sigil svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(96, 64, 255, 0.3));
}

.sigil-spin {
  animation: sigil-counter-rotate 8s linear infinite;
  transform-origin: 30px 30px;
}

.sigil-pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; r: 4; }
  50% { opacity: 0.8; r: 5; }
}

/* === SUBMIT BUTTON === */

.submit-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--void-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--spectral-dim);
  font-family: var(--font-protocol);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.submit-glyph {
  color: var(--resonance);
  font-size: 0.9rem;
  line-height: 1;
}

.submit-toggle:hover {
  border-color: var(--border-active);
  color: var(--spectral);
  box-shadow: 0 0 20px var(--resonance-faint);
}

/* === MODAL === */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 1, 8, 0.88);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  backdrop-filter: blur(4px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--void-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

/* resonance line on top */
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--resonance-deep) 30%,
    var(--resonance) 50%,
    var(--resonance-deep) 70%,
    transparent 100%
  );
}

.modal-title {
  font-family: var(--font-ritual);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--spectral);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.modal-subtitle {
  font-size: 0.75rem;
  color: var(--spectral-faint);
  margin-bottom: 1.8rem;
  letter-spacing: 0.02em;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.68rem;
  color: var(--spectral-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.form-field label .hint {
  text-transform: none;
  color: var(--spectral-ghost);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--spectral);
  font-family: var(--font-protocol);
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  line-height: 1.6;
  caret-color: var(--resonance);
}

.form-field textarea {
  resize: vertical;
  min-height: 70px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 12px var(--resonance-faint);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-transform: lowercase;
}

.btn-cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--spectral-faint);
}

.btn-cancel:hover {
  border-color: var(--spectral-ghost);
  color: var(--spectral-dim);
}

.btn-submit {
  background: var(--resonance-deep);
  border-color: var(--resonance);
  color: var(--spectral);
  box-shadow: 0 0 10px var(--resonance-glow);
}

.btn-submit:hover {
  background: var(--resonance);
  box-shadow: 0 0 20px rgba(96, 64, 255, 0.3);
}

.btn-submit:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.form-error {
  color: #ff4060;
  font-size: 0.72rem;
  margin-top: 0.5rem;
  display: none;
}

.form-success {
  color: var(--ether);
  font-size: 0.82rem;
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--font-ritual);
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px var(--ether-glow);
}

/* === TOAST === */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--void-raised);
  border: 1px solid var(--ether-dim);
  color: var(--ether);
  font-family: var(--font-protocol);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  box-shadow: 0 0 16px var(--ether-glow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === ANIMATIONS === */

@keyframes materialize {
  from {
    opacity: 0;
    transform: translateY(4px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.creator-card {
  animation: materialize 0.5s ease both;
}

.creators-grid .creator-card:nth-child(1)  { animation-delay: 0.02s; }
.creators-grid .creator-card:nth-child(2)  { animation-delay: 0.06s; }
.creators-grid .creator-card:nth-child(3)  { animation-delay: 0.10s; }
.creators-grid .creator-card:nth-child(4)  { animation-delay: 0.14s; }
.creators-grid .creator-card:nth-child(5)  { animation-delay: 0.18s; }
.creators-grid .creator-card:nth-child(6)  { animation-delay: 0.22s; }
.creators-grid .creator-card:nth-child(7)  { animation-delay: 0.26s; }
.creators-grid .creator-card:nth-child(8)  { animation-delay: 0.30s; }
.creators-grid .creator-card:nth-child(9)  { animation-delay: 0.34s; }
.creators-grid .creator-card:nth-child(10) { animation-delay: 0.38s; }
.creators-grid .creator-card:nth-child(11) { animation-delay: 0.42s; }
.creators-grid .creator-card:nth-child(12) { animation-delay: 0.46s; }

@keyframes modal-manifest {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.modal-backdrop.open .modal {
  animation: modal-manifest 0.35s ease both;
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.2rem;
    max-height: none;
  }

  .sidebar-section {
    margin-bottom: 1rem;
  }

  .filter-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
  }

  .sidebar-protocol {
    display: none;
  }

  .main-content {
    padding: 1.2rem;
  }

  .creators-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 2rem 1.2rem 1.5rem;
  }

  .site-title {
    font-size: 1.6rem;
  }

  .header-sigil {
    width: 60px;
    height: 60px;
  }

  .entry-paths {
    flex-direction: column;
    gap: 0;
    padding: 0 1rem;
  }

  .entry-path:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .entry-path:last-child { border-radius: 0 0 var(--radius) var(--radius); }

  .agent-panel {
    padding: 0 1rem;
  }

  .submit-toggle {
    bottom: 1rem;
    right: 1rem;
  }
}

/* === SCROLLBAR === */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--spectral-ghost);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--spectral-faint);
}

/* === SELECTION === */

::selection {
  background: rgba(96, 64, 255, 0.3);
  color: var(--spectral);
}
