/* ═══════════════════════════════════════════════════════════════
   Quably Persona — generated personal website styles.
   ONE stylesheet drives both the live preview (JS renderer) and the
   published public page (PHP renderer). Template variants switch on
   [data-template]; the accent colour is injected as --accent; theme
   via [data-theme].
   Self-contained: does NOT depend on the main site tokens, so a
   published page renders identically in an iframe or standalone.
   ═══════════════════════════════════════════════════════════════ */

.ps-site {
  --accent: #7C3AED;
  --bg: #09090F;
  --surface: #14141C;
  --surface-2: #1C1C28;
  --border: #2A2A3C;
  --text: #F0F0F8;
  --text-2: #9A9AB4;
  --text-3: #62627A;
  --radius: 14px;
  --maxw: 760px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
.ps-site[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F7F7FB;
  --surface-2: #EFEFF6;
  --border: #E2E2EE;
  --text: #15151F;
  --text-2: #55556E;
  --text-3: #9191A8;
}
.ps-site *,
.ps-site *::before,
.ps-site *::after { box-sizing: border-box; }

.ps-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Hero ─────────────────────────────────────────────────────── */
.ps-hero { text-align: center; padding: 72px 20px 40px; }
.ps-hero__photo {
  width: 112px; height: 112px; margin: 0 auto 20px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700; color: #fff; overflow: hidden;
}
.ps-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.ps-hero__name { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.ps-hero__headline { font-size: 1.1rem; color: var(--accent); font-weight: 600; margin: 0 0 10px; }
.ps-hero__meta { color: var(--text-2); font-size: 0.9rem; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ps-hero__meta a { color: var(--text-2); text-decoration: none; }
.ps-hero__meta a:hover { color: var(--accent); }

/* ── Social / action buttons ──────────────────────────────────── */
.ps-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.ps-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--surface);
  transition: all 150ms ease;
}
.ps-btn:hover { border-color: var(--accent); color: var(--accent); }
.ps-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ps-btn--primary:hover { opacity: 0.92; color: #fff; }

/* ── Sections ─────────────────────────────────────────────────── */
.ps-section { padding: 28px 0; border-top: 1px solid var(--border); }
.ps-section__title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin: 0 0 18px;
}
.ps-about p { color: var(--text-2); margin: 0; font-size: 1rem; }

/* Timeline (experience + education) */
.ps-entry { position: relative; padding: 0 0 20px 20px; border-left: 2px solid var(--border); }
.ps-entry:last-child { padding-bottom: 0; }
.ps-entry::before {
  content: ''; position: absolute; left: -5px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.ps-entry__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.ps-entry__title { font-weight: 700; font-size: 1rem; }
.ps-entry__sub { color: var(--accent); font-size: 0.9rem; font-weight: 600; }
.ps-entry__time { color: var(--text-3); font-size: 0.8rem; white-space: nowrap; }
.ps-entry__desc { color: var(--text-2); font-size: 0.92rem; margin: 6px 0 0; }

/* Skills */
.ps-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-skill {
  font-size: 0.82rem; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}

/* Projects */
.ps-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ps-project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: inherit; display: block;
  transition: all 160ms ease;
}
.ps-project:hover { border-color: var(--accent); transform: translateY(-2px); }
.ps-project__img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; background: var(--surface-2); }
.ps-project__title { font-weight: 700; font-size: 1rem; margin: 0 0 6px; }
.ps-project__desc { color: var(--text-2); font-size: 0.88rem; margin: 0 0 10px; }
.ps-project__tech { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-project__tech span { font-size: 0.68rem; color: var(--accent); background: var(--surface-2); padding: 3px 8px; border-radius: 999px; }

/* Achievements */
.ps-achievements { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-achievement { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 0.95rem; }
.ps-achievement::before { content: '★'; color: var(--accent); flex-shrink: 0; }

/* Contact */
.ps-contact { display: flex; flex-direction: column; gap: 8px; }
.ps-contact a, .ps-contact span { color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.ps-contact a:hover { color: var(--accent); }

/* Footer */
.ps-footer { text-align: center; padding: 40px 20px 48px; color: var(--text-3); font-size: 0.78rem; }
.ps-footer a { color: var(--text-3); text-decoration: none; }
.ps-footer a:hover { color: var(--accent); }

/* ══════════════ TEMPLATE VARIANTS ══════════════ */

/* Professional: left-aligned hero, serif-ish headings, calmer */
.ps-site[data-template="professional"] .ps-hero { text-align: left; display: flex; align-items: center; gap: 24px; }
.ps-site[data-template="professional"] .ps-hero__photo { margin: 0; }
.ps-site[data-template="professional"] .ps-hero__meta { justify-content: flex-start; }
.ps-site[data-template="professional"] .ps-actions { justify-content: flex-start; }

/* Developer: mono accents, terminal feel */
.ps-site[data-template="developer"] { --surface: #0F1420; --surface-2: #141b2b; }
.ps-site[data-template="developer"] .ps-hero__name,
.ps-site[data-template="developer"] .ps-section__title { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.ps-site[data-template="developer"] .ps-hero__name::before { content: '> '; color: var(--accent); }
.ps-site[data-template="developer"] .ps-skill { font-family: 'JetBrains Mono', monospace; }

/* Creative: bold, larger name, rounded cards, gradient avatar ring */
.ps-site[data-template="creative"] .ps-hero__name { font-size: 2.6rem; }
.ps-site[data-template="creative"] .ps-hero__photo { border-width: 4px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 15%, transparent); }
.ps-site[data-template="creative"] .ps-projects { grid-template-columns: 1fr; }
.ps-site[data-template="creative"] .ps-project { padding: 22px; }

/* Elegant: generous spacing, thin rules, centered serif */
.ps-site[data-template="elegant"] { --maxw: 680px; }
.ps-site[data-template="elegant"] .ps-hero { padding-top: 96px; }
.ps-site[data-template="elegant"] .ps-hero__name { font-weight: 600; letter-spacing: 0.01em; }
.ps-site[data-template="elegant"] .ps-section { padding: 36px 0; }

/* Minimal is the base (no overrides). */

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 560px) {
  .ps-projects { grid-template-columns: 1fr; }
  .ps-site[data-template="professional"] .ps-hero { flex-direction: column; text-align: center; }
  .ps-site[data-template="professional"] .ps-hero__photo { margin: 0 auto 20px; }
  .ps-site[data-template="professional"] .ps-hero__meta,
  .ps-site[data-template="professional"] .ps-actions { justify-content: center; }
}
