/* ═══════════════════════════════════════════════════════════
   Personas v2 — AI Personality Profile Output
   Matches original Personas profile page style
   ═══════════════════════════════════════════════════════════ */

.profile-panel {
  margin-top: 3rem;
  padding-top: 1rem;
}

.profile-hero {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.profile-hero-tag {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.profile-username {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.profile-short {
  font-size: 0.8rem;
  color: var(--muted2);
  margin-top: 1rem;
  max-width: 560px;
  line-height: 1.75;
}

.profile-vibe {
  margin-top: 0.7rem;
  font-size: 0.65rem;
  color: var(--accent3);
  letter-spacing: 0.1em;
}

.profile-vibe::before {
  content: '// ';
  color: var(--muted);
}

.profile-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.long-desc {
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.9;
  max-width: 720px;
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.field-key {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.field-val {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.6;
}

/* Rendered markdown-ish profile content */
.profile-content {
  margin-top: 1rem;
}

.profile-content h2,
.profile-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.profile-content h2 {
  font-size: 0.95rem;
  color: var(--text);
}

.profile-content h2 .num {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-right: 0.75rem;
  letter-spacing: 0.15em;
}

.profile-content h3 {
  font-size: 0.7rem;
  color: var(--muted2);
  border-bottom: none;
  margin: 1.25rem 0 0.6rem;
  padding-bottom: 0;
}

.profile-content p {
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.85;
  margin-bottom: 0.9rem;
  max-width: 720px;
}

.profile-content ul,
.profile-content ol {
  margin: 0.5rem 0 1rem 1.2rem;
  color: #aaa;
  font-size: 0.78rem;
  line-height: 1.8;
}

.profile-content li { margin-bottom: 0.3rem; }

.profile-content strong {
  color: var(--text);
  font-weight: 700;
}

.profile-content em {
  color: var(--text-secondary);
  font-style: italic;
}

.profile-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.6rem 0 0.6rem 1.1rem;
  margin: 0.8rem 0 1.2rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.7;
  font-style: italic;
}

.profile-content code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--surface2);
  padding: 0.1rem 0.35rem;
  color: var(--accent);
}

.profile-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Quote cards */
.quote-grid {
  display: grid;
  gap: 0.75rem;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent3);
  padding: 1rem 1.2rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

.quote-card .ctx {
  font-style: normal;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

/* Red flags */
.flag-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.flag-item {
  border: 1px solid rgba(255, 51, 102, 0.3);
  background: var(--accent2-dim);
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  color: #ff8aa8;
  line-height: 1.65;
}

.flag-item .flag-title {
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

/* Profile export bar */
.profile-export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Gemini loading state */
.gemini-loading {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-top: 2rem;
}

.gemini-loading .spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 1.25rem;
  display: block;
}

.gemini-loading h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.gemini-loading p {
  font-size: 0.7rem;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

@media (max-width: 700px) {
  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-meta {
    text-align: left;
    align-items: flex-start;
  }
}
