/* ════════════════════════════════════════════════════════════════
   profile.css — /profile/<username>/ page-specific styles.
   Dual-mode: both Zodiac and Delicious work via data-mode="z|d".
   Reuses cosmic .rcard*, .pagination* and the Delicious token block.
   The .layout-z/.layout-d rules here are the mode-visibility switch.
   ════════════════════════════════════════════════════════════════ */

/* ── Mode-layout visibility ─────────────────────────────────────── */
.layout-z { display: block; }
.layout-d { display: none; }
html[data-mode="d"] .layout-z { display: none; }
html[data-mode="d"] .layout-d {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  html[data-mode="d"] .layout-d { grid-template-columns: 1fr; }
  .prof-sidebar { margin-top: 1.5rem; }
}

/* ── Profile header (mode-independent) ─────────────────────────── */
.prof-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1.75rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
  .prof-head { grid-template-columns: auto 1fr; }
  .prof-actions { grid-column: 1 / -1; margin-top: .5rem; }
  .prof-big-three { grid-column: 1 / -1; }
}

.prof-avatar {
  grid-row: 1 / 3;
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--surface-low);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif', serif; font-size: 2.2rem; font-style: italic;
  color: var(--primary); font-weight: 300; flex-shrink: 0;
  overflow: hidden;
}
html[data-mode="d"] .prof-avatar { font-family: 'Fraunces', serif; }
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }

.prof-info { display: flex; flex-direction: column; gap: .35rem; }
.prof-display-name {
  font-family: 'Noto Serif', serif; font-style: italic; font-weight: 300;
  font-size: 1.7rem; letter-spacing: -.01em; color: var(--text);
  margin: 0; line-height: 1.1;
}
html[data-mode="d"] .prof-display-name {
  font-family: 'Fraunces', serif; font-style: normal; font-weight: 400;
  letter-spacing: -.015em;
}
.prof-username { font-family: 'DM Mono', monospace; font-size: .78rem; letter-spacing: .06em; color: var(--accent); }
.prof-since { font-family: 'Noto Serif', serif; font-style: italic; font-size: .85rem; color: var(--muted); margin: .1rem 0 0; }
html[data-mode="d"] .prof-since { font-family: 'Manrope', sans-serif; font-style: normal; }

.prof-stats { display: flex; gap: 1.5rem; margin-top: .3rem; }
.prof-stat { display: flex; gap: .35rem; align-items: baseline; font-family: 'Space Grotesk', sans-serif; font-size: .75rem; letter-spacing: .04em; }
.prof-stat__count { font-weight: 600; color: var(--text); font-size: .88rem; }
.prof-stat__label { color: var(--muted); }

.prof-actions { display: flex; gap: .75rem; align-items: flex-start; }
.prof-btn {
  height: 38px; padding: 0 1.25rem;
  font-family: 'Space Grotesk', sans-serif; font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: var(--r-pill); cursor: pointer; transition: opacity .2s, background .2s;
  border: none;
}
.prof-btn--primary { background: var(--accent); color: var(--bg); }
html[data-mode="d"] .prof-btn--primary { background: var(--primary-deep); color: #fff; }
.prof-btn--primary:hover { opacity: .85; }
.prof-btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.prof-btn--ghost:hover { border-color: var(--muted); color: var(--text); }

/* Big-three chips */
.prof-big-three { grid-column: 2 / 4; display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .9rem; }
.big-three-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .8rem;
  background: var(--surface-low); border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: 'Space Grotesk', sans-serif; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.big-three-chip .glyph { font-family: serif; font-size: 1rem; color: var(--accent); }
html[data-mode="d"] .big-three-chip { font-family: 'Manrope', sans-serif; }
html[data-mode="d"] .big-three-chip .glyph { color: var(--primary-deep); }

/* ── Zodiac: 3D chart host ──────────────────────────────────────── */
.layout-z .chart-widget-scene {
  width: 100%;
  height: clamp(260px, 40vw, 480px);
  border-radius: var(--r-card);
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(128,99,255,.18), 0 0 120px rgba(71,23,202,.10);
}

/* ── Zodiac: planet table ───────────────────────────────────────── */
/* .ptbl/.pcell/.pg/.rx/.ef/.ee/.ea/.ew — now canonical in cosmic.css */
.prof-panel {
  background: var(--surface-low); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 1.2rem 1.4rem; margin-bottom: 2rem;
}
.prof-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.prof-panel-title {
  font-family: 'Space Grotesk', sans-serif; font-size: .63rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: .44rem;
}
.prof-panel-title::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px var(--accent); flex-shrink: 0; }

