/* ============================================
   Persona Shell — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Tokens --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #e8e8ed;
  --text-secondary: #8b8b9e;
  --text-muted: #5a5a6e;

  --accent-1: #7c5cfc;
  --accent-2: #00d4aa;
  --accent-3: #ff6b9d;
  --accent-glow-1: rgba(124, 92, 252, 0.15);
  --accent-glow-2: rgba(0, 212, 170, 0.15);

  --gradient-main: linear-gradient(135deg, #7c5cfc 0%, #00d4aa 50%, #ff6b9d 100%);
  --gradient-card-1: linear-gradient(135deg, rgba(124, 92, 252, 0.08), rgba(0, 212, 170, 0.04));
  --gradient-card-2: linear-gradient(135deg, rgba(255, 107, 157, 0.08), rgba(124, 92, 252, 0.04));

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(124, 92, 252, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- Animated Background --- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124, 92, 252, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 107, 157, 0.03) 0%, transparent 50%);
  animation: bgDrift 20s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes bgDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-0.5deg); }
  100% { transform: translate(1%, -2%) rotate(0.5deg); }
}

/* --- Noise Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  z-index: 0;
  pointer-events: none;
}

/* --- Layout --- */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

/* --- Top Navigation Bar --- */
.topbar {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  animation: fadeSlideDown 0.6s ease-out both;
}

.topbar-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-logo span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  max-width: 700px;
  margin-bottom: 4rem;
  animation: fadeSlideUp 0.7s ease-out 0.15s both;
}

.avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gradient-main);
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ringGlow 3s ease-in-out infinite alternate;
}

@keyframes ringGlow {
  0% { box-shadow: 0 0 20px rgba(124, 92, 252, 0.2), 0 0 40px rgba(124, 92, 252, 0.05); }
  100% { box-shadow: 0 0 30px rgba(0, 212, 170, 0.25), 0 0 60px rgba(0, 212, 170, 0.08); }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  color: var(--text-primary);
}

.hero-name {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-name .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: var(--transition-fast);
}

.chip:hover {
  border-color: var(--border-glow);
  background: var(--accent-glow-1);
  color: var(--text-primary);
}

/* --- Section Title --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-align: center;
  animation: fadeSlideUp 0.7s ease-out 0.3s both;
}

/* --- Project Cards --- */
.projects {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
  animation: fadeSlideUp 0.7s ease-out 0.45s both;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 0;
}

.project-card:nth-child(1)::before {
  background: var(--gradient-card-1);
}

.project-card:nth-child(2)::before {
  background: var(--gradient-card-2);
}

.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.card-icon.hub {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(124, 92, 252, 0.05));
  border: 1px solid rgba(124, 92, 252, 0.2);
}

.card-icon.memes {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(255, 107, 157, 0.05));
  border: 1px solid rgba(255, 107, 157, 0.2);
}

.card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.project-card:hover .card-arrow {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: white;
  transform: translate(2px, -2px);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.project-card:hover .tech-tag {
  border-color: rgba(124, 92, 252, 0.15);
  color: var(--text-secondary);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem 0;
  animation: fadeSlideUp 0.7s ease-out 0.6s both;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* --- Animations --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .shell {
    padding: 2rem 1.25rem;
  }

  .topbar {
    margin-bottom: 3rem;
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .card-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 1.8rem;
  }

  .hero-chips {
    gap: 0.35rem;
  }

  .chip {
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
}
