/* ═══════════════════════════════════════════════════
   SUPER PORTFOLIO BROS — CSS Design System
   ═══════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  /* Mario Colors */
  --mario-red: #e52521;
  --mario-blue: #049cd8;
  --mario-yellow: #fbd000;
  --mario-green: #43b047;
  --mario-brown: #8c5523;
  --mario-orange: #f58220;

  /* Level Palettes */
  --sky-top: #6b9eff;
  --sky-bottom: #9dc8ff;
  --underground-bg: #0d0d0d;
  --underground-brick: #8c5523;
  --overworld-bg: #5c94fc;
  --overworld-ground: #43b047;
  --castle-bg: #0a0a0a;
  --castle-brick: #3a2a1a;
  --lava-color: #ff4500;

  /* UI */
  --pixel-font: 'Press Start 2P', monospace;
  --body-font: 'Inter', system-ui, -apple-system, sans-serif;
  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(0, 0, 0, 0.7);
  --glass-blur: 12px;

  /* Spacing */
  --section-pad: 100px 24px;
  --container-max: 1100px;

  /* Transitions */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--body-font);
  color: var(--text-primary);
  background: #000;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scroll Progress Bar ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--mario-red), var(--mario-yellow), var(--mario-green));
  z-index: 10000;
  transition: width 0.1s linear;
}

/* ─── Animations ─── */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes blink-slow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes float-block {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes cloud-drift {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(calc(100vw + 120%));
  }
}

@keyframes walk-cycle {
  0% {
    transform: translateX(-100px) scaleX(1);
  }

  48% {
    transform: translateX(calc(100vw + 50px)) scaleX(1);
  }

  49% {
    transform: translateX(calc(100vw + 50px)) scaleX(-1);
  }

  50% {
    transform: translateX(calc(100vw + 50px)) scaleX(-1);
  }

  98% {
    transform: translateX(-100px) scaleX(-1);
  }

  99% {
    transform: translateX(-100px) scaleX(1);
  }

  100% {
    transform: translateX(-100px) scaleX(1);
  }
}

