:root {
  --bg: #fbfaf7;
  --bg-elevated: rgba(255, 255, 255, 0.85);
  --border: rgba(22, 101, 52, 0.12);
  --border-hover: rgba(244, 63, 94, 0.45);
  --text: #18221c;
  --muted: #526358;
  --accent: #16a34a;
  --accent-2: #f43f5e;
  --accent-3: #f59e0b;
  --sky: #0ea5e9;
  --shadow-soft: 0 18px 40px -15px rgba(24, 34, 28, 0.1);
  --mouse-x: 50%;
  --mouse-y: 50%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(at 12% 10%, rgba(254, 205, 211, 0.48) 0px, transparent 48%),
    radial-gradient(at 88% 15%, rgba(186, 230, 253, 0.48) 0px, transparent 50%),
    radial-gradient(at 50% 85%, rgba(187, 247, 208, 0.45) 0px, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

#sakuraCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(244, 63, 94, 0.08),
    rgba(22, 163, 74, 0.05) 45%,
    transparent 80%
  );
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Navbar Blanca Cristal */
nav {
  position: sticky;
  top: 1.25rem;
  z-index: 50;
  margin: 1.25rem auto 0;
  max-width: 1040px;
  padding: 0 1.5rem;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.4rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(22, 101, 52, 0.14);
  border-radius: 20px;
  box-shadow: 0 12px 30px -12px rgba(24, 34, 28, 0.12);
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-word {
  display: inline-flex;
  letter-spacing: -0.02em;
}

.brand-word span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Hero */
.hero {
  padding: 5rem 0 3.8rem;
  text-align: left;
  position: relative;
}

.hero-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #be123c;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
}

.greeting-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(24, 34, 28, 0.08);
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(120deg, #15803d 10%, #0ea5e9 55%, #f43f5e 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typing-wrapper {
  display: inline-block;
  color: var(--accent-2);
  border-right: 2.5px solid var(--accent-2);
  padding-right: 4px;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 49% { border-color: var(--accent-2); }
  50%, 100% { border-color: transparent; }
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.88rem 1.65rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #16a34a, #059669);
  color: #ffffff;
  box-shadow: 0 10px 25px -6px rgba(22, 163, 74, 0.38);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(22, 163, 74, 0.52);
}

.btn-glass {
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(24, 34, 28, 0.14);
  box-shadow: 0 6px 18px -6px rgba(24, 34, 28, 0.08);
}

.btn-glass:hover {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
  transform: translateY(-2px);
}

/* Terminal Interactiva */
.terminal-box {
  margin: 1.5rem 0 5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(22, 101, 52, 0.16);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.terminal-header {
  background: linear-gradient(90deg, #f0fdf4, #fff1f2, #f0f9ff);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 34, 28, 0.08);
}

.window-dots {
  display: flex;
  gap: 0.45rem;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #fb7185; }
.window-dots span:nth-child(2) { background: #fbbf24; }
.window-dots span:nth-child(3) { background: #34d399; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

.terminal-body {
  padding: 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  color: var(--text);
}

.terminal-output {
  min-height: 135px;
  max-height: 270px;
  overflow-y: auto;
  margin-bottom: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  white-space: pre-wrap;
}

.cmd-line { color: #e11d48; font-weight: 600; }
.cmd-response {
  color: #374151;
  padding-left: 0.7rem;
  border-left: 2.5px solid #22c55e;
  line-height: 1.5;
}

.terminal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #16a34a;
  color: #ffffff;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-top: 1px solid rgba(24, 34, 28, 0.08);
  padding-top: 0.8rem;
}

.terminal-input-row span {
  color: #16a34a;
  font-weight: 700;
}

.terminal-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
}

/* Bento Grid con Tilt 3D */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid rgba(24, 34, 28, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.48rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.tab-btn:not(.active):hover {
  color: var(--text);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.35rem;
  margin-bottom: 5rem;
  perspective: 1000px;
}

.bento-card {
  position: relative;
  background: var(--bg-elevated);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(24, 34, 28, 0.1);
  border-radius: 24px;
  padding: 1.9rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--card-x, 50%) var(--card-y, 50%),
    rgba(244, 63, 94, 0.09),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 24px 48px -15px rgba(244, 63, 94, 0.18);
}

.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }

@media (max-width: 820px) {
  .col-7, .col-5, .col-6 { grid-column: span 12; }
  .nav-links a.hide-mobile { display: none; }
}

.card-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  width: fit-content;
}

.badge-green {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.badge-pink {
  color: #be123c;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
}

.badge-sky {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.badge-amber {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.bento-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.bento-card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}

/* Visualizador de Audio */
.audio-widget {
  background: linear-gradient(135deg, #fff1f2, #fefce8);
  border: 1px solid #fecdd3;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: auto;
}

.play-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 6px 15px rgba(244, 63, 94, 0.35);
  transition: transform 0.2s ease;
}

.play-toggle:hover {
  transform: scale(1.08);
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  width: 68px;
  flex-shrink: 0;
}

.bar {
  flex: 1;
  background: linear-gradient(to top, #16a34a, #f43f5e);
  border-radius: 4px;
  height: 22%;
  transition: height 0.15s ease;
}

.equalizer.playing .bar {
  animation: bounceBar 0.7s infinite ease-in-out alternate;
}

.equalizer.playing .bar:nth-child(odd) { animation-duration: 0.55s; }
.equalizer.playing .bar:nth-child(2n) { animation-delay: 0.15s; }
.equalizer.playing .bar:nth-child(3n) { animation-delay: 0.3s; }

@keyframes bounceBar {
  0% { height: 20%; }
  100% { height: 100%; }
}

.widget-track-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  color: #be123c;
  text-align: right;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Contacto */
.connect-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 253, 244, 0.92));
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 28px;
  padding: 3.2rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-soft);
}

.connect-box h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.connect-box p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

footer {
  border-top: 1px solid rgba(24, 34, 28, 0.1);
  padding: 2rem 0 5.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Reproductor Multi-Pista Flotante */
.ac-player {
  position: fixed;
  bottom: 1.4rem;
  left: 1.4rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #86efac;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(22, 101, 52, 0.18);
  transition: all 0.25s ease;
  max-width: calc(100vw - 2.8rem);
}

.ac-player:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(22, 101, 52, 0.24);
}

.ac-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #16a34a;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ac-btn:hover {
  transform: scale(1.08);
  background: #15803d;
}

.ac-next {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.ac-next:hover {
  background: #dcfce7;
  transform: scale(1.08);
}

.ac-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 155px;
}

.ac-select {
  font-family: 'Inter', sans-serif;
  font-size: 0.79rem;
  font-weight: 700;
  color: #14532d;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding-right: 4px;
  max-width: 225px;
}

.ac-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem;
  color: #16a34a;
}

.ac-vol {
  width: 54px;
  accent-color: #16a34a;
  cursor: pointer;
}

@media (max-width: 540px) {
  .ac-vol { display: none; }
  .ac-select { max-width: 165px; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: #ffffff;
  color: var(--text);
  border: 1.5px solid #16a34a;
  padding: 0.85rem 1.3rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 15px 35px rgba(24, 34, 28, 0.15);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}