/* ── Zodiac: activity strip ─────────────────────────────────────── */
.activity-strip { margin-bottom: 2rem; }
.activity-strip__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.activity-strip__head h2 { margin: 0; font-size: 1rem; color: var(--text); font-family: 'Space Grotesk', sans-serif; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.activity-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 640px) { .activity-strip__grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Delicious: tabs + recipe grid ─────────────────────────────── */
.prof-recipe-main { min-width: 0; }
.prof-tabs { display: flex; gap: 0; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.prof-tab {
  padding: .7rem 1.1rem; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.prof-tab:hover { color: var(--text); }
.prof-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
html[data-mode="d"] .prof-tab.is-active { color: var(--primary-deep); border-bottom-color: var(--primary-deep); }
.prof-recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.4rem; }
@media (max-width: 640px) { .prof-recipe-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Delicious: sidebar cosmic sig card ─────────────────────────── */
.prof-sidebar { min-width: 0; }
.cosmic-sig-card {
  background: var(--surface-low); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 1.3rem 1.4rem;
}
.cosmic-sig-card__head {
  font-family: 'Space Grotesk', sans-serif; font-size: .63rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: .44rem; margin-bottom: 1.1rem;
}
html[data-mode="d"] .cosmic-sig-card__head::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.cosmic-sig-chart {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: var(--surface-mid); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem; position: relative; overflow: hidden;
}
html[data-mode="d"] .cosmic-sig-chart { background: linear-gradient(155deg, rgba(90,107,61,0.1), rgba(194,93,59,0.08)); }
.cosmic-sig-chart__label { font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); text-align: center; line-height: 1.5; }
.cosmic-sig-card__chips { display: flex; flex-direction: column; gap: .45rem; }
.cosmic-sig-chip {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem;
  background: var(--surface-hi); border-radius: var(--r-md);
  font-family: 'Space Grotesk', sans-serif; font-size: .72rem; letter-spacing: .06em; color: var(--muted);
}
html[data-mode="d"] .cosmic-sig-chip { background: rgba(43,38,32,0.04); }
.cosmic-sig-chip .glyph { font-family: serif; font-size: 1rem; color: var(--accent); flex-shrink: 0; }
html[data-mode="d"] .cosmic-sig-chip .glyph { color: var(--primary-deep); }
.cosmic-sig-chip strong { color: var(--text); font-weight: 600; }
.cosmic-sig-cta {
  display: block; margin-top: 1.1rem; text-align: center; padding: .6rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: 'Space Grotesk', sans-serif; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color .2s, border-color .2s;
}
.cosmic-sig-cta:hover { color: var(--primary); border-color: var(--primary); }

/* ── Empty states ───────────────────────────────────────────────── */
.prof-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 3rem 2rem; border: 1px dashed var(--line);
  border-radius: var(--r-card); color: var(--muted);
}
.prof-empty__icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .55; }
.prof-empty__title { font-family: 'Noto Serif', serif; font-style: italic; font-size: 1.2rem; color: var(--text); margin: 0 0 .4rem; }
html[data-mode="d"] .prof-empty__title { font-family: 'Fraunces', serif; font-style: normal; }
.prof-empty__desc { font-size: .88rem; line-height: 1.55; max-width: 42ch; margin: 0 0 1.25rem; }
.prof-empty__cta {
  display: inline-block; padding: .6rem 1.4rem;
  background: var(--primary-deep); color: var(--text-on-primary);
  border-radius: var(--r-pill);
  font-family: 'Space Grotesk', sans-serif; font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; transition: opacity .2s;
}
.prof-empty__cta:hover { opacity: .85; color: var(--text-on-primary); }