@keyframes progress-fill {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }

  60% {
    transform: translateY(-4px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lava-pulse {

  0%,
  100% {
    opacity: 0.7;
    background-position: 0 0;
  }

  50% {
    opacity: 1;
    background-position: 30px 0;
  }
}

@keyframes level-complete-entrance {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }

  60% {
    transform: scale(1.1) rotate(2deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.blink {
  animation: blink 1s step-end infinite;
}

.blink-slow {
  animation: blink-slow 2s ease-in-out infinite;
}

/* ─── Utility ─── */
.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.level-tag {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: var(--mario-yellow);
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.section-title {
  font-family: var(--pixel-font);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: #fff;
  margin-bottom: 48px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  line-height: 1.8;
}

.title-accent {
  color: var(--mario-yellow);
}

/* ═══════════════════════════════════════════════════
   LOADING SCREEN (NIVEL 0)
   ═══════════════════════════════════════════════════ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  padding: 24px;
}

.loading-subtitle {
  font-family: var(--pixel-font);
  font-size: clamp(0.7rem, 2.5vw, 1.2rem);
  color: var(--mario-yellow);
  margin-bottom: 40px;
  text-shadow: 2px 2px 0 var(--mario-red);
  letter-spacing: 3px;
}

.loading-bar-container {
  width: min(320px, 80vw);
  height: 16px;
  background: #333;
  border: 2px solid #555;
  border-radius: 2px;
  margin: 0 auto 32px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mario-green), var(--mario-yellow));
  animation: progress-fill 1.5s ease-out forwards;
  border-radius: 1px;
}

.loading-text {
  font-family: var(--pixel-font);
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.loading-name {
  font-family: var(--pixel-font);
  font-size: clamp(1rem, 4vw, 1.8rem);
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 var(--mario-blue);
}

.loading-role {
  font-family: var(--pixel-font);
  font-size: clamp(0.5rem, 1.5vw, 0.7rem);
  color: var(--mario-blue);
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.loading-cta {
  font-family: var(--pixel-font);
  font-size: clamp(0.45rem, 1.2vw, 0.6rem);
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.loading-coins {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════════════ */
.main-header {
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  z-index: 9000;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.main-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.nav-mario {
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}

.nav-name {
  font-family: var(--pixel-font);
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s var(--ease-smooth);
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  color: var(--mario-yellow);
  background: rgba(251, 208, 0, 0.1);
}

/* Hamburger */
.nav-toggle {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 100;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Sound toggle */
.sound-toggle {
  background: none;
  border: 1px solid var(--card-border);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════
   NIVEL 1 — HERO (WORLD 1-1)
   ═══════════════════════════════════════════════════ */
.level {
  position: relative;
  overflow: hidden;
}

.level-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%, var(--overworld-ground) 92%, #5a3a1a 100%);
  padding: var(--section-pad);
}

/* Clouds */
.clouds-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow:
    20px 10px 0 10px rgba(255, 255, 255, 0.9),
    -20px 10px 0 10px rgba(255, 255, 255, 0.9),
    0 15px 0 15px rgba(255, 255, 255, 0.9);
}

.cloud-1 {
  width: 80px;
  height: 40px;
  top: 10%;
  animation: cloud-drift 25s linear infinite;
}

.cloud-2 {
  width: 60px;
  height: 30px;
  top: 20%;
  animation: cloud-drift 35s linear infinite 5s;
}

.cloud-3 {
  width: 100px;
  height: 50px;
  top: 5%;
  animation: cloud-drift 30s linear infinite 10s;
}

.cloud-4 {
  width: 50px;
  height: 25px;
  top: 30%;
  animation: cloud-drift 40s linear infinite 18s;
}

.cloud-5 {
  width: 70px;
  height: 35px;
  top: 15%;
  animation: cloud-drift 28s linear infinite 13s;
}

/* Ground */
.ground-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background:
    repeating-linear-gradient(90deg,
      var(--mario-brown) 0px,
      var(--mario-brown) 30px,
      #6b3a12 30px,
      #6b3a12 32px);
  border-top: 4px solid #3a2010;
}

.ground-row::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--mario-green);
}

/* Pipes */
.pipe {
  position: absolute;
  bottom: 60px;
  width: 50px;
  height: 70px;
  background: linear-gradient(90deg, #1a8c1a, #2ecc40, #1a8c1a);
  border-radius: 4px 4px 0 0;
  z-index: 1;
}

.pipe::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -6px;
  width: 62px;
  height: 20px;
  background: linear-gradient(90deg, #1a8c1a, #2ecc40, #1a8c1a);
  border-radius: 4px;
  border: 2px solid #0d5c0d;
}

.pipe-left {
  left: 8%;
}

.pipe-right {
  right: 10%;
}

/* Mario sprite */
.mario-sprite {
  position: absolute;
  bottom: 80px;
  font-size: 2rem;
  animation: walk-cycle 12s linear infinite;
  z-index: 3;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
}

/* Question blocks */
.question-blocks {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 50px;
}

.q-block {
  width: 40px;
  height: 40px;
  background: var(--mario-yellow);
  border: 3px solid var(--mario-brown);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  animation: float-y 3s ease-in-out infinite;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.2), 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.q-block-2 {
  animation-delay: 0.5s;
}

.q-block-3 {
  animation-delay: 1s;
}

/* Hero content */
.hero-content {
  text-align: center;
  position: relative;
  z-index: 5;
  max-width: 700px;
}

.hero-level-tag {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: var(--mario-yellow);
  margin-bottom: 16px;
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-family: var(--pixel-font);
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 4px 4px 0 var(--mario-red), 6px 6px 0 rgba(0, 0, 0, 0.3);
  line-height: 1.4;
}

.hero-subtitle {
  font-family: var(--pixel-font);
  font-size: clamp(0.45rem, 1.5vw, 0.7rem);
  color: var(--mario-yellow);
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 2;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-family: var(--body-font);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 550px;
  margin: 0 auto 36px;
  line-height: 1.7;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-cta {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 0.65rem;
  color: #000;
  background: var(--mario-yellow);
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s var(--ease-bounce);
  box-shadow: 0 4px 0 #b89600, 0 8px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.hero-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 #b89600, 0 12px 30px rgba(0, 0, 0, 0.4);
  background: #ffe040;
}

.hero-cta:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b89600;
}

/* ═══════════════════════════════════════════════════
   NIVEL 2 — SKILLS (WORLD 1-2) — Underground
   ═══════════════════════════════════════════════════ */
.level-underground {
  background: var(--underground-bg);
  padding: var(--section-pad);
  position: relative;
}

.brick-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background:
    repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 28px,
      #665533 28px,
      #665533 30px),
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 58px,
      #665533 58px,
      #665533 60px);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s var(--ease-bounce);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251, 208, 0, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--mario-yellow);
  box-shadow: 0 12px 40px rgba(251, 208, 0, 0.1), 0 0 0 1px var(--mario-yellow);
}

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

.skill-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 14px;
  transition: transform 0.3s var(--ease-bounce);
}

.skill-card:hover .skill-icon {
  transform: scale(1.2);
}

.skill-name {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--text-secondary);
  line-height: 1.8;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════
   NIVEL 3 — PROYECTOS (WORLD 2-1) — Overworld
   ═══════════════════════════════════════════════════ */
.level-overworld {
  background: linear-gradient(180deg, var(--overworld-bg) 0%, #4a7af0 100%);
  padding: var(--section-pad);
  position: relative;
}

.floating-blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.f-block {
  position: absolute;
  width: 35px;
  height: 35px;
  background: var(--mario-brown);
  border: 2px solid #5a3a1a;
  border-radius: 3px;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.3);
  animation: float-block 5s ease-in-out infinite;
}

.f-block-1 {
  top: 15%;
  left: 5%;
  animation-delay: 0s;
}

.f-block-2 {
  top: 40%;
  right: 8%;
  animation-delay: 1.5s;
}

.f-block-3 {
  bottom: 20%;
  left: 12%;
  animation-delay: 3s;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent, var(--mario-yellow));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card--coming {
  opacity: 0.5;
  border-style: dashed;
}

.project-card--coming:hover {
  opacity: 0.7;
  transform: none;
}

.project-thumbnail {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-thumbnail--coming {
  background: #1a1a1a !important;
}

.project-emoji {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s var(--ease-bounce);
}

.project-card:hover .project-emoji {
  transform: scale(1.15) rotate(-5deg);
}

.project-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.6;
}

.project-desc {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  flex: 1;
}

.coming-text {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--mario-yellow);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-family: var(--pixel-font);
  font-size: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mario-yellow);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(251, 208, 0, 0.15);
  letter-spacing: 0.5px;
}

.project-link {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--mario-yellow);
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.project-link:hover {
  color: #ffe040;
  text-shadow: 0 0 8px rgba(251, 208, 0, 0.4);
}

/* ═══════════════════════════════════════════════════
   NIVEL 4 — BEHANCE (WORLD 2-2)
   ═══════════════════════════════════════════════════ */
.level-behance {
  background: linear-gradient(180deg, #0a0a2e 0%, #151545 100%);
  padding: var(--section-pad);
}

.behance-alt-text {
  font-family: var(--body-font);
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.behance-iframe-container {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  margin-bottom: 24px;
}

.behance-iframe-container iframe {
  display: block;
  border: none;
}

.behance-fallback {
  text-align: center;
  padding: 16px;
}

.behance-fallback p {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.behance-btn {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: #000;
  background: #053eff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s var(--ease-bounce);
  box-shadow: 0 4px 0 #0030c0;
}

.behance-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #0030c0;
  color: #fff;
}

/* ═══════════════════════════════════════════════════
   NIVEL 5 — SOBRE MÍ (WORLD 3-1) — Timeline
   ═══════════════════════════════════════════════════ */
.level-story {
  background: linear-gradient(180deg, #1a0a30 0%, #0d0620 100%);
  padding: var(--section-pad);
}

.timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-left: 50px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--mario-red), var(--mario-yellow), var(--mario-green), var(--mario-blue));
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 4px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--mario-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
  box-shadow: 0 0 20px rgba(251, 208, 0, 0.2);
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: rgba(251, 208, 0, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-title {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: var(--mario-yellow);
  margin-bottom: 8px;
  line-height: 1.6;
}

.timeline-desc {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Fade in animation */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-smooth);
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   NIVEL 6 — CONTACTO (WORLD 4-4) — Castle
   ═══════════════════════════════════════════════════ */
.level-castle {
  background: var(--castle-bg);
  padding: var(--section-pad);
  position: relative;
}

.castle-bricks {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background:
    repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 38px,
      #8b4513 38px,
      #8b4513 40px),
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 78px,
      #8b4513 78px,
      #8b4513 80px);
  pointer-events: none;
}

.lava-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #ff4500, #ff6a00, #ff4500, #ff2200, #ff4500);
  background-size: 60px 8px;
  animation: lava-pulse 2s ease-in-out infinite;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: var(--mario-yellow);
  letter-spacing: 1px;
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 18px;
  color: #fff;
  font-family: var(--body-font);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
  border-color: var(--mario-yellow);
  box-shadow: 0 0 0 3px rgba(251, 208, 0, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: #000;
  background: var(--mario-red);
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease-bounce);
  box-shadow: 0 4px 0 #a01a18, 0 8px 25px rgba(229, 37, 33, 0.3);
  align-self: center;
  letter-spacing: 1px;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #a01a18, 0 14px 35px rgba(229, 37, 33, 0.4);
  background: #ff3530;
  color: #fff;
}

.form-submit:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a01a18;
}

/* Level Complete */
.level-complete {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.level-complete.show {
  display: flex;
}

.level-complete-content {
  text-align: center;
  animation: level-complete-entrance 0.8s var(--ease-bounce) forwards;
}

.level-complete-title {
  font-family: var(--pixel-font);
  font-size: clamp(1rem, 4vw, 2rem);
  color: var(--mario-yellow);
  margin-bottom: 16px;
  text-shadow: 3px 3px 0 var(--mario-red);
}

.level-complete-text {
  font-family: var(--body-font);
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.level-complete-score {
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  color: var(--mario-green);
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.social-link {
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-bounce);
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  color: var(--mario-yellow);
  border-color: var(--mario-yellow);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(251, 208, 0, 0.15);
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.main-footer {
  background: #000;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--card-border);
}

.footer-text {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-sub {
  font-family: var(--pixel-font);
  font-size: 0.4rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
  line-height: 2;
}

/* ═══════════════════════════════════════════════════
   MINI-GAME
   ═══════════════════════════════════════════════════ */
.minigame-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--mario-yellow);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--ease-bounce);
}

.minigame-container:hover {
  transform: scale(1.05);
}

.minigame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 8px;
  font-family: var(--pixel-font);
  font-size: 0.45rem;
  color: var(--mario-yellow);
}

.minigame-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.minigame-close:hover {
  color: var(--mario-red);
  background: rgba(255, 255, 255, 0.1);
}

#minigameCanvas {
  border-radius: 6px;
  cursor: pointer;
  image-rendering: pixelated;
  display: block;
}

