/* ═══════════════════════════════════════════════════
   BENTO PORTFOLIO — Premium Design System
   ═══════════════════════════════════════════════════ */

:root {
  /* Dark Theme (Default) */
  --bg-base:      #050508;
  --bg-card:      rgba(20, 20, 28, 0.6);
  --bg-card-hover:rgba(28, 28, 40, 0.8);
  --border:       rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --text-primary:   #f0f0f5;
  --text-secondary: #9898a8;
  --text-muted:     #5a5a6e;
  
  --accent-1: #7c6aef;
  --accent-2: #c06aef;
  --accent-3: #ef6a9a;
  --gradient-brand: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  
  --radius-xl: 32px;
  --radius-lg: 24px;
  
  --font-sans:  'Inter', system-ui, sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-base:      #f4f4f6;
  --bg-card:      rgba(255, 255, 255, 0.9);
  --bg-card-hover:rgba(255, 255, 255, 1);
  --border:       rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem;
  overflow-x: hidden;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ─── Ambience ─── */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
}
.glow-1 { top: -10%; left: -5%; width: 50vw; height: 50vw; background: var(--accent-1); }
.glow-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: var(--accent-3); }
[data-theme="light"] .ambient-glow { opacity: 0.08; }

/* ─── Layout ─── */
.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease-out);
}
.theme-btn:hover { background: var(--bg-card-hover); transform: scale(1.05); }
.theme-btn .icon-moon { display: none; }
[data-theme="light"] .theme-btn .icon-sun { display: none; }
[data-theme="light"] .theme-btn .icon-moon { display: block; }

/* ─── Bento Grid ─── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 1.25rem;
}

.bento-item {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.4s var(--ease-spring), border-color 0.3s, background 0.3s;
  display: flex;
  flex-direction: column;
}

.bento-item.p-0 { padding: 0; }

.bento-item:hover {
  transform: scale(0.985);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.bento-item:active { transform: scale(0.96); }

/* Spans */
.span-2x2 { grid-column: span 2; grid-row: span 2; }
.span-2x1 { grid-column: span 2; grid-row: span 1; }
.span-1x2 { grid-column: span 1; grid-row: span 2; }
.span-1x1 { grid-column: span 1; grid-row: span 1; }

.flex-center { align-items: center; justify-content: center; text-align: center; }

/* ─── Card Utilities & Micro-interactions ─── */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: auto;
}
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-muted);
}
.arrow {
  color: var(--text-muted);
  transition: all 0.3s var(--ease-out);
}
.group:hover .arrow {
  color: var(--text-primary);
  transform: translate(3px, -3px);
}

.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124,106,239,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.group:hover .card-glow { opacity: 1; }

/* ─── Specific Widgets ─── */

/* Profile */
.card-profile { justify-content: center; }
.avatar-ring {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient-brand);
  padding: 3px;
  margin-bottom: 2rem;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-base);
}
.status-badge {
  position: absolute;
  bottom: -4px; right: -60px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
  animation: pulse-green 2s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes pulse-green {
  to { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

.card-profile h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.tagline {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 90%;
}

/* Insight Project */
.project-bg {
  position: absolute; inset: 0;
  transition: opacity 0.4s;
}
.card-project:hover .project-bg { opacity: 0.15; }
.card-project h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.card-project p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Social */
.card-social svg {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.4s var(--ease-spring);
}
.card-social:hover svg {
  color: var(--text-primary);
  transform: scale(1.15);
}

/* Contact & Custom Widgets */
.badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 12px;
  transition: all 0.2s;
}
.card-email h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.icon-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
}
button.bento-item { cursor: pointer; color: inherit; }

/* Sub Links (YouTube/FB inside cards) */
.sub-link {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s var(--ease-spring);
  display: flex;
}
.sub-link:hover {
  color: var(--text-primary);
  transform: scale(1.15);
}

/* Metric Cards */
/* Mini Metrics inside Creator Cards */
.metrics-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  z-index: 10;
  position: relative;
}
.metric-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.3s var(--ease-spring);
  color: inherit;
}
.metric-mini svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s var(--ease-spring);
}
.group\/mini:hover svg {
  color: var(--text-primary);
  transform: scale(1.15);
}
.metric-value.compact {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.metric-label.mini {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-muted);
}
.leading-none { line-height: 1; }

.inline-block { display: inline-block; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }

/* Utilities */
.text-center { text-align: center; }
.text-3xl { font-size: 2rem; }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-serif { font-family: var(--font-serif); }
.italic { font-style: italic; }
.mb-2 { margin-bottom: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-4 { gap: 1rem; }
.text-secondary { color: var(--text-secondary); font-size: 0.85rem; }

/* ─── Responsive Stacking ─── */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .span-2x2 { grid-column: span 2; grid-row: span 2; }
  .span-2x1 { grid-column: span 2; grid-row: span 1; }
  .span-1x2 { grid-column: span 1; grid-row: span 1; } /* change music to standard block */
  .span-1x1 { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 600px) {
  body { padding: 1rem; }
  header { margin-bottom: 2rem; }
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-item { padding: 1.5rem; }
  .span-2x2, .span-2x1, .span-1x2, .span-1x1 {
    grid-column: span 1;
    grid-row: auto;
  }
  .card-music iframe { min-height: 152px; } /* force compact spotify embed on mobile */
}
