/* ============================================================
   FelixCraft · Portfolio v4 — Ethereal Minimalism
   Requires bento.css · rendered by profile-ui.js
   ============================================================ */

.page {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
  padding-bottom: 80px;
}

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 16px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px;
  padding: 6px 8px 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.08);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
[data-theme="dark"] .topbar { background: rgba(11, 22, 45, 0.82); border-color: rgba(56, 189, 248, 0.25); }
.topbar:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.topbar-home {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 7px 14px;
  border-radius: var(--r-pill);
  color: var(--muted); font: 500 0.80rem var(--font);
  transition: color 0.2s ease, background 0.2s ease;
}
.topbar-home i { font-size: 0.72rem; opacity: 0.5; transition: transform 0.25s var(--ease); }
.topbar-home:hover { color: var(--accent); background: var(--accent-subtle); }
.topbar-home:hover i { transform: translateX(-3px); opacity: 1; }

.topbar-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center; color: var(--muted);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.topbar-actions { display: flex; align-items: center; gap: 5px; }
#language { font: 600 0.68rem var(--font); letter-spacing: 0.04em; }

/* ── Profile Shell ──────────────────────────────────────── */
.profile-shell {
  display: grid; gap: 16px;
  padding-top: 44px;
  opacity: 0;
  animation: pageIn 0.6s var(--ease) 0.05s forwards;
}

/* ── Hero ───────────────────────────────────────────────── */
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px; align-items: stretch;
}

/* ── Identity Card ──────────────────────────────────────── */
.identity {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px, 5vw, 52px);
  overflow: hidden;
}
.identity::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient);
}
.identity::after {
  content: ''; position: absolute; right: -15%; bottom: -40%; width: 50%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-subtle), transparent);
  pointer-events: none;
}

.identity .eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}

.identity h1 {
  margin: 12px 0 8px;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 700; line-height: 0.96; letter-spacing: -0.05em;
}

.role {
  color: var(--accent); font-size: 0.95rem; font-weight: 600;
  letter-spacing: -0.01em;
}

.bio {
  max-width: 480px; margin: 16px 0 24px;
  color: var(--muted); line-height: 1.85; font-size: 0.88rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags .tag {
  padding: 4px 14px; font-size: 0.68rem; border-radius: var(--r-pill);
  background: var(--accent-subtle); color: var(--accent);
  border: 1px solid var(--line);
  font-weight: 500;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tags .tag:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(14,165,233,0.12);
}

/* ── Visual (Avatar) ────────────────────────────────────── */
.visual-wrap {
  position: relative; display: grid; place-items: center;
  min-width: 0; padding: clamp(24px, 3vw, 32px);
}

.visual-pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%;
}
.visual-pair img, .visual-single img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--r-xl);
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s var(--ease);
}
.visual-pair img:first-child { transform: rotate(-2deg); }
.visual-pair img:last-child { transform: rotate(1.5deg) translateY(8px); }
.visual-pair img:hover {
  z-index: 1; border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(14,165,233,0.15);
  transform: rotate(0deg) translateY(0) scale(1.03);
}

.visual-single { position: relative; width: min(320px, 100%); }
.visual-single::before {
  content: ''; position: absolute; inset: -15%;
  background: radial-gradient(circle at 50% 45%, var(--accent-subtle), transparent 65%);
  pointer-events: none;
}
.visual-single img {
  position: relative; border-radius: var(--r-xl);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-md);
}
.visual-single img:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(14,165,233,0.15);
  transform: scale(1.02);
}

.visual-note {
  position: absolute; top: -12px; right: 6%; z-index: 2;
  padding: 7px 16px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--accent);
  font: 600 0.68rem var(--font);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.visual-note:hover {
  color: var(--accent2); border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(14,165,233,0.12);
}