.minigame-hint {
  font-family: var(--pixel-font);
  font-size: 0.35rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════
   EASTER EGG MODAL
   ═══════════════════════════════════════════════════ */
.easter-egg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.easter-egg-modal.show {
  display: flex;
}

.easter-egg-content {
  text-align: center;
  animation: level-complete-entrance 0.6s var(--ease-bounce);
}

.easter-egg-title {
  font-family: var(--pixel-font);
  font-size: clamp(1.2rem, 5vw, 2.5rem);
  color: var(--mario-yellow);
  text-shadow: 3px 3px 0 var(--mario-red);
  margin-bottom: 12px;
}

.easter-egg-text {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.easter-egg-btn {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: #000;
  background: var(--mario-yellow);
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: all 0.3s var(--ease-bounce);
  box-shadow: 0 4px 0 #b89600;
}

.easter-egg-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #b89600;
}

.easter-egg-close {
  display: block;
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.easter-egg-close:hover {
  border-color: var(--mario-red);
  color: var(--mario-red);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --section-pad: 70px 16px;
  }

  /* Nav */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right 0.4s var(--ease-smooth);
    border-left: 1px solid var(--card-border);
    z-index: 90;
  }

  .nav-toggle:checked~.nav-links {
    right: 0;
  }

  .nav-toggle:checked~.nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle:checked~.nav-hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked~.nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-links a {
    font-size: 0.6rem;
    padding: 14px 16px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .pipe {
    display: none;
  }

  .question-blocks {
    display: none;
  }

  .hero-content {
    padding: 0 8px;
  }

  /* Mini-game */
  .minigame-container {
    bottom: 12px;
    right: 12px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .minigame-container:hover {
    transform: scale(0.9);
  }

  /* Timeline */
  .timeline {
    padding-left: 40px;
  }

  .timeline-marker {
    left: -34px;
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  /* Loading coins */
  .loading-coins {
    gap: 20px;
    font-size: 0.4rem;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 20px 12px;
  }

  .skill-icon {
    font-size: 1.8rem;
  }

  .skill-name {
    font-size: 0.45rem;
  }

  .project-thumbnail {
    height: 120px;
  }

  .nav-container {
    padding: 10px 16px;
    border-radius: 12px;
  }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════
   UX RECRUITMENT FLOW — CUSTOM STYLES
   ═══════════════════════════════════════════════════ */

.pixel-card {
  background: rgba(0, 0, 0, 0.85);
  border: 4px solid #fff;
  padding: 24px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  max-width: 450px;
}

.pixel-card h2,
.pixel-card h3 {
  font-family: var(--pixel-font);
  font-size: 0.9rem;
  color: var(--mario-yellow);
  margin-bottom: 20px;
  line-height: 1.5;
  text-transform: uppercase;
}

.pixel-card p {
  font-family: var(--body-font);
  font-size: 1rem;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 12px;
}

.skill-card .icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
  text-align: center;
}

.timeline-card .timeline-item {
  border-left: 3px dashed var(--mario-blue);
  padding-left: 20px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: #ddd;
}

.timeline-card .timeline-item strong {
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.project-modal {
  text-align: center;
}

.project-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.project-tags span {
  background: var(--mario-blue);
  color: #fff;
  padding: 6px 14px;
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  border-radius: 4px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.pixel-link-btn {
  background: var(--mario-red);
  color: white;
  border: none;
  font-family: var(--pixel-font);
  font-size: 0.65rem;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #800;
  margin-top: 24px;
  transition: transform 0.1s;
}

.pixel-link-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #800;
  background: #ff3333;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

.pixel-link-alt {
  display: block;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-family: var(--pixel-font);
  font-size: 0.75rem;
  padding: 18px;
  text-align: center;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 var(--mario-yellow);
  transition: all 0.2s;
}

.pixel-link-alt:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0 var(--mario-red);
  color: var(--mario-red);
}