:root {
  --bg-dark: #0a0a0a;
  --bg-card: #151515;
  /* slightly lighter for contrast */
  --bg-glass: rgba(255, 255, 255, 0.03);

  --primary-violet: #7c3aed;
  --primary-fuchsia: #d946ef;
  --accent-cyan: #22d3ee;

  --text-main: #ffffff;
  --text-muted: #a3a3a3;

  --font-main: 'Outfit', sans-serif;

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 58, 237, 0.5);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.25);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem;
  overflow-x: hidden;
  position: relative;
}

/* === ANIMATED BACKGROUND === */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.1), transparent 25%);
  animation: bgMove 15s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

/* === BENTO GRID LAYOUT === */
.bento-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* Layout 1/3 - 2/3 */
  grid-template-rows: auto auto;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  position: relative;
  /* Context for spotlight */
}

/* SPOTLIGHT EFFECT */
.bento-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.06),
      transparent 40%);
  z-index: 0;
  /* Behind items if they are transparent, or top if overlay */
  pointer-events: none;
  border-radius: var(--radius-lg);
  opacity: 1;
  transition: opacity 0.5s;
}

.bento-wrapper:hover::before {
  opacity: 1;
}

/* Common Bento Card Style */
.bento-item {
  background: rgba(21, 21, 21, 0.7);
  /* More transparency for glass */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease-out;
  /* Smooth tilt */
  z-index: 1;
  transform-style: preserve-3d;
  /* Enable 3D children */
}

.bento-item:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Grid Specifics */
.brand-box {
  grid-column: 1 / 2;
  justify-content: flex-end;
  /* Alineado abajo */
  background: linear-gradient(145deg, #121212, #0d0d0d);
  min-height: 250px;
}

.profile-box {
  grid-column: 2 / 3;
  background: linear-gradient(to bottom right, #151515, #1e1e1e);
  justify-content: center;
}

.topics-box {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(90deg, #151515, #101010);
  border-left: 4px solid var(--primary-fuchsia);
}

/* === BRAND BOX (GIANT TEXT) === */
.anime-title {
  font-size: 5rem;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -2px;
  background: linear-gradient(90deg, #fff, #888, #fff);
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 5s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes textShine {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.brand-box .subtitle {
  color: var(--primary-violet);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* === PROFILE (MERGED) === */
.profile-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: 100%;
}

.profile-img-lg {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-glow);
  object-fit: cover;
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.2);
}

.profile-info {
  flex: 1;
}

/* STATS BADGE */
.stats-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  text-align: center;
  min-width: 80px;
  animation: bgPulse 3s infinite alternate;
}

@keyframes bgPulse {
  0% {
    background: rgba(255, 255, 255, 0.1);
  }

  100% {
    background: rgba(124, 58, 237, 0.2);
  }
}

.stats-badge #postCount {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.stats-badge .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.bio-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
}

.profile-links {
  display: flex;
  gap: 1rem;
}

.btn-link {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 24px;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  border: 1px solid var(--border-glass);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-link:hover {
  border-color: var(--primary-fuchsia);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-link.github span {
  color: var(--text-muted);
}

.btn-link.blog-dev span {
  color: var(--accent-cyan);
}

/* === INLINE SEARCH BAR === */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.search-container-inline {
  flex: 0 1 400px;
}

.search-container-inline input {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: var(--transition);
}

.search-container-inline input:focus {
  border-color: var(--primary-fuchsia);
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.2);
  transform: translateY(-2px);
}

/* === TOPICS CHIPS === */
.topics-box h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-right: 1rem;
  min-width: unset;
  margin-bottom: 0.8rem;
  background: linear-gradient(90deg, #fff, var(--primary-fuchsia), var(--accent-cyan), #fff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: textShine 4s linear infinite;
}

.topics-box {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.topics-grid {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.topic-chip {
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.topic-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.t-1 {
  border-bottom: 2px solid var(--primary-violet);
}

.t-2 {
  border-bottom: 2px solid var(--accent-cyan);
}

.t-3 {
  border-bottom: 2px solid #f59e0b; /* Amber/Orange */
}

.t-4 {
  border-bottom: 2px solid #10b981; /* Emerald/Green */
}

.t-5 {
  border-bottom: 2px solid var(--primary-fuchsia); /* Fuchsia/Pink */
}

.t-6 {
  border-bottom: 2px solid #ef4444; /* Red */
}

.t-7 {
  border-bottom: 2px solid #3b82f6; /* Blue */
}

/* === MAIN CONTENT (POSTS) === */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(to right, #fff, #666);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.posts-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

/* Staggered animation delay for up to 20 items */
.post-card:nth-child(1) {
  animation-delay: 0.1s;
}

.post-card:nth-child(2) {
  animation-delay: 0.15s;
}

.post-card:nth-child(3) {
  animation-delay: 0.2s;
}

.post-card:nth-child(4) {
  animation-delay: 0.25s;
}

.post-card:nth-child(5) {
  animation-delay: 0.3s;
}

.post-card:nth-child(6) {
  animation-delay: 0.35s;
}

.post-card:nth-child(n+7) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-violet), var(--primary-fuchsia));
  opacity: 0;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glass);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #fff;
  line-height: 1.3;
}

.post-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn-outline {
  align-self: flex-start;
  text-decoration: none;
  font-weight: 600;
  color: var(--primary-fuchsia);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-outline::after {
  content: '→';
  transition: transform 0.3s ease;
}

.btn-outline:hover::after {
  transform: translateX(5px);
}

/* === TOPIC PAGE NAVIGATION === */
.topic-nav {
  position: sticky;
  top: 1rem;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-home {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-fuchsia);
}

/* === MULTI-COLUMN FOOTER === */

/* === SIMPLIFIED FOOTER === */
.main-footer {
  background-color: #050505;
  border-top: 1px solid var(--border-glass);
  padding: 3rem 2rem;
  margin-top: 5rem;
  position: relative;
  overflow: hidden;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-violet), transparent);
  opacity: 0.5;
}

.footer-simple-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.brand-name {
  background: linear-gradient(to right, #fff, var(--primary-fuchsia));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.copyright {
  color: #555;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-family: monospace;
}

.footer-actions {
  display: flex;
  gap: 1rem;
}

.footer-btn {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-violet);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.15);
}

/* === ANIMATIONS === */
.cursor {
  animation: blink 0.8s infinite;
  color: var(--primary-fuchsia);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .bento-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .brand-box {
    grid-column: 1 / -1;
    min-height: auto;
    text-align: center;
    justify-content: center;
  }

  .profile-box {
    grid-column: 1 / -1;
  }

  .profile-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-links {
    justify-content: center;
  }

  .topics-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col p {
    margin: 0 auto 1.5rem auto;
  }
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .bento-wrapper {
    display: flex;
    flex-direction: column;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .topics-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* === PJP BRAND === */
.pjp-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #8b5cf6; /* Purple-500 equivalent */
    display: inline-block;
    animation: pjpPulse 2s infinite ease-in-out;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

@keyframes pjpPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 20px rgba(139, 92, 246, 0.8), 0 0 40px rgba(139, 92, 246, 0.4);
    }
}