/* ── Info Grid ──────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.info-card {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  min-height: 140px; padding: 24px;
  animation: cardIn 0.5s var(--ease) backwards;
}
.info-card:nth-child(2) { animation-delay: 0.06s; }
.info-card:nth-child(3) { animation-delay: 0.12s; }

.info-card h2 {
  color: var(--muted); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.info-card p {
  font-size: 0.92rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink);
}

.info-card:first-child {
  background: var(--gradient); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(14,165,233,0.20);
}
.info-card:first-child:hover {
  box-shadow: 0 6px 24px rgba(14,165,233,0.30);
}
.info-card:first-child h2 { color: rgba(255,255,255,0.60); }
.info-card:first-child p { color: #fff; }

/* ── Per-member Accent Palettes (Full Custom Themes) ─────── */
body.profile-frame121 {
  --accent:        #0284c7;
  --accent2:       #0ea5e9;
  --accent3:       #38bdf8;
  --accent-glow:   rgba(56, 189, 248, 0.40);
  --accent-subtle: rgba(14, 165, 233, 0.10);
  --gradient:      linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
  --shadow-glow:   0 0 30px rgba(56, 189, 248, 0.35);
}

body.profile-simon {
  --accent:        #8b5cf6;
  --accent2:       #a78bfa;
  --accent3:       #c4b5fd;
  --accent-glow:   rgba(139, 92, 246, 0.40);
  --accent-subtle: rgba(139, 92, 246, 0.10);
  --gradient:      linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
  --shadow-glow:   0 0 30px rgba(139, 92, 246, 0.35);
}

body.profile-nick {
  --accent:        #ef4444;
  --accent2:       #f87171;
  --accent3:       #fca5a5;
  --accent-glow:   rgba(239, 68, 68, 0.40);
  --accent-subtle: rgba(239, 68, 68, 0.10);
  --gradient:      linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
  --shadow-glow:   0 0 30px rgba(239, 68, 68, 0.35);
}

body.profile-hernfah {
  --accent:        #d97706;
  --accent2:       #eab308;
  --accent3:       #facc15;
  --accent-glow:   rgba(234, 179, 8, 0.40);
  --accent-subtle: rgba(234, 179, 8, 0.10);
  --gradient:      linear-gradient(135deg, #b45309 0%, #d97706 50%, #facc15 100%);
  --shadow-glow:   0 0 30px rgba(234, 179, 8, 0.35);
}

body.profile-hunt {
  --accent:        #f97316;
  --accent2:       #fb923c;
  --accent3:       #fdba74;
  --accent-glow:   rgba(249, 115, 22, 0.40);
  --accent-subtle: rgba(249, 115, 22, 0.10);
  --gradient:      linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  --shadow-glow:   0 0 30px rgba(249, 115, 22, 0.35);
}

body.profile-rimaki {
  --accent:        #06b6d4;
  --accent2:       #22d3ee;
  --accent3:       #67e8f9;
  --accent-glow:   rgba(6, 182, 212, 0.40);
  --accent-subtle: rgba(6, 182, 212, 0.10);
  --gradient:      linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
  --shadow-glow:   0 0 30px rgba(6, 182, 212, 0.35);
}

body.profile-nicekun {
  --accent:        #6366f1;
  --accent2:       #818cf8;
  --accent3:       #a5b4fc;
  --accent-glow:   rgba(99, 102, 241, 0.40);
  --accent-subtle: rgba(99, 102, 241, 0.10);
  --gradient:      linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  --shadow-glow:   0 0 30px rgba(99, 102, 241, 0.35);
}

/* ── Heart Pop ──────────────────────────────────────────── */
.heart-pop {
  position: fixed; z-index: 100;
  color: var(--accent); font-size: 1.5rem;
  pointer-events: none;
  animation: heartPop 1s ease-out forwards;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes softShift { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes heartPop {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(1.2); }
}

body.state-changing .profile-shell { animation: softShift 0.35s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .profile-shell, .info-card { opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .profile-hero { grid-template-columns: 1fr; }
  .visual-wrap { padding: 16px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card { min-height: 0; padding: 22px; }
}
@media (max-width: 560px) {
  .page { width: calc(100% - 24px); }
  .topbar-title { font-size: 0.56rem; letter-spacing: 0.08em; }
  .topbar-home span { display: none; }
  .topbar-home { padding-inline: 10px; }
  .visual-note { right: 0; top: -8px; }
}
